Subject: bug#36747: Official MesCC bootstrap binaries differ from my locally built ones

From: Mark H Weaver <[email-masked]>
Date: Sun, 11 Aug 2019 20:21:54 -0400

Jan Nieuwenhuizen <[email-masked]> writes:

> Mark H Weaver writes:
>
> Hi Mark,
>
>>> I have added a very similar set of two patches to wip-cu-binaries,
>>> branched @ ef809e3ac036eccc5f9c9edd8fb661d14ae15f2f.
>>>
>>> They give the same md5sum for me as the wip-binaries branch that
>>> branched off of master; so mine are at
>>> http://lilypond.org/janneke/guix/20190722/
>>
>> I built these, and here are the results:
>>
>> mhw@jojen /gnu/store/hd3lk0f08a0sq40qqa6yv1q9gbk7gxww-bootstrap-tarballs-0$ sha256sum *
>> b5915c71ff5ea722864e1097ce1e7ed50fd68ad7544521f2dd6969173c260276  guile-static-stripped-2.2.4-i686-linux.tar.xz
>> 1acd8f83e27d2fac311a5ca78e9bf11a9a1638b82469870d5c854c4e7afaa26a  linux-libre-headers-stripped-4.14.67-i686-linux.tar.xz
>> 021543d9bb6af55f39e68d69692e3cb74646ced2cad0bb9ac0047ef81e9d7330  mescc-tools-static-stripped-0.5.2-0.bb062b0-i686-linux.tar.xz
>> fb32090071b39fc804fb9a7fba96f0bc5eb844a0efd268fb24c42e6bfa959de0  mes-minimal-stripped-0.19-i686-linux.tar.xz
>> 9ee954dc19db5c8d4113c73a702fd8f79f26c51024220f2617d0572c0a85e69c  static-binaries-0-i686-linux.tar.xz
>>
>> Do these match what you built?
>
> Well...
>
> 08:16:12 janneke@dundal:~/src/guix/wip-cu-binaries [env]
> $ sha256sum /gnu/store/hd3lk0f08a0sq40qqa6yv1q9gbk7gxww-bootstrap-tarballs-0/*
> adce360f68ed0083c7356c267c24271fa4907f8082c9d47db28b603f9da5e763
> /gnu/store/hd3lk0f08a0sq40qqa6yv1q9gbk7gxww-bootstrap-tarballs-0/guile-static-stripped-2.2.4-i686-linux.tar.xz
> 1acd8f83e27d2fac311a5ca78e9bf11a9a1638b82469870d5c854c4e7afaa26a
> /gnu/store/hd3lk0f08a0sq40qqa6yv1q9gbk7gxww-bootstrap-tarballs-0/linux-libre-headers-stripped-4.14.67-i686-linux.tar.xz
> 021543d9bb6af55f39e68d69692e3cb74646ced2cad0bb9ac0047ef81e9d7330
> /gnu/store/hd3lk0f08a0sq40qqa6yv1q9gbk7gxww-bootstrap-tarballs-0/mescc-tools-static-stripped-0.5.2-0.bb062b0-i686-linux.tar.xz
> fb32090071b39fc804fb9a7fba96f0bc5eb844a0efd268fb24c42e6bfa959de0
> /gnu/store/hd3lk0f08a0sq40qqa6yv1q9gbk7gxww-bootstrap-tarballs-0/mes-minimal-stripped-0.19-i686-linux.tar.xz
> c80cdd17b0a24eebdd75570ff72c4ec06e129bd702ac008186b57f6301c448e7
> /gnu/store/hd3lk0f08a0sq40qqa6yv1q9gbk7gxww-bootstrap-tarballs-0/static-binaries-0-i686-linux.tar.xz

There are two bootstrap tarballs that differ:

(1) static-binaries
(2) guile-static-stripped

In this message, I'll address only the 'static-binaries'.

The only difference in the static-binaries is bash.  It turns out that
the bash-4.4 configure script produces an incorrect compile-time
configuration when built on Linux 5.x or later.  It boils down to this
code in Bash's configure.ac:

--8<---------------cut here---------------start------------->8---
linux*)         LOCAL_LDFLAGS=-rdynamic          # allow dynamic loading
                case "`uname -r`" in
                2.[[456789]]*|[[34]]*)  AC_DEFINE(PGRP_PIPE) ;;
                esac ;;
--8<---------------cut here---------------end--------------->8---

In bash-5.0, this code has been changed to:

--8<---------------cut here---------------start------------->8---
linux*)         LOCAL_LDFLAGS=-rdynamic          # allow dynamic loading
                case "`uname -r`" in
                1.*|2.[[0123]]*)        : ;;
                *)      AC_DEFINE(PGRP_PIPE) ;;
                esac ;;
--8<---------------cut here---------------end--------------->8---

which is certainly an improvement, but still nondeterministic.  We
should probably fix that.

Anyway, it appears that our static-binaries-0-i686-linux.tar.xz tarball
can only be built correctly on a machine running Linux 4.x or earlier.

       Mark