Severe issue with gfortran (from gcc) with binary builds
Ryan Schmidt
ryandesign at macports.org
Thu May 17 10:08:53 PDT 2012
On May 17, 2012, at 03:57, Thomas Robitaille wrote:
> If I install MacPorts (on 10.7) then gcc45 from scratch with binary
> packages, the issue is there. If I install all packages from scratch
> with the -s flag, the issue disappears. This suggests to me that there
> is an issue with one of the binary builds.
The Lion buildbot was initially set up with Xcode 4.1 so the Lion packages were initially built with that. The buildbot has since then been updated to Xcode 4.3.2 but no new version/revision of gmp has been committed since then so the package has not been rebuilt on that.
The gmp port contains this block:
# llvm-gcc-4.2 fails make check
if {${configure.compiler} == "llvm-gcc-4.2"} {
if {[vercmp $xcodeversion 4.1] >= 0} {
configure.compiler clang
} else {
configure.compiler gcc-4.2
}
}
Xcode 4.0 and 4.1 default to llvm-gcc-4.2, so this block means on Xcode 4.1 the compiler will be changed to clang, and on Xcode 4.0 the compiler will be changed to gcc-4.2.
Note that the block used to read:
# llvm-gcc-4.2 fails make check
if {${configure.compiler} == "llvm-gcc-4.2"} {
configure.compiler clang
}
But this was changed in r81117 to fix #30294. The version of clang in Xcode 4.0 was too old to even compile the gmp code. Perhaps the version of clang in Xcode 4.1 is new enough to compile the code but not new enough to do so correctly.
If anybody here has Xcode 4.1 installed, or can install Xcode 4.1, they should build gmp from source as is:
sudo port -ns upgrade --force gmp
and verify whether the issue exists (compile and run the previously-posted Fortran test code). If so, they should rebuild gmp again from source with gcc-4.2:
sudo port -ns upgrade --force gmp configure.compiler=gcc-4.2
and verify whether that fixes the issue. If it does, then we should change the block to:
# llvm-gcc-4.2 fails make check
# clang on Xcode 4.0 cannot compile the code
# clang on Xcode 4.1 compiles the code incorrectly
if {${configure.compiler} == "llvm-gcc-4.2"} {
configure.compiler gcc-4.2
}
and increase the port's revision to force a rebuild for users.
More information about the macports-dev
mailing list