[GRASS-dev] compilation of grass on AIX 7.1

Glynn Clements glynn at gclements.plus.com
Thu Mar 21 21:28:11 PDT 2013


Markus Neteler wrote:

> > I gained back access to an older AIX 5.3 system and try to compile
> > GRASS 7.svn:

> > "plot.c", line 34.15: 1506-343 (S) Redeclaration of nearest differs
> > from previous declaration on line 941 of "/usr/include/math.h".

> > Meanwhile I'll try the gcc compiler.

The issue is with the standard C library, so changing the compiler
probably won't help.

> Happens as well with gcc. I locally renamed the variable (yet to be fixed
> properly in SVN).

First, check:

> line 941 of "/usr/include/math.h"

It may be that the declaration is protected by a #ifdef and can be
"deactivated" with the appropriate switch.

> Next problem:
> 
> grass-7.0.svn/lib/datetime> make
> o /afs/cluster/myuser/private/software/grass-7.0.svn/dist.powerpc-ibm-aix5.3.0.0/lib/libgrass_datetime.7.0.svn.so

> make: o: Command not found

This suggests that SHLIB_LD is empty, so the command:

	$(SHLIB_LD) -o $@ $(LDFLAGS) $^ $(LIBES) $(EXTRA_LIBS) $(MATHLIB)

reduces to:

	-o $@ $(LDFLAGS) $^ $(LIBES) $(EXTRA_LIBS) $(MATHLIB)

A leading dash is interpreted by make as a flag which causes errors to
be ignored. So it interprets the "o" as the name of the program.

And indeed, the *aix* section in SC_CONFIG_CFLAGS doesn't define
SHLIB_LD, so you'll need to use --disable-shared. Ideally,
AC_MSG_ERROR should be called if shared libraries are requested for a
platform which doesn't have support for them.

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


More information about the grass-dev mailing list