[MacPorts] #68239: Xcode 15 and GCC: linker complains that "duplicate LC_RPATH are deprecated"
MacPorts
noreply at macports.org
Mon Sep 25 17:10:57 UTC 2023
#68239: Xcode 15 and GCC: linker complains that "duplicate LC_RPATH are deprecated"
----------------------+--------------------
Reporter: szhorvat | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: gcc12
----------------------+--------------------
When linking to shared libraries that were compiled with GCC, e.g. ports
that need gfortran, the linker included in Xcode 15 issues this warning:
{{{
$ cc xx.c -L/opt/local/lib -lopenblas
ld: warning: duplicate LC_RPATH are deprecated ('/opt/local/lib/libgcc')
}}}
Here `openblas` is just an example of such a library, and `xx.c` can be a
trivial program with an empty `main` function.
This is well beyond my expertise, but I think it's related to the rpath
entries here:
{{{
$ otool -L /opt/local/lib/libopenblas.1.dylib
/opt/local/lib/libopenblas.1.dylib:
/opt/local/lib/libopenblas-r1.dylib (compatibility version 0.0.0,
current version 0.0.0)
@rpath/libgfortran.5.dylib (compatibility version 6.0.0, current
version 6.0.0)
@rpath/libquadmath.0.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1319.100.3)
}}}
There's a separate issue that trying to use GCC triggers an assertion
failure in the linker, but I'm sure you're aware of that (see e.g. this SO
search:
https://stackoverflow.com/search?q=file+Relocations.cpp%2C+line+1336 )
--
Ticket URL: <https://trac.macports.org/ticket/68239>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list