Opened 5 years ago
Last modified 2 years ago
#60340 reopened defect
ifeffit: library path to gcc library is baked into configuration file, and is wrong
Reported by: | paulfons | Owned by: | joefowler (Joe Fowler) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.2 |
Keywords: | Cc: | Chamaco326, mascguy (Christopher Nielsen) | |
Port: | ifeffit |
Description (last modified by jmroot (Joshua Root))
The demeter build fails due to the gfortran library not being found. The relevant part of the log file is shown below. I am using Xcode 11.4. I can see that the gcc9 has been properly installed and the relevant libraries are located in "/opt/local/lib/gcc9/libgfortran.a", but it appears that clang doesn't look for the gfortran library in the right location. This would appear to be a bug. I am not sure how to modify the installation procedure to explicitly add an "-L/opt/local/lib/gcc9" to the build file for macports. Any help would be appreciated as I need the underlying package.
Environment: Xcode 11.4
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 11.0.3 (clang-1103.0.32.29) Target: x86_64-apple-darwin19.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
:info:build "%s", :info:build 31 warnings generated. :info:build env LD_RUN_PATH=/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE /usr/bin/clang -mmacosx-version-min=10.15 -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fstack-protector-strong -o src/Ifeffit.dylib src/ifeffit_wrap.o -L/opt/local/lib -lifeffit -L/opt/local/lib -lpgplot -lpng -lX11 -L/opt/local/lib -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin19/9.2.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin19/9.2.0/../../.. -lgfortran -lSystem -lgcc_ext.10.5 -lquadmath -lm :info:build ld: warning: directory not found for option '-L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin19/9.2.0' :info:build ld: warning: directory not found for option '-L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin19/9.2.0/../../..' :info:build ld: library not found for -lgfortran :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build error building src/Ifeffit.dylib from src/ifeffit_wrap.o at /opt/local/lib/perl5/5.28/ExtUtils/CBuilder/Base.pm line 332, <C> line 11. :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_demeter/demeter/work/demeter-0.9.26" && ./Build install :info:build Exit code: 1 :error:build Failed to build demeter: command execution failed :debug:build Error code: CHILDSTATUS 79316 1 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec build" :debug:build (procedure "portbuild::build_main" line 8) :debug:build invoked from within :debug:build "$procedure $targetname" :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_demeter/demeter/main.log for details.
Attachments (1)
Change History (16)
comment:1 Changed 5 years ago by jmroot (Joshua Root)
Description: | modified (diff) |
---|---|
Keywords: | demeter gfortran removed |
Milestone: | MacPorts 2.7.0 |
Owner: | set to joefowler |
Status: | new → assigned |
comment:2 Changed 4 years ago by reneeotten (Renee Otten)
Cc: | Chamaco326 added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
comment:3 Changed 4 years ago by reneeotten (Renee Otten)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:6 Changed 4 years ago by kencu (Ken)
try building it without the recently-added patchfile and see if that works. Sounds like <https://github.com/bruceravel/demeter/issues/60> there is something odd going on there...
comment:8 Changed 4 years ago by kencu (Ken)
On 10.13, demeter
installs as-is, without any trouble, without touching the existing Portfiles.
$ port -v installed demeter The following ports are currently installed: demeter @0.9.26_0 (active) platform='darwin 17' archs='x86_64' date='2020-06-18T18:42:09-0700'
comment:10 Changed 4 years ago by reneeotten (Renee Otten)
it doesn't build for me on 10.14 either. Looking at the logs, it appears the the compilation flags used are the ones from the ifeffit
port. So if there is something wrong with those, the underlying issue could be in that port instead. I looked a bit yesterday, but am afraid I lack the knowledge for fixing this...
6985 :info:build Ifeffit's installations directory is /opt/local/share/ifeffit 6986 :info:build (found by capturing `ifeffit -i`) 6987 :info:build Compilation flags (from /opt/local/share/ifeffit/config/Config.mak): 6988 :info:build -L/opt/local/lib -lifeffit -L/opt/local/lib -lpgplot -lpng -lX11 -L/opt/local/lib -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin19/9.2.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin19/9.2.0/../../.. -lgfortran -lSystem -lgcc_ext.10.5 -lquadmath -lm
comment:11 Changed 4 years ago by kencu (Ken)
As Renee noted, the configuration flags from the ifeffit
port appear to be wrong. Specifically, the location of the gcc libraries. This information is stored in this file:
/opt/local/share/ifeffit/config/Config.mak
I'm building this at present on 10.6.8, which uses gcc8, so I changed this:
LIB_F77 = -L/opt/local/lib -L/opt/local/lib/gcc8/gcc/x86_64-apple-darwin10/8.3.0 -L/opt/local/lib/gcc8/gcc/x86_64-apple-darwin10/8.3.0/../../.. -lgfortran -lSystem -lgcc_ext.10.5 -lquadmath -lm
to this
LIB_F77 = -L/opt/local/lib -L/opt/local/lib/gcc8 -lgfortran -lSystem -lgcc_ext.10.5 -lquadmath -lm
and all is well:
$ port -v installed demeter The following ports are currently installed: demeter @0.9.26_0 (active) platform='darwin 10' archs='x86_64' date='2020-06-19T10:23:40-0700'
clearly we need a better plan for:
/opt/local/share/ifeffit/config/Config.mak
comment:13 Changed 4 years ago by kencu (Ken)
Port: | ifeffit added; demeter removed |
---|---|
Summary: | gfortran library not found in building demeter → ifeffit: library path to gcc libraries is baked into configuration file, and is wrong |
comment:14 Changed 4 years ago by kencu (Ken)
Summary: | ifeffit: library path to gcc libraries is baked into configuration file, and is wrong → ifeffit: library path to gcc library is baked into configuration file, and is wrong |
---|
comment:15 Changed 2 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
has duplicate #60649