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

Missing rpath on libclang dependency #69

Open
lfdominguez opened this issue Oct 19, 2024 · 0 comments
Open

Missing rpath on libclang dependency #69

lfdominguez opened this issue Oct 19, 2024 · 0 comments

Comments

@lfdominguez
Copy link

Hi, I'm trying to compile my rust + esp32 project and used this to install the idf framework, but every time that cargo tried to compile esp-idf-sys show me the message about /nix/store/<hash>-esp-clang-esp-idf-v5.3/lib/libclang.so.16.0.1 could found first the zlib dependency and then the libLLVM one, need to do a workaround on the tools.nix installPhase:

      libPath = lib.makeLibraryPath [
        stdenv.cc.cc.lib 
        zlib
        libxml2
      ];

installPhase:

      if [[ -f $out/lib/libclang.so.16.0.1 ]]; then
          echo "Patching Clang"

          patchelf \
            --set-rpath "${libPath}:$out/lib/" \
            $out/lib/libclang.so.16.0.1

          patchelf \
            --set-rpath "${libPath}" \
            $out/lib/libLLVM-16.so
        fi
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

1 participant