[MacPorts] #69725: odin @0.2024.01: Library not loaded: @rpath/libc++.1.dylib; Reason: no LC_RPATH's found

MacPorts noreply at macports.org
Fri Apr 12 22:13:36 UTC 2024


#69725: odin @0.2024.01: Library not loaded: @rpath/libc++.1.dylib; Reason: no
LC_RPATH's found
-----------------------+------------------------
  Reporter:  kwolcott  |      Owner:  mohd-akram
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  odin      |
-----------------------+------------------------

Comment (by ryandesign):

 Replying to [comment:5 mohd-akram]:
 > OP is also building on macOS 14.2.1 and using Xcode 15.2 per the log.
 I'd suggest updating both, maybe that will fix it.

 While it's a fine idea to update the OS (and to a lesser extent Xcode due
 to all the problems we already know the 15.3 release has caused), I doubt
 it will help because that is what we use on our build machine; see the
 Information section at the bottom of
 https://build.macports.org/buildslaves/ports-14_arm64.

 What seems clear from the error message is that some copy of
 libc++.1.dylib somewhere has the install name `@rpath/libc++.1.dylib` and
 whatever is trying to link with it has not specified (by using the right
 `-rpath` flag) what `@rpath` shall expand to. We cannot check what the
 install name of /usr/lib/libc++.1.dylib is because as of macOS 11 Apple no
 longer stores libraries in the filesystem, only in the dynamic library
 cache, however I've never known Apple to use `@rpath` in system libraries
 before. And in MacPorts we try not to use `@rpath` either because of the
 problems it causes (the error in this ticket is one such problem).
 Nevertheless, on my macOS 12 x86_64 machine, I see that the clang-17
 port's copy of libc++.1.dylib ''does'' use `@rpath`:

 {{{
 % otool -L /opt/local/libexec/llvm-17/lib/libc++.1.dylib
 /opt/local/libexec/llvm-17/lib/libc++.1.dylib:
         @rpath/libc++.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 1311.100.3)
         @rpath/libc++abi.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
 }}}

 So perhaps the odin build is, for some reason, using clang-17's
 libc++.1.dylib instead of the system's copy. If so, the question would be
 why and whether we can stop that from happening. If not, then the fixes
 are either to fix the clang-17 port so that its libraries don't use
 `@rpath`, or to have odin and anybody else that needs to link with
 clang-17's libraries specify the correct `-rpath` flag.

-- 
Ticket URL: <https://trac.macports.org/ticket/69725#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list