Bug 17598 – dmd fails to build on OpenSUSE Tumbleweed

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-07-05T11:39:05Z
Last change time
2024-12-13T18:53:06Z
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dmd#19275 →

Comments

Comment #0 by code — 2017-07-05T11:39:05Z
https://github.com/dlang/dub/issues/1141#issuecomment-309197106 openSUSE Tumbleweed switched to PIE, see https://lists.opensuse.org/opensuse-factory/2017-06/msg00403.html . The last released version of openSUSE Leap, openSUSE Leap 42.2 is as it looks like untouched as well as the version currently in Beta, openSUSE Leap 42.3. I branched the build project for dub+dmd+etc. within OBS to check how the situation looks like when building against openSUSE:Factory, openSUSE:Tumbleweed, openSUSE:Leap:42.2 and openSUSE:Leap:42.3 . openSUSE Leap 42.2+42.3 are all fine with the latest (released) version of dmd+dub but openSUSE Tumbleweed fails to compile dmd with [ 33s] c++ -c -Wno-deprecated -Wstrict-aliasing -fno-exceptions -fno-rtti -D__pascal= -DMARS=1 -DTARGET_LINUX=1 -DDM_TARGET_CPU_X86=1 -m64 -std=gnu++98 -O2 -Iroot -MMD -MF newdelete.deps root/newdelete.c [ 34s] /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: idgen.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC [ 34s] /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: final link failed: Nonrepresentable section on output [ 34s] collect2: error: ld returned 1 exit status so I assume the problem is within dmd itself, how it's compiled, not dub. And if I try to patch "-fPIC" into the Makefile for building dmd I get a segfault so I assume this is not the way to go ;-) Help appreciated.
Comment #1 by code — 2017-07-05T11:43:27Z
Seems to be related to their recent change to PIE-by-default. https://build.opensuse.org/package/live_build_log/home:okurz:branches:devel:languages:D/dmd/openSUSE_Tumbleweed/x86_64 Could easily be caused by using their ldc package as bootstrap compiler without having that configured for PIC/PIE.
Comment #2 by robert.schadek — 2024-12-13T18:53:06Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19275 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB