ImportError on when running a frozen program

Scott Silliman sillyman71 at
Mon Dec 15 21:21:39 CET 2003

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

sillyman71 at (Scott Silliman) wrote in message news:<1c03f108.0312111557.7a183f4 at>...
> I'm getting the following when I run my executable:
> File "/usr/lib/python2.2/", line 41, in ?
>     from _socket import *
> ImportError: /usr/lib/python2.2/lib-dynload/
> 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

More information about the Python-list mailing list