Am 28. November 2025 08:53:17 MEZ schrieb John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>:
Hi Jan,
On Fri, 2025-11-28 at 00:17 +0100, Jan Engelhardt wrote:
On Thursday 2025-11-27 22:13, John Paul Adrian Glaubitz wrote:
--- debian/rules.orig 2025-11-08 21:28:26.000000000 +0100
+++ debian/rules 2025-11-27 22:11:18.063514133 +0100
@@ -1146,6 +1146,11 @@
DEB_CXXFLAGS_MAINT_APPEND = -ffp-contract=off
endif
+ifneq (,$(filter sparc64,$(DEB_HOST_ARCH)))
+ DEB_CFLAGS_MAINT_APPEND = -fPIE
+ DEB_CXXFLAGS_MAINT_APPEND = -fPIE
+endif
If all you have a "hammer" (e.g. `./configure CFLAGS=-fPIC`), that CFLAGS
variable may be used by the software project for both executables and shared
libraries.
It is possible for the build to fail, since PIE is not meant to
be used when building shared libraries.
If that happens, you have to switch from PIE to PIC (that latter is more
general).
On the other hand, if the software project uses libtool, you are in good hands:
libtool forces -fPIC on shared libs anyway and transparently strips any
conflicting -fPIE internally (it also eats the small model -fpic/-fpie
in favor of -fPIC).
Yeah, you seem to be correct with your analysis as the -fPIE didn't help and the
error still occurs:
../shared/commonlib.c: In function 'timeNow':
../shared/commonlib.c:705:3: warning: 'ftime' is deprecated: Use gettimeofday or clock_gettime instead [-Wdeprecated-declarations]
705 | ftime(&buf);
| ^~~~~
In file included from ../shared/commonlib.c:7:
/usr/include/sparc64-linux-gnu/sys/timeb.h:29:12: note: declared here
29 | extern int ftime (struct timeb *__timebuf)
| ^~~~~
lp_MDO.o: in function `getMDO':
lp_MDO.c:(.text+0x6f4): relocation truncated to fit: R_SPARC_GOT13 against symbol `mdo_free' defined in .text section in lp_MDO.o
lp_MDO.c:(.text+0x6fc): relocation truncated to fit: R_SPARC_GOT13 against symbol `mdo_calloc' defined in .text section in lp_MDO.o
mmio.o: in function `mm_read_mtx_crd':
mmio.c:(.text+0x938): relocation truncated to fit: R_SPARC_GOT13 against symbol `stdin@@GLIBC_2.2' defined in .data section in /lib/sparc64-linux-gnu/libc.so.6
mmio.c:(.text+0x9f8): relocation truncated to fit: R_SPARC_GOT13 against symbol `stdin@@GLIBC_2.2' defined in .data section in /lib/sparc64-linux-gnu/libc.so.6
mmio.c:(.text+0xa7c): relocation truncated to fit: R_SPARC_GOT13 against symbol `stdin@@GLIBC_2.2' defined in .data section in /lib/sparc64-linux-gnu/libc.so.6
mmio.o: in function `mm_read_unsymmetric_sparse':
mmio.c:(.text+0xce8): relocation truncated to fit: R_SPARC_GOT13 against symbol `stderr@@GLIBC_2.2' defined in .data section in /lib/sparc64-linux-gnu/libc.so.6
mmio.c:(.text+0xd24): relocation truncated to fit: R_SPARC_GOT13 against symbol `stderr@@GLIBC_2.2' defined in .data section in /lib/sparc64-linux-gnu/libc.so.6
mmio.o: in function `mm_write_mtx_crd':
mmio.c:(.text+0xdd0): relocation truncated to fit: R_SPARC_GOT13 against symbol `stdout@@GLIBC_2.2' defined in .data section in /lib/sparc64-linux-gnu/libc.so.6
mmio.c:(.text+0xf44): relocation truncated to fit: R_SPARC_GOT13 against symbol `stdout@@GLIBC_2.2' defined in .data section in /lib/sparc64-linux-gnu/libc.so.6
myblas.o: in function `is_nativeBLAS':
myblas.c:(.text+0x7a0): relocation truncated to fit: R_SPARC_GOT13 against symbol `hBLAS' defined in .bss section in myblas.o
myblas.o: in function `load_BLAS':
myblas.c:(.text+0x7c0): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
make: *** [/home/glaubitz/loffice/libreoffice-26.2.0~alpha1/external/lpsolve/ExternalProject_lpsolve.mk:27: /home/glaubitz/loffice/libreoffice-26.2.0~alpha1/workdir/ExternalProject/lpsolve/build]
Error 1
So, I'll have to dig deeper in the build system where I need to pass -fPIE.
Adrian