From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 16 02:59:13 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC87C16A41F for ; Fri, 16 Dec 2005 02:59:13 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers.102a7e@mired.org) Received: from delight.idiom.com (outbound.idiom.com [216.240.47.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E5E243D5D for ; Fri, 16 Dec 2005 02:59:09 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers.102a7e@mired.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id E6F7422870D for ; Thu, 15 Dec 2005 18:59:08 -0800 (PST) Received: from mired.org (mwm@idiom [216.240.32.1]) by idiom.com (8.12.11/8.12.11) with SMTP id jBG2x6A5031553 for ; Thu, 15 Dec 2005 18:59:07 -0800 (PST) (envelope-from mwm-keyword-freebsdhackers.102a7e@mired.org) Received: (qmail 1900 invoked by uid 1001); 16 Dec 2005 03:02:05 -0000 Received: by localhost.mired.org (tmda-sendmail, from uid 1001); Thu, 15 Dec 2005 22:02:05 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17314.11820.983364.232729@bhuda.mired.org> Date: Thu, 15 Dec 2005 22:02:04 -0500 To: Tony Maher In-Reply-To: <43A2265B.5070706@uts.edu.au> References: <43A2265B.5070706@uts.edu.au> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer Cc: hackers@freebsd.org Subject: Re: mathematica/mathlink/python/linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2005 02:59:14 -0000 In <43A2265B.5070706@uts.edu.au>, Tony Maher 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. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.