Packaging/32bit Applications: Difference between revisions
imported>Mic92 No edit summary |
imported>Mic92 No edit summary |
||
Line 6: | Line 6: | ||
== Building multilib software == | == Building multilib software == | ||
If a | If a package wants to compile both 32/64-bit executable, you need a compiler with multilib support. | ||
In nixpkgs provides <code>multiStdenv.mkDerivation</code> that should be used instead <code>stdenv.mkDerivation</code>. | In nixpkgs provides <code>multiStdenv.mkDerivation</code> that should be used instead <code>stdenv.mkDerivation</code>. | ||
This is equivalent to using <code>gcc-multilib</code> in debian derivatives. | This is equivalent to using <code>gcc-multilib</code> in debian derivatives. |
Revision as of 17:51, 19 March 2018
Building software with 32bit gcc
Question: I'm invoking gcc with -m32 and it fails to find `gnu/stubs-32.h`
Answer (clever): you want to use pkgsi686Linux
instead of pkgs, so things like pkgsi686Linux.stdenv.mkDerivation
or pkgsi686Linux.callPackage
then nix will give you 32bit everything[1]
Building multilib software
If a package wants to compile both 32/64-bit executable, you need a compiler with multilib support.
In nixpkgs provides multiStdenv.mkDerivation
that should be used instead stdenv.mkDerivation
.
This is equivalent to using gcc-multilib
in debian derivatives.