[gdal-dev] error compiling 2.4.0 on RHEL7

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] error compiling 2.4.0 on RHEL7

John Cartwright - NOAA Federal
Hello All,

I'm having trouble compiling 2.4.0 on a RHEL 7.6 machine.  Errors like:

linkhash.c:43:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘unsigned’
 unsigned long lh_char_hash(const void *k)

Compile options are listed below.  Any suggestions?

Thanks!

--john


./configure --prefix=$CONTRIB \
  --with-png=internal \
  --with-libtiff=internal \
  --with-geotiff=internal \
  --with-jpeg=internal \
  --with-gif=internal \
  --with-pg=/usr/bin/pg_config \
  --with-hdf5=$CONTRIB/lib \
  --with-oci=$ORACLE_HOME \
  --with-oci-include=/usr/include/oracle/11.2/client64 \
  --with-oci-lib=$ORACLE_HOME/lib \
  --with-netcdf \
  --with-libjson-c=internal \
  --with-geos=$CONTRIB/bin/geos-config \
  --with-java=yes

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: error compiling 2.4.0 on RHEL7

Even Rouault-2
On jeudi 31 janvier 2019 16:09:40 CET John Cartwright - NOAA Federal wrote:
> Hello All,
>
> I'm having trouble compiling 2.4.0 on a RHEL 7.6 machine.  Errors like:
>
> linkhash.c:43:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
> before ‘unsigned’
>  unsigned long lh_char_hash(const void *k)
>
> Compile options are listed below.  Any suggestions?

The token preceding the error where the compilation error occurs is
CPL_NOSANITIZE_UNSIGNED_INT_OVERFLOW , which is defined in cpl_port.h and
should expand to nothing with GCC
My hypothesis is that you might have a cpl_port.h file from an older GDAL
version (2.2 or older) somewhere in the filesystem that is also in the include
paths for this file.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: error compiling 2.4.0 on RHEL7

John Cartwright - NOAA Federal
That does seem to have been the problem.  Thanks so much for the suggestion!

--john


On Fri, Feb 1, 2019 at 2:05 AM Even Rouault <[hidden email]> wrote:
On jeudi 31 janvier 2019 16:09:40 CET John Cartwright - NOAA Federal wrote:
> Hello All,
>
> I'm having trouble compiling 2.4.0 on a RHEL 7.6 machine.  Errors like:
>
> linkhash.c:43:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
> before ‘unsigned’
>  unsigned long lh_char_hash(const void *k)
>
> Compile options are listed below.  Any suggestions?

The token preceding the error where the compilation error occurs is
CPL_NOSANITIZE_UNSIGNED_INT_OVERFLOW , which is defined in cpl_port.h and
should expand to nothing with GCC
My hypothesis is that you might have a cpl_port.h file from an older GDAL
version (2.2 or older) somewhere in the filesystem that is also in the include
paths for this file.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev