473,385 Members | 1,461 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

hab
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

Jul 18 '05 #1
2 3449
hab <ha*@polbox.com> 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
Jul 18 '05 #2
In article <m3************@mira.informatik.hu-berlin.de>,
ma****@v.loewis.de (Martin v. Lowis) wrote:
hab <ha*@polbox.com> 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, do**@u.washington.edu
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Erik Johnson | last post by:
I am trying to upgrade my Python installation. After downloading sources and building Python 2.3.4, I am unable to use the command history editing feature in the interactive interpreter (where the...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 375 open ( -3) / 3264 closed (+26) / 3639 total (+23) Bugs : 910 open ( +3) / 5851 closed (+20) / 6761 total (+23) RFE : 217 open...
1
by: J. Jeffrey Close | last post by:
Hi all, I have been trying for some time to build Python 2.4.x from source on OS X 10.4.6. I've found *numerous* postings on various mailing lists and web pages documenting the apparently...
4
by: JDJMSon | last post by:
I was wondering if someone here could help me with a problem I'm having building Python extensions with the Boost.Python library. Basically, if I have a wrapper class with something like this: ...
2
by: Thomas Ploch | last post by:
Hello, I followed the instructions in the Mac/README file. I ran ./configure --enable-framework But when I try to build from source with gcc 4.0.2, following happens:
3
by: =?UTF-8?Q?Ahmad_=E3=8B=A1_Baitalmal?= | last post by:
Hi, I'm having a hard time getting python-mcrypt extension to build. I installed libmcrypt with --prefix=/usr and I checked that the library exists -rwxr-xr-x 1 root wheel 352K Sep 19...
4
by: Arnaud Delobelle | last post by:
Hi fellow python enthusiasts. Having recently acquired a MacBook Pro (Intel Core 2 Duo) which comes with python2.5, I have been installing some modules that I need (PIL, psycopg2, PyXML ...). ...
4
by: njwilson23 | last post by:
I'm having trouble with tkinter on a new installation of Python (2.6), built with the framework option from source that was downloaded from python.org. I'm running OS 10.4 on a PowerPC G4. The...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.