[MacPorts] #70404: llvm-18: libLLVM.dylib not loaded at runtime
MacPorts
noreply at macports.org
Fri Jul 19 16:50:34 UTC 2024
#70404: llvm-18: libLLVM.dylib not loaded at runtime
---------------------------------+--------------------
Reporter: sletz | Owner: (none)
Type: defect | Status: new
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: llvm-18 llvm-devel |
---------------------------------+--------------------
Old description:
> My project using llvm-18 correctly build but I get this error at runtime:
> Library not loaded: '@rpath/libLLVM.dylib'
> The same happens with llvlm-devel and the project is correctly working
> with llvm-17.
New description:
My project using llvm-18 correctly build but I get this error at runtime:
{{{
Library not loaded: '@rpath/libLLVM.dylib'
}}}
The same happens with llvm-devel and the project is correctly working with
llvm-17.
--
Comment (by ryandesign):
The way that rpath works on macOS is that when you link with a library
that uses rpath, you have to supply a linker flag to tell it what `@rpath`
should expand to. Looks like our llvm ports have been using `@rpath` for
libLLVM.dylib for a long time, so if old versions worked without you
having to specify the rpath manually, maybe that's something that can be
fixed in the new llvm versions. Until then, you can do it manually, for
example by using the linker flag `-rpath /opt/local/libexec/llvm-18/lib`.
--
Ticket URL: <https://trac.macports.org/ticket/70404#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list