Python 2.2.1 vs. gcc 3.1?
Andrew Koenig
ark at research.att.com
Fri Jun 7 15:29:40 EDT 2002
Andrew> How do I go about finding out the cause of the failure?
Skip> Try running the just built python executable and then manually execute
Skip> "import struct". What error message(s) do you see?
OK... I now understand why I couldn't find struct.so:
the setup.py program deletes it after it finds that the import
attempt fails.
So, in setup.py, I did this, starting at line 164:
# try:
__import__(ext.name)
# except ImportError:
# self.announce('WARNING: removing "%s" since importing it failed' %
# ext.name)
# assert not self.inplace
# fullname = self.get_ext_fullname(ext.name)
# ext_filename = os.path.join(self.build_lib,
# self.get_ext_filename(fullname))
# os.remove(ext_filename)
That left the various .so libraries around, which allows me to try them out:
$ ./python
Python 2.2.1 (#6, Jun 7 2002, 14:55:06)
[GCC 3.1] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: ld.so.1: ./python: fatal: relocation error: file /tmp/build-python/Python-2.2.1/build/lib.solaris-2.8-sun4u-2.2/struct.so: symbol PyString_Type: referenced symbol not found
So apparently the shared libraries are not being built properly.
Any more ideas?
--
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark
More information about the Python-list
mailing list