Re: Re: [farm-report] (no subject)

Michael Hudson <[email protected]> 22 Jul 2002 11:27:52 +0100
Newsgroups gmane.comp.python.snake-farm.user
Message-ID <[email protected]>
Anders Qvist <[email protected]> writes:

> On Sat, Jul 20, 2002 at 01:37:58AM +0200, Anders Qvist wrote:
> [snip]
> > > :: Too many arguments.
> > > :: Too many arguments.
> > 
> > These guys come from ld_so_aix, line 76:
> > 
> > # Check for existence of compiler.
> > CC=$1; shift
> > whichcc=`which $CC`
> > 
> > The script is executed with sh. You prolly want to use type -p. I'll
> > make a patch tomorrow.
> 
> Thus:
> 
> diff -u -r2.5 ld_so_aix
> --- ld_so_aix 3 Sep 1997 00:45:30 -0000	2.5
> +++ ld_so_aix 20 Jul 2002 09:52:55 -0000
> @@ -73,7 +73,7 @@
>  
>  # Check for existence of compiler.
>  CC=$1; shift
> -whichcc=`which $CC`
> +whichcc=`type -p $CC | sed -e "s@.* \(/.*\)@\1@"`
>  
>  if test ! -x "$whichcc"; then
>    echo "ld_so_aix: Compiler '$CC' not found; exiting."
> 
> This solves the problem (anyone with a better sed expression fix it).

This all sounds very familiar (I recall working with someone to try to
get 2.2.1 working on AIX but ran out of time...).

> Now we get a core dump:
> 
> ../python/dist/src/Modules/makexp_aix Modules/python.exp "" libpython2.3.a;  gcc  -Wl,-bE:Modules/python.exp -lld -o python \
>                 Modules/ccpython.o \
>                 libpython2.3.a -ldl  -lpthreads   -lm  
> case $MAKEFLAGS in \
> *-s*)  CC='gcc' LDSHARED='../python/dist/src/Modules/ld_so_aix gcc -bI:Modules/python.exp' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ../python/dist/src/setup.py -q build;; \
> *)  CC='gcc' LDSHARED='../python/dist/src/Modules/ld_so_aix gcc -bI:Modules/python.exp' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ../python/dist/src/setup.py build;; \
> esac
> running build
> running build_ext
> building 'struct' extension
> gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I/tmp_mnt/mp/slaskdisk/tmp/sfarmer/python/dist/src/./Include -I/usr/local/include -I/tmp_mnt/mp/slaskdisk/tmp/sfarmer/Include -I/tmp_mnt/mp/slaskdisk/tmp/sfarmer/python-AIX-2-000000042E00-hal -c /tmp_mnt/mp/slaskdisk/tmp/sfarmer/python/dist/src/Modules/structmodule.c -o build/temp.aix-4.2-2.3/structmodule.o
> ../python/dist/src/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)

Which process has dumped core here?  The linker?

Cheers,
M.