Discussion:
Any AIX experts out there?
Laura Creighton
2003-01-29 05:35:59 UTC
Permalink
The Snake Farm is having trouble building Python on AIX.
See: http://lists.lysator.liu.se/pipermail/snake-farm/2003-January/000654.html

Does anybody recognise these symptoms?

Laura Creighton
Laura Creighton
2003-01-29 19:35:10 UTC
Permalink
| The Snake Farm is having trouble building Python on AIX.
| See: http://lists.lysator.liu.se/pipermail/snake-farm/2003-January/000654
.html
|
| Does anybody recognise these symptoms?
No. As Neal surmises, a problem with the host is as likely as anything
else - we have a number of AIX boxes here and I wouldn't touch installation
or maintenance of the IBM software with a stick, leave that to specialists
and keep an eye out for problems anyway.
I configured 2.2.1 with platform type rs6000-ibm-aix4.1,
OPT='-O2 -qmaxmem=8192', CC=cc and --with-cxx=no.
I just compiled Python2.2.2 on AIX yesterday. Worked fine, though it
was pretty big -- 7MB, but that included tkinter. Used gcc 2.95.3.
Used ./configure --prefix=... --with-gcc. Configure got everything
else right.
I agree that AIX is a tricky world for OSS. Sometimes I have to use
the vendor compiler (xlC), sometimes the libraries are hard to find,
sometimes it just doesn't build, etc.
--
6-6M31 Knowledge Management
Phone: (425) 294-8757
--
http://mail.python.org/mailman/listinfo/python-list
What does --prefix=... mean?

Laura
M.-A. Lemburg
2003-02-01 21:25:00 UTC
Permalink
Post by Laura Creighton
The Snake Farm is having trouble building Python on AIX.
See: http://lists.lysator.liu.se/pipermail/snake-farm/2003-January/000654.html
Does anybody recognise these symptoms?
Some tips:

* you may not rename the binary of the interpreter after you have
built it; use a symbolic link instead (e.g. copying "python"
to "python2.2" and the running python2.2 will cause the AIX
dynamic linker to dump core).

* building has to be done with:

configure --without-gcc
gmake CC=cc_r OPT="-O2 -qmaxmem=4000"
gmake CC=cc_r OPT="-O2 -qmaxmem=4000" install

(gmake == GNU make; this is important !)
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/
Neal Norwitz
2003-02-01 21:44:53 UTC
Permalink
Post by M.-A. Lemburg
Post by Laura Creighton
The Snake Farm is having trouble building Python on AIX.
http://lists.lysator.liu.se/pipermail/snake-farm/2003-January/000654.html
Does anybody recognise these symptoms?
* you may not rename the binary of the interpreter after you have
built it; use a symbolic link instead (e.g. copying "python"
to "python2.2" and the running python2.2 will cause the AIX
dynamic linker to dump core).
configure --without-gcc
gmake CC=cc_r OPT="-O2 -qmaxmem=4000"
gmake CC=cc_r OPT="-O2 -qmaxmem=4000" install
(gmake == GNU make; this is important !)
I am able to build now based on information provided by Gary Hooks
from IBM. Here's what he said:

The python.exp list is wrong. Using only the #! means that
every listed symbol is a deferred import, and those are
resolved by loading subsequent modules or calling loadbind().
What you need is a first line that has 3 characters: "#!."
The period is critical. It tells the binder,and later the
loader, that the symbol comes from the main application. This
is why the module call-back fails.

The "." syntax was introduced in AIX 4.2. The question is
really, what code was doing the dynamic loading? If it worked
on AIX 3.2 and 4.1, then it's pretty certain that Jens
Uwe-Mager's dlopen implementation was being used, and his code
did a full loadbind() of every module against every other
module. That would have resolved the deferred imports.
AFAIK, that old dlopen code still works, although we encourage
people to use the native dlopen API.

If you put the period in, the import list won't be handled
properly pre-4.2. Yes, much changed in that release. So you
have a bit of a conundrum. Not sure if configure can be
trained to figure out the version/release and manipulate the
import list appropriately...

