ImportError on _socketmodule.so when running a frozen program

S

Scott Silliman

I'm getting the following when I run my executable:

File "/usr/lib/python2.2/socket.py", line 41, in ?
from _socket import *
ImportError: /usr/lib/python2.2/lib-dynload/_socketmodule.so:
undefined symbol: PyInt_FromLong

However, if I run 'nm' on the executable, I get the following output:

0807cf90 T PyInt_FromLong

doesn't this mean that PyInt_FromLong() is staticly linked into the
executable (got it when it staticly linked in
/usr/lib/python2.2/config/libpython2.2.a )?

Any ideas as to why it doesn't think this symbol is defined?

-Scott
 
S

Scott Silliman

Hmm, I just ran objdump and it definitely looks like the
PyInt_FromLong definition is statically linked into the executable.
Any ideas as to why loading a shared library would fail saying
PyInt_FromLong is an undefined symbol?

0807cf90 <PyInt_FromLong>:
807cf90: 55 push %ebp
807cf91: 89 e5 mov %esp,%ebp
807cf93: 83 ec 18 sub $0x18,%esp
807cf96: 89 75 f8 mov %esi,0xfffffff8(%ebp)
807cf99: 8b 75 08 mov 0x8(%ebp),%esi
..
..
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,477
Latest member
ColumbusMa

Latest Threads

Top