[GRASS-user] "GLdouble" syntax error when compiling GRASS 7.0.4

Hi list,

I’m trying to compile GRASS 7.0.4 on an HPC cluster running Red Hat Enterprise Linux 6.5. We use EasyBuild to manage our toolchain, and I’m compiling GRASS against numerous packages that I’ve previously built, such as PROJ4, GDAL, etc.

Unfortunately, during the compilation process, I get errors of this sort:

Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/ogsf.h:475: Syntax error at 'GLdouble'
Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/ogsf.h:475: Syntax error at ';'
Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/defs/ogsf.h:178: Syntax error at 'GLuint'
Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/defs/ogsf.h:445: Syntax error at 'gsd_set_font'

Because the objective is to convert data into graphical formats rather than displaying it, we don’t have OpenGL rendering; even the OpenGL libraries and headers are not available. However, I have attempted to disable OpenGL dependency using the --without-opengl configuration option; moreover, I see “checking whether to use OpenGL... no” in my configuration log.

It seems that GLdouble and so forth are OpenGL data types, and presumably therefore I can’t use them without supplying the OpenGL headers.

I’ve tried to find a way to disable OGSF and even NVIZ, thinking that maybe these are dependent on OpenGL in some way, but to no avail.

Is there something I’ve overlooked that will allow me to work around this problem and get on with a GRASS build without OpenGL?

Thanks,
Ben

Hi Ben,

On Tue, Jul 19, 2016 at 10:01 AM, Benjamin Roberts <ben@roberts.geek.nz> wrote:

Hi list,

I’m trying to compile GRASS 7.0.4 on an HPC cluster running Red Hat Enterprise Linux 6.5. We use EasyBuild to manage our toolchain, and I’m compiling GRASS against numerous packages that I’ve previously built, such as PROJ4, GDAL, etc.

Yes fine. BTW: are you aware of this page:

https://grasswiki.osgeo.org/wiki/Compile_and_Install

The closest might be
https://grasswiki.osgeo.org/wiki/Compile_and_Install#Scientific_Linux

which I have used for many years.

Unfortunately, during the compilation process, I get errors of this sort:

Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/ogsf.h:475: Syntax error at 'GLdouble'
Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/ogsf.h:475: Syntax error at ';'
Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/defs/ogsf.h:178: Syntax error at 'GLuint'
Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/defs/ogsf.h:445: Syntax error at 'gsd_set_font'

Because the objective is to convert data into graphical formats rather than displaying it, we don’t have OpenGL rendering; even the OpenGL libraries and headers are not available.

Is there a chance to install the RPM which contains GL/gl.h?
On my Fedora box that is the mesa-libGL-devel RPM.

However, I have attempted to disable OpenGL dependency using the --without-opengl configuration option; moreover, I see “checking whether to use OpenGL... no” in my configuration log.

ok, for fun I have removed the OpenGL headers on my Fedora box (along
with some dependent packages) and tried to reproduce your problem. So
I ended up with

  Cairo support: no
...
  OpenGL support: no
...
  wxWidgets support: no

Means, I used for configure:

...
  --with-cairo=no \
  --with-wxwidgets=no \
  --with-opengl=no \
...

Compiling it as that gave me no errors at all.

It seems that GLdouble and so forth are OpenGL data types, and presumably therefore I can’t use them without supplying the OpenGL headers.

Yes. Again, it should only be an RPM.

I’ve tried to find a way to disable OGSF and even NVIZ, thinking that maybe these are dependent on OpenGL in some way, but to no avail.

Is there something I’ve overlooked that will allow me to work around this problem and get on with a GRASS build without OpenGL?

Please check which configure switches you used.

Maybe send the full configure command to me off-list, in order to take
a look. And also config.log.

Best,
Markus

--
Markus Neteler
http://www.mundialis.de - free data with free software
http://grass.osgeo.org
http://courses.neteler.org/blog

Benjamin Roberts wrote:

I’m trying to compile GRASS 7.0.4 on an HPC cluster running Red Hat Enterprise Linux 6.5. We use EasyBuild to manage our toolchain, and I’m compiling GRASS against numerous packages that I’ve previously built, such as PROJ4, GDAL, etc.

Unfortunately, during the compilation process, I get errors of this sort:

Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/ogsf.h:475: Syntax error at 'GLdouble'
Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/ogsf.h:475: Syntax error at ';'
Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/defs/ogsf.h:178: Syntax error at 'GLuint'
Error: /home/brob695/.local/easybuild/build/GRASS/7.0.4/foss-2015a/grass-7.0.4/dist.x86_64-pc-linux-gnu/include/grass/defs/ogsf.h:445: Syntax error at 'gsd_set_font'

Could you provide some more context? Ideally everything after the
prior "Entering directory ..." line, to indicate which component is
being built and the command which is generate the errors.

Because the objective is to convert data into graphical formats
rather than displaying it, we don’t have OpenGL rendering; even the
OpenGL libraries and headers are not available. However, I have
attempted to disable OpenGL dependency using the --without-opengl
configuration option; moreover, I see “checking whether to use
OpenGL... no” in my configuration log.

In which case, GRASS ought to skip any component which requires
OpenGL.

I suspect that this arises from building the Python ctypes wrappers
for the OGSF and NVIZ libraries.

In which case, we should probably change the definition of MODULES in
lib/python/ctypes/Makefile to e.g.:

  MODULES = date gis raster gmath proj imagery vector rtree display stats \
    dbmi raster3d arraystats cluster vedit segment rowio temporal
  ifneq ($(USE_OPENGL),)
  MODULES += ogsf nviz
  endif

--
Glynn Clements <glynn@gclements.plus.com>

On Fri, Jul 22, 2016 at 11:21 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:
...

I suspect that this arises from building the Python ctypes wrappers
for the OGSF and NVIZ libraries.

In which case, we should probably change the definition of MODULES in
lib/python/ctypes/Makefile to e.g.:

        MODULES = date gis raster gmath proj imagery vector rtree display stats \
                dbmi raster3d arraystats cluster vedit segment rowio temporal
        ifneq ($(USE_OPENGL),)
        MODULES += ogsf nviz
        endif

to avoid that this gets lost, I have committed the change to trunk in r69098.
Backport candidate, I suppose.

Markus

On Sat, Aug 6, 2016 at 8:33 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Jul 22, 2016 at 11:21 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:
...

I suspect that this arises from building the Python ctypes wrappers
for the OGSF and NVIZ libraries.

In which case, we should probably change the definition of MODULES in
lib/python/ctypes/Makefile to e.g.:

        MODULES = date gis raster gmath proj imagery vector rtree display stats \
                dbmi raster3d arraystats cluster vedit segment rowio temporal
        ifneq ($(USE_OPENGL),)
        MODULES += ogsf nviz
        endif

to avoid that this gets lost, I have committed the change to trunk in r69098.
Backport candidate, I suppose.

Done for 7.2.svn and 7.0.svn.

Markus