I've modified configure to recognize if we are AIX 4.2+ and add in the
period. Is it possible that no one else is using dynamic (shared)
libraries on AIX 4.2+?

Neal
M.-A. Lemburg
2003-02-01 22:25:03 UTC
Permalink
Post by Neal Norwitz
Post by M.-A. Lemburg
Post by Laura Creighton
The Snake Farm is having trouble building Python on AIX.
http://lists.lysator.liu.se/pipermail/snake-farm/2003-January/000654.html
Does anybody recognise these symptoms?
* you may not rename the binary of the interpreter after you have
built it; use a symbolic link instead (e.g. copying "python"
to "python2.2" and the running python2.2 will cause the AIX
dynamic linker to dump core).
configure --without-gcc
gmake CC=cc_r OPT="-O2 -qmaxmem=4000"
gmake CC=cc_r OPT="-O2 -qmaxmem=4000" install
(gmake == GNU make; this is important !)
I am able to build now based on information provided by Gary Hooks
The python.exp list is wrong. Using only the #! means that
every listed symbol is a deferred import, and those are
resolved by loading subsequent modules or calling loadbind().
What you need is a first line that has 3 characters: "#!."
The period is critical. It tells the binder,and later the
loader, that the symbol comes from the main application. This
is why the module call-back fails.
The "." syntax was introduced in AIX 4.2. The question is
really, what code was doing the dynamic loading? If it worked
on AIX 3.2 and 4.1, then it's pretty certain that Jens
Uwe-Mager's dlopen implementation was being used, and his code
did a full loadbind() of every module against every other
module. That would have resolved the deferred imports.
AFAIK, that old dlopen code still works, although we encourage
people to use the native dlopen API.
If you put the period in, the import list won't be handled
properly pre-4.2. Yes, much changed in that release. So you
have a bit of a conundrum. Not sure if configure can be
trained to figure out the version/release and manipulate the
import list appropriately...
I've modified configure to recognize if we are AIX 4.2+ and add in the
period. Is it possible that no one else is using dynamic (shared)
libraries on AIX 4.2+?
No :-)

I've built Python on AIX a couple of times (both on AIX 3 and 4)
and always used shared libs (the mx tools and other third party tools).
I never had to change python.exp, so I'm not sure whether this
really fixes the problem.

Could be that makexp_aix needs fixing though: it relies on the
format of nm output, so if that changes, it's likely to cause
problems.
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/
Neal Norwitz
2003-02-01 22:44:36 UTC
Permalink
Post by M.-A. Lemburg
Post by Neal Norwitz
I am able to build now based on information provided by Gary Hooks
The python.exp list is wrong. Using only the #! means that
every listed symbol is a deferred import, and those are
resolved by loading subsequent modules or calling loadbind().
What you need is a first line that has 3 characters: "#!."
The period is critical. It tells the binder,and later the
loader, that the symbol comes from the main application. This
is why the module call-back fails.
The "." syntax was introduced in AIX 4.2. The question is
really, what code was doing the dynamic loading? If it worked
on AIX 3.2 and 4.1, then it's pretty certain that Jens
Uwe-Mager's dlopen implementation was being used, and his code
did a full loadbind() of every module against every other
module. That would have resolved the deferred imports.
AFAIK, that old dlopen code still works, although we encourage
people to use the native dlopen API.
If you put the period in, the import list won't be handled
properly pre-4.2. Yes, much changed in that release. So you
have a bit of a conundrum. Not sure if configure can be
trained to figure out the version/release and manipulate the
import list appropriately...
I've modified configure to recognize if we are AIX 4.2+ and add in the
period. Is it possible that no one else is using dynamic (shared)
libraries on AIX 4.2+?
No :-)
I've built Python on AIX a couple of times (both on AIX 3 and 4)
and always used shared libs (the mx tools and other third party tools).
Did you use AIX 4.2/4.3 or 4.1?

