Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Dec 2005 22:02:04 -0500
From:      Mike Meyer <mwm-keyword-freebsdhackers.102a7e@mired.org>
To:        Tony Maher <anthony.maher@uts.edu.au>
Cc:        hackers@freebsd.org
Subject:   Re: mathematica/mathlink/python/linux
Message-ID:  <17314.11820.983364.232729@bhuda.mired.org>
In-Reply-To: <43A2265B.5070706@uts.edu.au>
References:  <43A2265B.5070706@uts.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
In <43A2265B.5070706@uts.edu.au>, Tony Maher <anthony.maher@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@mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17314.11820.983364.232729>