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

Benjamin Collar bcollar@cs.unm.edu
Wed, 7 Feb 2001 16:26:18 -0700 (MST)


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).

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

Ben