From owner-freebsd-hackers Thu Aug 8 14:17:36 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA13674 for hackers-outgoing; Thu, 8 Aug 1996 14:17:36 -0700 (PDT) Received: from helmholtz.salk.edu (helmholtz.salk.edu [198.202.70.34]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA13642; Thu, 8 Aug 1996 14:17:25 -0700 (PDT) Received: from pauling.salk.edu (pauling [198.202.70.108]) by helmholtz.salk.edu (8.7.5/8.7.3) with SMTP id OAA10416; Thu, 8 Aug 1996 14:17:25 -0700 (PDT) Date: Thu, 8 Aug 1996 14:17:17 -0700 (PDT) From: Tom Bartol Reply-To: Tom Bartol To: sos@FreeBSD.org cc: hackers@FreeBSD.org Subject: linux-elf matlab runs! In-Reply-To: <199608080642.IAA01368@ra.dkuug.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk 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