This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Tristan.Carel
Recipients Tristan.Carel, eric.araujo, pedz, sable
Date 2011-03-31.11:15:39
SpamBayes Score 3.7908565e-13
Marked as misclassified No
Message-id <1301570141.42.0.756190750674.issue10656@psf.upfronthosting.co.za>
In-reply-to
Content
I have experienced the same problem under ppc64 aix 6.1.2.0 while compiling Python 2.7.1

$ cd Python-2.7.1
$ mkdir __build
$ cd __build
$ ../configure --with-gcc=xlc_r --with-cxx-main=xlC_r --with-threads --disable-ipv6
$ /usr/linux/bin/make
[...]
../Modules/ld_so_aix xlc_r -bI:Modules/python.exp -L.. -L/opt/freeware/lib -L/opt/freeware/lib build/temp.aix-6.1-2.7/data/tcarel/ngbuilder/python/2.7.1/Python-2.7.1/Modules/_struct.o -L/opt/freeware/lib -L/usr/local/lib -o build/lib.aix-6.1-2.7/_struct.so
unable to execute ../Modules/ld_so_aix: No such file or directory

There are references to $(srcdir)/Modules/ld_so_aix in both configure.in and Makefile.pre.in whereas ld_so_aix is created in build tree.

==================================================
diff -r f4e6e18cae4b Makefile.pre.in
--- a/Makefile.pre.in	Tue Mar 29 17:28:25 2011 -0700
+++ b/Makefile.pre.in	Thu Mar 31 13:05:45 2011 +0200
@@ -1028,7 +1028,7 @@
 		$(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix	\
 				$(DESTDIR)$(LIBPL)/makexp_aix;		\
 		echo "$(LIBPL)/makexp_aix";			\
-		$(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix	\
+		$(INSTALL_SCRIPT) Modules/ld_so_aix	\
 				$(DESTDIR)$(LIBPL)/ld_so_aix;		\
 		echo "$(LIBPL)/ld_so_aix";			\
 		echo; echo "See Misc/AIX-NOTES for details.";	\
diff -r f4e6e18cae4b configure.in
--- a/configure.in	Tue Mar 29 17:28:25 2011 -0700
+++ b/configure.in	Thu Mar 31 13:05:45 2011 +0200
@@ -1778,7 +1778,7 @@
 then
 	case $ac_sys_system/$ac_sys_release in
 	AIX*)
-		BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
+		BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
 		LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
 		;;
 	BeOS*)
==================================================

After fixing these 2 files, Modules/ld_so_aix is found and properly executed by compilation process, but then there is a new issue:

Modules/ld_so_aix xlc_r -bI:Modules/python.exp -L.. -L/opt/freeware/lib -L/opt/freeware/lib build/temp.aix-6.1-2.7/data/tcarel/Python-2.7.1/Modules/_struct.o -L/opt/freeware/lib -L/usr/local/lib -o build/lib.aix-6.1-2.7/_struct.so
Modules/ld_so_aix[183]: Modules/makexp_aix:  not found.

This time, makexp_aix is expected to be is the same directory than ld_so_aix whereas makeexp_aix remains in the source tree.

Here is a fix:

==================================================
diff -r f4e6e18cae4b Modules/ld_so_aix.in
--- a/Modules/ld_so_aix.in	Tue Mar 29 17:28:25 2011 -0700
+++ b/Modules/ld_so_aix.in	Thu Mar 31 13:01:57 2011 +0200
@@ -69,7 +69,10 @@
   echo $usage; exit 2
 fi
 
-makexp=`dirname $0`/makexp_aix
+makexp=`dirname $0`/@srcdir@/makexp_aix
+if test ! -e "$makexp" ; then
+  makeexp=makexp_aix
+fi
 
 # Check for existence of compiler.
 CC=$1; shift
==================================================

The first value fix the issue while building Python. The second will use PATH to find makeexp_aix as explained in section `SHARED LIBRARY SUPPORT' in AIX-NOTES (for building shared extension modules).

You can find a patch for 2.7 branch in attachment.

Regards
-- 
Tristan Carel
Exalead
History
Date User Action Args
2011-03-31 11:15:41Tristan.Carelsetrecipients: + Tristan.Carel, sable, eric.araujo, pedz
2011-03-31 11:15:41Tristan.Carelsetmessageid: <1301570141.42.0.756190750674.issue10656@psf.upfronthosting.co.za>
2011-03-31 11:15:40Tristan.Carellinkissue10656 messages
2011-03-31 11:15:39Tristan.Carelcreate