[llvm-bugs] [Bug 50597] New: error library not found
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jun 6 11:31:20 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50597
Bug ID: 50597
Summary: error library not found
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: MachO
Assignee: unassignedbugs at nondot.org
Reporter: schuett at gmail.com
CC: gkm at fb.com, jezreel at gmail.com,
llvm-bugs at lists.llvm.org, smeenai at fb.com
On Big Sur I get:
: ld64.lld: error: library not found for -lSystem
ld64.lld: error: library not found for -lresolv
ld64.lld: error: library not found for -lc
ld64.lld: error: library not found for -lm
ld64.lld: error: library not found for -liconv
I believe the root cause is:
New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker
cache of all system-provided libraries. As part of this change, copies of
dynamic libraries are no longer present on the filesystem. Code that attempts
to check for dynamic library presence by looking for a file at a path or
enumerating a directory will fail. Instead, check for library presence by
attempting to dlopen() the path, which will correctly check for the library in
the cache. (62986286)
lld currently uses fs::exists:
https://github.com/llvm/llvm-project/blob/6881f29a36a97102e5c89653a343f656231bc2f2/lld/MachO/DriverUtils.cpp#L252
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210606/48fc4e08/attachment-0001.html>
More information about the llvm-bugs
mailing list