DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th May 2008
coppermine's Avatar
coppermine coppermine is offline
Port Guard
 
Join Date: May 2008
Posts: 40
Default Matlab 2007b (linux version) on FreeBSD

Hi!

For some time I am trying to install the Matlab 2007b linux version on FreeBSD. Unfortunately, the steps in Handbook are not working and even not applicable because of differences between versions.
As far I see the problem, the installation shell script don't want to be run. It is complaining about some errors in a script. I will soon post more detailed error messages, but I just want to know - may be somebody has positive experience by doing this?

P.S. In fact, this is a main reason why I am still sticked to Vista . I would switch, but the need for MATLAB is strong.
Reply With Quote
  #2   (View Single Post)  
Old 21st May 2008
coppermine's Avatar
coppermine coppermine is offline
Port Guard
 
Join Date: May 2008
Posts: 40
Default

So, after some trials and errors... I didn't get the installation script working! The shell is complaining about usage of -ne operator usage in if statement. I am novice in script debugging and that script is by far not simple. Anyway, I will give more tries, because the working Matlab on FreeBSD will be a strong motivation to switch.
Oh, and the next time I will dual-boot to FreeBSD, i will put that offending part of script here. I can't find a mistake in it. That's strange - opensource community, but has not the same scripting language! Even by using shell from linux emulation (/compat/linux/bin/bash) doesn't work! C'est bizarre!

Last edited by coppermine; 21st May 2008 at 11:13 AM.
Reply With Quote
  #3   (View Single Post)  
Old 21st May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Quote:
Originally Posted by coppermine View Post
The shell is complaining about usage of -ne operator usage in if statement.
Post that line (adding a '# this is the line' comment to it would be nice) and about 4 or 5 lines above down to the closing statement, e.g. a matching 'fi' to the 'if' line, usually it is indented to the same level.

Also post the entire error output and any other relivent output from the script.

Pasting the entire script content to pastebin for a months time or as an attachment might not hurt either.


EDIT:

I do learn new things every now and then that I didn't know were valid Bourne, but generally get along fine with /bin/sh.


Quote:
Originally Posted by coppermine View Post
That's strange - opensource community, but has not the same scripting language!

FreeBSDs /bin/sh implementation is more focused on POSIX (i.e. the standard) then on extending the language. Look up the Almquist shell.


The Bourne Again SHell (bash) is the standard GNU shell and equivalent to /bin/sh in the GNU operating system. The funky Linux/GNU symbiosis makes them bed-fellows when it comes to a shell. Although some Distros are using the Debian Almquist shell (dash) instead of bash; baiscally a port of NetBSD's sh to Linux.


BourneAgain is a superset of Bourne which means Bourne script will run in bash but BourneAgain script (and Korn script in both cases) will not run in a Bourne shell if it uses BASH (or Korn) specific features.


I write scripts strictly with a POSIX Bourne Sell in mind and beyond what it provides, usually tells me that I need to use a bigger scripting language.


Although I must admit, I have recently considered writing for Korn instead of Bourne... But then using my scripts on Linux boxes could get more iffy :|
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.

Last edited by TerryP; 21st May 2008 at 10:41 PM.
Reply With Quote
  #4   (View Single Post)  
Old 25th May 2008
coppermine's Avatar
coppermine coppermine is offline
Port Guard
 
Join Date: May 2008
Posts: 40
Default

Ok, at last I got the hands to FreeBSD installation and that Matlab issue.

Code:
[root@amandine matlab]# /home/xeon/Matlab\ Linux\ 2006a/CD1/install -glnx86
expr: illegal option -- r
usage: expr [-e] expression
/home/xeon/Matlab Linux 2006a/CD1/install: line 197: [: -ne: unary operator expected
usage: dirname string
expr: illegal option -- r
usage: expr [-e] expression
/tmp/40023tmwinstall/install: line 197: [: -ne: unary operator expected
--------------------------------------------------------------------------
    Usage: install -h | [-<arch>] [-debug] [ [-t] | [-x] ]

      -h      Help. Show command usage.

      -<arch> Assume this architecture when installing.
              You must specify a valid MATLAB arch (e.g. sol2, glnx86)

      -debug  Turn on debugging messages.

      -t      Use terminal setup.

      -x      Use X Window setup. (Default)

--------------------------------------------------------------------------
The neighboorhood of offending lines are like this:
Code:
#
# Check for link portably
#
	    if [ `expr "$lscmd" : '.*->.*'` -ne 0 ]; then
	        filename=`echo "$lscmd" | awk '{ print $NF }'`
And.. may be it's better to post somehow entire script? It has more than 1200 lines. May be there is a place devoted to this?

That's it... if somebody can point out the cause of error and help to get the Matlab working, I would not hesitate to buy the beer (I don't drink, but this doesn't matter).
Reply With Quote
  #5   (View Single Post)  
Old 25th May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

The best place is to would be a pastebin or a url to the d/l, pastebin.ca can have things set to remain on display for months.


Never used it so I'm not aware of this boards attachments policy.


Code:
`expr "$lscmd" : '.*->.*'` -ne 0
means to use the output of the expr(ession) command and check if the value is not equal to zero.

the right side of the colon up until the closing back tick, ` is a regular expression to evaluate it against, I see no problem there.

I think the entire script would help.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #6   (View Single Post)  
Old 25th May 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Quote:
Never used it so I'm not aware of this boards attachments policy.
Attach whatever you want as long as it's relevant (i.e. Your Holiday pictures aren't).
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #7   (View Single Post)  
Old 25th May 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

coppermine,

hmm, i think i have an idea why the script is failing.
please run the following commands:

Code:
# cd /home/xeon/
# mkdir matlab_copy
# tar cf - 'Matlab Linux 2006a' | tar xpf - -C matlab_copy
# cd 'matlab_copy/Matlab Linux 2006a'
# perl -i -pe 's/\b(expr)\s+?/$1 -- /g' install
# /compat/linux/bin/sh ./install
ofcourse, its quite possible this won't work

Last edited by ephemera; 25th May 2008 at 05:34 PM.
Reply With Quote
  #8   (View Single Post)  
Old 29th May 2008
coppermine's Avatar
coppermine coppermine is offline
Port Guard
 
Join Date: May 2008
Posts: 40
Default

Thanks, ephemera. I will test this very soon - within a few days. Yesterday I tried to install the same Matlab distribution in fresh Xubuntu Hardy Haron installation. I made this just to wipe away the suspections about the correctness for the scripts. Needless to say.. everything went smooth and works good. (Except some warnings about lock assertion.. but who cares )

Yes, the pastebin.ca is working. I will post there the entire installation script. I think the cause of evil is there.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Matlab R2008b via linuxulator in FreeBSD, Installation Troubles ninjatux FreeBSD General 2 24th March 2009 04:23 AM
FreeBSD 7.1 kernel incompatible with a linux program map7 FreeBSD Installation and Upgrading 7 5th November 2008 11:17 PM
installing linux on freeBSD freddybaker Other BSD and UNIX/UNIX-like 4 17th October 2008 03:40 PM
[FreeBSD] which version of PostgreSQL? MacApp FreeBSD Ports and Packages 8 12th July 2008 09:25 AM
What version of FreeBSD should i choose latorion FreeBSD Installation and Upgrading 4 19th May 2008 10:16 PM


All times are GMT. The time now is 11:49 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick