Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2002 13:39:00 -0500
From:      Mathew Kanner <mat@cnd.mcgill.ca>
To:        freebsd-emulation@freebsd.org
Cc:        Mathew Kanner <mat@cnd.mcgill.ca>
Subject:   Matlab 6.5 R13 installation notes
Message-ID:  <20021107133900.X92742@cnd.mcgill.ca>

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

--TakKZr9L6Hm6aLOc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello,
	The following is what I had to do to install and run Matlab with
linux-base-7.  Could someone please follow-up on 
http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/45023 (patch #1) and
http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/42457 (patch #2).

	Notes:
	Two kernel patches are required and the default java doesn't
work.  Java jre1.3.1 dies with a thread problem and jre1.1.8 hangs on
exit without patch #2.
	FlexLM doesn't run without patch #1.
	Matlab no-longer requires the /dev/ptmx and the unix command
works.

	Installation (assumes kernel patches are done)
% xhost + localhost
% su
% mount Unix installation CD #1
% /compat/linux/bin/bash
% run install found on cd
	-Install to /usr/local/matlab6.13
	-Cancel the license editor, cp your license to
	/usr/local/matlab6.13/etc/license.dat click ok (or yes), and
	your license should show up with the right SERVER and VENDOR
	lines.
	I choose to create the links in /usr/local/bin
	Complete the install.
% (Optional) If you want additional toolboxes, eject the cd, mount the
  2nd Unix CD, re-run the installation and specify the same path as
  before. 
 
% pw useradd -u 81 -n flexlm -s /bin/sh -d /
	(Creates a user for flexlm)
% sed -i.bak -e's,^#\!.*/bin/sh$,#! /compat/linux/bin/bash,' /usr/local/matlab6.13/etc/lm* /usr/local/matlab6.13/bin/matlab /usr/local/matlab6.13/bin/mex
	(Set linux emulation, or you could hack the arch.sh, or
	 manually specify the arch)

% rm /usr/local/matlab6.13/sys/java/jre/glnx86
% ln -s /usr/local/matlab6.13/sys/java/jre/glnx86/jre1.1.8/ /usr/local/matlab6.13/sys/java/jre/glnx86/jre
	(Changes the default java to one that works)
	
% /usr/local/matlab6.13/etc/lmstart -u flexlm
	(Start FlexLM)

% as regular user, run matlab to test.

	Attached is two patches anda start-up script I use in
/usr/local/etc/rc.d to automatically start flexlm.

	--Mat

PS, please CC as I'm not on the list

-- 
Captain Capacitor: Shiver me templates! (ReBoot)

--TakKZr9L6Hm6aLOc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="matlab.patch1"

--- /usr/src/sys/compat/linux/linux_file.c	Mon Nov  5 14:08:22 2001
+++ /usr/src/sys/compat/linux/linux_file.c.new	Thu Nov  7 02:16:51 2002
@@ -766,8 +766,8 @@
 	}
 	bsd_flock->l_whence = linux_flock->l_whence;
 	bsd_flock->l_start = (off_t)linux_flock->l_start;
-	bsd_flock->l_len = (off_t)linux_flock->l_len;
-	bsd_flock->l_pid = (pid_t)linux_flock->l_pid;
+	bsd_flock->l_pid = 0;
+	bsd_flock->l_len = 0;
 }
 
 static void
@@ -818,8 +818,8 @@
 	}
 	bsd_flock->l_whence = linux_flock->l_whence;
 	bsd_flock->l_start = (off_t)linux_flock->l_start;
-	bsd_flock->l_len = (off_t)linux_flock->l_len;
-	bsd_flock->l_pid = (pid_t)linux_flock->l_pid;
+	bsd_flock->l_pid = 0;
+	bsd_flock->l_len = 0;
 }
 
 static void

--TakKZr9L6Hm6aLOc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="matlab.patch2"

--- /usr/src/sys/kern/kern_exit.c.old	Thu Nov  7 12:59:18 2002
+++ /usr/src/sys/kern/kern_exit.c	Thu Nov  7 13:00:06 2002
@@ -342,7 +342,8 @@
 	if (p->p_sigparent && p->p_pptr != initproc) {
 	        psignal(p->p_pptr, p->p_sigparent);
 	} else {
-	        psignal(p->p_pptr, SIGCHLD);
+	        if (p->p_sigparent != 0)
+			psignal(p->p_pptr, SIGCHLD);
 	}
 
 	wakeup((caddr_t)p->p_pptr);

--TakKZr9L6Hm6aLOc
Content-Type: application/x-sh
Content-Disposition: attachment; filename="flexlm.sh"

#!/bin/sh
#
# FlexLM startup script

flexlmdir=/usr/local/matlab6.13/etc/
flexlmuser=flexlm

case "$1" in
start)
	echo -n ' FlexLM'
	$flexlmdir/lmstart -u $flexlmuser
    ;;
stop)
	$flexlmdir/lmdown
    ;;
*)
    echo "Usage: `basename $0` {start|stop}" >&2
    exit 64
    ;;
esac

exit 0

--TakKZr9L6Hm6aLOc--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021107133900.X92742>