Packaging/Quirks and Caveats: Difference between revisions

imported>Makefu
Caveats: add /etc/protocols sandbox fix
imported>Mic92
expand scope of /etc/protocols
Line 59: Line 59:
Solution: add <code>${stdenv.cc.cc.lib}/lib/libstdc++.so.6</code> to the <code>LD_LIBRARY_PATH</code>.
Solution: add <code>${stdenv.cc.cc.lib}/lib/libstdc++.so.6</code> to the <code>LD_LIBRARY_PATH</code>.


=== Test cannot access <code>/etc/protocols</code> when building in sandbox ===
=== Test cannot access <code>/etc/protocols</code>, <code>/etc/services</code> or expects a special <code>/etc/passwd</code> when building in sandbox ===
 
Sometimes libraries try to fetch protocol specs via <code>socket.getprotobyname('tcp')</code> which fails in sandboxes because /etc/protocols is unaccessible. Override pre- and postCheck phases with this:
Sometimes libraries try to fetch protocol specs via <code>socket.getprotobyname('tcp')</code> which fails in sandboxes because /etc/protocols is unaccessible. Override pre- and postCheck phases with this:
<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">