[GRASS-dev] compilation of grass on AIX 7.1

Markus Metz markus.metz.giswork at gmail.com
Wed Jun 26 12:04:59 PDT 2013


On Wed, Jun 26, 2013 at 7:40 PM, Markus Neteler <neteler at osgeo.org> wrote:
> On Wed, Jun 26, 2013 at 1:13 AM, Glynn Clements
> <glynn at gclements.plus.com> wrote:
>>
>> Markus Neteler wrote:
>>
>>> -bash-3.2$ cd /gpfs/home/neteler/software/grass-7.0.svn/raster/r.terraflow
>>
>>> ld: 0711-317 ERROR: Undefined symbol: .std::basic_filebuf<char,
>>> std::char_traits<char> >::open64(char const*, std::_Ios_Openmode)
>>
>> This appears to be a problem with g++ on AIX, caused by AIX having
>> "#define open open64" in one of its headers:
>>
>>         http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01957.html
>>
>> It might be possible to work around this with e.g.:
>>
>>         #include <fcntl.h>
>>         #undef open
>
> Markus Metz figured it out, fixed locally (see attachment).
> Submit or not?

The fix is based on the hack proposed in

http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01957.html

which is IMHO a hack, not a fix. Anyway, the hack has been applied to
later versions of gcc. Therefore I would suggest to not submit the
local hack for r.terraflow, but suggest to add the patch to

http://grasswiki.osgeo.org/wiki/Compile_and_Install#AIX

Anybody who wants to compile C++ modules using open() on AIX with LFS
and a buggy gcc can then apply the patch. The patch seems to be too
specialized to warrant submission to trunk even though no fixed gcc
seems to be available for AIX, yet.

Markus M

PS: AIX is apparently deviating from UNIX standards so far that it can
hardly be called a UNIX system any more...

>
> GRASS' LFS support on AIX7 also fixed also in
> http://trac.osgeo.org/grass/changeset/56936
>
> Now trying to get shared libraries enabled (almost there).
>
> Markus
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev


More information about the grass-dev mailing list