"undefined symbol: _Py_NoneStruct" with freeze and Numeric on Linux

Anthony Tuininga anthony at computronix.com
Thu Aug 29 16:26:56 CEST 2002


I have solved this problem and the solution is to pass to the linker
-rdynamic, which tells the program to resolve symbols dynamically at
run-time.

That said, there are a couple of alternatives (that I know about) to
freeze on Linux which are (IMO) better than freeze. They are Installer
(by Gordon McMillan) and a set of routines that I have written that do
much the same thing but are somewhat simpler, do not make use of import
hooks and run on Linux, Windows, Tru64 Unix and Solaris. If anyone is
interested in the latter, let me know. If there is enough interest, I'll
make them available on our web site.

On Thu, 2002-08-29 at 08:00, Berthold Höllmann wrote:
> Hello,
> 
> I try to freeze a project using NumPy. But using a minimal example:
> 
> ------ ntest.py --------------
> import Numeric as N
> 
> print N.array((1.,2,3,4))
> ------ ntest.py --------------
> 
> after calling
> 
> > python ~/python/freeze/freeze.py ntest.py ; make
> 
> the call to
> 
> > ./ntest
> 
> gives an error message:
> 
> Traceback (most recent call last):
>   File "ntest.py", line 28, in ?
>     import Numeric as N
>   File "/usr/local/gltools/python/Python-2.2.1/linux/lib/python2.2/site-packages/Numeric/Numeric.py", line 91, in ?
>     import multiarray
> ImportError: /usr/local/gltools/python/Python-2.2.1/linux/lib/python2.2/site-packages/Numeric/multiarray.so: undefined symbol: _Py_NoneStruct
> 
> but
> 
> >nm ntest|grep _Py_NoneStruct
> 0823449c D _Py_NoneStruct
> 
> so "_Py_NoneStruct" is in the executable and
> 
> >python ntest.py
> [ 1.  2.  3.  4.]
> 
> So NumePy seems to work. Searching Google I found others having the
> same Problem, but no solution. Is there any, and if yes, what is it.
> 
> Thanks
> 
> Berthold
> -- 
> Dipl.-Ing. Berthold Höllmann   __   Address:
> hoel at germanlloyd.org        G /  \ L Germanischer Lloyd
> phone: +49-40-36149-7374    -+----+- Vorsetzen 32/35    P.O.Box 111606
> fax  : +49-40-36149-7320      \__/   D-20459 Hamburg    D-20416 Hamburg
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
-- 
Anthony Tuininga
anthony at computronix.com
 
Computronix
Distinctive Software. Real People.
Suite 200, 10216 - 124 Street NW
Edmonton, AB, Canada  T5N 4A3
Phone:	(780) 454-3700
Fax:	(780) 454-3838
http://www.computronix.com





More information about the Python-list mailing list