Mathematica/Mathlink auf FreeBSD

From: Karsten Rothemund <karsten.rothemund(at)etechnik.uni-rostock.de>
Date: Mon, 10 Feb 2003 18:22:31 +0100

Hallo Liste,

ich setze ein Mathematica (Version 4.1) auf meinem FreeBSD-Rechner ein
(nach entsprechendem Branding geht das hervorragend). Nun will ich
aber ein C-Programm mit einem Mathematica-Notebook kommunizieren
lassen. Das entsprechende Programm tut noch nichts wildes, laesst sich
auf Linux auch uebersetzten und linken und laeuft.

Das gleiche Projekt auf FreeBSD uebersetzen geht aber nicht. Die
Ausgabe sieht wie folgt aus:

-----8<----------8<----------8<----------8<----------8<----------8<-----
gcc32 -o ml ml.o ./libML.a -lm -lc
./libML.a(mlnumenv.o): In function ne(short, dp)':
mlnumenv.o(.text+0x991): undefined reference to __errno_location'
mlnumenv.o(.text+0x9a8): undefined reference to __strtod_internal'
mlnumenv.o(.text+0xbd8): undefined reference to __errno_location'
./libML.a(mlnumenv.o): In function ne(short, xp)':
mlnumenv.o(.text+0xc91): undefined reference to __errno_location'
mlnumenv.o(.text+0xca6): undefined reference to strtold'
mlnumenv.o(.text+0xeb8): undefined reference to __errno_location'
./libML.a(mlunix.o): In function MLRequest_unix':
mlunix.o(.text+0x7f): undefined reference to stderr'
mlunix.o(.text+0x8f): undefined reference to stdin'
./libML.a(mlunix.o): In function MLAlert_unix':
mlunix.o(.text+0x271): undefined reference to stderr'
./libML.a(_pipe.o): In function pipe_make':
_pipe.o(.text+0xfc4): undefined reference to __strtol_internal'
_pipe.o(.text+0x1066): undefined reference to stdin'
_pipe.o(.text+0x10a1): undefined reference to stdout'
_pipe.o(.text+0x10da): undefined reference to stderr'
./libML.a(sockport.o): In function mlsock__getlasterror':
sockport.o(.text+0x341): undefined reference to __errno_location'
./libML.a(sockport.o): In function mlsock__setlasterror':
sockport.o(.text+0x361): undefined reference to __errno_location'
./libML.a(sockport.o): In function mlsock___reuseaddr':
sockport.o(.text+0x3d8): undefined reference to __errno_location'
./libML.a(sockpipe.o): In function _read_ul':
sockpipe.o(.text+0x21): undefined reference to __errno_location'
./libML.a(sockpipe.o): In function unix_arrange_to_get_msgs':
sockpipe.o(.text+0xc9): undefined reference to __bzero'
sockpipe.o(.text+0x119): undefined reference to __bzero'
./libML.a(sockpipe.o): In function unix_signal_handler':
sockpipe.o(.text+0x1c4): undefined reference to __bzero'
sockpipe.o(.text+0x239): undefined reference to __errno_location'
sockpipe.o(.text+0x2d0): undefined reference to __errno_location'
./libML.a(sockpipe.o): In function unix_write':
sockpipe.o(.text+0x3e1): undefined reference to __errno_location'
sockpipe.o(.text+0x409): undefined reference to __errno_location'
./libML.a(sockpipe.o): In function unix_select':
sockpipe.o(.text+0x489): undefined reference to __errno_location'
./libML.a(sockpipe.o)(.text+0x493): more undefined references to __errno_location' follow
./libML.a(sockpipe.o): In function watchsignal':
sockpipe.o(.text+0x718): undefined reference to __bzero'
collect2: ld returned 1 exit status
*** Error code 1

Stop in /home/karo/C/MathLink.
-----8<----------8<----------8<----------8<----------8<----------8<-----

Die Fehler treten beim Linken auf und deuten daraufhin, dass eine
Library fehlt: stderr und stdin deuten auf die Ausgabestreams, ich
habe deshalb schon -lm -lc explizit hinzugenommen, was aber keinen
Effekt hatte).

Die Frage ist also, welche Library muss hinzugelinkt werden? Die
libML.a ist die Version fuer Linux, und ich vermute genau hier das
Problem.

Bei Wolfram finden sich kaum Eintraege in der Datenbank und Google
findet auch nicht viel (verwertbares). Schluss: entweder bin ich zu
dumm (sonst hat keiner das Problem) oder niemand sonst verwendet
MathLink auf FreeBSD.

Dankbar fuer jeden Hinweis (RTFM reicht auch, wenn ich eines
uebersehen habe),

Ciao,

-- 
Karsten Rothemund,
Institut f. Allgemeine Elektrotechnik, Universitaet Rostock
Tel.: +49 (0)381 498 3649
E-Mail: karsten.rothemund(at)etechnik.uni-rostock.de
(PGP- and GnuPG-Key available on my HomePage:
 http://www-ae.e-technik.uni-rostock.de/home/karo/)

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Mon 10 Feb 2003 - 18:29:48 CET

search this site