Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Mar 2013 10:31:13 +0100
From:      Tijl Coosemans <tijl@coosemans.org>
To:        Vijay Kaul <vijaykaul@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Installing Matlab
Message-ID:  <5131C6E1.3050000@coosemans.org>
In-Reply-To: <CAOgC9OjJVzfkWtnXWx9c%2BLURnZ%2BYEEXnZ--V%2Br3PnR5MLWcyQw@mail.gmail.com>
References:  <CAOgC9Oi=Mt-tgjQpzmGJGS9gYiS5RsEtPVhP4X=viSKh9tz%2Bpw@mail.gmail.com> <511E01BA.20307@coosemans.org> <511E6509.9090703@coosemans.org> <CAOgC9OjB5kVfFp_EO-R8Tfmu=oy-j6_UBpYVFPmqHqJ2Jv_NcQ@mail.gmail.com> <51310F25.9070404@coosemans.org> <CAOgC9OigPyd7uQ4ZHzJQVKEEqZZML9XYnAQt9MX9mFmWV0KdSA@mail.gmail.com> <51312B41.2060901@coosemans.org> <CAOgC9OjJVzfkWtnXWx9c%2BLURnZ%2BYEEXnZ--V%2Br3PnR5MLWcyQw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2LLLRPQSNXNJTOJCTXLGW
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 01-03-2013 23:55, Vijay Kaul wrote:
> On Fri, Mar 1, 2013 at 5:27 PM, Tijl Coosemans <tijl@coosemans.org> wro=
te:
>> On 01-03-2013 22:35, Vijay Kaul wrote:
>>> On Fri, Mar 1, 2013 at 3:27 PM, Tijl Coosemans <tijl@coosemans.org> w=
rote:
>>>> On 01-03-2013 21:07, Vijay Kaul wrote:
>>>>> On Fri, Feb 15, 2013 at 11:40 AM, Tijl Coosemans <tijl@coosemans.or=
g> wrote:
>>>>>> On 15-02-2013 10:36, Tijl Coosemans wrote:
>>>>>>> On 14-02-2013 22:42, Vijay Kaul wrote:
>>>>>>>> I was wondering if anyone has had any recent (or not-so-recent)
>>>>>>>> experience installing Matlab on FreeBSD/PC-BSD? (Yes, I know abo=
ut
>>>>>>>> octave.)
>>>>>>>>
>>>>>>>>  I'm not entirely new to *nix, but I'm novice enough that I can'=
t seem
>>>>>>>> to get this to work.
>>>>>>>>
>>>>>>>>  Perhaps the shortest and simplest solution would be if Mathwork=
s own
>>>>>>>> installer would function, but that runs as a Java Web Start
>>>>>>>> application, and I can't seem to get that working in Opera, Fire=
fox,
>>>>>>>> or Konqueror.
>>>>>>>>
>>>>>>>>  The automatic rout having failed, I've downloaded the files man=
ually,
>>>>>>>> and I've tried to run the install script; however, it's failed a=
s
>>>>>>>> well. I found this site:
>>>>>>>> <http://matrossi.blogspot.com/2011/08/installing-matlab-2011a-on=
-freebsd.html>,
>>>>>>>> which claims installation instructions for PC-BSD8.2 boiling dow=
n to:
>>>>>>>> open up the shell scripts and take /bin/sh --> /compat/linux/bin=
/sh.
>>>>>>>> Well, that seems to help a bit, but it also fails because the in=
stall
>>>>>>>> script determines my architecture to be x68, while the downloads=
 are
>>>>>>>> for (what they call) a64. (My system is indeed a 64-bit system.
>>>>>>>> Perhaps the above instructions were for an x86 system.)
>>>>>>>>
>>>>>>>>  I feel like if I could modify the install script sufficiently, =
the
>>>>>>>> install would work. My bash scripting is weak, though, and I wor=
ry
>>>>>>>> about screwing up my system and/or the installation. There are o=
nly a
>>>>>>>> few functions in there that are looking for architecture type, u=
sually
>>>>>>>> with the output from uname. I think fixing those would work...?
>>>>>>>>
>>>>>>>>  Could anyone help me get past this point?
>>>>>>>>
>>>>>>>>  Thanks in advance! And please, if there's any info I can provid=
e that
>>>>>>>> would be helpful, please just let me know.
>>>>>>>>
>>>>>>>>  Output of uname -a:
>>>>>>>>  FreeBSD pcbsd-8517 9.1-RELEASE FreeBSD 9.1-RELEASE #2: Tue Nov =
27
>>>>>>>> 03:45:16 UTC 2012
>>>>>>>> root@darkstar:/usr/obj/pcbsd-build90/fbsd-source/9.1/sys/GENERIC=
 amd64
>>>>>>>>
>>>>>>>>  The install script in question: <http://pastebin.com/QkEH1vkF>;
>>>>>>>
>>>>>>> Try creating this link:
>>>>>>>
>>>>>>> ln -s ../usr/bin/expr /compat/linux/bin/expr
>>>>>>>
>>>>>>> Without this link Linux scripts run the FreeBSD expr which isn't =
fully
>>>>>>> compatible.
>>>>>>
>>>>>> And also, the Linux compatibility layer is 32bit so you need the x=
86
>>>>>> version of Matlab.
>>>>>>
>>>>>
>>>>> Oh, I didn't realize that Linux on FBSD was 32 bit. Thanks for
>>>>> pointing that out. BTW, mathworks has stopped releasing new 32-bit
>>>>> versions of matlab for linux, but you can still get R2012a for 32-b=
it
>>>>> linux.
>>>>>
>>>>> Regarding the linking advice.... I have a /bin/expr and
>>>>> /compat/linux/usr/bin/expr. My naivety is showing, but if I did
>>>>>
>>>>> ~> ln -s /usr/bin/expr /compat/linux/usr/bin/expr
>>>>
>>>> That's not the same command as above.
>>>
>>> You're right. I didn't understand at first, but I think the command
>>> you suggested assumed that the working directory was
>>> /compat/linux/bin.
>>>
>>>>
>>>>> don't I also need to edit my path so that the script would find my
>>>>> link before finding the built-in FBSD command? Currently, my path
>>>>> begins: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/u=
sr/local/bin:
>>>>> .... So I think the script would still use '/bin/expr'.
>>>>
>>>> Under Linux compat the order becomes:
>>>>
>>>> 1: /compat/linux/sbin/expr
>>>> 2: /sbin/expr
>>>> 3: /compat/linux/bin/expr       <- You need to create this as a link=
 to 7
