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)

main.log (2.7 MB) - added by watsodw 11 years ago.

Change History (16)

Changed 11 years ago by watsodw

Attachment: main.log added

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: jonesc@… removed
Owner: changed from macports-tickets@… to jonesc@…
:info:build /usr/bin/clang++ -dynamiclib -single_module -Wl,-dead_strip_dylibs -install_name /opt/macports/lib/root/libminicern.5.so -O2 -m64 -mmacosx-version-min=10.8 -o lib/libminicern.5.34.so misc/minicern/src/cernlib.o -ldl misc/minicern/src/hbook.o misc/minicern/src/kernlib.o misc/minicern/src/zebra.o -compatibility_version 5 -current_version 5.34.09
:info:build clang: error: no such file or directory: 'misc/minicern/src/hbook.o'
:info:build clang: error: no such file or directory: 'misc/minicern/src/kernlib.o'
:info:build clang: error: no such file or directory: 'misc/minicern/src/zebra.o'
:info:build make: *** [lib/libminicern.so] Error 1

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 should 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

Version 0, edited 11 years ago by cjones051073 (Chris Jones) (next)

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:5 Changed 11 years ago by watsodw

Works for me, too, using gcc 4.7 port selected.

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)
Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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 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 in reply to:  12 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: newclosed

I applied the portion of attachment:ticket:40238:root.diff that fixed this issue in r110048.

Note: See TracTickets for help on using tickets.