Installing and running MATLAB 2012b on MacOSX 10.11.6

2 views (last 30 days)
Hello--with the help of this and other sites I successfully installed MATLAB 2012b on Mac OSX 10.11.6.
I also then installed the patch from mathworks, unfortunately MATLAB will not start. To start MATLAB I wrote a small shell to set the env variables and launch the process as follows:
setenv JAVA_HOME /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
setenv MATLAB_JAVA /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
/Applications/MATLAB_R2012b.app/Contents/MacOS/StartMATLAB
When I start this simple cshell I get the following errors:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
------------------------------------------------------------------------
Segmentation violation detected at Fri Sep 2 13:59:44 2016
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled
Current Visual : None
Default Encoding: ISO-8859-1
MATLAB Root : /Applications/MATLAB_R2012b.app
MATLAB Version : 8.0.0.783 (R2012b)
Operating System: Darwin 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
Processor ID : x86 Family 6 Model 44 Stepping 2, GenuineIntel
Virtual Machine : Java 1.8.0_60-b27 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : No active display
Fault Count: 1
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 000000000000000d RBX = 000000000000000d
RCX = 00007000012f7050 RDX = 0000000115ae2902
RSP = 0000000100000000 RBP = 0000000118ec45d0
RSI = 0000000118edfac3 RDI = 00007000012f7060
R8 = 00007000012f70b0 R9 = 00007000012f7060
R10 = 0000000128e06ac8 R11 = 00007000012f7060
R12 = 000000000000001a R13 = 000000011926b730
R14 = 00000007bd4553d8 R15 = 00007000012f70b0
RIP = 00000010012f7060 RFL = 0000000128e06ac8
CS = 00007000012f7068 FS = 0000000000000000 GS = 0000000128e05a78
Stack Trace (from fault):
[ 0] 0x00000001000e4e46 /Applications/MATLAB_R2012b.app/bin/maci64/libmwfl.dylib+00036422 _ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+000150
[ 1] 0x00000001000e5af1 /Applications/MATLAB_R2012b.app/bin/maci64/libmwfl.dylib+00039665 fl_diag_terminate+000321
[ 2] 0x00000001000e7c34 /Applications/MATLAB_R2012b.app/bin/maci64/libmwfl.dylib+00048180 _ZN2fl4diag13terminate_logEPKcRKNS0_14thread_contextE+000100
[ 3] 0x00000001008e125e /Applications/MATLAB_R2012b.app/bin/maci64/libmwmcr.dylib+00315998 mnTrapCtrlc+000254
[ 4] 0x00000001008e2d24 /Applications/MATLAB_R2012b.app/bin/maci64/libmwmcr.dylib+00322852 _Z32mnRunPathDependentInitializationv+003492
[ 5] 0x00000001008e313d /Applications/MATLAB_R2012b.app/bin/maci64/libmwmcr.dylib+00323901 _Z32mnRunPathDependentInitializationv+004541
[ 6] 0x00000001008e37f5 /Applications/MATLAB_R2012b.app/bin/maci64/libmwmcr.dylib+00325621 _Z32mnRunPathDependentInitializationv+006261
[ 7] 0x00000001008e3945 /Applications/MATLAB_R2012b.app/bin/maci64/libmwmcr.dylib+00325957 mnFatalSignalHandler+000149
[ 8] 0x00007fff87f5d52a /usr/lib/system/libsystem_platform.dylib+00009514 _sigtramp+000026
[ 9] 0x0000000115bc4498 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+03966104 _ZN8CallInfo11set_virtualE11KlassHandleS0_12methodHandleS1_iP6Thread+000352
[ 10] 0x0000000118ebf7a7 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+57423783
[ 11] 0x0000000115ae6b0e /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+03058446 _ZN9JavaCalls11call_helperEP9JavaValueP12methodHandleP17JavaCallArgumentsP6Thread+001710
[ 12] 0x0000000115ab9c69 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+02874473 _ZN13InstanceKlass27call_class_initializer_implE19instanceKlassHandleP6Thread+000191
[ 13] 0x0000000115abb171 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+02879857 _ZN13InstanceKlass15initialize_implE19instanceKlassHandleP6Thread+001205
[ 14] 0x0000000115abb407 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+02880519 _ZN13InstanceKlass10initializeEP6Thread+000061
[ 15] 0x0000000115bc6322 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+03973922 _ZN12LinkResolver19resolve_static_callER8CallInfoR11KlassHandleP6SymbolS5_S2_bbP6Thread+000156
[ 16] 0x0000000115bc6536 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+03974454 _ZN12LinkResolver20resolve_invokestaticER8CallInfo18constantPoolHandleiP6Thread+000258
[ 17] 0x0000000115bc65f7 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+03974647 _ZN12LinkResolver14resolve_invokeER8CallInfo6Handle18constantPoolHandleiN9Bytecodes4CodeEP6Thread+000179
[ 18] 0x0000000115ae0efd /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+03034877 _ZN18InterpreterRuntime14resolve_invokeEP10JavaThreadN9Bytecodes4CodeE+000881
[ 19] 0x0000000118ee0288 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+57557640
[ 20] 0x0000000118ec69d0 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib+57453008
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.** This crash report has been saved to disk as /Users/mynamehere/matlab_crash_dump.1558-1 **
MATLAB is exiting because of fatal error
Killed
It's clear that the path is incorrect and somehow MATLAB is ignoring both the JAVA_HOME and MATLAB_JAVA env variables. Here is the directory listing of that location:
[corona:~/matlab2012b]% ls $MATLAB_JAVA
bin bundle lib man
Any help would be greatly appreciated--this is to run legacy MATLAB framework code.
Thank you!

