[Nix-dev] influence of cpu/kernel version on builds

Eelco Dolstra eelco.dolstra at logicblox.com
Thu Mar 8 00:06:47 CET 2012


Hi,

On 07/03/12 09:13, Mathijs Kwik wrote:

> Then I saw this commit come along [1].
> Indeed the only difference I can think of between these machines are the
> kernel version and the hardware itself.

FWIW, Linux 3.x has a personality to report 2.6 to userspace programs:
http://kernel.opensuse.org/cgit/kernel/commit/?id=512228f0be3af44bf5cf6cc5750ddd279bbedaf3

I've thought about setting it in Nix a few months ago (it already uses
personality() to do 32-bit builds on 64-bit machines), but then I forgot about it.

> I think there are 2 solutions:
> - record some kernel version number in the store hash.
>   Of course we don't want the full version number, as that would lead to
>   rebuilding your entire system if you upgrade kernels. There are no
>   real differences between 3.0 and 3.2 (not like 2.4 and 2.6 differed),
>   so I don't know what number to look for.

That would be highly impractical.

The impurity caused by the kernel/hardware is annoying, but not so bad that
encoding them into the platform string would make live easier.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/


More information about the nix-dev mailing list