www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DMD on x86_64

reply Robert Clipsham <robert octarineparrot.com> writes:
I've been wanting to try D2 properly for a while now, but as I use linux 
x86-64 I've had to resort to using a virtual machine, which is really 
off putting when I just want to play around with it. I've read multiple 
threads about getting dmd working with a multilib system, but I still 
can't get it working, here's what I've tried:

test.d:
import std.stdio;

void main()
{
         writeln( "Hello World!" );
}

% dmd -v test.d
-- snip --
gcc test.o -o test -m32 -Xlinker -L./../lib -lphobos2 -lpthread -lm
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../libpthread.so when 
searching for -lpthread
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../libpthread.a when 
searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching 
for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching 
for -lpthread
/usr/bin/ld: cannot find -lpthread
collect2: ld returned 1 exit status
--- errorlevel 1

I have a 32 bit version of libpthread in /opt/lib32/lib, so I then tried:

% dmd test.d -L-L/opt/lib32/lib
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../libpthread.so when 
searching for -lpthread
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../libpthread.a when 
searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching 
for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching 
for -lpthread
/usr/bin/ld: cannot find -lpthread
collect2: ld returned 1 exit status
--- errorlevel 1

ld still seems to be trying to use the 64 bit version. Trying to link 
manually with gcc (some options tweaked):

% gcc test.o -o test -m32 -Xlinker -L./../lib -L/opt/lib32/lib 
-L/opt/lib32/usr/lib -lphobos2 -lpthread -lm
/usr/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching 
for /lib/libpthread.so.0
/usr/bin/ld: cannot find /lib/libpthread.so.0
collect2: ld returned 1 exit status

This seemed to get less errors than before. When I specified the path to 
libpthread manually it started complaining about libgcc. Using -v with 
the above command I found the linking command, then adapted that and 
tried manually again, but was left with the error:

/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 
0000000008048c90

When editing the linking command I had to remove a selection of gcc 
libraries that I don't have 32 bit versions of, which could be the 
issue, however according to nm none of the other .o's or .a's that are 
meant to get linked contain _start. Does anyone have any idea how I can 
get dmd working with a multi lib x86-64 system? I'm using Arch Linux, if 
you could point me in the right direction to get the missing libraries 
or whatever's needed to get dmd working let me know, thanks.

Robert
Feb 15 2010
next sibling parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
Robert Clipsham wrote:

 I've been wanting to try D2 properly for a while now, but as I use linux 
 x86-64 I've had to resort to using a virtual machine, which is really 
 off putting when I just want to play around with it. I've read multiple 
 threads about getting dmd working with a multilib system, but I still 
 can't get it working, here's what I've tried:
These instructions should work, I haven't tested but others say they work: http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWithD/Compiler/DMD#AMD64 I had originally posted this question to SO and it gave me a better understanding of what the issue were: http://stackoverflow.com/questions/856328/compiling-with-dmd-on-64bit-linux-or-linking-with-32bit-object-files I found that after installing the proper -dev packages you don't need to specify the linking format.
Feb 15 2010
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 15/02/10 21:44, Jesse Phillips wrote:
 Robert Clipsham wrote:

 I've been wanting to try D2 properly for a while now, but as I use linux
 x86-64 I've had to resort to using a virtual machine, which is really
 off putting when I just want to play around with it. I've read multiple
 threads about getting dmd working with a multilib system, but I still
 can't get it working, here's what I've tried:
