On Wed, 19 Jun 2024 18:19:59 +0100 Peter Green <plugw...@debian.org> wrote:
Package: pesign
Version: 116-7
While working on the time64 transition in raspbian, I discovered pesign failing
to build with a linker error.
> cc -g -O2 -Werror=implicit-function-declaration
-ffile-prefix-map=/build/reproducible-path/pesign-116=. -fstack-protector-strong
-fstack-clash-protection -Wformat -Werror=format-security -Wall -Wextra -Wsign-compare
-Wno-unused-result -Wno-unused-function -Wno-missing-field-initializers -Werror
-Wno-error=cpp -Wno-free-nonheap-object -std=gnu11 -fshort-wchar -fPIC -fno-strict-aliasing
-D_GNU_SOURCE -DCONFIG_aarch64 -I../include '-DRUNDIR="/run/"'
-Wmaybe-uninitialized -grecord-gcc-switches -Wl,-z,relro -fno-merge-constants
-fvar-tracking -fvar-tracking-assignments -fkeep-inline-functions
-Wl,--fatal-warnings,--no-allow-shlib-undefined,--default-symver -Wl,-O2
-Wl,--no-undefined-version -Wl,-z,relro,-z,now
-Wl,--no-add-needed,--no-copy-dt-needed-entries,--as-needed -pie -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -shared \
> -Wl,-soname,libdpe.so.0.116 \
> -o libdpe.so libdpe.o pe_addcert.o pe_allocspace.o pe_begin.o pe_end.o pe_error.o pe_getdatadir.o pe_getpehdr.o pe_getscn.o pe_getshdr.o pe_nextscn.o pe_opthdr.o pe_rawfile.o pe_readall.o pe_update.o pe_updatefile.o pe_updatenull.o -lpthread
> /usr/bin/ld: warning: libdpe.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
...
I checked over on reproducible builds to determine if this was raspbian
specific,
and it seems that on the reproducible builds tests for armhf, "rbuild" is
succeeding
but "build2" is failing.
https://tests.reproducible-builds.org/debian/rb-pkg/trixie/armhf/pesign.html
Hello,
I am not maintainer of pesign, just tried to reproduce it.
I could reproduce this message within a armhf chroot(systemd-nspawn)
running on top of a trixie/unstable arm64 debian on an RPi3.
The reason of the failure seems to be the missing "-Wl,--no-wchar-size-warning",
which should be added by [1].
The reason this option gets not added seems to be that `uname -m` inside
my chroot still reports `aarch64`.
When I add `--personality=arm` to my systemd-nspawn command,
an `uname -m` reports `armv8l` and the build succeeds.
The log then shows `-DCONFIG_arm` instead of `-DCONFIG_aarch64`,
and the previously missing `-Wl,--no-wchar-size-warning`.
So I don't if the architecture should be detected some different way,
or if it is up to the builder to set the right personality for the build.
Kind regards,
Bernhard
[1]
https://salsa.debian.org/efi-team/pesign/-/blob/debian/debian/patches/stop_arm_linker_wchar_warnings.patch?ref_type=heads