From owner-freebsd-doc@FreeBSD.ORG Fri Sep 10 10:10:21 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3318B16A4CE for ; Fri, 10 Sep 2004 10:10:21 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2111143D53 for ; Fri, 10 Sep 2004 10:10:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8AAALuQ050276 for ; Fri, 10 Sep 2004 10:10:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8AAAKf3050273; Fri, 10 Sep 2004 10:10:20 GMT (envelope-from gnats) Resent-Date: Fri, 10 Sep 2004 10:10:20 GMT Resent-Message-Id: <200409101010.i8AAAKf3050273@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Willem van Engen Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B861816A4CE for ; Fri, 10 Sep 2004 10:08:17 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9633243D4C for ; Fri, 10 Sep 2004 10:08:17 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i8AA8HpS064595 for ; Fri, 10 Sep 2004 10:08:17 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i8AA8HOL064594; Fri, 10 Sep 2004 10:08:17 GMT (envelope-from nobody) Message-Id: <200409101008.i8AA8HOL064594@www.freebsd.org> Date: Fri, 10 Sep 2004 10:08:17 GMT From: Willem van Engen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: docs/71555: how to run matlab on 5.2 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2004 10:10:21 -0000 >Number: 71555 >Category: docs >Synopsis: how to run matlab on 5.2 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 10 10:10:20 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Willem van Engen >Release: 5.2-CURRENT >Organization: >Environment: FreeBSD jeremy 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Wed Jul 21 10:00:48 CEST 2004 root@jeremy:/usr/obj/usr/src/sys/JEREMY i386 >Description: Following FreeBSD's handbook procedure to get matlab running doesn't work here on 5.2-CURRENT with linux_base-7.1_7, giving many errors like: [: -ne: unary operator expected both trying to start the license manager and matlab. License manager cannot be run, and matlab doesn't start because of that. >How-To-Repeat: on 5.2-CURRENT with linux_base-7.1_7, install matlab using the installer. Follow procedure of FreeBSD's handbook for running it on FreeBSD, try to start the license manager (/usr/local/etc/rc.d/flexlm.sh). >Fix: 0. Skip the handbook's license manager startup section (sorry guys) 1. brandelf -t Linux the binaries in $MATLABROOT/etc/glnx86 2. Remove scripts $MATLABROOT/etc/lm* 3. Create symlink from glnx86/lm_boot to $MATLABROOT/etc/lm_boot. 4. Create new startup script /usr/local/etc/rc.d/flexlm.sh as shown below 5. chmod +x of script. like handbook says 6. Run `/usr/local/etc/rc.d/flexlm.sh start` [note: it still needs some su-wrapping for running it as a normal user] I'm not sure if this is the Right Way (tm) to run it, but at least it works, independently from linux_base version (as it completely bypasses shell scripts and starts the binaries directly). I'll forward this pr to freebsd-emulation too. --- begin flexlm.sh --- #!/bin/sh # Verified for matlab R12 MATLABROOT=/usr/local/matlab LICENSE=$MATLABROOT/etc/license.dat case "$1" in start) # Now start daemon. Logging is still an issue if [ -f $MATLABROOT/etc/glnx86/lmgrd ]; then $MATLABROOT/etc/glnx86/lmgrd -c $LICENSE && echo 'MATLAB_lmgrd' fi ;; stop) # Quit 'm if [ -f $MATLABROOT/etc/glnx86/lmdown ]; then $MATLABROOT/etc/glnx86/lmdown -c $LICENSE -q && echo 'MATLAB_lmgrd' fi ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac exit 0 --- end flexlm.sh --- >Release-Note: >Audit-Trail: >Unformatted: