[gdal-dev] compilation error - g++ unrecognized command line option
Conrad Bielski
conrad_bielski at yahoo.com
Fri May 25 09:08:57 PDT 2018
Hello,
just to close this topic. I was able to compile GDAL 3.2.0 using:
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
with no problems. So not sure what was happening with the gcc (GCC) 7.2.1 errors.
Thanks for your help,
Conrad
On Thursday, May 24, 2018, 9:20:25 PM GMT+1, Conrad Bielski <conrad_bielski at yahoo.com> wrote:
Thanks for the suggestion Even.
I checked the GCC with g++ --version and got the following:
gcc --version
gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)
which gcc
/usr/bin/gcc
[ec2-user at ip-172-31-22-101 gdal-2.3.0]$ /usr/bin/gcc --version
gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)
But still had the compilation errors.
So I decided to test using a newer version:
gcc --version
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
and it doesn't produce those errors! I'll keep you posted when the full compilation finishes...
Enjoy your evening,
Conrad
On Thursday, May 24, 2018, 6:24:13 PM GMT+1, Even Rouault <even.rouault at spatialys.com> wrote:
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180525/0dad969f/attachment.html>
More information about the gdal-dev
mailing list