Bug#1121530: libreoffice: Please build with -fPIE on sparc64 to fix FTBFS

Rene Engelhard <[email protected]> Fri, 28 Nov 2025 09:23:26 +0100
Newsgroups gmane.linux.debian.devel.bugs.general,gmane.linux.debian.devel.openoffice,gmane.linux.debian.ports.sparc
Message-ID <[email protected]>
------IY9TIWGZ4MPM55C7W4PO8TNL95B5BC
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi,

The internal lp-solve probably just doesn't honour the system env buildfla=
gs=2E It's a crude shell script used for building (ccc), see the existing l=
p-solve-related patches=2E

Regards=20

Rene

Am 28=2E November 2025 08:53:17 MEZ schrieb John Paul Adrian Glaubitz <gla=
ubitz@physik=2Efu-berlin=2Ede>:
>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=2Eorig   2025-11-08 21:28:26=2E000000000 +0100
>> > +++ debian/rules        2025-11-27 22:11:18=2E063514133 +0100
>> > @@ -1146,6 +1146,11 @@
>> >        DEB_CXXFLAGS_MAINT_APPEND =3D -ffp-contract=3Doff
>> > endif
>> >=20
>> > +ifneq (,$(filter sparc64,$(DEB_HOST_ARCH)))
>> > +       DEB_CFLAGS_MAINT_APPEND =3D -fPIE
>> > +       DEB_CXXFLAGS_MAINT_APPEND =3D -fPIE
>> > +endif
>>=20
>> If all you have a "hammer" (e=2Eg=2E `=2E/configure CFLAGS=3D-fPIC`), t=
hat CFLAGS
>> variable may be used by the software project for both executables and s=
hared
>> libraries=2E
>>=20
>> It is possible for the build to fail, since PIE is not meant to
>> be used when building shared libraries=2E
>>=20
>> If that happens, you have to switch from PIE to PIC (that latter is mor=
e
>> general)=2E
>>=20
>> On the other hand, if the software project uses libtool, you are in goo=
d 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)=2E
>
>Yeah, you seem to be correct with your analysis as the -fPIE didn't help =
and the
>error still occurs:
>
>=2E=2E/shared/commonlib=2Ec: In function 'timeNow':
>=2E=2E/shared/commonlib=2Ec:705:3: warning: 'ftime' is deprecated: Use ge=
ttimeofday or clock_gettime instead [-Wdeprecated-declarations]
>  705 |   ftime(&buf);
>      |   ^~~~~
>In file included from =2E=2E/shared/commonlib=2Ec:7:
>/usr/include/sparc64-linux-gnu/sys/timeb=2Eh:29:12: note: declared here
>   29 | extern int ftime (struct timeb *__timebuf)
>      |            ^~~~~
>lp_MDO=2Eo: in function `getMDO':
>lp_MDO=2Ec:(=2Etext+0x6f4): relocation truncated to fit: R_SPARC_GOT13 ag=
ainst symbol `mdo_free' defined in =2Etext section in lp_MDO=2Eo
>lp_MDO=2Ec:(=2Etext+0x6fc): relocation truncated to fit: R_SPARC_GOT13 ag=
ainst symbol `mdo_calloc' defined in =2Etext section in lp_MDO=2Eo
>mmio=2Eo: in function `mm_read_mtx_crd':
>mmio=2Ec:(=2Etext+0x938): relocation truncated to fit: R_SPARC_GOT13 agai=
nst symbol `stdin@@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc64-=
linux-gnu/libc=2Eso=2E6
>mmio=2Ec:(=2Etext+0x9f8): relocation truncated to fit: R_SPARC_GOT13 agai=
nst symbol `stdin@@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc64-=
linux-gnu/libc=2Eso=2E6
>mmio=2Ec:(=2Etext+0xa7c): relocation truncated to fit: R_SPARC_GOT13 agai=
nst symbol `stdin@@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc64-=
linux-gnu/libc=2Eso=2E6
>mmio=2Eo: in function `mm_read_unsymmetric_sparse':
>mmio=2Ec:(=2Etext+0xce8): relocation truncated to fit: R_SPARC_GOT13 agai=
nst symbol `stderr@@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc64=
-linux-gnu/libc=2Eso=2E6
>mmio=2Ec:(=2Etext+0xd24): relocation truncated to fit: R_SPARC_GOT13 agai=
nst symbol `stderr@@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc64=
-linux-gnu/libc=2Eso=2E6
>mmio=2Eo: in function `mm_write_mtx_crd':
>mmio=2Ec:(=2Etext+0xdd0): relocation truncated to fit: R_SPARC_GOT13 agai=
nst symbol `stdout@@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc64=
-linux-gnu/libc=2Eso=2E6
>mmio=2Ec:(=2Etext+0xf44): relocation truncated to fit: R_SPARC_GOT13 agai=
nst symbol `stdout@@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc64=
-linux-gnu/libc=2Eso=2E6
>myblas=2Eo: in function `is_nativeBLAS':
>myblas=2Ec:(=2Etext+0x7a0): relocation truncated to fit: R_SPARC_GOT13 ag=
ainst symbol `hBLAS' defined in =2Ebss section in myblas=2Eo
>myblas=2Eo: in function `load_BLAS':
>myblas=2Ec:(=2Etext+0x7c0): additional relocation overflows omitted from =
the output
>collect2: error: ld returned 1 exit status
>make: *** [/home/glaubitz/loffice/libreoffice-26=2E2=2E0~alpha1/external/=
lpsolve/ExternalProject_lpsolve=2Emk:27: /home/glaubitz/loffice/libreoffice=
-26=2E2=2E0~alpha1/workdir/ExternalProject/lpsolve/build]
>Error 1
>
>So, I'll have to dig deeper in the build system where I need to pass -fPI=
E=2E
>
>Adrian
>
>--=20
> =2E''`=2E  John Paul Adrian Glaubitz
>: :' :  Debian Developer
>`=2E `'   Physicist
>  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>

------IY9TIWGZ4MPM55C7W4PO8TNL95B5BC
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div dir=3D"auto">Hi,<br><br>The internal lp-solve=
 probably just doesn't honour the system env buildflags=2E It's a crude she=
ll script used for building (ccc), see the existing lp-solve-related patche=
s=2E<br><br>Regards <br><br>Rene</div><br><br><div class=3D"gmail_quote"><d=
iv dir=3D"auto">Am 28=2E November 2025 08:53:17 MEZ schrieb John Paul Adria=
n Glaubitz &lt;glaubitz@physik=2Efu-berlin=2Ede&gt;:</div><blockquote class=
=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0=2E8ex; border-left: 1px sol=
id rgb(204, 204, 204); padding-left: 1ex;">
<pre class=3D"k9mail"><div dir=3D"auto">Hi Jan,<br><br>On Fri, 2025-11-28 =
at 00:17 +0100, Jan Engelhardt wrote:<br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin: 0pt 0pt 1ex 0=2E8ex; border-left: 1px solid #729fcf;=
 padding-left: 1ex;"><div dir=3D"auto">On Thursday 2025-11-27 22:13, John P=
aul Adrian Glaubitz wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin: 0pt 0pt 1ex 0=2E8ex; border-left: 1px solid #ad7fa8; padding-le=
ft: 1ex;"><div dir=3D"auto">--- debian/rules=2Eorig   2025-11-08 21:28:26=
=2E000000000 +0100<br>+++ debian/rules        2025-11-27 22:11:18=2E0635141=
33 +0100<br>@@ -1146,6 +1146,11 @@<br>       DEB_CXXFLAGS_MAINT_APPEND =3D =
-ffp-contract=3Doff<br>endif<br><br>+ifneq (,$(filter sparc64,$(DEB_HOST_AR=
CH)))<br>+       DEB_CFLAGS_MAINT_APPEND =3D -fPIE<br>+       DEB_CXXFLAGS_=
MAINT_APPEND =3D -fPIE<br>+endif<br></div></blockquote><div dir=3D"auto"><b=
r>If all you have a "hammer" (e=2Eg=2E `=2E/configure CFLAGS=3D-fPIC`), tha=
t CFLAGS<br>variable may be used by the software project for both executabl=
es and shared<br>libraries=2E<br><br>It is possible for the build to fail, =
since PIE is not meant to<br>be used when building shared libraries=2E<br><=
br>If that happens, you have to switch from PIE to PIC (that latter is more=
<br>general)=2E<br><br>On the other hand, if the software project uses libt=
ool, you are in good hands:<br>libtool forces -fPIC on shared libs anyway a=
nd transparently strips any<br>conflicting -fPIE internally (it also eats t=
he small model -fpic/-fpie<br>in favor of -fPIC)=2E<br></div></blockquote><=
div dir=3D"auto"><br>Yeah, you seem to be correct with your analysis as the=
 -fPIE didn't help and the<br>error still occurs:<br><br>=2E=2E/shared/comm=
onlib=2Ec: In function 'timeNow':<br>=2E=2E/shared/commonlib=2Ec:705:3: war=
ning: 'ftime' is deprecated: Use gettimeofday or clock_gettime instead [-Wd=
eprecated-declarations]<br>  705 |   ftime(&amp;buf);<br>      |   ^~~~~<br=
>In file included from =2E=2E/shared/commonlib=2Ec:7:<br>/usr/include/sparc=
64-linux-gnu/sys/timeb=2Eh:29:12: note: declared here<br>   29 | extern int=
 ftime (struct timeb *__timebuf)<br>      |            ^~~~~<br>lp_MDO=2Eo:=
 in function `getMDO':<br>lp_MDO=2Ec:(=2Etext+0x6f4): relocation truncated =