These instructions should work, I haven't tested but others say they work: http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWithD/Compiler/DMD#AMD64 I had originally posted this question to SO and it gave me a better understanding of what the issue were: http://stackoverflow.com/questions/856328/compiling-with-dmd-on-64bit-linux-or-linking-with-32bit-object-files I found that after installing the proper -dev packages you don't need to specify the linking format.
I don't use ubuntu, so those instructions don't apply to me. I've tried to make sure I've got all the required 32 bit libs, can't be sure though, my guess is there's still some missing. I've installed the 32 bit libs for gcc, that seems to miss out whatever's included in ubuntu's gcc-multilib package.
Feb 15 2010
next sibling parent "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
Robert Clipsham wrote:
 On 15/02/10 21:44, Jesse Phillips wrote:
 Robert Clipsham wrote:

 I've been wanting to try D2 properly for a while now, but as I use linux
 x86-64 I've had to resort to using a virtual machine, which is really
 off putting when I just want to play around with it. I've read multiple
 threads about getting dmd working with a multilib system, but I still
 can't get it working, here's what I've tried:
These instructions should work, I haven't tested but others say they work: http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWith /Compiler/DMD#AMD64 I had originally posted this question to SO and it gave me a better understanding of what the issue were: http://stackoverflow.com/questions/856328/compiling-with-dmd-on-64bit-linux-or-linking-wit -32bit-object-files I found that after installing the proper -dev packages you don't need to specify the linking format.
I don't use ubuntu, so those instructions don't apply to me. I've tried to make sure I've got all the required 32 bit libs, can't be sure though, my guess is there's still some missing. I've installed the 32 bit libs for gcc, that seems to miss out whatever's included in ubuntu's gcc-multilib package.
Here are listings of the files in the Ubuntu gcc-multilib and g++-multilib packages. You can compare them to the files on your computer: gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/crtbegin.o gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/crtbeginS.o gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/crtbeginT.o gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/crtend.o gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/crtendS.o gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/crtfastmath.o gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/crtprec32.o gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/crtprec64.o gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/crtprec80.o gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libgcc.a gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libgcc_eh.a gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libgcc_s.so gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libgcov.a gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libgomp.a gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libgomp.so gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libssp_nonshared.a gcc-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/libgcc_s_32.so gcc-4.4-multilib: /usr/share/doc/gcc-4.4-multilib g++-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libstdc++.a g++-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libstdc++.so g++-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libstdc++_pic.a g++-4.4-multilib: /usr/lib/gcc/x86_64-linux-gnu/4.4/32/libsupc++.a g++-4.4-multilib: /usr/share/doc/g++-4.4-multilib -Lars
Feb 16 2010
prev sibling parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
Robert Clipsham wrote:

 I don't use ubuntu, so those instructions don't apply to me.
I don't either, but the instructions still apply to me. What distro are you using? If you figure it out, write up some instructions for it.
Feb 16 2010
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 16/02/10 15:20, Jesse Phillips wrote:
 Robert Clipsham wrote:

 I don't use ubuntu, so those instructions don't apply to me.
I don't either, but the instructions still apply to me. What distro are you using? If you figure it out, write up some instructions for it.
I'm using Arch Linux. I've found a gcc-multilib package in AUR ( http://aur.archlinux.org/packages.php?ID=28545 ), it's out of date and doesn't build for me though, it seems to require the de_DE locale too for some unknown reason. I'm hoping when this package is updated it'll do what I need, I'm not holding my breath though.
Feb 16 2010
parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
Robert Clipsham wrote:

 On 16/02/10 15:20, Jesse Phillips wrote:
 Robert Clipsham wrote:

 I don't use ubuntu, so those instructions don't apply to me.
I don't either, but the instructions still apply to me. What distro are you using? If you figure it out, write up some instructions for it.
I'm using Arch Linux. I've found a gcc-multilib package in AUR ( http://aur.archlinux.org/packages.php?ID=28545 ), it's out of date and doesn't build for me though, it seems to require the de_DE locale too for some unknown reason. I'm hoping when this package is updated it'll do what I need, I'm not holding my breath though.
Oh, yeah Arch dropped most efforts to support 32bit didn't they. This probably won't help but maybe trying dmd test.d -L-L/opt/lib32/lib -L-melf_i386 I'd hope that would at least stop it complaining about libpthread. (but so should have your gcc -m32
Feb 16 2010
next sibling parent reply Brad Roberts <braddr puremagic.com> writes:
On 2/16/2010 10:05 PM, Jesse Phillips wrote:
 Robert Clipsham wrote:
 
 On 16/02/10 15:20, Jesse Phillips wrote:
 Robert Clipsham wrote:

 I don't use ubuntu, so those instructions don't apply to me.
I don't either, but the instructions still apply to me. What distro are you using? If you figure it out, write up some instructions for it.
I'm using Arch Linux. I've found a gcc-multilib package in AUR ( http://aur.archlinux.org/packages.php?ID=28545 ), it's out of date and doesn't build for me though, it seems to require the de_DE locale too for some unknown reason. I'm hoping when this package is updated it'll do what I need, I'm not holding my breath though.
Oh, yeah Arch dropped most efforts to support 32bit didn't they. This probably won't help but maybe trying dmd test.d -L-L/opt/lib32/lib -L-melf_i386 I'd hope that would at least stop it complaining about libpthread. (but so should have your gcc -m32
The other thing you could try is to take dmd out of the loop. Can you build a 32 bit c/c++ app with gcc/g++ directly? If you can't get that to work, it's unlikely that dmd will we successful either, given that it relies on gcc to invoke the linker, picking up all the right c library pieces.
Feb 16 2010
next sibling parent reply BCS <none anon.com> writes:
Hello Brad,

 The other thing you could try is to take dmd out of the loop.  Can you
 build a 32 bit c/c++ app with gcc/g++ directly?  If you can't get that
 to work, it's unlikely that dmd will we successful either, given that
 it relies on gcc to invoke the linker, picking up all the right c
 library pieces.
if all else fails, you could use "dmd -c" and invoke the linker directly. -- ... <IXOYE><
Feb 17 2010
parent Robert Clipsham <robert octarineparrot.com> writes:
On 17/02/10 08:48, BCS wrote:
 Hello Brad,

 The other thing you could try is to take dmd out of the loop. Can you
 build a 32 bit c/c++ app with gcc/g++ directly? If you can't get that
 to work, it's unlikely that dmd will we successful either, given that
 it relies on gcc to invoke the linker, picking up all the right c
 library pieces.
if all else fails, you could use "dmd -c" and invoke the linker directly.
I tried that, can't manage to get it to link though, even after changing every library and file mentioned to the 32 bit versions and passing in the right -m :s
Feb 17 2010
prev sibling next sibling parent Robert Clipsham <robert octarineparrot.com> writes:
On 17/02/10 06:20, Brad Roberts wrote:
 On 2/16/2010 10:05 PM, Jesse Phillips wrote:
 Robert Clipsham wrote:

 On 16/02/10 15:20, Jesse Phillips wrote:
 Robert Clipsham wrote:

 I don't use ubuntu, so those instructions don't apply to me.
I don't either, but the instructions still apply to me. What distro are you using? If you figure it out, write up some instructions for it.
I'm using Arch Linux. I've found a gcc-multilib package in AUR ( http://aur.archlinux.org/packages.php?ID=28545 ), it's out of date and doesn't build for me though, it seems to require the de_DE locale too for some unknown reason. I'm hoping when this package is updated it'll do what I need, I'm not holding my breath though.
Oh, yeah Arch dropped most efforts to support 32bit didn't they. This probably won't help but maybe trying dmd test.d -L-L/opt/lib32/lib -L-melf_i386 I'd hope that would at least stop it complaining about libpthread. (but so should have your gcc -m32
The other thing you could try is to take dmd out of the loop. Can you build a 32 bit c/c++ app with gcc/g++ directly? If you can't get that to work, it's unlikely that dmd will we successful either, given that it relies on gcc to invoke the linker, picking up all the right c library pieces.
I haven't tried that yet, I'll give it a shot and see how it goes, thanks :) I suspect that won't work either, at least that gives me some insight into where I'm going wrong though.
Feb 17 2010
prev sibling parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 17/02/10 06:20, Brad Roberts wrote:
 On 2/16/2010 10:05 PM, Jesse Phillips wrote:
 Robert Clipsham wrote:

 On 16/02/10 15:20, Jesse Phillips wrote:
 Robert Clipsham wrote:

 I don't use ubuntu, so those instructions don't apply to me.
I don't either, but the instructions still apply to me. What distro are you using? If you figure it out, write up some instructions for it.
I'm using Arch Linux. I've found a gcc-multilib package in AUR ( http://aur.archlinux.org/packages.php?ID=28545 ), it's out of date and doesn't build for me though, it seems to require the de_DE locale too for some unknown reason. I'm hoping when this package is updated it'll do what I need, I'm not holding my breath though.
Oh, yeah Arch dropped most efforts to support 32bit didn't they. This probably won't help but maybe trying dmd test.d -L-L/opt/lib32/lib -L-melf_i386 I'd hope that would at least stop it complaining about libpthread. (but so should have your gcc -m32
The other thing you could try is to take dmd out of the loop. Can you build a 32 bit c/c++ app with gcc/g++ directly? If you can't get that to work, it's unlikely that dmd will we successful either, given that it relies on gcc to invoke the linker, picking up all the right c library pieces.
% gcc hello.c % ./a.out Hello World! % gcc -m32 hello.c In file included from /usr/include/features.h:371, from /usr/include/stdio.h:28, from hello.c:1: /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory % gcc -m32 hello.c /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/libgcc.a when searching for -lgcc /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc collect2: ld returned 1 exit status % gcc -m32 hello.c -L/opt/lib32/lib -L/opt/lib32/usr/lib /usr/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6 /usr/bin/ld: cannot find /lib/libc.so.6 collect2: ld returned 1 exit status
Feb 17 2010
parent =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= <jeberger free.fr> writes:
	Don't forget that gcc adds a couple of system libraries (like
libgcc) to the linker command. You need to give the right path for
those too (you might want to try with --sysroot, or use --nostdlib
and specify -lgcc manually)

		Jerome
--=20
mailto:jeberger free.fr
http://jeberger.free.fr
Jabber: jeberger jabber.fr
Feb 17 2010
prev sibling parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 17/02/10 06:05, Jesse Phillips wrote:
 Oh, yeah Arch dropped most efforts to support 32bit didn't they. This
I'm pretty sure they didn't... maybe they did on x86_64, I don't know.
 probably won't help but maybe trying

 dmd test.d -L-L/opt/lib32/lib -L-melf_i386
Already tried this, no luck :(
 I'd hope that would at least stop it complaining about libpthread. (but
 so should have your gcc -m32
No luck unfortunately with either method :s
Feb 17 2010
parent Jesse Phillips <jessekphillips+D gmail.com> writes:
Robert Clipsham Wrote:

 On 17/02/10 06:05, Jesse Phillips wrote:
 Oh, yeah Arch dropped most efforts to support 32bit didn't they. This
I'm pretty sure they didn't... maybe they did on x86_64, I don't know.
 probably won't help but maybe trying

 dmd test.d -L-L/opt/lib32/lib -L-melf_i386
Already tried this, no luck :(
 I'd hope that would at least stop it complaining about libpthread. (but
 so should have your gcc -m32
No luck unfortunately with either method :s
My understanding was that all you had was x86_64 Arch http://www.archlinux.org/news/440/ And I found this, "I don't think that the default arch64 gcc is a cross-compiler so you won't be able to compile 32-bit apps with it" But isn't really related to linking so... http://bbs.archlinux.org/viewtopic.php?id=64979
Feb 17 2010
prev sibling next sibling parent reply Lutger <lutger.blijdestijn gmail.com> writes:
If you manage to find the proper 32 bit libraries, there is a configuration 
file for ld where you can specify the search paths, should be: 
/etc/ld.so.conf

The 64-bit distro's I have used fail to add the 32-bit lib paths to this 
file, even if you install the right packages.
Feb 17 2010
parent Robert Clipsham <robert octarineparrot.com> writes:
On 17/02/10 11:06, Lutger wrote:
 If you manage to find the proper 32 bit libraries, there is a configuration
 file for ld where you can specify the search paths, should be:
 /etc/ld.so.conf

 The 64-bit distro's I have used fail to add the 32-bit lib paths to this
 file, even if you install the right packages.
The paths to my 32bit libs seem to be in there, thanks :)
Feb 17 2010
prev sibling next sibling parent reply "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
Robert Clipsham wrote:
 I've been wanting to try D2 properly for a while now, but as I use linux 
 x86-64 I've had to resort to using a virtual machine, which is really 
 off putting when I just want to play around with it. I've read multiple 
 threads about getting dmd working with a multilib system, but I still 
 can't get it working, here's what I've tried:
 
 test.d:
 import std.stdio;
 
 void main()
 {
         writeln( "Hello World!" );
 }
 
 % dmd -v test.d
 -- snip --
 gcc test.o -o test -m32 -Xlinker -L./../lib -lphobos2 -lpthread -lm
 /usr/bin/ld: skipping incompatible 
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../libpthread.so when 
 searching for -lpthread
 /usr/bin/ld: skipping incompatible 
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../libpthread.a when 
 searching for -lpthread
 /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching 
 for -lpthread
 /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching 
 for -lpthread
 /usr/bin/ld: cannot find -lpthread
 collect2: ld returned 1 exit status
 --- errorlevel 1
 
 I have a 32 bit version of libpthread in /opt/lib32/lib, so I then tried:
 
 % dmd test.d -L-L/opt/lib32/lib
 /usr/bin/ld: skipping incompatible 
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../libpthread.so when 
 searching for -lpthread
 /usr/bin/ld: skipping incompatible 
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../libpthread.a when 
 searching for -lpthread
 /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching 
 for -lpthread
 /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching 
 for -lpthread
 /usr/bin/ld: cannot find -lpthread
 collect2: ld returned 1 exit status
 --- errorlevel 1
 
 ld still seems to be trying to use the 64 bit version. Trying to link 
 manually with gcc (some options tweaked):
 
 % gcc test.o -o test -m32 -Xlinker -L./../lib -L/opt/lib32/lib 
 -L/opt/lib32/usr/lib -lphobos2 -lpthread -lm
 /usr/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching 
 for /lib/libpthread.so.0
 /usr/bin/ld: cannot find /lib/libpthread.so.0
 collect2: ld returned 1 exit status
 
 This seemed to get less errors than before. When I specified the path to 
 libpthread manually it started complaining about libgcc. Using -v with 
 the above command I found the linking command, then adapted that and 
 tried manually again, but was left with the error:
 
 /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 
 0000000008048c90
 
 When editing the linking command I had to remove a selection of gcc 
 libraries that I don't have 32 bit versions of, which could be the 
 issue, however according to nm none of the other .o's or .a's that are 
 meant to get linked contain _start. Does anyone have any idea how I can 
 get dmd working with a multi lib x86-64 system? I'm using Arch Linux, if 
 you could point me in the right direction to get the missing libraries 
 or whatever's needed to get dmd working let me know, thanks.
 
 Robert
Try typing: export LD_LIBRARY_PATH="/opt/lib32" before compiling. -Lars
Feb 17 2010
parent Robert Clipsham <robert octarineparrot.com> writes:
On 17/02/10 16:58, Lars T. Kyllingstad wrote:
 Try typing:

 export LD_LIBRARY_PATH="/opt/lib32"

 before compiling.

 -Lars
No luck unfortunately, I get all the same errors as when I use -L, (I believe -L is checked first anyway, not sure though).
Feb 17 2010
prev sibling parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 15/02/10 15:54, Robert Clipsham wrote:
 I've been wanting to try D2 properly for a while now, but as I use linux
 x86-64 I've had to resort to using a virtual machine, which is really
 off putting when I just want to play around with it. I've read multiple
 threads about getting dmd working with a multilib system, but I still
 can't get it working, here's what I've tried:
I managed to get it working! Took a lot of effort, but in short: % yaourt -S lib32-glibc-multilib % cd /tmp % wget http://omploader.org/vM2w4cw % sudo pacman -Rd gcc lib32-glibc lib32-glibc-multilib lib32-gcc-libs % sudo pacman -U gcc-multilib-4.4.2-10-x86_64.pkg.tar.gz % cat > hello.d <<EOF import std.stdio; void main() { writeln( "Hello World!" ); } EOF % dmd hello.d % ./hello Hello World! Hope this helps anyone having trouble getting dmd working on Arch Linux x86-64 :) Thanks to everyone who helped me, I probably wouldn't have managed without your help :) Robert
Feb 17 2010
parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
Robert Clipsham wrote:

 On 15/02/10 15:54, Robert Clipsham wrote:
 I've been wanting to try D2 properly for a while now, but as I use linux
 x86-64 I've had to resort to using a virtual machine, which is really
 off putting when I just want to play around with it. I've read multiple
 threads about getting dmd working with a multilib system, but I still
 can't get it working, here's what I've tried:
I managed to get it working! Took a lot of effort, but in short: % yaourt -S lib32-glibc-multilib % cd /tmp % wget http://omploader.org/vM2w4cw % sudo pacman -Rd gcc lib32-glibc lib32-glibc-multilib lib32-gcc-libs % sudo pacman -U gcc-multilib-4.4.2-10-x86_64.pkg.tar.gz % cat > hello.d <<EOF import std.stdio; void main() { writeln( "Hello World!" ); } EOF % dmd hello.d % ./hello Hello World! Hope this helps anyone having trouble getting dmd working on Arch Linux x86-64 :) Thanks to everyone who helped me, I probably wouldn't have managed without your help :) Robert
Please place them on Wiki4D, probably a sub-section under AMD64. If you don't I will, but I'll give you a chance :) http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWithD/Compiler/DMD
Feb 18 2010
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 18/02/10 15:13, Jesse Phillips wrote:
 Please place them on Wiki4D, probably a sub-section under AMD64. If you
 don't I will, but I'll give you a chance  :)

 http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWithD/Compiler/DMD
Done, I hope it's alright, feel free to edit it as you see fit :)
Feb 18 2010
next sibling parent Chinedu Okonkwo <codmajik gmail.com> writes:
Robert Clipsham Wrote:

 On 18/02/10 15:13, Jesse Phillips wrote:
 Please place them on Wiki4D, probably a sub-section under AMD64. If you
 don't I will, but I'll give you a chance  :)

 http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWithD/Compiler/DMD
Done, I hope it's alright, feel free to edit it as you see fit :)
tried the your approach it worked but compile cpp applications fails. [Sanity Checks - fails] i found my way arround it by installing cross32-gcc and adding CC=/usr/bin/i686-unknown-linux-gnu-gcc to the dmd.conf file I have added the procedure to Wiki4D http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWithD/Compiler/DMD#ArchLinuxASaferSolutionD
Mar 25 2010
prev sibling parent Alvin Majik <me somuta.com> writes:
tried the your approach it worked but compile cpp applications fails.
[Sanity Checks - fails]

i found my way arround it by installing cross32-gcc
and adding
CC=/usr/bin/i686-unknown-linux-gnu-gcc
to the dmd.conf file

I have added the procedure to Wiki4D
http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/StartingWithD/
Compiler/DMD#ArchLinuxASaferSolutionD
Mar 27 2010