digitalmars.D - dmd or phobos were broken in ubuntu 16.10 d-apt
- mogu (50/50) Oct 20 2016 $ dmd hello.d
- tcak (12/13) Oct 21 2016 Yes, we (I and one another person on this forum) have the same
- Daniel Kozak via Digitalmars-d (3/12) Oct 21 2016 Or you can build your own version of dmd with PIC enabled and add -fPIC
- mogu (5/7) Oct 21 2016 I rebuilded phobos and druntime with -fPIC and replaced the
- Daniel Kozak via Digitalmars-d (4/10) Oct 21 2016 read my message again:
- Daniel Kozak via Digitalmars-d (3/14) Oct 21 2016 or maybe there is another one dmd.conf somewhere in dmd source (in place...
- Martin Nowak (4/5) Jan 10 2017 Just for future reference, PIE support was fixed with 2.072.2.
$ dmd hello.d /usr/bin/ld: hello.o: relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(exception_224_3b4.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(exception_227_4a2.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(exception_229_5cc.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(dmain2_626_47b.o): relocation R_X86_64_32 against symbol `_D6object9Throwable7__ClassZ' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(dmain2_628_776.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(dwarfeh_62b_6b9.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(dwarfeh_62d_56a.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(dwarfeh_62e_811.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(dwarfeh_632_2c9.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(dwarfeh_633_6e0.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(lifetime_647_482.o): relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC ...
Oct 20 2016
On Friday, 21 October 2016 at 04:16:38 UTC, mogu wrote:[...]Yes, we (I and one another person on this forum) have the same problem. As a temporary solution, while compiling your program, add -defaultlib=libphobos2.so -fPIC This solved my problem on Ubuntu 16.10. But with one problem. Now, while you are copying your executable to another computer, you need to copy libphobos2.so (in my case libphobos2.so.17) to that computer's /usr/lib as well.
Oct 21 2016
Dne 21.10.2016 v 10:02 tcak via Digitalmars-d napsal(a):On Friday, 21 October 2016 at 04:16:38 UTC, mogu wrote:Or you can build your own version of dmd with PIC enabled and add -fPIC to /etc/dmd.conf[...]Yes, we (I and one another person on this forum) have the same problem. As a temporary solution, while compiling your program, add -defaultlib=libphobos2.so -fPIC This solved my problem on Ubuntu 16.10. But with one problem. Now, while you are copying your executable to another computer, you need to copy libphobos2.so (in my case libphobos2.so.17) to that computer's /usr/lib as well.
Oct 21 2016
On Friday, 21 October 2016 at 10:05:40 UTC, Daniel Kozak wrote:Or you can build your own version of dmd with PIC enabled and add -fPIC to /etc/dmd.confI rebuilded phobos and druntime with -fPIC and replaced the static libphobos2.a. Now it works well. But I have to specified -fPIC to dmd each time to build. Should dmd make -fPIC the default?
Oct 21 2016
Dne 21.10.2016 v 12:53 mogu via Digitalmars-d napsal(a):On Friday, 21 October 2016 at 10:05:40 UTC, Daniel Kozak wrote:read my message again: add -fPIC to /etc/dmd.conf this should helpOr you can build your own version of dmd with PIC enabled and add -fPIC to /etc/dmd.confI rebuilded phobos and druntime with -fPIC and replaced the static libphobos2.a. Now it works well. But I have to specified -fPIC to dmd each time to build. Should dmd make -fPIC the default?
Oct 21 2016
Dne 21.10.2016 v 12:59 Daniel Kozak napsal(a):Dne 21.10.2016 v 12:53 mogu via Digitalmars-d napsal(a):or maybe there is another one dmd.conf somewhere in dmd source (in place where your new dmd binary is)On Friday, 21 October 2016 at 10:05:40 UTC, Daniel Kozak wrote:read my message again: add -fPIC to /etc/dmd.conf this should helpOr you can build your own version of dmd with PIC enabled and add -fPIC to /etc/dmd.confI rebuilded phobos and druntime with -fPIC and replaced the static libphobos2.a. Now it works well. But I have to specified -fPIC to dmd each time to build. Should dmd make -fPIC the default?
Oct 21 2016
On Friday, 21 October 2016 at 04:16:38 UTC, mogu wrote:$ dmd hello.dJust for future reference, PIE support was fixed with 2.072.2. http://dlang.org/changelog/2.072.2.html https://issues.dlang.org/show_bug.cgi?id=16794
Jan 10 2017