www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15054] New: DMD doesn't work with hardening-wrapper


          Issue ID: 15054
           Summary: DMD doesn't work with hardening-wrapper
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: public dicebot.lv

Originally reported by Arch Linux user Richard White (rwhite) :


Description: Both the dmd and ldc (but not the gdc) d compilers in the repos fail to build anything. It always returns this /usr/bin/ld: hello.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC hello.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status --- errorlevel 1 Steps to reproduce: Create a *.d file with the trivial program void main(){} $ dmd filename.d <<<

I found the problem. The hardening-wrapper package appends its utils (which seem to be incompatible with dmd and ldc) to the begging of your path causing them to be used. Removing the hardening-wrapper and restarting seems to have fixed the problem. <<< Relevant : https://wiki.debian.org/Hardening --
Sep 13 2015