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

LLVM: llvm-config --link-shared broken on Darwin #9157

Open
maleadt opened this issue Jul 27, 2024 · 0 comments
Open

LLVM: llvm-config --link-shared broken on Darwin #9157

maleadt opened this issue Jul 27, 2024 · 0 comments

Comments

@maleadt
Copy link
Contributor

maleadt commented Jul 27, 2024

❯ /Users/tim/Julia/depot/artifacts/bc0ef6f5449e8f49ae78ed6072c3cf51ea2c9dda/tools/llvm-config --link-shared
llvm-config: error: libLLVM-15jl.dylib is missing

We don't provide any dylib like that:

❯ ls -la /Users/tim/Julia/depot/artifacts/bc0ef6f5449e8f49ae78ed6072c3cf51ea2c9dda/lib | grep dylib
-r-xr-xr-x    1 tim  staff     50496 Jul 27 09:14 libClangdXPCLib.dylib
lrwxr-xr-x    1 tim  staff        13 Jul 27 09:14 libLLVM-15.0.dylib -> libLLVM.dylib
-r-xr-xr-x    1 tim  staff  51587504 Jul 27 09:14 libLLVM.dylib
-r-xr-xr-x    1 tim  staff    127888 Jul 27 09:14 libLTO.dylib
-r-xr-xr-x    1 tim  staff  37942480 Jul 27 09:14 libMLIR-C.dylib
-r-xr-xr-x    1 tim  staff  39106480 Jul 27 09:14 libMLIR.dylib
-r-xr-xr-x    1 tim  staff     53008 Jul 27 09:14 libRemarks.dylib
-r-xr-xr-x    1 tim  staff  49044576 Jul 27 09:14 libclang-cpp.dylib
-r-xr-xr-x    1 tim  staff  26014272 Jul 27 09:14 libclang.dylib
-r-xr-xr-x    1 tim  staff    115296 Jul 27 09:14 libmlir_async_runtime.dylib
-r-xr-xr-x    1 tim  staff   1205920 Jul 27 09:14 libmlir_c_runner_utils.dylib
-r-xr-xr-x    1 tim  staff     91264 Jul 27 09:14 libmlir_runner_utils.dylib

I'm not sure why the configured suffix doesn't work on macOS:

CMAKE_FLAGS+=(-DLLVM_VERSION_SUFFIX:STRING="jl")

Maybe we need another workaround a la

Yggdrasil/L/LLVM/common.jl

Lines 391 to 396 in ec78fa7

# Work around llvm-config bug by creating versioned symlink to libLLVM
# https://github.com/JuliaLang/julia/pull/30033
if [[ "${target}" == *darwin* ]]; then
LLVM_VER=$(${WORKSPACE}/bootstrap/bin/llvm-config --version | cut -d. -f1-2)
ln -s libLLVM.dylib ${prefix}/lib/libLLVM-${LLVM_VER}.dylib
fi

cc @vchuravy

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

1 participant