rebootstrap

rebootstrap is a crude hack to test the bootstrappability of Debian architectures. In this context bootstrapping refers to building binaries for an architecture from source without using any pre-built binaries for that architecture. In the past 20 years about 20 architectures have been bootstrapped for Debian. At all times this has been a manual and non-repeatable process. rebootstrap is trying to address the very early bootstrap phase involving the gcc/eglibc dance.

The source can be obtained using git:

git clone https://salsa.debian.org/helmutg/rebootstrap.git

One of rebootstraps major goals is to highlight bugs.

rebootstrap on jenkins.d.n

Contact Helmut Grohne or stop by #debian-bootstrap on OFTC if you have any questions.

DebConf15 Slides

Occasionally, rebootstrap works around limitations of packages by carrying patches locally. This raises the question of which patches are acceptable. Rules are:

  1. Patches must be intended for inclusion into the patched package and therefore should be filed as a bug against the relevant package.
  2. Patches beyond a couple of hundred lines are simply too long atm.

Thanks

Without the following (non-exhaustive list of) people rebootstrap would not be where it is today. Thanks!

Issues

Below is a non-exhaustive list of unsolved problems. Patches welcome.

alpha

Something causes cross compiler libraries (lib*-alpha-cross) to depend on libc6.1 rather than libc6.1-alpha-cross. Thus they are uninstallable. (Jobs rebootstrap_alpha_gcc*_supported)

libgc fails to build during tests and has symbol differences during cross.

arm64ilp32

arm64ilp32 is dead.

hppa

Someone needs to tell guile-2.0 how to cross build for hppa.

File conflict between libc6-dev and libc6-dev-hppa-cross (converted by dpkg-cross). Someone needs to fix dpkg-cross.

hurd-amd64

gnumach has no clue how to handle cpu type x86_64. Some needs to finish the porting, see https://www.gnu.org/software/hurd/open_issues/64-bit_port.html.

hurd-i386

The proposed solution for the LIMITS_H_TEST involves __has_include_next. Unfortunately, gcc's __has_include_next implementation is buggy when there is no further include directory, which happens to be the case here.

i386

When built on amd64, the cross compiler package gcc-N-i386-linux-gnu:amd64 has a dependency on lib64gcc1. Since the latter is only available for i386, the dependency is unsatisfiable. It should be depending on libgcc1 instead. Something goes wrong in dpkg-shlibdeps.

Other builds simply fail running dpkg-shlibdeps as it fails finding e.g. libc.so.6. Why?

When building without disabling multilib, the stage2 pass of gcc-7 fails including <stdio.h> in the x32 multilib pass of libgcc.

ia64

Debian's glibc dropped support for ia64 as of wheezy.

Currently, reboostrap on ia64 is stuck at a dependency loop between GCC's internal libunwind implementation, and GLIBC. Work is being done on a GLIBC stub that will satisfy libunwind's requirements.

kfreebsd-any

The source package kfreebsd-kernel-headers vanished from unstable. It needs to be reintroduced (by adding an alibi package, e.g. a documentation package).

lm32

binutils and gcc both support lm32 in trunk.

Blocker is no up-to-date linux port to the platform (an old port can be found at https://github.com/m-labs/linux-milkymist). The lm32 normally doesn't have a mmu, so needs ucLinux. Potentially more useful stuff at http://m-labs.hk/milkymist-wiki/wiki/index.php%3Ftitle=Milkymist_Linux_cheat_sheet.html and http://m-labs.hk/milkymist-wiki/wiki/index.php%3Ftitle=Linux.html

(The lm32 is a softcore created by Lattice for FPGA boards - see https://en.wikipedia.org/wiki/LatticeMico32.)

mips

When building with gcc-7, the cross compiler multilib library lib64atomic1-mips-cross ends up depending on libc6-mips64, which is arch:any. It should be depending on libc6-mips64-mips-cross instead.

mips64

src:libgpg-error lacks the lock object header.

There is a file conflict bewteen the multilibs libc6-mips32-mips64-cross and libc6-mips64-cross. Someone needs to fix dpkg-cross.

When building with gcc-7, the stage2 cross compiler build fails. Why?

mips64r6el

Symbol issues in libffi.

mipsr6el

Compiling gmp issues invalid instructions.

or1k

gcc as found in Debian sid for version 4.8 and 4.9 do not support or1k as a target. Thus gcc stage1 fails to configure. It is expected that this issue vanishes with future gcc upstream releases.

powerpcel

Someone needs to tell src:openssl what this architecture means.

riscv64

libgc needs riscv64 support.

s390

Debian's glibc dropped support for ia64.

sh3

icu needs to be ported.

x32

jemalloc fails to build

musl-linux-any

datefudge: datefudge.c:77:5: error: conflicting types for 'gettimeofday'

libbsd: ../include/bsd/sys/cdefs.h:28:28: fatal error: sys/cdefs.h: No such file or directory. Fixes are committed, but not released upstream.

libelf: checking host system type... Invalid configuration 'mips-linux-musl': system 'musl' not recognized

libsigsegv: fault-linux-mips.h:30:70: error: 'mcontext_t {aka struct <anonymous>}' has no member named 'gregs'

musl-linux-i386

gcc-7 fails to build, because ./src/libmpx/mpxrt/mpxrt.h defines XSAVE_OFFSET_IN_FPMEM as sizeof (struct _libc_fpstate) and expects that struct to be defined by the libc. On glibc systems, it is defined in asm/ucontext.h. On musl, the struct is missing.