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

hab hab at polbox.com
Fri Jul 4 08:04:57 EDT 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





More information about the Python-list mailing list