0

I mostly work on linux and have no problems but want to occasionally use a Mac for work. Somehow gfortran does not work there, though. I installed it as instructed but when I try to compile something, this happens:

gfortran -o m_g_matrix2.x m_g_matrix.f90
ld: entry point (start) undefined.  Usually in crt1.o for architecture x86_64
collect2: error: ld returned 1 exit status

I have no idea what this means and google search did not help. Did someone manage to get gfortran to work on Mac?

Thanks for the help!

8
  • 2
    From where did you install it? Which instructions did you use? Did you read the question about mac and gfortran from this site? There are many stackoverflow.com/questions/tagged/osx+gfortran Commented Oct 21, 2014 at 13:18
  • I read the questions and they do not answer mine. All I'm gathering is that people in general have problems compiling fortran on a Mac. It was a few months ago that I installed gfortran so I do not remember the exact way just that I needed Xcode for it Commented Oct 21, 2014 at 13:27
  • Have you installed OS X Yosemite since you built gfortran? Commented Oct 21, 2014 at 13:48
  • No, there have been no updates to the OS since then and it hasn't worked from the beginning. Commented Oct 21, 2014 at 14:15
  • Cannot reproduce -- gfortran built from source via macports, MacOS 10.10, 10.9 and 10.6. Commented Oct 21, 2014 at 15:09

1 Answer 1

1

I installed gcc binaries for yosemite from http://hpc.sourceforge.net and also installed Xcode command-line tools as directed there. gcc contains the gfortran compiler. Seems to work well on macbook air with Yosemite. JTN

Sign up to request clarification or add additional context in comments.

Comments

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.