www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17598] New: dmd fails to build on OpenSUSE Tumbleweed

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

          Issue ID: 17598
           Summary: dmd fails to build on OpenSUSE Tumbleweed
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

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.

--
Jul 05