to fit: R_SPARC_GOT13 against symbol `mdo_free' defined in =2Etext section =
in lp_MDO=2Eo<br>lp_MDO=2Ec:(=2Etext+0x6fc): relocation truncated to fit: R=
_SPARC_GOT13 against symbol `mdo_calloc' defined in =2Etext section in lp_M=
DO=2Eo<br>mmio=2Eo: in function `mm_read_mtx_crd':<br>mmio=2Ec:(=2Etext+0x9=
38): relocation truncated to fit: R_SPARC_GOT13 against symbol `stdin@@GLIB=
C_2=2E2' defined in =2Edata section in /lib/sparc64-linux-gnu/libc=2Eso=2E6=
<br>mmio=2Ec:(=2Etext+0x9f8): relocation truncated to fit: R_SPARC_GOT13 ag=
ainst symbol `stdin@@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc6=
4-linux-gnu/libc=2Eso=2E6<br>mmio=2Ec:(=2Etext+0xa7c): relocation truncated=
 to fit: R_SPARC_GOT13 against symbol `stdin@@GLIBC_2=2E2' defined in =2Eda=
ta section in /lib/sparc64-linux-gnu/libc=2Eso=2E6<br>mmio=2Eo: in function=
 `mm_read_unsymmetric_sparse':<br>mmio=2Ec:(=2Etext+0xce8): relocation trun=
cated to fit: R_SPARC_GOT13 against symbol `stderr@@GLIBC_2=2E2' defined in=
 =2Edata section in /lib/sparc64-linux-gnu/libc=2Eso=2E6<br>mmio=2Ec:(=2Ete=
xt+0xd24): relocation truncated to fit: R_SPARC_GOT13 against symbol `stder=
r@@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc64-linux-gnu/libc=
=2Eso=2E6<br>mmio=2Eo: in function `mm_write_mtx_crd':<br>mmio=2Ec:(=2Etext=
+0xdd0): relocation truncated to fit: R_SPARC_GOT13 against symbol `stdout@=
@GLIBC_2=2E2' defined in =2Edata section in /lib/sparc64-linux-gnu/libc=2Es=
o=2E6<br>mmio=2Ec:(=2Etext+0xf44): relocation truncated to fit: R_SPARC_GOT=
13 against symbol `stdout@@GLIBC_2=2E2' defined in =2Edata section in /lib/=
sparc64-linux-gnu/libc=2Eso=2E6<br>myblas=2Eo: in function `is_nativeBLAS':=
<br>myblas=2Ec:(=2Etext+0x7a0): relocation truncated to fit: R_SPARC_GOT13 =
against symbol `hBLAS' defined in =2Ebss section in myblas=2Eo<br>myblas=2E=
o: in function `load_BLAS':<br>myblas=2Ec:(=2Etext+0x7c0): additional reloc=
ation overflows omitted from the output<br>collect2: error: ld returned 1 e=
xit status<br>make: *** [/home/glaubitz/loffice/libreoffice-26=2E2=2E0~alph=
a1/external/lpsolve/ExternalProject_lpsolve=2Emk:27: /home/glaubitz/loffice=
/libreoffice-26=2E2=2E0~alpha1/workdir/ExternalProject/lpsolve/build]<br>Er=
ror 1<br><br>So, I'll have to dig deeper in the build system where I need t=
o pass -fPIE=2E<br><br>Adrian<br><br></div></pre></blockquote></div></body>=
</html>
------IY9TIWGZ4MPM55C7W4PO8TNL95B5BC--