[GRASS-dev] compilation of grass on AIX 7.1

Glynn Clements glynn at gclements.plus.com
Wed Jun 12 12:48:17 PDT 2013


Markus Neteler wrote:

> * AIX namespace pollutions:
> /gpfs/home/neteler/software/grass-7.0.svn/lib/rst/interp_float
> /gpfs/home/neteler/software/grass-7.0.svn/raster/r.resamp.rst
> /gpfs/home/neteler/software/grass-7.0.svn/vector/v.surf.rst
> /gpfs/home/neteler/software/grass-7.0.svn/vector/v.vol.rst
> 
> gmake[1]: Entering directory
> `/gpfs/home/neteler/software/grass-7.0.svn/lib/rst/interp_float'
> gcc  -g -O2    -I/gpfs/home/neteler/software/grass-7.0.svn/dist.powerpc-ibm-aix7.1.0.0/include
> -I/gpfs/home/neteler/software/grass-7.0.svn/dist.powerpc-ibm-aix7.1.0.0/include
>  -D_FILE_OFFSET_BITS=64 -I/gpfs/home/neteler/bin/include
> -DPACKAGE=\""grasslibs"\"
> -I/gpfs/home/neteler/software/grass-7.0.svn/dist.powerpc-ibm-aix7.1.0.0/include
> -I/gpfs/home/neteler/software/grass-7.0.svn/dist.powerpc-ibm-aix7.1.0.0/include
> -o OBJ.powerpc-ibm-aix7.1.0.0/point2d.o -c point2d.c
> point2d.c: In function 'IL_check_at_points_2d':
> point2d.c:54:43: error: expected identifier or '(' before numeric constant

Likely case: "#define hz ..." in one of the headers. Use -std=c89 then
figure out which -D switches are needed to re-enable POSIX.

> * "System error: Not enough space"
> /gpfs/home/neteler/software/grass-7.0.svn/raster/simwe/r.sim.water
> /gpfs/home/neteler/software/grass-7.0.svn/raster/simwe/r.sim.sediment

I think that this may be due to simlib/hydro.c defining some unusually
large static arrays:

	double vavg[MAXW][2], stack[MAXW][3], w[MAXW][3]; 
	int iflag[MAXW];

waterglobs.h has:

	#define MAXW    7000000

so that's 56 million doubles and 7 million ints = 476 MB. If AIX has a
limit on the size of the BSS segment, this is a prime candidate for
exceeding it.

It should be simple to confirm whether this is the case: reduce the
value of MAXW by a factor of 100 and see if the errors disappear.

If so, consider replacing the arrays with:

	double (*vavg)[2], (*stack)[3], (*w)[3]; 
	int *iflag;

then allocating the arrays with G_calloc() at run time.

>     import grass.lib.vector as vector
> ImportError: No module named lib.vector

$GISBASE/etc/python/grass/__init__.py has this:

	__all__ = ["script", "temporal"]
	if os.path.exists(os.path.join(os.path.dirname(__file__), "lib", "__init__.py")):
	    __all__.append("lib")

Check that $GISBASE/etc/python/grass/lib/__init__.py exists. If it
doesn't, that suggests a problem with building lib/python/ctypes. If
it does, there's a problem with the logic in __init__.py.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list