Packaging/Binaries: Difference between revisions
imported>Milahu architecture differs from target: actual fix |
imported>Milahu add section: Wrong file paths |
||
| Line 277: | Line 277: | ||
<code>autoPatchelfHook</code> can make the manual written patchelf invocations unnecessary. [[Category:Tutorial]] | <code>autoPatchelfHook</code> can make the manual written patchelf invocations unnecessary. [[Category:Tutorial]] | ||
[[Category:nixpkgs]] | [[Category:nixpkgs]] | ||
== Wrong file paths == | |||
Some programs will try to access hard-coded FHS file paths like <code>/usr/lib</code>, but mostly, this will result in <code>No such file</code> errors, which can break the program | |||
<pre> | |||
strace --trace=file --follow-forks ./result/bin/some-program 2>strace.log | |||
cat strace.log | grep 'No such file' | grep -v -e '/nix/store/' -e '/etc/ld-nix.so.preload' | grep '"/' | less -S | |||
</pre> | |||
== See also == | == See also == | ||
* [[Steam#steam-run|steam-run]] as a quick way to run binaries | * [[Steam#steam-run|steam-run]] as a quick way to run binaries | ||