[Python-bugs-list] [Bug #132637] can't compile modules on AIX 4.2.1 (for real this time)

noreply@sourceforge.net noreply@sourceforge.net
Fri, 16 Feb 2001 01:51:04 -0800


Bug #132637, was updated on 2001-Feb-15 15:59
Here is a current snapshot of the bug.

Project: Python
Category: Extension Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: bcollar
Assigned to : nobody
Summary: can't compile modules on AIX 4.2.1 (for real this time)

Details: Hi,

CC=cc_r CFLAGS="-O2 -qmaxmem=6000" ./configure --prefix=/development/utils
--without-gcc
make CC=cc_r OPT="-O2 -qmaxmem=6000".

I'm building 2.1a2 with patch 103679 applied (necessary for makexp_aix and
ld_so_aix to be found earlier in the process). Here's some output (it's the
same for all modules):

building '_tkinter' extension
/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/_tkinter.o
build/temp.aix-2-000310094C00-2.1/tkappinit.o -L/usr/X11/lib
-L/usr/local/lib -ltk8.0 -ltcl8.0 -lld -lX11 -o
build/lib.aix-2-000310094C00-2.1/_tkinter.so
unable to execute /development/utils/lib/python2.1/config/ld_so_aix: No
such file or directory
WARNING: building of extension "_tkinter" failed: command
'/development/utils/lib/python2.1/config/ld_so_aix' failed with exit status
1

There are TWO things I notice here:

1) ld_so_aix is in Modules, not in /development/utils/lib/python2.1/config.
In fact, there is no directory called /development/utils/lib/python2.1.

2) (copied from above)
"/development/utils/lib/python2.1/config/ld_so_aix cc"

Note it says cc, not cc_r, which is how I configured and ran make. cc_r is
darn important, since python will blow up if it's configured with threads
but you don't run cc_r.

Previously this problem was mentioned in bug #129991, which was closed when
I submitted some patches I thought solved the problem...well they were
incomplete. I don't know exactly what to patch for the above problems...


Follow-Ups:

Date: 2001-Feb-16 01:51
By: lemburg

Comment:
Just reading through the checkins today I fonud that Neil has
been fiddling with that code. Perhaps you ought to grab the latest
CVS snapshot and rerun the install ?!
-------------------------------------------------------

Date: 2001-Feb-16 01:45
By: lemburg

Comment:
Ok, here we go again :-)

1)  distutils assumes Python to be already installed on the machine
and thus it looks for the AIX tools in the config dir -- unfortunately,
setup.py is run before these files are installed, so it cannot find
them. Perhaps we ought to add a special case to distutils
which allows finding them anyway ?!

2) It seems as if your make doesn't copy the command line
variables into the OS environment. The setup.py file contains
explicit code which uses the OS environment variables to
choose a compiler and linker:

# When you run "make CC=altcc" or something similar, you really want
# those environment variables passed into the setup.py phase. Here's
# a small set of useful ones.
 compiler = os.environ.get('CC')
 linker_so = os.environ.get('LDSHARED')

Not sure what to do about this. It hints at another problem though:
distutils uses the settings from the Makefile per default. It seems
that in your case it is having trouble parsing that file.

BTW, why does sys.platform return for you ? (There is a switch
in distutils.sysconfig which switches on 'aix4' -- could be that
this causes the problem)
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=132637&group_id=5470