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

castxml binary is broken as it does not correctly link libLLVM #318055

Closed
bcdarwin opened this issue Jun 7, 2024 · 3 comments · Fixed by #318140
Closed

castxml binary is broken as it does not correctly link libLLVM #318055

bcdarwin opened this issue Jun 7, 2024 · 3 comments · Fixed by #318140
Labels
0.kind: bug 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related

Comments

@bcdarwin
Copy link
Member

bcdarwin commented Jun 7, 2024

Describe the bug

Sometime between 23.11 and now, the castxml binary broke due to a linking issue.

Steps To Reproduce

Steps to reproduce the behavior:

$ nix run nixpkgs/release-23.11#castxml  # succeeds
$ nix run nixpkgs#castxml
/nix/store/ccz3hkgbf2fi5rylc2xw6iw1ks83lfqf-castxml-0.6.6/bin/castxml: error while loading shared libraries: libLLVM-17.so: cannot open shared object file: No such file or directory
$ nix shell nixpkgs#castxml --command which castxml | xargs ldd
        linux-vdso.so.1 (0x00007ffea9d1e000)
        libclang-cpp.so.17 => /nix/store/wxxgsgjxbnkkyczgf8lkbfrsqiywm8bi-clang-17.0.6-lib/lib/libclang-cpp.so.17 (0x00007f0175a00000)
        libLLVM-17.so => not found
        libstdc++.so.6 => /nix/store/xvzz97yk73hw03v5dhhz3j47ggwf1yq1-gcc-13.2.0-lib/lib/libstdc++.so.6 (0x00007f0175600000)
        libm.so.6 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libm.so.6 (0x00007f01798aa000)
        libgcc_s.so.1 => /nix/store/xvzz97yk73hw03v5dhhz3j47ggwf1yq1-gcc-13.2.0-lib/lib/libgcc_s.so.1 (0x00007f0179885000)
        libc.so.6 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6 (0x00007f0175413000)
        libLLVM-17.so => /nix/store/ax9wbqknwawnl21kvkp8l6jn2r6q0l90-llvm-17.0.6-lib/lib/libLLVM-17.so (0x00007f016ca00000)
        /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/ld-linux-x86-64.so.2 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib64/ld-linux-x86-64.so.2 (0x00007f017998f000)
        libffi.so.8 => /nix/store/kbg5m7fyi1w23fyfmxjhhzcbd577rpg0-libffi-3.4.6/lib/libffi.so.8 (0x00007f0179872000)
        librt.so.1 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/librt.so.1 (0x00007f017986b000)
        libdl.so.2 => /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libdl.so.2 (0x00007f0179866000)
        libz.so.1 => /nix/store/lv6nackqis28gg7l2ic43f6nk52hb39g-zlib-1.3.1/lib/libz.so.1 (0x00007f0179848000)
        libncursesw.so.6 => /nix/store/j4m3lwhh4x0bzilvi77d512ahry775nq-ncurses-6.4/lib/libncursesw.so.6 (0x00007f01797d4000)
        libxml2.so.2 => /nix/store/kf7fzax0av9him9m4zcmbqmihh5108wq-libxml2-2.12.7/lib/libxml2.so.2 (0x00007f01758a0000)

Notify maintainers

@AndersonTorres

@bcdarwin bcdarwin added 0.kind: bug 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related labels Jun 7, 2024
@bcdarwin
Copy link
Member Author

bcdarwin commented Jun 7, 2024

autoPatchelfHook fixes it of course, but I don't see an obvious less brutal approach.

@paparodeo
Copy link
Contributor

autoPatchelfHook fixes it of course, but I don't see an obvious less brutal approach.

adding llvm to the buildInputs works for me.

@bcdarwin
Copy link
Member Author

bcdarwin commented Jun 8, 2024

adding llvm to the buildInputs works for me.

Good point, somehow thought this was already the case.

PR up.

bcdarwin added a commit to bcdarwin/nixpkgs that referenced this issue Jun 8, 2024
(in order to prevent CLI regressions such as NixOS#318055)
bcdarwin added a commit to bcdarwin/nixpkgs that referenced this issue Jun 8, 2024
(in order to prevent CLI regressions such as NixOS#318055)
bcdarwin added a commit to bcdarwin/nixpkgs that referenced this issue Jun 8, 2024
bcdarwin added a commit to bcdarwin/nixpkgs that referenced this issue Jun 8, 2024
(in order to prevent CLI regressions such as NixOS#318055)
github-actions bot pushed a commit that referenced this issue Jun 8, 2024
github-actions bot pushed a commit that referenced this issue Jun 8, 2024
(in order to prevent CLI regressions such as #318055)

(cherry picked from commit 068d188)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants