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

Failure to run clang++ from clang toolchain #603

Open
lauromoura opened this issue Jun 24, 2022 · 1 comment
Open

Failure to run clang++ from clang toolchain #603

lauromoura opened this issue Jun 24, 2022 · 1 comment

Comments

@lauromoura
Copy link

In the WebKit GTK and WPE ports, we have an SDK based on Flatpak. It supports distributed builds by automatically bundling GCC and Clang toolchains with icecc --build-native and setting up ICECC_VERSION accordingly. This scheme uses clang from the flatpak remote org.freedesktop.Sdk.Extension.llvm14, which places the clang binaries on /usr/lib/sdk/llvm14/bin/....

One issue with the clang toolchain file is related to the clang++ file (a symbolic link to clang). Currently, icecc-create-env moves the clang binary, located initially at usr/lib/sdk/llvm14/bin/clang, to usr/bin/clang inside the toolchain file, also placing the dependencies libclang-cpp and libLLVM-14 inside usr/lib. This scheme works fine for clang as its rpath points to $ORIGIN/../lib.

In the clang++ case, which some dependencies of WebKit require, the toolchain keeps it in its original path, usr/lib/sdk/llvm14/bin/clang++. As it has the same rpath as clang, the libraries are not there, and the compiler invocation fails on the remote icecc node.

Is this a bug in how icecc-create-env handles clang and clang++? Or is there any way to work around this limitation?

@arkq
Copy link

arkq commented Jul 11, 2023

I've got the same issue (it seems) and adding clang++ symlink to the created bundle fixed that for me. Simply unpack created bundle, add ln -s clang usr/bin/clang++, and pack it again.

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

No branches or pull requests

2 participants