summaryrefslogtreecommitdiff
path: root/.Attic/README.old_stage2
blob: 6e7fc692a82bfddcb47729b54b21b54cbc4c3e6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# old stage 2 based on a broken stage 1, so carefull what to pick
# into the next version..

# common issues
###############

TODOS: in linux package makepkg
https://github.com/libarchive/libarchive/issues/411

https://rubenerd.com/sata-on-qemu/

/usr/libexec/qemu-kvm --enable-kvm -cpu 486 -m 32 -vnc 0.0.0.0:2 \
	-kernel linux/pkg/linux/boot/vmlinuz-linux \
	-append 'root=/dev/hda1 nomodeset init=/etc/rc console=ttyS0 console=tty0' \
	-cdrom /data/isos/arch486.iso -hda /data/libvirt/arch486.qcow2 -nographic

qemu-system-i386 --enable-kvm -cpu 486 -m 32 -cdrom /data/isos/arch486.iso \
	-hda /data/libvirt/arch486.qcow2 -curses -boot d \
	-netdev user,id=net0,net=10.0.0.0/24,host=10.0.0.2,dhcpstart=10.0.0.16,hostfwd=tcp::2222-:22 \
	-device rtl8139,netdev=net0

qemu-system-i386 --enable-kvm -cpu 486 -m 32 \
	-hda /home/cross/arch486.img -curses -boot d \
	-netdev user,id=net0,net=10.0.0.0/24,host=10.0.0.2,dhcpstart=10.0.0.16,hostfwd=tcp::2222-:22 \
	-device rtl8139,netdev=net0

PHASE 2
#######

# tcl
#####
# disable tests: cynical, disable unit tests of a software needed for testing

# dejagnu
#########
# has hard-wired AC_PROG_CXX in configure, remove internal C++ tests
sed -i '/.\/configure/ i \  sed -i "s@AC_PROG_CXX@#AC_PROG_CXX@" configure.ac' dejagnu/PKGBUILD
sed -i '/configure.ac/ a \  sed -i "s@\\(unit_SOURCES.*\\)@#\\1@g" Makefile.am' dejagnu/PKGBUILD
sed -i '/configure.ac/ a \  sed -i "s@\\(check_PROGRAMS*\\)@#\\1@g" Makefile.am' dejagnu/PKGBUILD
sed -i '/Makefile.am/ a \  autoreconf' dejagnu/PKGBUILD

# glibc
#######
# use 2.25 version, not 2.26. Keep the ABI intact!
# endless loop? gawk -f ../scripts/gen-as-const.awk pthread-pi-defines.sym \
# two reasons: clock and artifacts walk backwards or forward in time
# chroot on server with chroot, hard to have an asynchronous clock?
# or glibc is already installed on the system (where not?), so how the
# hell can it be possibly built!
# => oh, this would be cruel.
# or 3rd reason, we have a glibc shim, maybe this one causes some trouble
# => why?
# or libtool fixing, whatever fixing means (https://forums.gentoo.org/viewtopic-t-496052-start-0.html)
# => nope.
# -isystem /usr/includ ein gcc spec? quite likely!
# ah: old friend:
build/glibc/src/glibc-build/libc.a(dl-sysdep.o): In function `.L18':
dl-sysdep.c:(.text+0x8c): undefined reference to `__memcmp_ia32'
/build/glibc/src/glibc-build/libc.a(dl-sysdep.o): In function `.L87':
dl-sysdep.c:(.text+0x11f): undefined reference to `__memcmp_ia32'
/build/glibc/src/glibc-build/libc.a(dl-sysdep.o): In function `.L19':
dl-sysdep.c:(.text+0x152): undefined reference to `__memcmp_ia32'
/build/glibc/src/glibc-build/libc.a(dl-sysdep.o): In function `.L85':
dl-sysdep.c:(.text+0x19c): undefined reference to `__memcmp_ia32'
dl-sysdep.c:(.text+0x1b7): undefined reference to `__memcmp_ia32'
/build/glibc/src/glibc-build/libc.a(dl-sysdep.o):dl-sysdep.c:(.text+0x202): more undefined references to `__memcmp_ia32' follow
elf/sln
=> USE_MULTIARCH
=> --disable-multi-arch
=> let's test this time, too dangerous to loose the chroot otherwise!
# older 2.25 misses a binutils 2.29 patch:
https://git.busybox.net/buildroot/diff/package/glibc/0005-fix-binutils-2-29-build.patch?id=cf821efbd0b24690b52f379d4a9934a16073762e
{standard input}: Assembler messages:
{standard input}: Error: `loc1@GLIBC_2.0' can't be versioned to common symbol 'loc1'
{standard input}: Error: `loc2@GLIBC_2.0' can't be versioned to common symbol 'loc2'
{standard input}: Error: `locs@GLIBC_2.0' can't be versioned to common symbol 'locs'
make[2]: *** [../o-iterator.mk:9: /build/glibc/src/glibc-build/misc/regexp.os] Error 1

PACKAGES=" \
libgpg-error   \
      \
sysfsutils libidn iputils \
  tcl expect dejagnu  gcc  glibc"

# aftermatch for gcc/binutils

#collect2: unable to find ld: this sounds bad, like an archicture mismatch somewhere
#in binutils/gcc
=> this is the cross compiled gcc for i486 inside the chroot, it expects
   its platform dependend stuff in /usr/lib/gcc/i486-unknown-linux-gnu/7.2.0
=> we can temporarily fix this:
ln -s /usr/bin/ld /usr/lib/gcc/i486-unknown-linux-gnu/7.2.0/ld
etc.

# aftermatch for glibc

# bacause pacman cannot set file permissions
chmod u+x /usr/bin/* /lib/*.so*


# in 'real' 486
###############

next round: do those problems persist

error: could not register 'temp' database (wrong or NULL argument passed)

installed binaries have wrong permissions (no execute permission), a pacman issue?
shilly flags? libarchive problem?

later: for inside the chroot