www.digitalmars.com         C & C++   DMDScript  

D.gnu - LDC on Ubuntu 10.4

reply Piotrek <starpit tlen.pl> writes:
Hi,


I have just upgraded my Liniux box since I noticed that ldc came into 
Ubuntu packaging.

After downloading ldc and tango lib i can't compile anything that 
imports anything (so I guess it's a paths problem).


I want to complie this:


--------------------------
import tango.io.Stdout;

void main()
{
     Stdout ("hello").newline;
}

--------------------------

and I get this:
/usr/include/d/tango/core/Vararg.d(20): Error: module vararg cannot read 
file 'ldc/vararg.d'

After moving the missing 'ldc/vararg.d' file to appropriate folder (it's 
present in subdir) I get:

hi.o:(.rodata+0x0): undefined reference to `_D5tango2io6Stdout8__ModuleZ'
collect2: ld returned 1 exit status
Error: linking failed:
status: 1


Any ideas?
Maybe I ask somewhere else (ubuntu bug tracking)?

Cheers
Piotrek
Apr 30 2010
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 30/04/10 22:22, Piotrek wrote:
 Any ideas?
I can't remember the source of these errors, you just need to play around a bit and it'll start working... Try adding -L-ltango-user-ldc to your build line, if ld can't find that it's called something else... If it is: $ find /usr/lib -name '*tango*' To get the name of the user library, and make sure you pass it to the linker (-L-llibnamehere, don't include the 'lib' or the '.a' though :)). Also make sure that the folder is in the linkers include path, using -L-L/usr/lib/d/ or whereever the ubuntu package stores the libraries. You should also note that moving the ldc/ directory was not necessary, and, in fact, I advise against it. The correct solution is to add -I/usr/include/d/tango/core/runtime/compiler/ldc (or whatever the original path was) to your command line. If these things work, you can edit /etc/ldc.conf and add these switches in so you don't have to manually type them each time. If neither of these works, try the ldc forums, the ldc mailing lists, the tango forums, the ldc irc channel on chat.freenode.net or the tango/D channels on the same network. http://dsource.org/forums/viewforum.php?f=149 - LDC Forum(not used much) http://groups.google.com/group/ldc-dev - LDC Mailing list http://www.dsource.org/projects/tango/forums - Tango forums // Real time chat, whether you get help depends on what time of day // it is http://webchat.freenode.net/?channels=ldc - LDC IRC channel http://webchat.freenode.net/?channels=d.tango - Tango IRC channel http://webchat.freenode.net/?channels=D - D IRC channel You could also try the main newsgroups on d.D or d.D.learn.
 Maybe I ask somewhere else (ubuntu bug tracking)?
See the above list, if you manage to get it working you should report a bug to the ubuntu ldc packagers, as people seem to get this a lot with the ldc packages on ubuntu. They need to edit the ldc config file when the tango user library is installed I believe.
 Cheers
 Piotrek
May 01 2010
parent Piotrek <starpit tlen.pl> writes:
W dniu 01.05.2010 12:34, Robert Clipsham pisze:
 See the above list, if you manage to get it working you should report a
 bug to the ubuntu ldc packagers, as people seem to get this a lot with
 the ldc packages on ubuntu. They need to edit the ldc config file when
 the tango user library is installed I believe.

 Cheers
 Piotrek
Thanks. I'll try. Cheers Piotrek
May 01 2010