From 88d1620e0a9d56717ad7b76dae38ec57d47b4bff Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 1 Sep 2024 19:26:35 -0700 Subject: [PATCH 1/2] Fix Windows exported symbol check on binutils 2.43 binutils 2.43 added some columns and a header row to the exported symbol list. Update our check accordingly. The new code works with older binutils as well. Signed-off-by: Benjamin Gilbert --- artifacts/postprocess-binary.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artifacts/postprocess-binary.py b/artifacts/postprocess-binary.py index 8d4b488..a59a48f 100644 --- a/artifacts/postprocess-binary.py +++ b/artifacts/postprocess-binary.py @@ -55,7 +55,9 @@ def library_symbols(file: Path) -> list[str]: if active: if not line.strip(): return syms - syms.append(line.split()[2]) + sym = line.split()[-1] + if sym != 'Name': + syms.append(sym) elif 'Ordinal/Name Pointer' in line: active = True raise Exception("Couldn't parse objdump output") From a32161661988453d2b91bf0e0fb3e28acdd45461 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 1 Sep 2024 19:42:32 -0700 Subject: [PATCH 2/2] builder/windows: bump API version binutils 2.43 is incompatible with older openslide-bin source releases. We could pin older binutils in the Windows builder container, but that's probably more backward compatibility glue than we want to maintain here. Bump the builder API version so older openslide-bin source releases will fail cleanly. Have bintool accept both API versions, since the new code should work with both. Signed-off-by: Benjamin Gilbert --- bintool | 2 +- builder/windows/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bintool b/bintool index 7329903..d7453a2 100755 --- a/bintool +++ b/bintool @@ -50,7 +50,7 @@ from common.meson import ( ) from common.software import Project -WINDOWS_API_VERS = (4,) +WINDOWS_API_VERS = (4, 5) LINUX_API_VERS = (3,) # we have a higher minimum than the underlying meson.build MESON_MIN_VER = (1, 5, 0) diff --git a/builder/windows/Dockerfile b/builder/windows/Dockerfile index 5e810e2..e11e8bd 100644 --- a/builder/windows/Dockerfile +++ b/builder/windows/Dockerfile @@ -2,7 +2,7 @@ FROM docker.io/gentoo/stage3:latest # NOTE: try to keep the current container image compatible with the latest # stable source release, so people can conveniently build from the source # tarball -RUN touch /etc/openslide-winbuild-builder-v{3,4} +RUN touch /etc/openslide-winbuild-builder-v5 RUN echo 'FEATURES="-sandbox -usersandbox -ipc-sandbox -network-sandbox -pid-sandbox"' >> /etc/portage/make.conf COPY package.accept_keywords /etc/portage/package.accept_keywords/openslide COPY package.use /etc/portage/package.use/openslide