Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dmd fails to build on OpenSUSE Tumbleweed #19275

Open
dlangBugzillaToGithub opened this issue Jul 5, 2017 · 1 comment
Open

dmd fails to build on OpenSUSE Tumbleweed #19275

dlangBugzillaToGithub opened this issue Jul 5, 2017 · 1 comment
Labels

Comments

@dlangBugzillaToGithub
Copy link

Martin Nowak (@MartinNowak) reported this on 2017-07-05T11:39:05Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=17598

Description

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.
@dlangBugzillaToGithub
Copy link
Author

code (@MartinNowak) commented on 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant