Closed nstuardod closed 3 years ago
@nicst35: I think it looks like the same qemu bug that produces broken images for Raspbian Buster, can you apply the same workaround and see if it helps?
Hi @ashkulz
Just to check if the build script is using the right qemu, I patched shell(cmd, cwd)
to see what is actually doing:
def shell(cmd, cwd=None):
message(cmd)
ret = subprocess.call(cmd, shell=True, cwd=cwd)
if ret:
message('%s\ncommand failed: exit code %d' % (cmd, ret))
sys.exit(1)
Without any workaround, it appears the focal-armhf target is already using 32-bit QEMU so applying the workaround does no effect because of this (build, line 335):
if target['platform'] not in ('linux/amd64', 'linux/386'):
# workaround https://bugs.launchpad.net/qemu/+bug/1805913 for 32-bit targets
target['qemu'] = 'linux/amd64' if target['platform'] not in ('linux/arm/v5', 'linux/arm/v7') else 'linux/386'
This is what the script does on my machine
docker pull --platform linux/386 aptman/qus:latest
...
docker run --rm --privileged aptman/qus:latest -- -r
cat ./qemu-binfmt-conf.sh | sh -s -- --path=/qus/bin -r
docker run --rm --privileged aptman/qus:latest -s -- -p
cat ./qemu-binfmt-conf.sh | sh -s -- --path=/qus/bin -p --suffix -static
Setting /qus/bin/qemu-alpha-static as binfmt interpreter for alpha
...
docker pull --platform linux/arm/v7 ubuntu:focal
docker build -f docker/Dockerfile.focal --build-arg from=ubuntu:focal --build-arg jpeg=libjpeg-turbo8-dev -t wkhtmltopdf/0.12:focal-armhf docker/
And then, even if no SIGSEGV is raised, libc-bin setup fails with Allocating guest commpage: Operation not permitted
.
You're right, I forgot about the part. From a previous log where it was successful, it seems the following SHA256 of aptman/qus
was used:
latest: Pulling from aptman/qus
947be6ecc5f4: Already exists
8464b14bbf96: Already exists
86eee92003c9: Already exists
3810c5e368ec: Already exists
56438b5e5595: Already exists
Digest: sha256:b7b452445c7f9ff2c4c1d88f1867dfebb71a50e1240f63586de8afaffb9ced67
Status: Downloaded newer image for aptman/qus:latest
Maybe try to use that? Otherwise, I'm not really sure what the issue could be.
After a long wait and switching to a release branch, I could get a working build using qus:d4.2 for the docker build environment, and commits 6a57c14 (0.12.6) and ccdfd25996 (wk_4.8.7) of wkhtmltopdf and QT, respectively. (Since it includes the QT patch to avoid arithmetic exceptions, I'm attaching the generated .deb in a .zip in case someone finds it helpful) wkhtmltox_0.12.6-1.focal_armhf.deb.zip
Maybe try to use that? Otherwise, I'm not really sure what the issue could be.
I will try and report the results.
And yep, it builds with b7b452445c7f9ff2c4c1d88f1867dfebb71a50e1240f63586de8afaffb9ced67
Which Qt patch are you talking about? Also, not sure if we should report an issue about qus:latest
not working for armhf.
ccdfd25996: Fix artihmetic exception when using non-scalable fonts.
I'm closing this as your PR #86 was merged :+1:
I'm trying to build wkhtmltopdf for an armhf device running Ubuntu 20.04.1 (Raspberry Pi 3). The build machine is running the same distro and version. After installing the required packages (
docker.io
,python-yaml
,p7zip-full
andgit
, obviously) and syncing both qt and wkhtmltopdf repos (master branch), I used the following command line to perform the build process:First issue:
apt-get
crashes (segmentation faults) while setting up the build environment.So, I started downgrading the
qus
image: d5.0 crashes withapt-get
complaining of invalid signatures, however d4.2 succeeds so I kept using that version.Second issue: After a long wait, the build process finally fails because QtWebKit was not built:
Same issue as #76 but this is from a clean build. Is this failure related to the branch I'm using?