New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #28966 (closed defect: worksforme)

Opened 2 years ago

Last modified 2 years ago

py27-numpy @1.5.1 +python build failure: library not found for -lgfortranbegin

Reported by: everbloom@… Owned by: ram@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: vince@…
Port: py26-numpy py27-numpy

Description

Run port install py27-numpy but it seems to be having problems with fortran. It's giving ld: library not found for -lgfortranbegin in the logs. Full log attached.

Is it trying to use the wrong fortran (somehow)? I'm stuck.

The same problem occurs with py26-numpy.

Attachments

numpy.log (169.6 KB) - added by everbloom@… 2 years ago.
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py27-numpy/main.log

Change History

Changed 2 years ago by everbloom@…

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py27-numpy/main.log

comment:1 Changed 2 years ago by blb@…

  • Cc vince@… added
  • Owner changed from macports-tickets@… to ram@…
  • Port changed from py27-numpy to py26-numpy py27-numpy
:info:build /usr/bin/gfortran -Wall build/temp.macosx-10.6-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.macosx-10.6-x86_64-2.7/numpy/linalg/python_xerbla.o -L/opt/local/lib -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -Lbuild/temp.macosx-10.6-x86_64-2.7 -llapack -lptf77blas -lptcblas -latlas -lgfortran -o build/lib.macosx-10.6-x86_64-2.7/numpy/linalg/lapack_lite.so -undefined dynamic_lookup -bundle
2105	:info:build ld: library not found for -lgfortranbegin

Where did /usr/bin/gfortran come from? I believe the py*-numpy ports depend on gcc to get a gfortran, but that should then be installed in /opt/local.

comment:2 follow-up: ↓ 3 Changed 2 years ago by everbloom@…

According to itself, /usr/bin/gfortran is GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5659) + GF 4.2.4. So I guess it came with Xcode and Apple's gcc install.

whereis gfortran tells me about the /usr/bin/gfortran as well. However, in /opt/local/bin there's a gfortran-mp-4.4 which I guess is the macports gfortran. Is there a significant difference between macports gfortran and apple gfortran? Why is the port trying to use a non-mp version?

comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 2 years ago by blb@…

Replying to everbloom@…:

According to itself, /usr/bin/gfortran is GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5659) + GF 4.2.4. So I guess it came with Xcode and Apple's gcc install.

Is that Xcode 4? If so, maybe Apple is including a fortran compiler now...

whereis gfortran tells me about the /usr/bin/gfortran as well. However, in /opt/local/bin there's a gfortran-mp-4.4 which I guess is the macports gfortran. Is there a significant difference between macports gfortran and apple gfortran? Why is the port trying to use a non-mp version?

That's a good question, the Portfile appears to be trying to use the MacPorts' one, but looks like numpy's build setup may be ignoring what the Portfile says.

comment:4 in reply to: ↑ 3 Changed 2 years ago by everbloom@…

Replying to blb@…:

Replying to everbloom@…:

According to itself, /usr/bin/gfortran is GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5659) + GF 4.2.4. So I guess it came with Xcode and Apple's gcc install.

Is that Xcode 4? If so, maybe Apple is including a fortran compiler now...

Just Xcode 3.x, so I don't know how I got an Apple gfortran! I'm more likely to have the build that R tools come with.

whereis gfortran tells me about the /usr/bin/gfortran as well. However, in /opt/local/bin there's a gfortran-mp-4.4 which I guess is the macports gfortran. Is there a significant difference between macports gfortran and apple gfortran? Why is the port trying to use a non-mp version?

That's a good question, the Portfile appears to be trying to use the MacPorts' one, but looks like numpy's build setup may be ignoring what the Portfile says.

Buggery.

To my amazement, renaming /usr/bin/gfortran to /usr/bin/not-gfortran seems to have forced it to use mp's gfortran and it installed fine. That's *weird*, and not very nice of numpy to pick its own gfortran :(.

comment:5 Changed 2 years ago by ram@…

  • Status changed from new to closed
  • Resolution set to worksforme

The numpy distutils are very picky, Xcode doesn't provide a gfortran compiler so his compiler has come from somewhere else. Going to close this one as worksforme as you were able to work round this issue.

Note: See TracTickets for help on using tickets.