[Numpy-discussion] (SPAM) Re:embeddedPyArray_FromDimsAndDataSegmentationFault

Thomas Hrabe thrabe at burnham.org
Tue May 20 18:23:54 EDT 2008


Hi Pauli

my makefile compiles with the following options

/usr/global/matlab/bin/mex -cxx -g 
-I./include/ -I/home/global/python32/include/python2.4 
-I/home/global/python32/lib/python2.4/site-packages/numpy/core/include/ 
-DLIBPYTHON=\"/usr/global/python32/lib/libpython2.4.so\" 
....
-lpython2.4
With this options compilation is processed but many symbols remain unsolved

undefined symbol: PyExc_RuntimeError    (./bin/mp.mexglx)
....

When I use -lpython2.4 the linker woun't find the lib
/usr/bin/ld: cannot find -lpython2.4

But I bet you have managed to solve this problem. By the way, what Matlab version did you use?
Best,
Thomas


-----Original Message-----
From: numpy-discussion-bounces at scipy.org on behalf of Pauli Virtanen
Sent: Tue 5/20/2008 2:10 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] (SPAM) Re:embeddedPyArray_FromDimsAndDataSegmentationFault
 
ti, 2008-05-20 kello 13:36 -0700, Thomas Hrabe kirjoitti:
> Thats what PyErr_Print() prints.
> Python is initialised, for sure
> 
> Traceback (most recent call last):
>   File "/usr/global/python32/lib/python2.4/site-packages/numpy/__init__.py", lin
> e 34, in ?
>     import testing
>   File "/usr/global/python32/lib/python2.4/site-packages/numpy/testing/__init__.
> py", line 3, in ?
>     from numpytest import *
>   File "/usr/global/python32/lib/python2.4/site-packages/numpy/testing/numpytest
> py", line 8, in ?
>     import unittest
>   File "/usr/global/python32/lib/python2.4/unittest.py", line 51, in ?
>     import time
> ImportError: /usr/global/python32/lib/python2.4/lib-dynload/time.so: undefined s
> ymbol: PyExc_IOErro
> 
> why does it work in C and not in C started within Matlab?

It's probably that it has something to do with the way Matlab loads its
extension libraries:

http://www.iki.fi/pav/software/pythoncall/index.html#compilation-important

-- 
Pauli Virtanen


_______________________________________________
Numpy-discussion mailing list
Numpy-discussion at scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080520/5844031d/attachment.html>


More information about the NumPy-Discussion mailing list