[Python-bugs-list] [ python-Bugs-232637 ] can't compile modules on AIX 4.2.1 (for real this time)

noreply@sourceforge.net noreply@sourceforge.net
Sat, 20 Oct 2001 13:16:42 -0700


Bugs item #232637, was opened at 2001-02-15 15:59
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=232637&group_id=5470

Category: Build
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Benjamin Collar (bcollar)
Assigned to: Neil Schemenauer (nascheme)
Summary: can't compile modules on AIX 4.2.1 (for real this time)

Initial Comment:
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...


----------------------------------------------------------------------

>Comment By: Neil Schemenauer (nascheme)
Date: 2001-10-20 13:16

Message:
Logged In: YES 
user_id=35752

Closed as per Guido's request.  Resolution is "none".

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-05 11:08

Message:
Logged In: YES 
user_id=6380

Neil, it may make sense to just close this one -- there's
little chance we'll ever make progress given the last
message from bcollar.

----------------------------------------------------------------------

Comment By: Benjamin Collar (bcollar)
Date: 2001-04-04 12:53

Message:
Logged In: YES 
user_id=7170

Hi,

I have a little bad news...I'm at another job now, so I
don't currently have access to the machines I was building
on. I am trying to get permission to use the machine in
order to follow up on this bug; I won't find out if I can
until next week.

Sorry
Ben

----------------------------------------------------------------------

Comment By: Neil Schemenauer (nascheme)
Date: 2001-03-21 15:58

Message:
Logged In: YES 
user_id=35752

What are the values of CC and LINKCC in Makefile?

----------------------------------------------------------------------

Comment By: A.M. Kuchling (akuchling)
Date: 2001-03-17 09:17

Message:
Logged In: YES 
user_id=11375

Reassigning to Neil; I don't know why the value of CC
changes depending on the version of make.  setup.py looks at
the CC environment variable; perhaps AIX make doesn't 
pass its variables to subprocesses correctly?



----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-02-28 20:52

Message:
Logged In: YES 
user_id=3066

This relates to the move to distutils, but may have already been fixed.  Andrew?

----------------------------------------------------------------------

Comment By: Benjamin Collar (bcollar)
Date: 2001-02-22 11:47

Message:
I got today's snapshot and ran the same configure and make I've been doing. Lo and behold everything worked GREAT. No problems building modules at all.
NOTE: this is using GNU make.

Good job Neil!

However, when I used AIX's make, there were a few errors while building Modules:

./Modules/ld_so_aix cc -bI:Modules/python.exp build/temp.aix-2-000310094C00-2.1/dlmodule.o -L/usr/local/lib -o build/lib.aix-2-000310094C00-2.1/dl.so
ld: 0711-317 ERROR: Undefined symbol: .dlopen
ld: 0711-317 ERROR: Undefined symbol: .dlerror
ld: 0711-317 ERROR: Undefined symbol: .dlsym
ld: 0711-317 ERROR: Undefined symbol: .dlclose
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

./Modules/ld_so_aix cc -bI:Modules/python.exp build/temp.aix-2-000310094C00-2.1/_cursesmodule.o -L/usr/local/lib -lcurses -ltermcap -o build/lib.aix-2-000310094C00-2.1/_curses.so
ld: 0706-006 Cannot find or open library file: -l termcap
        ld:open(): A file or directory in the path name does not exist.

While GNU make during the Module builds used "ld_so_aix cc_r" ... you'll note that AIX's make used cc.

Shall we continue with this? Or is it sufficient to say "Please use GNU make if you're on AIX"?

----------------------------------------------------------------------

Comment By: M.-A. Lemburg (lemburg)
Date: 2001-02-16 01:51

Message:
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 ?!

----------------------------------------------------------------------

Comment By: M.-A. Lemburg (lemburg)
Date: 2001-02-16 01:45

Message:
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)

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=232637&group_id=5470