Bug 1057 – Can't build on x86_64 without --disable-shared
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2007-03-12T09:48:00Z
Last change time
2015-06-09T05:14:53Z
Assigned to
ibuclaw
Creator
ndbecker2
Comments
Comment #0 by ndbecker2 — 2007-03-12T09:48:20Z
Can't build on x86_64 without --disable-shared. Using --disable-shared builds a non-PIC version of libgphobos, and this can't be used to build shared object libraries.
Comment #1 by martinxyz — 2007-10-27T16:03:40Z
I can build without --disable-shared, but when trying to create a -shared object the linker tells me that I have to rebuild phobos with -fPIC.
As a workaround you can compile everything with -fPIC, which should not hurt so much on AMD64. Execute this command in the gcc directory (not in gcc/d/ but gcc/d/ must already exist):
find -name 'configure*' |grep -v .svn | xargs perl -p -i -e 's/-O2/-O2 -fPIC/g'
I really hope someone will find a clean solution.
Comment #2 by ibuclaw — 2012-07-06T05:07:07Z
Having been using / testing / developing on x86_64 builds for over a year now and have never had this issue. Closing.