cling icon indicating copy to clipboard operation
cling copied to clipboard

getResourceDir returns wrong path when using external Clang

Open apteryks opened this issue 4 years ago • 0 comments

Describe the bug

When using LLVM as an external library installed into its own prefix (rather than at the FHS standard location), the getResourceDir ends up resolving relatively to the Cling installation prefix, which on GNU Guix returns something like /gnu/store/plbjkdi3gz0dn2k8hq9nvfzr83rll3hw-cling-0.9-1.d78d1a0/lib/clang/9.0.1 instead of /gnu/store/6dbmmhqncj7xdw2m79nkvdzz6rl4gx1b-clang-cling-9.0.1/lib/clang/9.0.1 for example.

Expected behavior

The Clang library prefix should be resolved relatively to the clang binary.

To Reproduce

Build Cling using LLVM and Clang as external libraries (out of source build). https://gitlab.com/Apteryks/guix/-/commit/6dd2542118437d93b3e6bfe0ae1fdacfe1d23556 may provide guidance.

Setup

  1. Cling version: 0.9
  2. Operating system: Guix System
  3. How you obtained Cling: From sources

apteryks avatar Sep 08 '21 13:09 apteryks