Opened 11 years ago
Closed 11 years ago
#40226 closed defect (fixed)
root +cocoa build fails.
Reported by: | watsodw | Owned by: | cjones051073 (Chris Jones) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.0 |
Keywords: | Cc: | mattiafrancescomoro@…, ryandesign (Ryan Carsten Schmidt) | |
Port: | root |
Description
Problem compiling libAfterimage.
Attachments (1)
Change History (16)
Changed 11 years ago by watsodw
comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)
Cc: | jonesc@… removed |
---|---|
Owner: | changed from macports-tickets@… to jonesc@… |
comment:2 Changed 11 years ago by cjones051073 (Chris Jones)
The problem is with your fortran compiler
:info:build gfortran -O2 -m64 -std=legacy -o misc/minicern/src/hbook.o -c /opt/macports/var/macports/build/_opt_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_root/root/work/root/misc/minicern/src/hbook.f 2>&1 | sed -e s/arning:/arn-Ignore:/ >&2 :info:build i686-apple-darwin10-gfortran-4.2.1: error trying to exec 'f951': execvp: No such file or directory :info:build gfortran -O2 -m64 -std=legacy -o misc/minicern/src/kernlib.o -c /opt/macports/var/macports/build/_opt_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_root/root/work/root/misc/minicern/src/kernlib.f 2>&1 | sed -e s/arning:/arn-Ignore:/ >&2 :info:build i686-apple-darwin10-gfortran-4.2.1: error trying to exec 'f951': execvp: No such file or directory :info:build gfortran -O2 -m64 -std=legacy -o misc/minicern/src/zebra.o -c /opt/macports/var/macports/build/_opt_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_root/root/work/root/misc/minicern/src/zebra.f 2>&1 | sed -e s/arning:/arn-Ignore:/ >&2 :info:build i686-apple-darwin10-gfortran-4.2.1: error trying to exec 'f951': execvp: No such file or directory
Do you have a default version of gfortran available ? Which one ?
cheers Chris
comment:3 Changed 11 years ago by cjones051073 (Chris Jones)
I am wondering if you are using a fortran compiler from outside macports ? Can you show what you get with the commands below
macmini ~/Projects/MacPorts/portfiles/science/root > gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin12/4.8.1/lto-wrapper Target: x86_64-apple-darwin12 Configured with: ../gcc-4.8.1/configure --prefix=/opt/local --build=x86_64-apple-darwin12 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc48 --includedir=/opt/local/include/gcc48 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.8 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.8 --with-gxx-include-dir=/opt/local/include/gcc48/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc48 4.8.1_2' Thread model: posix gcc version 4.8.1 (MacPorts gcc48 4.8.1_2) macmini ~/Projects/MacPorts/portfiles/science/root > which gfortran /opt/local/bin/gfortran
If it is an external compiler, this is not something I can support. Please try again using a MacPorts gfortran compiler (i.e. sudo port select gcc).
Chris
comment:4 Changed 11 years ago by cjones051073 (Chris Jones)
Works fine for me, using OSX 10.8 and MacPorts gcc 4.8 'port selected' as in comment 3
comment:6 Changed 11 years ago by cjones051073 (Chris Jones)
so what gfortran version was it picking up before you port selected macPorts gcc 4.7 ?
comment:7 Changed 11 years ago by watsodw
It was finding gfortran 4.2.1 that I installed after installing the Xcode 4.6.3 commandline tools.
comment:8 Changed 11 years ago by cjones051073 (Chris Jones)
But *where* did you install it from ? Xcode does not provide a fortran compiler of any sorts.
comment:9 Changed 11 years ago by cjones051073 (Chris Jones)
or to put it another way, please run
> sudo port select gcc none > which gfortran > gfortran -v
So we can see exactly what you where using.
Chris
comment:10 Changed 11 years ago by watsodw
gfortran -v gives:
Using built-in specs. Target: i686-apple-darwin10 Configured with: /Builds/apple/gcc-5664/build/obj/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++,fortran --program-transform-name=/[cg][.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5664)
Obviously the wrong version for the gcc Xcode installed :
Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/[cg][.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
comment:11 Changed 11 years ago by cjones051073 (Chris Jones)
OK, so this is then some third party fortran compiler, that based on comment 2 is broken I would say.
comment:12 follow-up: 13 Changed 11 years ago by cjones051073 (Chris Jones)
Whilst I cannot fix a broken compiler, we can protect the ROOT port from opportunistically finding and using whatever 'gfortran', working or otherwise, the user has in their PATH when building the port. I have patch ready that will only enable the use of fortran if the user explicitly uses a compiler setting that provides one (i.e. if they use one of the gcc variants). Note the the bit of ROOT that still needs a fortran compiler is pretty insignificant these days, so this is no major lose...
comment:13 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to jonesc@…:
whatever 'gfortran', working or otherwise, the user has in their PATH when building the port
MacPorts does not use the user's PATH. It uses its own, as defined in binpath in macports.conf.
But ports should explicitly name, by absolute path, any compiler they want to use. This usually happens automatically. See UsingTheRightCompiler for more.
comment:14 Changed 11 years ago by cjones051073 (Chris Jones)
Well, it might not be via PATH, but however it was being found the ROOT configure script was finding the gfortran version the user had installed. I confirmed this myself, as if I didn't have a 'gfortran' version selected by 'port select gcc', nothing was found, and if I did it was. The fix is to just explicitly set the f77 compiler to something that cannot be found, in the cases where we don't want it to.
Chris
comment:15 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I applied the portion of attachment:ticket:40238:root.diff that fixed this issue in r110048.