Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Marc
@corpsmoderne@mamot.fr  路  activity timestamp last week

I'm in the process of write my second flake.nix file and so far it goes smoother than what I feared 馃槄 .. BUT!
I'm packaging a rust app with a gui, so needing X11 and a bunch of libX* , and I'm currently in this loop:
> nix build
[wait 10mn for cargo to build from scratch]
> ./result/bin/my_app
Error: libXbla.so not found
> [add pkgs.xorg.libXbla to buildInputs]
> repeat

Is there a way to speed this up? Can I tell nix to cache some/most of what cargo compiles? Or guess the deps quicker?
#nix

  • Copy link
  • Flag this post
  • Block
Colin McMillen
@colin_mcmillen@piaille.fr replied  路  activity timestamp last week

@corpsmoderne Is nix build -j12 an option? 馃槉

can you ldd ./result/bin/my_app and get "Not found" on the missing libs, or is the result not an ELF binary ?

  • Copy link
  • Flag this comment
  • Block
Marc
@corpsmoderne@mamot.fr replied  路  activity timestamp last week

@colin_mcmillen considering the noise of my fan it already takes all the resources it can find 馃槄
I already tried ldd, all the listed libraries are found. One of the crates I use must do dlopen's of it's own and it's what crashes 馃槬

  • Copy link
  • Flag this comment
  • Block
Marc
@corpsmoderne@mamot.fr replied  路  activity timestamp last week

ha, maybe for these runtime missing libs I can run nix-shell -p xorg.libXbla and run ./result/bin/my_app inside? should allow to troubleshoot faster (I haven't tested this yet)

  • Copy link
  • Flag this comment
  • Block
Marc
@corpsmoderne@mamot.fr replied  路  activity timestamp last week

ok now I'm stuck 馃槬
if I try to run my app it crashes instantly with:
> Library libxkbcommon-x11.so could not be loaded.

I've added libxkbcommon to buildInputs.
If I run $ find /nix/store/ | grep libxkbcommon-x11 , it find several instances of libxkbcommon-x11.so , for example:
/nix/store/klv07fh03501djj4q146z6pl7ywc550w-libxkbcommon-1.11.0/lib/libxkbcommon-x11.so

So I guess I have to fix the LD_LIBRARY_PATH of my package but I'm not sure how?
#nix

  • Copy link
  • Flag this comment
  • Block
Marc
@corpsmoderne@mamot.fr replied  路  activity timestamp last week

I found this which may be helpful: https://gist.github.com/TheSirC/8fc34ba9143c8fe4f0b1962f4d7225df

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.0-rc.3.21 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login