Hi Even, I switched to GCC 4.7.1 and I applied the tips from here:
http://grasswiki.osgeo.org/wiki/Talk:Compile_and_Install#AIX_7.x_compilation_hints One think I added to the compiler option is -maix64 but I am still getting some errors: In file included from cpl_vsi.h:61:0, from cpl_conv.h:36, from cpl_conv.cpp:33: /usr/include/unistd.h:1042:23: error: 'rid_t' was not declared in this scope /usr/include/unistd.h:1042:30: error: expected primary-expression before ']' token /usr/include/unistd.h:1042:33: error: expected primary-expression before 'int' /usr/include/unistd.h:1042:36: error: expression list treated as compound expression in initializer [-fpermissive] /usr/include/unistd.h:1043:30: error: 'rid_t' has not been declared It looks manageable. Let's see how it goes from here. Thanks, Ivan ________________________________________ From: Even Rouault <[email protected]> Sent: Sunday, February 7, 2016 3:29 AM To: [email protected] Cc: Ivan Lucena Subject: Re: [gdal-dev] fail to building GDAL in AIX 7.1 Le vendredi 05 février 2016 20:24:06, Ivan Lucena a écrit : > I am getting this error: > > > /usr/local/remote/packages/gcc_remote/4.2.1/bin/../lib/gcc/powerpc-ibm-aix5 > .2.0.0/4.2.1/../../../../include/c++/4.2.1/cmath:447: error: 'long double > std::tanh(long double)' conflicts with previous using declaration 'long > double tanh(long double)' gdalwarpkernel.cpp: In function 'void > GWKAverageOrModeThread(void*)': gdalwarpkernel.cpp:5017: error: call of > overloaded 'ceil(float)' is ambiguous /usr/include/math.h:975: note: > candidates are: long double ceil(long double) /usr/include/math.h:945: > note: float ceil(float) > /usr/include/math.h:345: note: double ceil(double) > > > I don't get this error when building with gcc 4.7.1 in a Linux 64 Intel > environment. > > > Is this error related to the gcc version or AIX? Any suggestions? Perhaps some incompatibility betwenn GCC cmath header and AIX /usr/include/math.h ? You could try removing #include <cmath> in that file and replacing the use of std::ceil() with just ceil(). This still builds on x86 : Index: alg/gdalwarpkernel.cpp =================================================================== --- alg/gdalwarpkernel.cpp (revision 33113) +++ alg/gdalwarpkernel.cpp (working copy) @@ -32,7 +32,6 @@ #include <vector> #include <algorithm> -#include <cmath> #include <cfloat> #include "gdalwarper.h" #include "gdal_alg_priv.h" @@ -5014,7 +5013,7 @@ if ( nCount > 0 ) { std::sort(dfValuesTmp.begin(), dfValuesTmp.end()); - int quantIdx = std::ceil(quant * dfValuesTmp.size() - 1); + int quantIdx = ceil(quant * dfValuesTmp.size() - 1); dfValueReal = dfValuesTmp[quantIdx]; dfBandDensity = 1; But this is a sign that the compilation environment is not sane and you may have other issues elsewhere, and you'd likely get even more problems with trunk gcc 4.2 is very ancient. Perhaps you need to upgrade to a more recent version to get it working on AIX. Looking at http://www.perzl.org/aix/index.php?n=Main.Gcc , gcc 4.2 & AIX 7.1 doesn't look as a supported combination (at least not by this site) Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
