www.digitalmars.com         C & C++   DMDScript  

D.gnu - GDC and Tango problem

reply revcompgeek gmail.com writes:
So I tried building Tango trunk a while ago, and it actually built 
surprisingly well, with only one small error I was able to fix. So I 
installed the tango library and proceeded to test if tango was really 
working. So in hello.d:

import tango.io.Stdout;
void main(){ Stdout("Hello {}!","World").newline; }

I don't know why, but I had to manually add object.d to the command 
line. To simplify, I put an object file of object.d into the current 
directory.

tests% gdc -o hello hello.d object.o -lgtango -lgphobos
ld: duplicate symbol __D6object9Interface6__initZ in 
/usr/local/lib/libgphobos.a(object.o) and object.o
collect2: ld returned 1 exit status

I'm not sure if this problem is an issue with gdc or a problem with 
Tango. Any ideas on how to fix this?
Dec 26 2009
parent reply Michael P. <baseball.mjp gmail.com> writes:
revcompgeek gmail.com Wrote:

 So I tried building Tango trunk a while ago, and it actually built 
 surprisingly well, with only one small error I was able to fix. So I 
 installed the tango library and proceeded to test if tango was really 
 working. So in hello.d:
 
 import tango.io.Stdout;
 void main(){ Stdout("Hello {}!","World").newline; }
 
 I don't know why, but I had to manually add object.d to the command 
 line. To simplify, I put an object file of object.d into the current 
 directory.
 
 tests% gdc -o hello hello.d object.o -lgtango -lgphobos
 ld: duplicate symbol __D6object9Interface6__initZ in 
 /usr/local/lib/libgphobos.a(object.o) and object.o
 collect2: ld returned 1 exit status
 
 I'm not sure if this problem is an issue with gdc or a problem with 
 Tango. Any ideas on how to fix this? 
http://www.dsource.org/projects/tango/wiki/UnixInstallGdc Have you looked there?
Dec 27 2009
parent reply revcompgeek <revcompgeek gmail.com> writes:
On 12/27/09 9:52 AM, Michael P. wrote:
 revcompgeek gmail.com Wrote:

 So I tried building Tango trunk a while ago, and it actually built
 surprisingly well, with only one small error I was able to fix. So I
 installed the tango library and proceeded to test if tango was really
 working. So in hello.d:

 import tango.io.Stdout;
 void main(){ Stdout("Hello {}!","World").newline; }

 I don't know why, but I had to manually add object.d to the command
 line. To simplify, I put an object file of object.d into the current
 directory.

 tests% gdc -o hello hello.d object.o -lgtango -lgphobos
 ld: duplicate symbol __D6object9Interface6__initZ in
 /usr/local/lib/libgphobos.a(object.o) and object.o
 collect2: ld returned 1 exit status

 I'm not sure if this problem is an issue with gdc or a problem with
 Tango. Any ideas on how to fix this?
http://www.dsource.org/projects/tango/wiki/UnixInstallGdc Have you looked there?
Yes, that is the main page I used when I was trying to figure out how to install Tango. As far as I can tell I did everything right. Like I said, this could be a problem with the new version of Tango, possibly just because the dmd frontend version isn't what Tango is set up for. Unfortunately, the 0.99.8 release had a lot of problems with gdc, so I'm just trying to get the trunk working. Should I try posting this to the main digitalmars.D group?
Dec 28 2009
parent Michael P. <baseball.mjp gmail.com> writes:
revcompgeek Wrote:

 On 12/27/09 9:52 AM, Michael P. wrote:
 revcompgeek gmail.com Wrote:

 So I tried building Tango trunk a while ago, and it actually built
 surprisingly well, with only one small error I was able to fix. So I
 installed the tango library and proceeded to test if tango was really
 working. So in hello.d:

 import tango.io.Stdout;
 void main(){ Stdout("Hello {}!","World").newline; }

 I don't know why, but I had to manually add object.d to the command
 line. To simplify, I put an object file of object.d into the current
 directory.

 tests% gdc -o hello hello.d object.o -lgtango -lgphobos
 ld: duplicate symbol __D6object9Interface6__initZ in
 /usr/local/lib/libgphobos.a(object.o) and object.o
 collect2: ld returned 1 exit status

 I'm not sure if this problem is an issue with gdc or a problem with
 Tango. Any ideas on how to fix this?
http://www.dsource.org/projects/tango/wiki/UnixInstallGdc Have you looked there?
Yes, that is the main page I used when I was trying to figure out how to install Tango. As far as I can tell I did everything right. Like I said, this could be a problem with the new version of Tango, possibly just because the dmd frontend version isn't what Tango is set up for. Unfortunately, the 0.99.8 release had a lot of problems with gdc, so I'm just trying to get the trunk working. Should I try posting this to the main digitalmars.D group?
Sure. You'll probably get much more answers there.
Dec 28 2009