mathematica/mathlink/python/linux

Mike Meyer mwm-keyword-freebsdhackers.102a7e at mired.org
Thu Dec 15 18:59:14 PST 2005


In <43A2265B.5070706 at uts.edu.au>, Tony Maher <anthony.maher at uts.edu.au> typed:
> I have installed Mathematica (v5.2) on FreeBSD 5-stable.  All works
> fine.

Is this a Linux binary, or a FreeBSD one?

> I am now trying to get the Python bindings to MathLink to
> work.  I can build ok but it links against the Mathematica library (ML)
> which is linux.  When I import mathlink I get undefined symbol "stdout"
> message (stdout used in libML).  In FreeBSD this symbol appears to be
> __stdoutp.

> ldd /usr/local/lib/python2.4/site-packages/mathlink.so
> /usr/local/lib/python2.4/site-packages/mathlink.so:
>         libm.so.3 => /lib/libm.so.3 (0x481b6000)
> 
> If I modify setup.py to specify libm as libm-2.3.2 (the linux one)
> ldd /usr/local/lib/python2.4/site-packages/mathlink.so
> /usr/local/lib/python2.4/site-packages/mathlink.so:
>         libm.so.6 => /compat/linux/lib/libm.so.6 (0x481b6000)
>         libc.so.6 => /compat/linux/lib/libc.so.6 (0x481d7000)
>         ld-linux.so.2 (0x48302000)
> 
> Then import fails with segmentation violation.

Expected. There's evidence that this can be made to work - see the
www/linuxpluginwrapper port. However, there's no guarantee that it
will, and the amount of work is unknown.

> Is there any way around this or is it a hopeless cause?
> (I could build a linux version of python on my system
> and then it shoudl work but that is not ideal)

If Mathematica is a linux binary, then you've presumably got one of
the linux emulation ports instlaled. I'd just install the python
package (.rpm, .deb, or watever) for that system rather than build
one. But that's still not ideal.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list