Answers (1)

Walter Roberson
Walter Roberson on 3 Sep 2016
I installed OS-X 10.11.6 (El Capitan) on a virtual machine on my existing El Capitan system (so that I would have a completely clean environment to test from.)
I used Safari to connect to my Mathworks account and asked to download the old R2012b release. That brought me to a page with a bunch of instructions and several items to download. Following the instructions there, I downloaded the installer .zip, ensured it got expanded to a folder, and then downloaded the other .zip into that folder (safari automatically unzipped them.)
I changed my system preferences to allow installation from unknown developers and double-clicked on the installer application. It popped up a message telling me that I needed to install a java. I clicked on the "More info" and was sent to the download page for the latest Java for OS-X, Java 8 release 101. I downloaded it and installed it. As indicated in the Java installation instructions, I rebooted (not that I could see any good reason to, but that was in the instructions.) (Actually I misread the instructions, just asks to restart your browser)
I then went back to the MATLAB installer... and was given the same message about needing java. Java 8 was definitely installed but the installer did not think any Java was installed :(
I then poked around a bit and downloaded legacy Java from https://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US . I was then able to launch the MATLAB installer.
In the installer I indicated I wanted to install from Internet, and that I wanted Custom install (so I could download a minimal version.) Logged in to my account -- and was told there were no products available for installation. So I had to go back to the download directory and re-zip the directories that Safari had so helpfully automatically unzipped . (Sigh. This reminds me why I normally use Firefox instead of Safari.) That down, the installer recognized there was something there and allowed me to select which of my licensed toolboxes I wanted to install. (Oddly, even though I had only downloaded MATLAB itself, it gives me the option of installing all of my toolboxes. Might have something to do with asking to check product updates.) I narrowed it down to just MATLAB. Upon being prompted I allowed java to create /usr/local/bin and proceeded to permit the install to the default location.
After activating, I installed the R2012b patch from http://www.mathworks.com/support/bugreports/1098655
That done, I was able to start MATLAB R2012b without difficulty. I did not need to change any environment variables.
  2 Comments
William
William on 3 Sep 2016
Edited: William on 3 Sep 2016
Thank you very much for this review.
The approach of using a virtual machine seems a wise one. I've decided (for reasons not entirely clear, probably personality disorder related) to try to make this work on fully patched 64 bit Mac OS 10.11.6.
As mentioned, after reviewing comments regarding how to pull this off on this site and others, I got through the download and back installation of the older JAVA version needed (I have three versions on this tower) and managed to install MATLAB 2012b without downloading everything initially--directly from a DVD media installer for a MATLAB & SIMULINK 2012b install disk I had. The trick there was the setting of the env variables and having the proper ancient JAVA properly installed. Everything worked in the installation process, including the licensing and activation. As the kids say "then the bad s*** happened".
The install process completed with no errors or even warnings, but when launching MATLAB seems unhappy about JAVA. I'll carefully review your helpful suggestion and rethink this.
Thank you very much for taking the time to help me with this detailed and thoughtful reply. Cheers.
Generally--do not try this, but if you do, after downloading be sure to set the correct env variables and run the installer this way (after moving to /volumes/.....):
./InstallForMacOSX -javadir /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
It amazes me that this will install, with only a few common and unimportant warnings:
Preparing installation files ... Installing ... Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized. Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized. Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
MATLAB2012b doesn't work yet, but I'll keep updating this thread with any details if this figured out. Efficient approach is VM probably.
Walter Roberson
Walter Roberson on 3 Sep 2016
I did this in a virtual machine only because I wanted to be able to document step-by-step the process needed to start "from scratch". My regular El Capitan already had several MATLAB releases installed and Java and so on, and I figured that those existing installations might be providing pieces that you might not happen to have, so I would get a misleading installation sequence if I did not start fresh.

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!