Opened 13 months ago
Last modified 9 months ago
#68400 new defect
esmf @8.5.0: ld: duplicate LC_RPATH '/opt/local/lib/libgcc' in '/opt/local/lib/libnetcdff.7.dylib'
Reported by: | ekinakoglu (Ekin Akoglu) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | sonoma | Cc: | tenomoto (Takeshi Enomoto), Dave-Allured (Dave Allured), massonseb |
Port: | esmf ncarg |
Description
esmf cannot be installed due to build error on macOS Sonoma; therefore, ncarg installation also fails. The offending part in the main.log is as follows:
:info:build ld: warning: duplicate -rpath '/opt/local/lib' ignored :info:build ld: warning: duplicate -rpath '/opt/local/lib' ignored :info:build ld: duplicate LC_RPATH '/opt/local/lib/libgcc' in '/opt/local/lib/libnetcdff.7.dylib' :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0' :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0' :info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0' :info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/src/Infrastructure/Trace/preload ;\ :info:build /Library/Developer/CommandLineTools/usr/bin/make tracelib_static :info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/src/Infrastructure/Trace/preload' :info:build ar cr /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/lib/libO/Darwin.gfortranclang.64.mpiuni.default/libesmftrace_static.a wrappers_io.o wrappers_mpi.o wrappers.o :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/src/Infrastructure/Trace/preload' :info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/src/Infrastructure/Trace/preload ;\ :info:build /Library/Developer/CommandLineTools/usr/bin/make tracelib_preload :info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/src/Infrastructure/Trace/preload' :info:build /usr/bin/clang++ -install_name /opt/local/lib/libesmftrace_preload.dylib -dynamiclib -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/lib/libO/Darwin.gfortranclang.64.mpiuni.default/libesmftrace_preload.dylib preload.o preload_io.o preload_mpi.o wrappers.o wrappers_io.o wrappers_mpi.o -pthread -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/lib/libO/Darwin.gfortranclang.64.mpiuni.default -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib/gcc13/gcc/arm64-apple-darwin23/13.2.0/../../../ -Wl,-rpath,/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/lib/libO/Darwin.gfortranclang.64.mpiuni.default -Wl,-rpath,/opt/local/lib -Wl,-rpath,/opt/local/lib -Wl,-rpath,/opt/local/lib -Wl,-rpath,/opt/local/lib/gcc13/gcc/arm64-apple-darwin23/13.2.0/../../../ -lgfortran -lvecLibFort -lnetcdff -lnetcdf -lxerces-c -lyaml-cpp -lesmf :info:build ld: warning: duplicate -rpath '/opt/local/lib' ignored :info:build ld: warning: duplicate -rpath '/opt/local/lib' ignored :info:build ld: duplicate LC_RPATH '/opt/local/lib/libgcc' in '/opt/local/lib/libnetcdff.7.dylib' :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make[2]: *** [tracelib_preload] Error 1 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0/src/Infrastructure/Trace/preload' :info:build make[1]: *** [build_tracelibs] Error 2 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0' :info:build make: *** [lib] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_esmf/esmf/work/esmf-8.5.0" && /usr/bin/make -j12 -w lib :info:build Exit code: 2 :error:build Failed to build esmf: command execution failed :debug:build Error code: CHILDSTATUS 26957 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec -callback portprogress::target_progress_callback 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_esmf/esmf/main.log for details.
Change History (11)
comment:1 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | sonoma added |
---|---|
Summary: | esmf @ 8.5.0 Failed to build esmf: command execution failed on macOS Sonoma → esmf @8.5.0: ld: duplicate LC_RPATH '/opt/local/lib/libgcc' in '/opt/local/lib/libnetcdff.7.dylib' |
comment:2 Changed 13 months ago by kencu (Ken)
I was incorrect about this... still investigating the issue.
comment:3 follow-up: 5 Changed 13 months ago by cjones051073 (Chris Jones)
The LC_RPATH message is just a warning, so I doubt is the underlying issue here. More likely this is just Xcode 15.0 again.
comment:4 Changed 12 months ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
comment:5 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to cjones051073:
The LC_RPATH message is just a warning, so I doubt is the underlying issue here. More likely this is just Xcode 15.0 again.
The LC_RPATH message does not include the word "warning". Yes, this is a new problem in Xcode 15+.
comment:6 Changed 12 months ago by Dave-Allured (Dave Allured)
Please look closely. There are TWO DIFFERENT LC_RPATH messages coming from the v15 linker, and they mean two completely different things. In the current context, one is a harmless warning, the other is a fatal error. Taken directly from the quoted log file above:
:info:build ld: warning: duplicate -rpath '/opt/local/lib' ignored
This one is only a warning. This is complaining about options specified on the CURRENT linker command line. For example, see line 16 in the above log file quote.
:info:build ld: duplicate LC_RPATH '/opt/local/lib/libgcc' in '/opt/local/lib/libnetcdff.7.dylib'
This is the real error. This is complaining about the contents of a PREVIOUSLY BUILT FILE, namely /opt/local/lib/libnetcdff.7.dylib. This problem can be solved by building libnetcdff without duplicate LC_RPATH's, thereby making it compatible with Xcode 15.
comment:7 Changed 12 months ago by kencu (Ken)
there are likely to be hundreds of libraries built over the past year or two by macports that have duplicate rpath entries in them.
once the cause for that has been removed (we know what it is) they will all need to be rebuilt
for now MacPorts is instead dreaming Apple will remove that duplicate rpath test from their new linker
dreams are nice.
comment:8 Changed 11 months ago by massonseb
Cc: | massonseb added |
---|
comment:9 Changed 9 months ago by Dave-Allured (Dave Allured)
Pull request in progress: https://github.com/macports/macports-ports/pull/22672
comment:10 Changed 9 months ago by Dave-Allured (Dave Allured)
Closed https://github.com/macports/macports-ports/pull/22672 without merging.
Superseded by: https://github.com/macports/macports-ports/commit/1c0c4cb3f024edf05c0298866500acb5314140a9
This issue is resolved. Please port upgrade and rebuild your ESMF. Someone please close this ticket. Thanks.
comment:11 Changed 9 months ago by Dave-Allured (Dave Allured)
Before rebuilding ESMF, please ensure that your ports netcdf
and netcdf-fortran
are both up to date. Both contained duplicate LC_RPATH
's which broke later builds. Both are now resolved.
See https://github.com/macports/macports-ports/pull/21835 for netcdf-fortran
, which was the source of this particular ESMF issue.
Presumably a duplicate of #68239.