[csw-maintainers] Python 3.3 in 64 bits

Maciej (Matchek) Bliziński maciej at opencsw.org
Thu Jan 10 18:47:30 CET 2013


2013/1/10 Dagobert Michelsen <dam at opencsw.org>
> The 64-bit version doesn't look in the right place when trying to load shared objects.
>
> >> import socket
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/opt/csw/lib/python3.3/socket.py", line 47, in <module>
>     import _socket
> ImportError: ld.so.1: python3.3: fatal: /opt/csw/lib/python3.3/lib-dynload/_socket.so: wrong ELF class: ELFCLASS32
>
>
> The shared object it should load is in /opt/csw/lib/amd64/python3.3/lib-dynload/_socket.so.
>
>
> Indeed. That means it doesn't honour $libdir which it should, right? Maybe you can bring
> this to upstream attention?

Who knows how it works. Maybe the file that defines where to look for
shared objects is not even merged from the 64-bit installation; AFAIK
only binaries are.

I found a workaround:

$ PYTHONPATH=/opt/csw/lib/amd64/python3.3/lib-dynload python3.3
Python 3.3.0 (default, Jan 10 2013, 11:28:31)
[GCC 4.7.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostname()
'vsol08'

Maybe we can somehow hardcode it into the build.


More information about the maintainers mailing list