Source: reglookup
Version: 1.0.1+svn296-1
Severity: normal
Tags: patch
Dear Maintainer,
Build fails here:
gcc -o src/reglookup-recover -fPIE -pie src/reglookup-recover.o -Llib
-L/usr/lib -lm -lpthread -lregfi -ltalloc
/usr/bin/ld: src/reglookup-recover.o: relocation R_PARISC_DPREL21L can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/reglookup-recover.o(.text+0x1fc): cannot handle
R_PARISC_PCREL17F for fwrite@@GLIBC_2.2
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
Full log is here:
https://buildd.debian.org/status/fetch.php?pkg=reglookup&arch=hppa&ver=1.0.1%2Bsvn296-1&stamp=1757429064&raw=0
The 32-bit hppa architecture doesn't enable PIE by default. As a result,
reglookup-recover.c needs to be compiled with -fPIE.
With the attached patch, the reglookup package builds successfully on hppa.
Maybe another alternative would be to modify CFLAGS in debian/rules.
Regards,
Dave Anglin
-- System Information:
Debian Release: forky/sid
APT prefers unreleased
APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: hppa (parisc64)
Kernel: Linux 6.12.44-dirty (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8),
LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
--- SConstruct.save 2025-09-09 12:47:08.000000000 -0400
+++ SConstruct 2025-09-09 13:01:45.496008451 -0400
@@ -10,7 +10,8 @@
# package build, instead relying on CFLAGS/LDFLAGS to specify them when
appropriate?
cflags = '-std=gnu99 -pedantic -Wall -Werror=format-security
-D_FILE_OFFSET_BITS=64 -fvisibility=hidden'
cflags += ' -DREGFI_VERSION=\'"%s"\' ' % REGFI_VERSION
-cflags += os.environ.get('CFLAGS','-fPIE -pie -fstack-protector-strong
-D_FORTIFY_SOURCE=2 -O2')
+cflags += ' -fPIE -pie '
+cflags += os.environ.get('CFLAGS','-fstack-protector-strong
-D_FORTIFY_SOURCE=2 -O2')
linkflags = "-fPIE -pie " + os.environ.get('LDFLAGS','-z relro -z now')