Bootstrapping Fedora on the new RISC-V architecture continues apace.
I have now written a small autobuilder which picks up new builds from the Fedora Koji build system and attempts to build them in the clean “stage4” environment.
Getting latest packages from Koji ...
Running: 0 (max: 16) Waiting to start: 7
uboot-tools-2016.09.01-1.fc25.src.rpm | 11 MB 00:10
uboot-tools-2016.09.01-1.fc25 build starting
tuned-2.7.1-2.fc25.src.rpm | 136 kB 00:00
tuned-2.7.1-2.fc25 build starting
rubygem-jgrep-1.4.1-1.fc25.src.rpm | 24 kB 00:00
rubygem-jgrep-1.4.1-1.fc25 build starting
qpid-dispatch-0.6.1-3.fc25.src.rpm | 1.3 MB 00:01
qpid-dispatch-0.6.1-3.fc25 build starting
python-qpid-1.35.0-1.fc25.src.rpm | 235 kB 00:01
python-qpid-1.35.0-1.fc25 build starting
java-1.8.0-openjdk-aarch32-126.96.36.199-4.160812.fc25.src.rpm | 53 MB 00:54
java-1.8.0-openjdk-aarch32-188.8.131.52-4.160812.fc25 build starting
NetworkManager-strongswan-1.4.0-1.fc25.src.rpm | 290 kB 00:00
NetworkManager-strongswan-1.4.0-1.fc25 build starting
MISSING DEPS: NetworkManager-strongswan-1.4.0-1.fc25 (see
... etc ...
Given that we don’t have GCC in the stage4 environment yet, almost all of them currently fail due to missing dependencies, but we’re hoping to correct that soon. In the mean time a few packages that have no C dependencies can actually compile. This way we’ll gradually build up the number of packages for Fedora/RISC-V, and that process will accelerate rapidly once we’ve got GCC.
You can browse the built packages and build logs here: https://fedorapeople.org/groups/risc-v/
The Fedora build system Koji runs on RHEL 5
Xen and builds everything on top of that using mock. This can lead to some rather difficult to debug problems where your package builds and tests OK for you on your local Rawhide machine, but fails in Koji. The reason it can fail in Koji is because it is running on the RHEL 5 Linux kernel (2.6.18). Your program, or any program you depend on during the build, might make assumptions about system calls that work for a Rawhide kernel, but fail for a RHEL 5 kernel.
Reproducing these bugs is difficult. Hopefully this posting should be a good start.
Koji is doing roughly the equivalent of this command (on a RHEL 5 host):
mock -r fedora-rawhide-x86_64 --rebuild your.src.rpm
That command doesn’t work straightaway. There are some things you have to install and upgrade first before that works:
- Install RHEL 5 (or use CentOS or another no-cost alternative).
- Install EPEL.
- Install or update yum, python-hashlib, mock.
- Use /usr/sbin/vigr to add yourself to the “mock” group.
- The version of RPM from RHEL 5 is too old to understand the new xz-based compression format used by Rawhide RPMs. You have to build the Fedora 12 RPM (NB: Fedora 13 RPM definitely doesn’t work because it requires Python 2.6).
The Fedora 12 specfile is a starting point, but it won’t work directly. There are some small changes you have to make, and a single patch to the source code, but hopefully those will be obvious. Update: Here for a short time is a scratch build of the Fedora 12 RPM made to work on RHEL 5.4. Once you’ve built the new rpm RPM (!), install it.
At this point you can use the mock command above to test-build SRPMs using the unusual RHEL 5 kernel / Rawhide userspace combination.