Summary: | [Flatpak] IceCC is broken for clang | ||
---|---|---|---|
Product: | WebKit | Reporter: | Xabier RodrÃguez Calvar <calvaris> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW --- | ||
Severity: | Normal | CC: | lmoura, philn |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Xabier RodrÃguez Calvar
2022-06-06 06:25:19 PDT
This seems to be an issue with the clang toolchain generated by icecc inside the flatpak env. It's generated with `icecc --build-native <path-to-clang> <path-to-clang++>`. In practice, icecc translates this to something `icecc-create-env clang --addfile=<path-to-clang++>`. `icecc-create-env` then creates the env translating the clang path to `usr/bin/clang`[1] inside the toolchain file alongside its dependencies `libLLVM-14.so` and `libclang-cpp.so.14` in `usr/lib`. This works fine as clang's `DT_RPATH` is set to `$ORIGIN/../lib`. But the script keeps the clang++ binary at its usual path, which is `usr/lib/sdk/llvm14/bin/clang++`. And as it has the same `DT_RPATH`, which poins effectively to `usr/lib/sdk/llvm14/lib/`, which is empty, clang++ can't find the required libraries. Looks like a valid upstream icecc issue and would deserve an upstream bug. Meanwhile, I'm testing a SDK patch to `icecc-create-env` as a workaround. [1] https://github.com/icecc/icecream/blob/master/client/icecc-create-env.in#L490 > Looks like a valid upstream icecc issue and would deserve an upstream bug. Submitted in https://github.com/icecc/icecream/issues/603 asking for either a fix or how we could approach this. > Meanwhile, I'm testing a SDK patch to `icecc-create-env` as a workaround. > L490 Tried a few tweaks on the way `icecc-create-env` adds the clang and clang++ files to the toolchain without luck. In the end, the clang++ was always invoked from `usr/lib/sdk...` while the required libraries were moved to `usr/lib/`. PS: Adding philn to the loop. The same toolchain zipped files work just fine with sccache. I wonder how, then :) |