Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > AIX + GCC 2.95.3 - Python (2.1 or 2.2) - building the shared library(.so) for python - HOW TO?!?

Reply
Thread Tools

AIX + GCC 2.95.3 - Python (2.1 or 2.2) - building the shared library(.so) for python - HOW TO?!?

 
 
hab
Guest
Posts: n/a
 
      07-04-2003
Hi all,
(If I use standard -shared linking, during the _import python is crashing.)
As seen in in AIX-NOTES there should be used ld_so_aix. But I suspect
that it was prepared for standard xlC (CC) compiler. How to make it
running for GCC compiler?

Now I receive following error:

gcc -Wl,-einitlib.a -Wl,-bE:lib.a.exp -Wl,-bI:./python.exp -Wl,-bhalt:4
-Wl,-bM:
SRE -Wl,-T512 -Wl,-H512 -lm -o lib.a. -shared -Wl,-bbigtoc
-L../../../../lib/pow
erpc_aix_4.3_gcc -L/users/tbech/ND/Python/usr/local/lib/python2.1/config
python.
exp y.tab.o lex.yy.o idlerr.o idlutil.o idltype.o idlrepoId.o idlscope.o
idlexpr
..o idlast.o idlvalidate.o idldump.o idlconfig.o idlfixed.o idlpython.o
ld: 0711-418 ERROR: Import or export file lib.a.exp at line 10:
A symbol name may only be followed by an export attribute
or an address. The line is being ignored.

When I remove this line 10 from lib.a.exp it is telling that several Py*
functions are not exported and that entry point initlib.a not found.

Additional questions:
1. Why is such nonuderstandable-ultimate-tricky solution prepared for AIX?
2. Does it work only for xlC (CC) or also for GCC? If, how to do it?
3. What is the entry point function? How I can find it in the sources?
4. Seems that makexp_aix wrongly makes exports

Thanks in advance,
Tom

 
Reply With Quote
 
 
 
 
Martin v. =?iso-8859-15?q?L=F6wis?=
Guest
Posts: n/a
 
      07-05-2003
hab <(E-Mail Removed)> writes:

> (If I use standard -shared linking, during the _import python is crashing.)
> As seen in in AIX-NOTES there should be used ld_so_aix. But I suspect
> that it was prepared for standard xlC (CC) compiler. How to make it
> running for GCC compiler?


Nobody knows anything about AIX in the Python world. You have to make
it work yourself.

> 1. Why is such nonuderstandable-ultimate-tricky solution prepared for AIX?


There are two possible reasons:
1. AIX is such a strange system that you need to play dirty tricks to
make it load modules dynamically.
2. Whoever ported shared loading to AIX didn't know anything about the
system, and tried random things until he got a working solution.

I don't know which one it is, but I'm leaning towards 1)

> 2. Does it work only for xlC (CC) or also for GCC? If, how to do it?


Nobody knows.

> 3. What is the entry point function? How I can find it in the sources?


You mean, of python itself? It's main(), and it is defined in
Modules/python.c.

Regards,
Martin
 
Reply With Quote
 
 
 
 
Donn Cave
Guest
Posts: n/a
 
      07-07-2003
In article <(E-Mail Removed)-berlin.de>,
http://www.velocityreviews.com/forums/(E-Mail Removed) (Martin v. Lowis) wrote:

> hab <(E-Mail Removed)> writes:
>
> > (If I use standard -shared linking, during the _import python is crashing.)
> > As seen in in AIX-NOTES there should be used ld_so_aix. But I suspect
> > that it was prepared for standard xlC (CC) compiler. How to make it
> > running for GCC compiler?

>
> Nobody knows anything about AIX in the Python world. You have to make
> it work yourself.
>
> > 1. Why is such nonuderstandable-ultimate-tricky solution prepared for AIX?

>
> There are two possible reasons:
> 1. AIX is such a strange system that you need to play dirty tricks to
> make it load modules dynamically.
> 2. Whoever ported shared loading to AIX didn't know anything about the
> system, and tried random things until he got a working solution.
>
> I don't know which one it is, but I'm leaning towards 1)


AIX is a classic example of underemployed engineers working in a
vacuum. It's strange, sometimes arguably better but rarely worth
the trouble. Linux strikes me a bit the same way, actually, and
IBM's interest in Linux is no surprise. I doubt there are any really
dirty tricks, but there is a point at which things like this are
going to depend on the compiler software. ld_so_aix works fine with
xlc, in my experience, and there's no reason to look for malfeasance
on either side to explain why it stops there. If you want a normal
UNIX platform with an open architecture, try one of the BSDs, or Linux
if you're not that picky about the normal UNIX part. If you're obliged
to work on AIX, then whoever's paying for AIX should happy to pay for
the compiler too.

Donn Cave, (E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
unable to compile Python 2.6.4 on AIX using gcc chuck Python 2 11-04-2009 05:27 PM
putenv for AIX and ifdef for AIX ClownPleco C Programming 5 08-24-2007 02:15 PM
Building Python 2.5.0 on AIX 5.3 - Undefined symbol: .__floor Justin Johnson Python 0 01-10-2007 03:29 PM
Looking for AIX 5.2 binaries, IS anyone running Ruby on AIX 5.2 ?? bww00amdahl@yahoo.com Ruby 5 07-08-2005 11:54 AM



Advertisments