From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Tue, 3 Sep 2013 09:16:12 +0200 Subject: [Buildroot] Build reproducibility In-Reply-To: <87r4d6775s.fsf@dell.be.48ers.dk> References: <1377851505-23498-1-git-send-email-jezz@sysmic.org> <2d076e17ea7c855166044994876e2add@sysmic.org> <20130830145254.1e5a1f53@skate> <5224B8C9.7060609@mind.be> <87r4d6775s.fsf@dell.be.48ers.dk> Message-ID: <20130903091612.3216fb83@skate> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Dear Peter Korsgaard, On Tue, 03 Sep 2013 08:26:07 +0200, Peter Korsgaard wrote: > Arnout> Note that doing more randomized build order in the autobuilder also > Arnout> will not capture the latter scenario. You would have to compare the > Arnout> build result - but binary differences are likely because of changing > Arnout> timestamps or changing optimizations depending on memory randomness. > > Exactly. I don't have any good ideas about how to detect this (besides > building all packages in clean staging dirs, E.G. only populated with > its explicit dependencies like afaik OE lite can do, but that would > require quite some work), anyone? Doing a per-package sysroot that is generated for each package before it gets built, with only the explicitly listed dependencies, is indeed the only way to ensure that a package is not seeing/using something that isn't declared as a dependency. This would certainly be nice to have (as it also helps top-level parallel build, as was discussed with Fabio Porcedda some time ago), but: 1) I'm worried about the additional complexity inside Buildroot. 2) I'm worried about the additional build time required to generate a per-package sysroot for each package. When building large stacks like X.org that has many small packages, but each have a lot of dependencies, the cost of creating a sysroot before building each package could be huge. 3) We still need to provide the user a global sysroot with all libraries installed, so that he can use the toolchain generated by Buildroot to build his own libraries/applications. This would mean we would need to have two sysroots: the global sysroot, that gets incrementally populated with what all packages are installing, but that isn't used for building packages inside Buildroot, and a separate temporary sysroot, used when building the current package. Since the compiler would default to the 'global sysroot', we would have to pass --sysroot $(TMPSYSROOT) all the time, or have a separate wrapper, or something. Not impossible, but see (1). Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com