Skip to content

Attempt to fix finding libedit on macOS#609

Merged
alexcrichton merged 2 commits intoWebAssembly:mainfrom
alexcrichton:try-to-fix-libedit
Mar 12, 2026
Merged

Attempt to fix finding libedit on macOS#609
alexcrichton merged 2 commits intoWebAssembly:mainfrom
alexcrichton:try-to-fix-libedit

Conversation

@alexcrichton
Copy link
Collaborator

First pass at trying to fix this...

First pass at trying to fix this...
Copy link

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at this!

ProcessorCount(nproc)
find_program(MAKE_EXECUTABLE make REQUIRED)
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(libedit_ldflags -Wl,-install_name,@rpath/libedit.0.dylib)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we set the rpath to ../lib somewhere (or does CMake do that automatically)? Or should this be @rpath/../lib/libedit.0.dylib?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh this doesn't even work as-is given CI (and more local testing), so I'm still flailing trying to figure this out

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My current thinking is: no, but that's only because the -install_name for libLLVM.dylib is @rpath/libLLVM.dylib. My ill-informed rationale is that the executable is responsible for saying what it's rpath is, and then the libraries linked say "ok sure and now you find me in the rpath"

@alexcrichton alexcrichton enabled auto-merge (squash) March 11, 2026 22:23
@cfallin
Copy link

cfallin commented Mar 11, 2026

I can confirm that the artifact from CI on the current state of this branch works for me: downloading dist-arm64-macos.zip, extracting the tarball inside, removing the quarantine bit (xattr -r -d com.apple.quarantine .), lets me run bin/lldb with no issues. Thanks!

@alexcrichton alexcrichton merged commit 5d5c6c0 into WebAssembly:main Mar 12, 2026
10 checks passed
@alexcrichton alexcrichton deleted the try-to-fix-libedit branch March 12, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants