Re: Core dumps building Python on AIX

Kalle Svensson <[email protected]> Wed, 14 Aug 2002 19:50:30 +0200
Newsgroups gmane.comp.python.snake-farm.user
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[Guido van Rossum]
> The AIX builds fail in the phase where it's building the extensions
> using setup.py:
...
> Can someone with access to the snake farm try to find out what's going
> on here?

It dies trying to link the first dynamic module, in this case
struct.so.

running build
running build_ext
building 'struct' extension
creating build
creating build/temp.aix-4.2-2.3
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I/tmp_mnt/mp/slaskdisk/tmp/kalle/python/dist/src/./Include -I/usr/local/include -I/tmp_mnt/mp/slaskdisk/tmp/kalle/python/dist/src/Include -I/tmp_mnt/mp/slaskdisk/tmp/kalle/python/dist/src -c /tmp_mnt/mp/slaskdisk/tmp/kalle/python/dist/src/Modules/structmodule.c -o build/temp.aix-4.2-2.3/structmodule.o
creating build/lib.aix-4.2-2.3
./Modules/ld_so_aix gcc -bI:Modules/python.exp build/temp.aix-4.2-2.3/structmodule.o -L/usr/local/lib -o build/lib.aix-4.2-2.3/struct.so
make: *** [sharedmods] Segmentation fault (core dumped)

I would have tried my poor gdb skills on the core file if it weren't
for the fact that we have no gdb on the platform.  I'll try to build
one later.

> One suggestion I have is to try to rebuild without -O3.  It seems
> Python is dumping core, and a broken optimizer is a likely cause.

No change with OPT="-g".

I uncommented the echo lines in ld_so_aix and got this:

./Modules/ld_so_aix gcc -bI:Modules/python.exp build/temp.aix-4.2-2.3/structmodule.o -L/usr/local/lib -o build/lib.aix-4.2-2.3/struct.so
ld_so_aix: Debug info section
  -> output file : build/lib.aix-4.2-2.3/struct.so
  -> import file : Modules/python.exp
  -> export file : struct.exp
  -> entry point : initstruct
  -> object files:  build/temp.aix-4.2-2.3/structmodule.o
  -> CC arguments:  build/temp.aix-4.2-2.3/structmodule.o -L/usr/local/lib
./Modules/makexp_aix struct.exp build/lib.aix-4.2-2.3/struct.so build/temp.aix-4.2-2.3/structmodule.o
gcc -Wl,-einitstruct -Wl,-bE:struct.exp -Wl,-bI:Modules/python.exp -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -lm -o build/lib.aix-4.2-2.3/struct.so build/temp.aix-4.2-2.3/structmodule.o -L/usr/local/lib
make: *** [sharedmods] Segmentation fault (core dumped)

Peace,
  Kalle
- -- 
Kalle Svensson, http://www.juckapan.org/~kalle/
Student, root and saint in the Church of Emacs.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 <http://mailcrypt.sourceforge.net/>

iD8DBQE9WphYdNeA1787sd0RApjiAKDCoLrB4mEmOtvy1Fm9iA4Z2jH0LQCgw/iC
wgwGZWetdNrNufVoGbM7r2o=
=6cfv
-----END PGP SIGNATURE-----