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
navit: fix plugins #45687
navit: fix plugins #45687
Conversation
Success on x86_64-linux (full log) Attempted: navit Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: navit Partial log (click to expand)
|
@@ -68,10 +68,10 @@ stdenv.mkDerivation rec { | |||
''; | |||
|
|||
# TODO: fix upstream? | |||
libPath = stdenv.lib.makeLibraryPath ([ stdenv.cc.libc ] ++ buildInputs ); |
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.
I prefer not to set this kind of thing as attributes of the derivation but instead do something like:
postFixup = let
libPath = stdenv.lib.makeLibraryPath ([ stdenv.cc.libc ] ++ buildInputs );
''
find "$out/lib" -type f -name "*.so" -exec patchelf --set-rpath ${libPath} {} \;
'';
It makes for more readable instantiated derivations.
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.
which means, that nix variables do not become environment variables in the build.
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.
Oki, seems good on paper, but just doesn't work.
genesis@genlaptop:/nix/store/y27wr1g1hw6jxbrc13s1jxh52a9mk6xw-navit-0.5.2/lib]$ for f in $(find -iname "*.so"); do echo $f && ldd -v $f | grep not ; done
./navit/font/libfont_freetype.so
./navit/graphics/libgraphics_gtk_drawing_area.so
libcairo.so.2 => not found
./navit/graphics/libgraphics_opengl.so
./navit/graphics/libgraphics_sdl.so
./navit/graphics/libgraphics_null.so
./navit/gui/libgui_gtk.so
./navit/gui/libgui_internal.so
./navit/binding/libbinding_dbus.so
libglib-2.0.so.0 => not found
./navit/binding/libbinding_python.so
./navit/speech/libspeech_dbus.so
libglib-2.0.so.0 => not found
./navit/speech/libspeech_cmdline.so
./navit/vehicle/libvehicle_gpsd_dbus.so
libglib-2.0.so.0 => not found
./navit/vehicle/libvehicle_demo.so
./navit/vehicle/libvehicle_file.so
./navit/vehicle/libvehicle_pipe.so
./navit/vehicle/libvehicle_serial.so
./navit/vehicle/libvehicle_socket.so
./navit/osd/libosd_core.so
./navit/map/libmap_binfile.so
./navit/map/libmap_filter.so
./navit/map/libmap_mg.so
./navit/map/libmap_shapefile.so
./navit/map/libmap_textfile.so
./navit/map/libmap_csv.so
Motivation for this change
there was still some broken plugins with glibc. This fix all.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)