Open
Bug 1778981
Opened 2 years ago
Updated 2 years ago
ld: read-only segment has dynamic relocations
Categories
(SeaMonkey :: Build Config, defect)
Tracking
(Not tracked)
UNCONFIRMED
People
(Reporter: psychonaut, Unassigned)
Details
When building SeaMonkey 2.53.13 for x86-64 on openSUSE Tumbleweed, compilation aborts with the following two "read-only segment has dynamic relocations" linker errors:
[ 906s] /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: /tmp/ccY1tqK1.ltrans0.ltrans.o: warning: relocation against `stdout@@GLIBC_2.2.5' in read-only section `.text._ZL13PrintAndFlushPKcz'
[ 906s] unbind.o
[ 906s] /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: read-only segment has dynamic relocations
[ 906s] collect2: error: ld returned 1 exit status
…
[ 914s] /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: /tmp/ccnVOEok.ltrans2.ltrans.o: warning: relocation against `_ZTVSt9basic_iosIcSt11char_traitsIcEE@@GLIBCXX_3.4' in read-only section `.text._ZNK5blink7
Decimal8toStringB5cxx11Ev'
[ 914s] /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: read-only segment has dynamic relocations
[ 914s] collect2: error: ld returned 1 exit status
Reporter | ||
Comment 1•2 years ago
|
||
The problem seems to be specific to openSUSE Tumbleweed, or maybe more specifically the version of GNU ld it uses (2.38) since building on openSUSE Leap 15.3 and openSUSE Leap 15.4, which use ld 2.37, works fine.
A workaround to get SeaMonkey 2.53.13 to build on openSUSE Tumbleweed is to disable LTO. I do this by adding %define _lto_cflags %{nil}
to the RPM spec file, which I suppose just omits the usual -flto=auto
from CXXFLAGS
.
Reporter | ||
Comment 2•2 years ago
|
||
Still reproducible when compiling 2.53.14 Beta 1.
You need to log in
before you can comment on or make changes to this bug.
Description
•