[gdal-dev] compilation error - g++ unrecognized command line option

Even Rouault even.rouault at spatialys.com
Thu May 24 10:24:09 PDT 2018


On jeudi 24 mai 2018 16:59:14 CEST Conrad Bielski wrote:
> Hi,
> 
> I couldn't find anything on this topic, so I hope that somebody has an
> answer to this issue. It might be Python related but I don't see the link.
> 
> So I get the following errors when running make:
> g++: error: unrecognized command line option ‘-Wdate-time’
> g++: error: unrecognized command line option ‘-Wnull-dereference’
> g++: error: unrecognized command line option ‘-Wduplicated-cond’
> g++: error: unrecognized command line option ‘-Wfloat-conversion’
> make[1]: *** [cpl_conv.lo] Error 1
> make[1]: Leaving directory `/home/ec2-user/tools/gdal-2.3.0/port'
> make: *** [port-target] Error 2
> 
> The funny thing is that when running configure, I have the following
> results: checking whether C compiler accepts -Wdate-time... yes
> checking whether C compiler accepts -Wnull-dereference... yes
> checking whether C compiler accepts -Wduplicated-cond... yes
> checking whether C compiler accepts -Wfloat-conversion... yes
> 
> And I'm not sure where to look to fix this issue. I'm compiling on a Amazon
> Linux with gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2). The version of
> Python installed is Python 2.7.14.

Are you sure the g++ uses for make is the one used during ./configure ?
-Wdate-time should be accepted by gcc 7.2

I don't see the link with Python as the failure occurs when building 
cpl_conv.cpp, which is not in the Python bindings.

Even

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


More information about the gdal-dev mailing list