Closed tebriel closed 3 weeks ago
I'm getting this same issue with a different gem--did you have any luck solving it?
I'm getting this same issue with a different gem--did you have any luck solving it?
@t56k I don't quite recall, have you tried using a different version of ruby? Mostly I've stopped doing development on OSX+devenv and do it remotely on a nixos box because of problems like this (which is disappointing but I gotta' get work done)!
@tebriel Yeah, after struggling for four days on this I did the same! Thanks for the reply all the same
This should be fixed, can someone confirm?
@domenkozar Happy to give this a test in a few hours, thanks for your work
@domenkozar Do you have an example flake where this is working?
https://gist.github.com/tebriel/632c6e6ec7312ddb0d3add404e605755
The placeholder clang-wrapper is still there, as is the warning from the linker, but gem install eventmachine
works from inside the shell.
There's an upstream PR to remove the warning-causing linker flags: https://github.com/NixOS/nixpkgs/pull/213841
The original error was this line: ld: library not found for -lc++abi
. The warning mentioning the reference-removed clang wrapper was (mostly) benign.
Now that the library is picked up (I imagine via NIX_LDFLAGS
?), things should build as normal.
I'm going to consider this resolved, but do ping us if anything comes up.
Describe the bug
When using
languages.ruby.enable = true;
directive in thedevenv.nix
file on OSX, the LDFLAG forclang-wrapper
is incorrect, referencingeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
instead of the actual hash. This prevented me from installingeventmachine
, verifiable with:gem install eventmachine
as seen in the gist'sgem_make.out
file.Actual (note
-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-clang-wrapper-11.1.0/
):To reproduce
https://gist.github.com/tebriel/632c6e6ec7312ddb0d3add404e605755
Version
devenv: 0.6.2 OSX: 13.4.1 Chip: Apple M1 Max Nix: nix (Nix) 2.16.1
Extra Context
After researching and debugging for a while, it looks like the
LDFLAGS
are pulled from the config that built the ruby installation (see https://docs.ruby-lang.org/en/master/RbConfig.html), so I thought maybe this was an issue with https://github.com/bobvanderlinden/nixpkgs-ruby which I believe devenv uses to install ruby, butnix flake init --template github:bobvanderlinden/nixpkgs-ruby#3.1.4
doesn't exhibit the same issue, so I decided it was likely within devenv.