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

Fix shell.nix use llvmPackages.bintools with wrapper for rpath config #14583

Conversation

straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented May 10, 2024

The blank lld package is unwrapped and does not have the proper rpath configuration, so the loader wouldn't find all libraries.

$ CC="$CC -fuse-ld=lld" crystal eval 'puts "hello"'
/home/johannes/.cache/crystal/crystal-run-eval.tmp: error while loading shared libraries: libpcre2-8.so.0: cannot open shared object file: No such file or directory

With this patch, everything works fine.

This is particularly relevant for EXPORT_CC in Makefile which configures to use lld.

Ref: NixOS/nixpkgs#24744 (comment)

@straight-shoota straight-shoota added this to the 1.13.0 milestone May 10, 2024
@straight-shoota straight-shoota changed the title Fix use llvmPackages.bintools with wrapper for rpath config Fix nix.shell use llvmPackages.bintools with wrapper for rpath config May 13, 2024
@straight-shoota straight-shoota merged commit bf39878 into crystal-lang:master May 13, 2024
61 checks passed
@straight-shoota straight-shoota deleted the infra/shell.nix-fix-bintools branch May 13, 2024 16:59
@straight-shoota straight-shoota changed the title Fix nix.shell use llvmPackages.bintools with wrapper for rpath config Fix shell.shell use llvmPackages.bintools with wrapper for rpath config May 13, 2024
@straight-shoota straight-shoota changed the title Fix shell.shell use llvmPackages.bintools with wrapper for rpath config Fix shell.nix use llvmPackages.bintools with wrapper for rpath config May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants