digitalmars.D.learn - Compilation phobos errors with DMD 2.071,2.072 or dub
- Ozan (ONS) (13/13) Nov 03 2016 Hi,
- kozzi11 via Digitalmars-d-learn (43/43) Nov 03 2016 --8323328-1155843618-1478194860=:1186
- Ozan (ONS) (12/25) Nov 04 2016 Solved through changing content of /etc/dmd.conf to
Hi, with a fresh Ubuntu 16.10 installation using "Hello, World" I got a list of following errors like: /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(thread_256_713.o): relocation R_X86_64_32 against symbol `_D6object9Throwable7__ClassZ' can not be used when making a shared object; recompile with -fPIC Example: Using dmd 2.071 and dub; dub init appName; compile appName with dub. Or direct with dmd What I'm missing? Any hints? Thanks & Regards, Ozan
Nov 03 2016
--8323328-1155843618-1478194860=:1186 Content-Type: TEXT/plain; CHARSET=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Really? This issue is here on forum many times, can you pleas read last few= post? Just by name.=0A=0ASent from my Samsung device.=C2=A0=0A=0A=0A=0A=0A= =0A---- Original message ----=0AFrom: Ozan (ONS) via Digitalmars-d-learn <d= igitalmars-d-learn puremagic.com>=0ASent: 03/11/2016 15:55:24=0ATo: digital= mars-d-learn puremagic.com=0ASubject: Compilation phobos errors with DMD 2.= 071,2.072 or dub=0A=0A=0A=0AHi,=0A=0A=0A=0Awith=C2=A0a=C2=A0fresh=C2=A0Ubun= tu=C2=A016.10=C2=A0installation=C2=A0using=C2=A0"Hello,=C2=A0World"=C2=A0I= =C2=A0got=C2=A0=0A=0Aa=C2=A0list=C2=A0of=C2=A0following=C2=A0errors=C2=A0li= ke:=0A=0A/usr/bin/ld:=C2=A0=0A=0A/usr/lib/x86_64-linux-gnu/libphobos2.a(thr= ead_256_713.o):=C2=A0=0A=0Arelocation=C2=A0R_X86_64_32=C2=A0against=C2=A0sy= mbol=C2=A0=0A=0A`_D6object9Throwable7__ClassZ'=C2=A0can=C2=A0not=C2=A0be=C2= =A0used=C2=A0when=C2=A0making=C2=A0a=C2=A0=0A=0Ashared=C2=A0object;=C2=A0re= compile=C2=A0with=C2=A0-fPIC=0A=0A=0A=0AExample:=C2=A0Using=C2=A0dmd=C2=A02= .071=C2=A0and=C2=A0dub;=C2=A0dub=C2=A0init=C2=A0appName;=C2=A0compile=C2=A0= =0A=0AappName=C2=A0with=C2=A0dub.=0A=0AOr=C2=A0direct=C2=A0with=C2=A0dmd=0A= =0A=0A=0AWhat=C2=A0I'm=C2=A0missing?=C2=A0Any=C2=A0hints?=0A=0A=0A=0AThanks= =C2=A0&=C2=A0Regards,=C2=A0Ozan=0A=0A=0A=0A=0A --8323328-1155843618-1478194860=:1186 Content-Type: TEXT/html; CHARSET=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE <html><body><div dir=3D"auto">Really? This issue is here on forum many time= s, can you pleas read last few post? Just by name.<br><br><div dir=3D"auto"= class=3D"tizen_signature">Sent from my Samsung device.</div> </div>= =0A=0A=0A=0A=0A=0A<div class=3D"tizen_quote">---- Original message ----<br>= From: Ozan (ONS) via Digitalmars-d-learn <digitalmars-d-learn puremagic.= com><br>Sent: 03/11/2016 15:55:24<br>To: digitalmars-d-learn puremagic.c= om<br>Subject: Compilation phobos errors with DMD 2.071,2.072 or dub<br></d= iv><br>=0A=0AHi,=0A<br>=0A<br>with a fresh Ubuntu 16.10= installation using "Hello, World" I got = ;=0A<br>a list of following errors like:=0A<br>/us= r/bin/ld: =0A<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(thread_256_713= .o): =0A<br>relocation R_X86_64_32 against symbol = =0A<br>`_D6object9Throwable7__ClassZ' can not be used&n= bsp;when making a =0A<br>shared object; recompile&= nbsp;with -fPIC=0A<br>=0A<br>Example: Using dmd 2.071 and d= ub; dub init appName; compile =0A<br>appName = with dub.=0A<br>Or direct with dmd=0A<br>=0A<br>What&nb= sp;I'm missing? Any hints?=0A<br>=0A<br>Thanks &&nb= sp;Regards, Ozan=0A<br>=0A<br><br></body></html> --8323328-1155843618-1478194860=:1186--
Nov 03 2016
On Thursday, 3 November 2016 at 14:52:26 UTC, Ozan (ONS) wrote:Hi, with a fresh Ubuntu 16.10 installation using "Hello, World" I got a list of following errors like: /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(thread_256_713.o): relocation R_X86_64_32 against symbol `_D6object9Throwable7__ClassZ' can not be used when making a shared object; recompile with -fPIC Example: Using dmd 2.071 and dub; dub init appName; compile appName with dub. Or direct with dmd What I'm missing? Any hints? Thanks & Regards, OzanSolved through changing content of /etc/dmd.conf to [Environment32] DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib/i386-linux-gnu -L--export-dynamic -fPIC -defaultlib=libphobos2.so [Environment64] DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib/x86_64-linux-gnu -L--export-dynamic -fPIC -defaultlib=libphobos2.so Thanks for the hints, Ozan
Nov 04 2016