design bugs: - we build now on VMs or real hardware via SSH, we should also try to build with chroots and bin_fmt (thanks to oaken-source mentioning it) general bugs: - how to clean up sysroot nicely without having to rebuild the cross-compiler? for now only removing and stowing a copy somewhere before building stage1 helps. - pacman with a '--no-execute-hooks' option - makepkg with an 'alternate root' option (which doens't collide with pacman's options), avoids patching -r and --config into makepkg for stage1 - shims and provides and depends don't work yet: - binutils and glibc-shim - same for gcc-libs: glibc and gcc-libs for gcc - bsdtar: /home/cross/i486-root/packages/i486/linux-docs-4.15.1-2-i486.pkg.tar.xz: Not found in archive bsdtar: /home/cross/i486-root/packages/i486/linux-headers-4.15.1-2-i486.pkg.tar.xz: Not found in archive bsdtar: Error exit delayed from previous errors. Built package linux. - removing all pacman databases and recreating them with repo-add, also removing all installed pacman packages seem a little bit paranoic. Find out how to speed this up and do it properly. - as soon as asp32 creates a combined PKGBUILD when exporting a package, we can remove the git repo packages32 and the cat of the diff-PKGBUILD in build_stage1_package.sh - when uninstalling pacman in the chroot, you must rename pacman.pacsave back to pacman.conf as it is used for building packages - pacman has some issues with the sync databases (pacman -Syyu results in): debug: returning error 6 from _alpm_db_register_sync : wrong or NULL argument passed error: could not register 'temp' database (wrong or NULL argument passed) error: no usable package repositories configured. installing and listing packages by hand works without problems. debug: unregistering database 'local' - some packages get build more than once in stage1 (linux-api-headers, pacman-mirrorlist) - make a wrapper for sed in DESCR, which is actually able to detect whether the patch was successful or not. Avoid hard to detect errors, when the upstream PKGBUILD(s) change. - stage 1 and stage 2 scripts have things in common which should probably be dealt with not by copy pasting code - maybe we should not simply overwrite packages with the same version numbers, have something like build/stage numbers as in Archlinux32. stage1 issues: - stage1: cdrom installs keyrings without having a gpg binary - 32 MB is not enough when installing packages => add a swap as first action! - stage1 has no bootloader package (syslinux) to install - do we really want to install stage1 via a CDROM? - using the cross compiler for syslinux is most likely overkill - some packages still build more than really needed: - syslinux: builds docu with asciidoc and build EFI stuff from gnu-efi - rename STAGE1 directories i486-root to i486-stage1-root and i486-build to i486-build-stage1 - gdb uses cross-compiler source files for debugging: Temporary breakpoint 1, 0x004005b0 in main () (gdb) list 1 /home/cross/.build/i486-unknown-linux-gnu/src/gcc/libgcc/libgcc2.c: No such file or directory. - currently gcc has a PKGBUILD modified by hand instead of diff seds in DESCR (the diff is very big and complex) - there is really no need to copy stage 1 repo /packages/i486 onto the hdd stage2 issues: - make: recursive targets like all-recursive don't work, the root cause is bash, see https://unix.stackexchange.com/questions/389022/make-unable-to-recurse-for-autoconf-like-projects/423448#423448 => rebuilding bash on the target as first package works, but it's a workaround - cross-compiled pacman has issues with repos: error: could not register 'temp' database (wrong or NULL argument passed) error: no usable package repositories configured. => we cannot install via the [temp] repo => on the long term, debug pacman and libalpm and see what could be the root cause - our expectiation is makepkg -o -e would do the trick, but it doesn't - cracklib and other packages: something is broken in zlib and thwe way libtool is used there: strip: /usr/lib/libz.so.1: no version information available (required by /usr/lib/libbfd-2.29.1.so) => this is because some tools are built with other versions (toolchain vs. chroot) => so we must not install zlib before we rebuild binutils - better "package already built" test (example pacman and pacman-mirrorlist) dito linux and linux-api-headers - syslinux: python cmenu issues (a generator), python is out of reach for stage2 to make it a build requirement! - syslinux: linking issues, header section too small in ld linker script - syslinux: shouldn't we switch to another easier boot manager? or to grub? - we lack a hdd and iso creator, for now we just take stage1 for stage2 and stage2 for stage3 stage 3 issues: - some packages don't install (also in stage 1): iana-etc, filesystem - can we build layers in parallel?