Re: Any AIX experts out there?

"M.-A. Lemburg" <[email protected]> Sat, 01 Feb 2003 23:57:39 +0100
Newsgroups gmane.comp.python.snake-farm.user
Organization eGenix.com Software GmbH
Message-ID <[email protected]>
Neal Norwitz wrote:
> On Sat, Feb 01, 2003 at 11:25:03PM +0100, M.-A. Lemburg wrote:
> 
>>Neal Norwitz wrote:
>>
>>
>>>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+?
>>
>>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

> 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.

> 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.

>>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.

>>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.

> 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/