Do you have the dlopen library installed (Jens Uwe-Mager reference above)
or is dynload_aix being used? (see DYNLOADFILE in Makefile)

Do you know if the compiler, etc. were built on 4.2/4.3 or perhaps
on an earlier version? (Not sure if this would matter or not.)
Post by M.-A. Lemburg
I never had to change python.exp, so I'm not sure whether this
really fixes the problem.
It does allow imports of dynamic libraries to succeed on the test
machine. Before it would crash.
Post by M.-A. Lemburg
Could be that makexp_aix needs fixing though: it relies on the
format of nm output, so if that changes, it's likely to cause
problems.
I agree that makexp_aix could need upgrading. nm isn't a problem
for me now, but I agree with you.

I'm still not comfortable making the change. I'd really like
feedback from AIX users. MAL, can you test if adding a period
works for you? The easiest way to make the change is modifying
the Makefile (after running configure) and change \"\" to a period
".".

I will definitely update the AIX-NOTES file.

Neal
M.-A. Lemburg
2003-02-01 22:57:39 UTC
Permalink
Post by Neal Norwitz
Post by M.-A. Lemburg
Post by Neal Norwitz
I am able to build now based on information provided by Gary Hooks
The python.exp list is wrong. Using only the #! means that
every listed symbol is a deferred import, and those are
resolved by loading subsequent modules or calling loadbind().
What you need is a first line that has 3 characters: "#!."
The period is critical. It tells the binder,and later the
loader, that the symbol comes from the main application. This
is why the module call-back fails.
The "." syntax was introduced in AIX 4.2. The question is
really, what code was doing the dynamic loading? If it worked
on AIX 3.2 and 4.1, then it's pretty certain that Jens
Uwe-Mager's dlopen implementation was being used, and his code
did a full loadbind() of every module against every other
module. That would have resolved the deferred imports.
AFAIK, that old dlopen code still works, although we encourage
people to use the native dlopen API.
If you put the period in, the import list won't be handled
properly pre-4.2. Yes, much changed in that release. So you
have a bit of a conundrum. Not sure if configure can be
trained to figure out the version/release and manipulate the
import list appropriately...
I've modified configure to recognize if we are AIX 4.2+ and add in the
period. Is it possible that no one else is using dynamic (shared)
libraries on AIX 4.2+?
No :-)
I've built Python on AIX a couple of times (both on AIX 3 and 4)
and always used shared libs (the mx tools and other third party tools).
Did you use AIX 4.2/4.3 or 4.1?
I'm not sure. I worked at customer sites; the machines gave
the following info:

Platform: AIX-3-xxx-32bit

and

AIX mistress 3 4 xxx
Post by Neal Norwitz
Do you have the dlopen library installed (Jens Uwe-Mager reference above)
or is dynload_aix being used? (see DYNLOADFILE in Makefile)
Sorry I don't have that around.
Post by Neal Norwitz
Do you know if the compiler, etc. were built on 4.2/4.3 or perhaps
on an earlier version? (Not sure if this would matter or not.)
No idea. I do know that we had to use the IBM compiler.
Post by Neal Norwitz
Post by M.-A. Lemburg
I never had to change python.exp, so I'm not sure whether this
really fixes the problem.
It does allow imports of dynamic libraries to succeed on the test
machine. Before it would crash.
The same happened to me after having renamed the Python
interpreter binary. Using a symbolic link solved the problem
for me.
Post by Neal Norwitz
Post by M.-A. Lemburg
Could be that makexp_aix needs fixing though: it relies on the
format of nm output, so if that changes, it's likely to cause
problems.
I agree that makexp_aix could need upgrading. nm isn't a problem
for me now, but I agree with you.
I'm still not comfortable making the change. I'd really like
feedback from AIX users. MAL, can you test if adding a period
works for you? The easiest way to make the change is modifying
the Makefile (after running configure) and change \"\" to a period
".".
Sorry, I don't have an AIX machine handy at the moment.
Post by Neal Norwitz
I will definitely update the AIX-NOTES file.
Good idea :-)
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/
Loading...