www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - First time user of LDC and getting newbie problems.

reply WhatMeForget <kheaser gmail.com> writes:
Just trying to compile a "Hello World" using dub and ldc2. The 32 
bit works fine:

generic generic-ThinkPad-T61:~/Desktop/test$ dub run 
--compiler=ldc2 --arch=x86
Performing "debug" build using ldc2 for x86.
test ~master: target for configuration "application" is up to 
date.
To force a rebuild of up-to-date targets, run again with --force.
Running ./test
hello there

But all hell breaks out when I try a 64 bit build. I've got a 64 
bit cpu and 64 bit Xubuntu so I thought, if I was going to get 
errors, it would be the previous case.


generic generic-ThinkPad-T61:~/Desktop/test$ dub run 
--compiler=ldc2 --arch=x86_64
Performing "debug" build using ldc2 for x86_64.
test ~master: building configuration "application"...
/usr/bin/ld: skipping incompatible /usr/lib/libphobos2-ldc.so 
when searching for -lphobos2-ldc
/usr/bin/ld: skipping incompatible /usr/lib/libphobos2-ldc.a when 
searching for -lphobos2-ldc
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/i686-linux-gnu/6/../../../libphobos2-ldc.so when 
searching for -lphobos2-ldc
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/i686-linux-gnu/6/../../../libphobos2-ldc.a when 
searching for -lphobos2-ldc
/usr/bin/ld: skipping incompatible //usr/lib/libphobos2-ldc.so 
when searching for -lphobos2-ldc
/usr/bin/ld: skipping incompatible //usr/lib/libphobos2-ldc.a 
when searching for -lphobos2-ldc
/usr/bin/ld: cannot find -lphobos2-ldc
/usr/bin/ld: skipping incompatible /usr/lib/libdruntime-ldc.so 
when searching for -ldruntime-ldc
/usr/bin/ld: skipping incompatible /usr/lib/libdruntime-ldc.a 
when searching for -ldruntime-ldc
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/i686-linux-gnu/6/../../../libdruntime-ldc.so when 
searching for -ldruntime-ldc
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/i686-linux-gnu/6/../../../libdruntime-ldc.a when 
searching for -ldruntime-ldc
/usr/bin/ld: skipping incompatible //usr/lib/libdruntime-ldc.so 
when searching for -ldruntime-ldc
/usr/bin/ld: skipping incompatible //usr/lib/libdruntime-ldc.a 
when searching for -ldruntime-ldc
/usr/bin/ld: cannot find -ldruntime-ldc
collect2: error: ld returned 1 exit status
Error: /usr/bin/gcc failed with status: 1
Jun 11
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Sunday, 11 June 2017 at 21:58:27 UTC, WhatMeForget wrote:
 Just trying to compile a "Hello World" using dub and ldc2.
Let's start from the beginning: how did you install LDC? I presume from your command line you're running Windows?
Jun 13
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Tuesday, 13 June 2017 at 12:38:03 UTC, Joseph Rushton Wakeling 
wrote:
 On Sunday, 11 June 2017 at 21:58:27 UTC, WhatMeForget wrote:
 Just trying to compile a "Hello World" using dub and ldc2.
I presume from your command line you're running Windows?
... I don't know where I got that idea from. Must be having a distracted day. What OS/distro are you running, in any case?
Jun 13
parent reply WhatMeWorry <kheaser gmail.com> writes:
On Tuesday, 13 June 2017 at 12:39:53 UTC, Joseph Rushton Wakeling 
wrote:
 On Tuesday, 13 June 2017 at 12:38:03 UTC, Joseph Rushton 
 Wakeling wrote:
 On Sunday, 11 June 2017 at 21:58:27 UTC, WhatMeForget wrote:
 Just trying to compile a "Hello World" using dub and ldc2.
I presume from your command line you're running Windows?
... I don't know where I got that idea from. Must be having a distracted day. What OS/distro are you running, in any case?
Sorry I didn't reply sooner. I just reinstalled everything and it's all good. Something was really screwed up.
Jun 13
parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Tuesday, 13 June 2017 at 20:04:46 UTC, WhatMeWorry wrote:
 Sorry I didn't reply sooner. I just reinstalled everything and 
 it's all good.  Something was really screwed up.
"Screwed up" is also a fairly good way to describe my responses too, since I also missed your clear statement that you were using Xubuntu. I think I was having One Of Those Days ... :-) The thought in my mind was that maybe you'd somehow installed a 32-bit LDC (which would probably still run all right on your 64-bit Xubuntu), and this could be the reason for the x86_64 build issues. But I honestly couldn't say just on the basis of what's in your post. Anyway, glad to hear you got things sorted.
Jun 13