Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 1996 14:17:17 -0700 (PDT)
From:      Tom Bartol <bartol@salk.edu>
To:        sos@FreeBSD.org
Cc:        hackers@FreeBSD.org
Subject:   linux-elf matlab runs!
Message-ID:  <Pine.NEB.3.93.960808133635.278E-100000@pauling.salk.edu>
In-Reply-To: <199608080642.IAA01368@ra.dkuug.dk>

next in thread | previous in thread | raw e-mail | index | archive | help


Success!!!  The linux-elf binary for matlab runs in
FreeBSD-2.2-960801-SNAP!!!

The suggestions given by several of you (thanks a bunch to you) looked
good and may very well have worked out too but what I tried first and what
is the best way to fix it was suggested by tech-support at the MathWorks
Inc.  It turns out that they have a more recent binary patched for a more
recent elf release. Here is result of running ldd on this binary: 

/compat/linux/usr/bin/ldd /usr/local/pkgs/matlab-4.2c/bin/lnx86/matlab
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6.0
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6.0
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6.0
        libdl.so.1 => /lib/libdl.so.1.7.3
        libtermcap.so.2 => /lib/libtermcap.so.2.0.0
        libm.so.5 => /lib/libm.so.5.0.0
        libc.so.5 => /lib/libc.so.5.0.9
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6.0
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6.0

This binary and several supporting files can be obtained from:

    ftp://ftp.mathworks.com/pub/mathworks/bin/unix/lnx86/matlab.42c.update
    ftp://ftp.mathworks.com/pub/tech-support/library/extern/conv2.mexlx
    ftp://ftp.mathworks.com/pub/tech-support/library/extern/ode23.mexlx
    ftp://ftp.mathworks.com/pub/tech-support/library/extern/ode45.mexlx

The procedure is:

     1.  /compat/linux/lib/elf files are not needed for this matlab
binary.
     2.  Make sure that LD_LIBRARY_PATH is set to nothing.
     3.  Rename the original MATLAB binary (in $MATLAB/bin/lnx86) to
something else. ($MATLAB is the directory in which the matlab package is
installed).
     4.  Get the patched binary.
     5.  Rename the patched binary 'matlab' and put it in
$MATLAB/bin/lnx86. 
     6.  Place the new mexlx files in ~/matlab, or replace
the existing mexlx files in $MATLAB/toolbox/matlab/datafun and
$MATLAB/toolbox/matlab/funfun. 
     7.  apply the following patch to $MATLAB/install/arch.sh

*** arch.sh.orig        Thu Aug  8 13:56:32 1996
--- arch.sh     Thu Aug  8 13:51:23 1996
***************
*** 98,103 ****
--- 98,109 ----
        else
            Arch="vax_unix"
        fi
+    elif [ -f /usr/bin/uname ]; then                   # FreeBSD?
+       case "`/usr/bin/uname`" in
+           FreeBSD)
+               Arch="lnx86"
+               ;;
+       esac
     elif [ -d $MATLAB/bin/c2mp ]; then
        Arch="c2mp"
     fi


And that's it!  Matlab runs perfectly and benchmarks out the same as
running a linux machine.

So now I'm getting set to UPGRADE every linux machine in our lab to
FreeBSD-2.2-960801-SNAP!!!

Many thanks to the core team and all those responsible for FreeBSD and the
linux compatibility module!

bits and bytes,

Tom








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.93.960808133635.278E-100000>