Discussion:
(no subject)
Michael Hudson
2002-07-17 09:06:07 UTC
Permalink
Actually, could you look at line 866 of posixmodule.c, where is says
#ifdef __hpux
extern int fdatasync(int); /* On HP-UX, in libc but not in unistd.h */
#endif
and change this to
#if defined(__hpux) || defined(_AIX)
extern int fdatasync(int); /* On HP-UX and AIX, in libc but not in
unistd.h */
#endif
and see if that helps? Do AIX and HP-UX share some common ancestry?
They seem to require a lot of similar portability hacks.
If this works, I'll check it in for rc2.
Has this disappeared from CVS or was it never checked in?
It might never have made it to the trunk.

Given that 2.3 uses autoconf 2.5.something it would be better to use
the AC_CHECK_DECLS (or whatever it's called) macro to tell whether we
need to declare it ourselves. I haven't found the time to acquire the
necessary autoconf-fu to do this yet.

Backporting the autoconf 2.5 work to 2.2 is something else I've been
meaning to look at (at least partially for this reason).

Cheers,
M.
--
40. There are two ways to write error-free programs; only the third
one works.
-- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html
Anders Qvist
2002-07-19 23:37:58 UTC
Permalink
Subject: Build python-AIX-2-000000042E00-hal was successful.
Build all succeded. Any warnings are appended below.
Impromptu build with locally defined fdatasync:

diff -u -r2.244 posixmodule.c
--- posixmodule.c 15 Jul 2002 16:10:55 -0000 2.244
+++ posixmodule.c 19 Jul 2002 22:16:23 -0000
@@ -891,6 +891,10 @@
extern int fdatasync(int); /* On HP-UX, in libc but not in unistd.h
*/
#endif

+#ifdef _AIX
+extern int fdatasync(int);
+#endif
+
PyDoc_STRVAR(posix_fdatasync__doc__,
"fdatasync(fildes)\n\n\
force write of file with filedescriptor to disk.\n\

Seems to work. make all succeeded.
--
../python/dist/src/Python/mysnprintf.c:65: warning: implicit declaration of function `vsnprintf'
../python/dist/src/Python/thread_pthread.h:159: warning: implicit declaration of function `pthread_init'
../python/dist/src/Modules/posixmodule.c:3824: warning: implicit declaration of function `seteuid'
../python/dist/src/Modules/posixmodule.c:3844: warning: implicit declaration of function `setegid'
:: Too many arguments.
:: 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.

[snip]
--
Anders "Quest" Qvist

"We've all heard that a million monkeys banging on a million typewriters
will eventually reproduce the entire works of Shakespeare. Now, thanks
to the Internet, we know this is not true." -- Robert Wilensky
Anders Qvist
2002-07-20 10:09:58 UTC
Permalink
On Sat, Jul 20, 2002 at 01:37:58AM +0200, Anders Qvist wrote:
[snip]
Post by Anders Qvist
:: Too many arguments.
:: Too many arguments.
# 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 "***@.* \(/.*\)@\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).
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)
--
Anders "Quest" Qvist

"We've all heard that a million monkeys banging on a million typewriters
will eventually reproduce the entire works of Shakespeare. Now, thanks
to the Internet, we know this is not true." -- Robert Wilensky
Michael Hudson
2002-07-22 10:27:52 UTC
Permalink
Post by Anders Qvist
[snip]
Post by Anders Qvist
:: Too many arguments.
:: Too many arguments.
# 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.
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`
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...).
Post by Anders Qvist
../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.

Loading...