-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
neovim: fix build on Darwin #95364
neovim: fix build on Darwin #95364
Conversation
I think this is luarocks still breaking the symlinks. It’s filesystem enumeration order dependent, so breaks at random. Longer comment at #81206 (comment) Notice the symlinks aren’t alongside the library in the
|
Agreed, that's what I'm seeing. My current idea is to work around this by not relying on symlinks but instead computing what the library name should be: luv = lua.pkgs.luv;
luvpath = with builtins ; if stdenv.isDarwin
then "${luv.libluv}/lib/lua/${lua.luaversion}/libluv.${head (match "([0-9.]+).*" luv.version)}.dylib"
else "${luv}/lib/lua/${lua.luaversion}/luv.so"; On Darwin /nix/store/jpzxw0ahvrg7yl6gf68k41i3lvaybmj7-lua5.2-luv-1.30.0-0/lib/lua/5.2/libluv.1.30.0.dylib ... which is referencing the non-symlinked portion of the tree:
My guess is that this would make this less fragile in the long-run? Also, I am uncertain of the difference between:
... they don't evaluate to the same derivation on my machine |
That's because |
@siriobalmelli libluv is almost broken ever since Luarocks 3.3.1. See:
The best attempt to fix this was #80528 but it got stale. Bottom lines: #80528 (comment) & #80528 (comment) & #80528 (comment). I'm sorry to hear that Neovim is now broken on Darwin, but I'm not sure what can be done. I think the best way to go is to help Luarocks play better with cmake based rocks builds, as @teto said in #80528 (comment) . |
I'm tracking ... but (from someone who is not in Lua ecosystem at all), which one should we be using for neovim? |
Wow, I see you and @thefloweringash already spent quite a bit of effort trying to get this fixed ... but I'm also seeing the upstream issue luarocks/luarocks#1160 is still open 😮 From my understanding, we can avoid immediate breakage with this PR by referencing libluv.1.30.0.dylib directly, instead of libluv.dylib which has this flaky symlink issue ... while upstream Lua gets their house in order. |
luajit.
Yea, this was sort of already requested at luarocks/luarocks#339 which is even more ancient.
Sounds good to me. Please use |
0628fa7
to
2e9a2c3
Compare
@GrahamcOfBorg build neovim |
@GrahamcOfBorg eval |
Thank you, appreciated. A couple notes: Standardized on Both |
Damn, ofborg detected this as a no changed output for Linux, yet it still failed to compile!
I can't think of a better way to do it, well done. |
I'm on it - will have a fix up shortly |
libluv path passed to -DLIBLUV_LIBRARY broken by change in libluv, eg: libluv.dylib -> libluv.1.30.0.dylib Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
2e9a2c3
to
0f1434c
Compare
ok, looks like Linux needs to reference My efforts to standardize on Scratching my head head here a bit, but it works and that's good enough for the interim, while Lua upstream straightens out. |
@GrahamcOfBorg build neovim |
@GrahamcOfBorg eval |
In that OfBorg failure, the requested path file was |
Unfortunately, that was the change I tried that broke the build on Linux: luv = lua.pkgs.luv;
luversion = with builtins; head (match "([0-9.]+).*" luv.version);
luvpath = if stdenv.isDarwin
then "${luv.libluv}/lib/lua/${lua.luaversion}/libluv.${luversion}.dylib"
else "${luv.libluv}/lib/lua/${lua.luaversion}/libluv.so.${luversion}"; This gives: nix-repl> :l ./default.nix
Added 12234 variables.
nix-repl> luv = lua.pkgs.luv
nix-repl> luversion = with builtins; head (match "([0-9.]+).*" luv.version)
nix-repl> luvpath3 = "${luv.libluv}/lib/lua/${lua.luaversion}/libluv.so.${luversion}"
nix-repl> luvpath3
"/nix/store/bwbh13d3s22izh8vy5kwa5f7qpxb4bpz-lua5.2-luv-1.30.0-0/lib/lua/5.2/libluv.so.1.30.0" ... and the derivation looks like:
But unfortunately the build fails with:
Going back to |
Oh, I see why. The linker succeeds but the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR label rebuild-linux:0
is set and the build of it for Linux and darwin succeed, so I conclude it's good to go. But yes, we do need to fix this properly at some point. Thanks for adding the link to #80528 in a comment.
Wow, I learned something new today ... was mystified as to what was happening 😅 |
libluv path passed to -DLIBLUV_LIBRARY broken by change in libluv:
libluv.dylib -> libluv.1.30.0.dylib
Signed-off-by: Sirio Balmelli sirio@b-ad.ch
Motivation for this change
I daily-drive neovim on Darwin
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)