>>>> 4: /bin/expr                    <- FreeBSD expr
>>>> 5: /compat/linux/usr/sbin/expr
>>>> 6: /usr/sbin/expr
>>>> 7: /compat/linux/usr/bin/expr   <- Linux expr
>>>> 8: /usr/bin/expr
>>>> ...
>>>
>>> I don't have #s 1, 2, 5, 6, or 8. I have created 3 as a link to 7.
>>> (And, of course, still have 4.)
>>> This does, indeed, clear up any errors from expr! Thanks!!
>>>
>>> <snip>
>>>
>>> The next issue is the java errors given. A brief linux install guide =
I
>>> was given instructed:
>>>
>>> ... (2) install Sun/Oracle java and plugin (32-bit) and you may
>>> actually need to use one or two versions back from the current versio=
n
>>> (depending on what's in the repositories anyway)
>>>
>>> I have, currently, installed the "OpenJDK b27" PBI (recall I'm really=

>>> on PC-BSD).
>>>
>>> Any tips or suggestions on where to find and how to install Oracle's
>>> Java? Why might I need an older version of Java? (Maybe they mean
>>> going back to JRE 6?) How would I know? (I ask about where to get
>>> Java, since Oracle claims only to support "linux", and the handbook
>>> doesn't seem to have a section on it. I'm wondering if there's a righ=
t
>>> and wrong way to go here.)
>>>
>>> The Java exceptions I see are at <http://pastebin.com/GJCnEXfR>.
>>
>> I suspect the installer already contains java, so you don't have to
>> install anything.
>=20
> Yes, the installer *does* in fact seem to contain a jre of its own, a
> point I had been confused about.
>=20
>> The Linux version of java requires linprocfs though
>> so make sure you have the following line in /etc/fstab:
>>
>> linprocfs   /compat/linux/proc  linprocfs       rw      0       0
>>
>> Then mount linprocfs using: mount /compat/linux/proc
>=20
> I do have linprocfs in my fstab, and that seemed to work. Should I set
> this command somewhere so that it executes on boot?
>=20
>> The Java exception is caused by a link error though. Can you send the
>> output of:
>>
>> objdump -p /tmp/mathworks_22112/bin/glnx86/libinstutil.so
>>
>=20
> Actually, no, I can't. It seems that the install script is not
> actually even getting to a point where it creates anything in the /tmp
> directory. I was thinking it might be cleaning up after itself, but
> no, the directory doesn't get touched. (At least, if I 'touch
> empty_file' or 'mkdir empty_dir' in /tmp, the timestamp on the
> directory (from 'ls -al') is modified. Running the installer script
> does not update the last modified timestamp on /tmp.)
>=20
> On the other hand, if I run "sudo ./install -test -v" (the 'test' flag
> suppresses execution of the java command, and the 'v' is for verbose)
> I get the following output:
>=20
> ***
> Preparing installation files ...
> ->  DVD                 =3D /usr/home/vijay/Downloads/matlab_x86
> ->  ARCH                =3D glnx86
> ->  DISPLAY             =3D :0
> ->  TESTONLY            =3D 1
> ->  JRE_LOC             =3D /tmp/mathworks_35348/sys/java/jre/glnx86/jr=
e
> ->  LD_LIBRARY_PATH     =3D /tmp/mathworks_35348/bin/glnx86
>=20
> Command to run:
> /tmp/mathworks_35348/sys/java/jre/glnx86/jre/bin/java
> -splash:"/usr/home/vijay/Downloads/matlab_x86/java/splash.png"
> -Djava.ext.dirs=3D/tmp/mathworks_35348/sys/java/jre/glnx86/jre/lib/ext:=
/tmp/mathworks_35348/java/jar:/tmp/mathworks_35348/java/jarext:/tmp/mathw=
orks_35348/java/jarext/axis2/:/tmp/mathworks_35348/java/jarext/guice/:/tm=
p/mathworks_35348/java/jarext/webservices/
> com/mathworks/professionalinstaller/Launcher -root
> "/usr/home/vijay/Downloads/matlab_x86" -tmpdir "/tmp/mathworks_35348"
>=20
> Finished
> ***
>=20
> I *do* get to see that splash image when I run the script, so somehow,
> java is running. (Or something else is throwing up a spash screen?)
>=20
> Any thoughts on a next step?

Maybe it uses /compat/linux/tmp?


------enig2LLLRPQSNXNJTOJCTXLGW
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iF4EAREIAAYFAlExxuYACgkQfoCS2CCgtiv6KQD/fgs5x2myADrTeuzj3ct3J0iL
xDstvFamQwtvGA5nIQ8A/0yWOjJ3F5TzfcNGZ394crG4MeXft3tQyh3mN2d3qWyK
=jDEc
-----END PGP SIGNATURE-----

------enig2LLLRPQSNXNJTOJCTXLGW--



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