Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Compiling Mathlink Module under Redhat 6.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17957] Compiling Mathlink Module under Redhat 6.0
  • From: ottffss <ottffss at worldnet.att.net>
  • Date: Mon, 7 Jun 1999 02:51:17 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

I just finished installing Mathematica 4.0 on my Redhat 6.0 Linux
system.  I compiled the mathlink examples (addtwo etc.) and when I try
to run them I get:

link = Install[
    "/home/msh/MyStuff/Research/SourceFiles/MathLinkExamples/addtwo",
    LinkMode -> Launch]

LinkConnect::"linkc": \
"\!\(LinkObject[\(\(\"'/home/msh/MyStuff/Research/SourceFiles/\
MathLinkExamples/addtwo'\", 2, 2\)\)]\) is dead; attempt to connect
failed."

$Failed

However, when I link against the prebuilt addtwo that shipped with
Mathematica 4.0, everything works fine.  Furthermore, Mathlink modules
which I compiled under Redhat 4.2 work fine.

So I appear to be able to run old Mathlink executables and prebuilt
executables from Wolfram, but modules compiled under RedHat 6.0 will not
run.

I have several Mathematica Licenses and I've installed one of them on
another computer running RedHat 5.2 Linux.  Everything works fine there:
old Mathelink modules, Prebuilt Examples shipped with Mathematica 4.0,
and modules compiled under Redhat 5.2.

I've downloaded the latest Mathlink software from Wolfram (the one which
is glibc 2.0 compatible) just in case it shipped with a non glibc ML
library.  I get the same results cited above.

I think that my problem goes back to an incompatibility between the
libraries that the ML library will link with.  If I check the libraries
against which my RH60 compiled modules will link I get:
[msh at localhost MathLinkExamples]$ ldd addtwo
 libm.so.6 => /lib/libm.so.6 (0x4001a000)
 libc.so.6 => /lib/libc.so.6 (0x40036000)
 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[msh at localhost MathLinkExamples]$


The prebuild examples however, link against:
[msh at localhost PrebuiltExamples]$ ldd addtwo
 libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x4000e000)
 libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x40016000)
[msh at localhost PrebuiltExamples]$
(By the way, these libraries are installed with RH 6.0, but they're in
/usr/i486-linux-libc5/lib/.  I think this is why the old and prebuilt
modules work.)

I've called Wolfram tech support with this question and their
preliminary position is that I should be able to compile and run
mathlink modules under Redhat 6.0.  Has anyone out there been able to do
this.  If so, would you mind sending me a makefile showing exactly how
you did it?

I suspect that the current MathLink libraries are glibc2.0 compatible,
while RedHat 6.0 is based on glibc2.1.






  • Prev by Date: Aborting execution -- a hard stop
  • Next by Date: Re: need help hiding display formulas
  • Previous by thread: Aborting execution -- a hard stop
  • Next by thread: need to plot an arc