[15057] in Athena Bugs
[daemon@ATHENA.MIT.EDU : linux unknown version: matlab]
daemon@ATHENA.MIT.EDU (Derek Atkins)
Fri Apr 4 12:20:12 1997
Date: Fri, 4 Apr 1997 12:20:02 -0500
From: Derek Atkins <warlord@MIT.EDU>
To: bugs@MIT.EDU
------- Forwarded transaction
[0024] daemon@ATHENA.MIT.EDU (David S. Lum) SIPB-Athena Bugs 04/04/97 11:35 (78 lines)
Subject: linux unknown version: matlab
From davknav@MIT.EDU Fri Apr 4 11:35:29 1997
Received: from MIT.EDU (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.69.0.28]) by bloom-picayune.MIT.EDU (8.7.6/2.3JIK) with SMTP id LAA29180 for <sipb-athena-bugs-mtg@bloom-picayune.mit.edu>; Fri, 4 Apr 1997 11:35:29 -0500
Received: from FILI.MIT.EDU by MIT.EDU with SMTP
id AA09999; Fri, 4 Apr 97 11:35:09 EST
Received: (from davknav@localhost) by fili.mit.edu (8.8.4/8.7.3) id LAA09683; Fri, 4 Apr 1997 11:35:22 -0500
Message-Id: <199704041635.LAA09683@fili.mit.edu>
To: sipb-athena-bugs@MIT.EDU
Subject: linux unknown version: matlab
Date: Fri, 04 Apr 1997 11:35:22 EST
From: "David S. Lum" <davknav@MIT.EDU>
System name: fili.mit.edu
Type and version: i686 unknown version (no /etc/athena/version found)
Display type: linux
What were you trying to do?
Compile a Matlab mex file with the script /mit/matlab/linuxbin/cmex
What's wrong:
(1) The script failed with the error "gcc-elf: command not found".
When I made a symlink from gcc-elf to the system compiler, gcc, it
compiled happily.
(2) When I ran the resulting .mexlx file it failed with all sorts of
"symbol undefined" errors. This is because the shared standard C
library did not get linked into the .mex file.
What should have happened:
Hi. I already reported this by sending mail to "bugs@mit.edu", but
I'm beginning to think that that email account is defunct, so I used
"sendbug" this time:
The bug is this: Matlab's "cmex" capability is heart-breakingly close
to being in perfect working order for the SIPB-supported Athena-Linux
platform. There are just two things that need to be modified in the
script /mit/matlab/linuxbin/cmex to make it work:
This section:
> lnx86)
> processor='lnx86'
> mex_ext='mexlx'
>#
> CC='gcc-elf'
> LD='$CC'
> LDFLAGS_DB="-shared -rdynamic"
> LDFLAGS="$LDFLAGS_DB"
> LD_CCLIBS='-lm'
> LD_FCLIBS='-lm'
>#
> ;;
has 2 errors. First, there *is* no such compiler as "gcc-elf" on a
Linux-Athena installation. The only compiler is "gcc", and that is
what CC should be set to. Second, the standard C library must be
specified as a link library (-lc) in LD_CCLIBS, else the resulting MEX
file fails because all sorts of symbols are undefined.
So, please modify the affected portion of /mit/matlab/linuxbin/cmex to
look like this:
lnx86)
processor='lnx86'
mex_ext='mexlx'
#
CC='gcc'
LD='$CC'
LDFLAGS_DB="-shared -rdynamic"
LDFLAGS="$LDFLAGS_DB"
LD_CCLIBS='-lc -lm'
LD_FCLIBS='-lc -lm'
#
;;
Please describe any relevant documentation references:
The SIPB knows all about Linux issues.
--[0024]--
------- End forwarded transaction