0

I need to run an old program that depends on MATLAB on my Mac with Apple Silicon, but I only have the precompiled binaries, not the .f source files. The program requires libgfortran.3, but modern versions of gfortran only provide libgfortran.5.

My questions: Is it possible to install libgfortran.3 on Mac Silicon? If not, what are my options for running this MATLAB-dependent program without the source code? Any advice, links to old binaries, or compatibility solutions would be greatly appreciated. Thanks!

5
  • What's stopping you from just building an old version of libgfortran from source? Commented Sep 3 at 18:54
  • The old program (binary) is most likely compiled for Intel architectures (or maybe even PowerPC?), not for Apple Silicon. If it’s Intel, you will need an Intel version of MATLAB too (run under Rosetta). If it’s PowerPC you will no longer be able to run it. Commented Sep 3 at 18:58
  • What type of program is it, how does it depend on MATLAB? It could be a MEX-file that you run from within MATLAB, it could be a stand-alone executable that links to MATLAB libraries, and there probably are some other options too. file <binary file name> should tell you what architecture the program is built for. Commented Sep 3 at 19:02
  • Thanks for the clarification! The program is a standalone executable that I call from within MATLAB, but not a MEX file. MATLAB itself just runs the binary through system calls. I already installed MATLAB R2018b, which requires an Intel processor, and I’m running it under Rosetta. I checked the binary with file <binary file name> and it reports: Mach-O 64-bit executable x86_64 So it seems to be Intel. From what I understand, both MATLAB and the binary should work under Rosetta, but the error I’m getting is specifically due to the missing libgfortran.3.dylib. Commented Sep 4 at 0:49
  • Install, e.g., by compiling from source, an older version of GCC that does include libgfortran 3. Commented Sep 11 at 12:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.