[Python-bugs-list] AIX build problems (Re: [Bug #129995] segfaults on AIX if configured with threads, Re:Bug #129991)

M.-A. Lemburg mal@lemburg.com
Thu, 08 Feb 2001 13:48:20 +0100


Benjamin Collar wrote:
> 
> On Wed, 7 Feb 2001, M.-A. Lemburg wrote:
> 
> > > current cvs tarball won't build because:
> > >
> > >         ./makexp_aix python.exp "" libpython2.1.a;  cc_r
> > > -Wl,-bE:python.exp -lld -o python Modules/python.o  libpython2.1.a -ldl
> > > -lm
> > > /bin/sh: ./makexp_aix:  not found.
> > > make: 1254-004 The error code from the last command is 127.
> > >
> > > this is on AIX 4.2.1.
> >
> > Could you tell us more about the context ? This seems to have
> > something to do with the following line in configure:
> >
> > configure:
> > --         LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
> >
> > AFAIK, makexp_aix lives in Modules/ so perhaps adding Modules/
> > will help ?!
> 
> makexp_aix is in Modules. I've changed the above line to
> LINKCC="\$(srcdir)/Modules/makexp_aix python.exp
> \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
> 
> This worked fine and now it compiles. Regarding the context, configure and
> make were as follows:
> 
> CC=cc_r CFLAGS="-O2 -qmaxmem=5000" ./configure --without-gcc
> --prefix=/development/utils
> 
> make CC=cc_r OPT="-O2 -qmaxmem=5000"
> 
> Regarding the segfault bug (Bug #129995), now that I've used cc_r there is
> no segfault. Hooray! If I may make a suggestion, the note to use cc_r
> should be put into the AIX documentation (especially since with-threads is
> default).

Could you submit a patch for these changes (configure.in and
Misc/AIX-NOTES), so that we can get them into 2.1 ? Thanks.

Perhaps there's also a way to have configure.in use the cc_r
compiler when building with threads ?!

> BUT there are other problems still. None of the extensions built. This was
> noted in Bug #129991: ld_so_aix is referenced before it exists. Here is a
> sample error (all extensions error the same way):
> 
> building 'nis' extension
> cc_r -I. -I/tmp/python/dist/src/./Include -IInclude/ -I/usr/local/include
> -c /tmp/python/dist/src/Modules/nismodule.c -o
> build/temp.aix-2-000310094C00-2.1/nismodule.o
> /development/utils/lib/python2.1/config/ld_so_aix cc
> -bI:/development/utils/lib/python2.1/config/python.exp
> build/temp.aix-2-000310094C00-2.1/nismodule.o -L/usr/local/lib -lnsl -o
> build/lib.aix-2-000310094C00-2.1/nis.so
> unable to execute /development/utils/lib/python2.1/config/ld_so_aix: No
> such file or directory
> WARNING: building of extension "nis" failed: command
> '/development/utils/lib/python2.1/config/ld_so_aix' failed with exit
> status 1
> 
> ls /development/utils/lib:
> libefence.a  libswig.a    python1.6    swig_lib

ld_so_aix lives in Modules/ too (and is not built from another
source). Looking at the above shell lines, it seems that ld_so_aix
is not installed properly before running setup.py.

Could you check whether these two utilities are in fact installed
in lib/python2.1/config/ ?

To fix the ld_so_aix problem, you will have to insert a Modules/
in the configure.in line as well:

        case $ac_sys_system/$ac_sys_release in
        AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/