Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When linking the iOS Signal app with Mach-O lld, it errors out #59627

Closed
michaeleisel opened this issue Dec 21, 2022 · 2 comments
Closed

When linking the iOS Signal app with Mach-O lld, it errors out #59627

michaeleisel opened this issue Dec 21, 2022 · 2 comments
Assignees

Comments

@michaeleisel
Copy link
Contributor

After building the Signal app following the basic steps and linking with ld64, it works. However, when I switch to lld by adding -fuse-ld=/path/to/ld64.lld to the linker command, I get the following error message:

ld64.lld: error: library not found for -lsignal_ffi
ld64.lld: error: library not found for -lringrtc
...

This is on an arm 13.0 mac with Xcode 14.1. I tried it with llvm at recent commit 70ac598 and on latest homebrew version of llvm, which appears to be on 15.0.6. In both cases, I got the same error result.

Here's the .tar.gz from --reproduce=...: https://drive.google.com/file/d/1eR65b2xTUgGasqduXRMoZBOKyVAG-V6H/view?usp=share_link

@llvmbot
Copy link
Member

llvmbot commented Dec 21, 2022

@llvm/issue-subscribers-lld-macho

@keith
Copy link
Member

keith commented Dec 21, 2022

Some discussion on this issue here https://reviews.llvm.org/D140225, in the meantime you can pass -Wl,--ignore-auto-link-option=signal_ffi -Wl,--ignore-auto-link-option=ringrtc to avoid these issues

@keith keith self-assigned this Dec 21, 2022
@keith keith closed this as completed in d6cd8d6 Dec 23, 2022
CarlosAlbertoEnciso pushed a commit to SNSystems/llvm-debuginfo-analyzer that referenced this issue Dec 25, 2022
By default ld64 ignores invalid LC_LINKER_OPTIONS unless the link fails,
in which case it prints a warning. Originally lld chose to be strict
about these, but it has uncovered that many of these exist in open
source projects today, since before developers never would have noticed
this issue. In order to make adoption of lld easier, this mirrors ld64's
behavior, while also adding a `--strict-auto-link-options` flag if
projects want to audit their libraries for these invalid options.

More discussion on https://reviews.llvm.org/D140225
Fixes llvm/llvm-project#59627

Differential Revision: https://reviews.llvm.org/D140491
veselypeta pushed a commit to veselypeta/cherillvm that referenced this issue Jun 10, 2024
By default ld64 ignores invalid LC_LINKER_OPTIONS unless the link fails,
in which case it prints a warning. Originally lld chose to be strict
about these, but it has uncovered that many of these exist in open
source projects today, since before developers never would have noticed
this issue. In order to make adoption of lld easier, this mirrors ld64's
behavior, while also adding a `--strict-auto-link-options` flag if
projects want to audit their libraries for these invalid options.

More discussion on https://reviews.llvm.org/D140225
Fixes llvm/llvm-project#59627

Differential Revision: https://reviews.llvm.org/D140491
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants