Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

install on linux

Moderators: larsivi kris

Posted: 02/04/07 04:32:48

on linux after install I have no libtango.a ?
I do have a libphobos.a.

ruimt@ruimt:~/devel/D/tango-0.95-beta1$ mkdir ~/devel/D/lib
ruimt@ruimt:~/devel/D/tango-0.95-beta1$ lib/install-dmd.sh ~/devel/D --no-root --version=tango
Installing Tango...
..checking if we have a local copy of the repository or an extracted package...
lib/install-dmd.sh: line 235: ...no subversion files found, using normal copy method...: command not found
...creating directory /home/ruimt/devel/D/include...


-----------------------------------------------------------------
Tango has been installed successfully.
You can find documentation at http://dsource.org/projects/tango,
or locally in /home/ruimt/devel/D/include/tango/doc/.

General D documentation can be found at:
  o http://digitalmars.com/d/
  o http://dsource.org/projects/tutorials/wiki
  o http://dprogramming.com/
  o http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage"

Enjoy your stay in the Tango dancing club! \\o \o/ o//

ruimt@ruimt:~/devel/D/tango-0.95-beta1$ v ~/devel/D/lib
total 476
476 -rw-r--r-- 1 ruimt ruimt 481704 2007-02-03 23:29 libphobos.a

btw I had to create the lib dir. the include dir was created by the install process.

Ant

Author Message

Posted: 02/04/07 06:51:42

Hello, Ant!

Good to see you here. :)

I just wanted to clarify a couple of things.

You may already be doing this, but you need to follow the instructions here: http://www.dsource.org/projects/tango/wiki/LinuxInstallDmd

Since you are using the install script, I assume you are using the script from the downloaded package and not the svn source checkout.

Next, since you have a libphobos.a there, that's a good sign. libphobos.a is the name of the functional tango library. The tango library needs to be named this because the dmd compiler "hard-wires" the 'phobos' name in there.

libphobos.a is actually a combinating of libbasic.a (the gc), libdmd.a (the compiler specific objects), and libtango.a (tango core elements). The gdc compiler calls it's library libgphobos.a.

So that should be all you need.

Are there any other problems in actually building Tango based projects? If so, please continute to post in this forum. Several of us here should be able to help you :).

-JJR

Posted: 02/04/07 07:36:22

JJR wrote:

Next, since you have a libphobos.a there, that's a good sign. libphobos.a is the name of the functional tango library. The tango library needs to be named this because the dmd compiler "hard-wires" the 'phobos' name in there.

-JJR

thank you.

but here you list 4 libs: http://www.dsource.org/projects/tango/wiki/TopicBuildingTango

I lookup at the libphobos.a contents and it doesn't seems to contain any tango objects. I cannot not see any objects from the net package, for instance. But I'll have to confirme that later (tomorrow).

Ant

Posted: 02/04/07 09:35:58

Hello Ant,

nice to see your interest in Tango.

Actually this error above is so ridiculous: I forgot to add an echo before the string to echo.. *D'oh*. Would you mind trying it again with the just newly checked in version?

Best regards, Alex

Posted: 02/04/07 12:08:06

Ant wrote:

You are right about libphobos.a not containing any tango.* objects. This may not have been emphasized enough, but putting objects with templates into a library don't work fully across all the toolchains, thus we have avoided this by default. We thus recommend that when building applications against Tango, that you use a tool like bud and/or DSSS. Since the library approach may work better on linux, even using DMD, we may help you with that too.

Posted: 02/04/07 17:02:21

Hi There,

I get a successful install on tango-0.95-beta1 , but when I try to do a simple build of hello.d (in install/):

$ dmd hello.d
object.d: module object cannot read file 'object.d'

When I try with build (bud)

$ bud hello.d -Mtango
object.d: module object cannot read file 'object.d'

When I switch back to libphobos:

$ dmd hello.d -I/usr/local/share/dmdsrc/phobos
hello.d(1): module stdio cannot read file 'tango/stdc/stdio.d'

When I try explicitly using the tango "libphobos" that was created:

$dmd hello.d -I/usr/local/include/tango/
object.d: module object cannot read file 'object.d'

Any suggestions on how to fix this?

Posted: 02/04/07 17:26:29

jgeewax wrote:

Hi There,

I get a successful install on tango-0.95-beta1 , but when I try to do a simple build of hello.d (in install/):

$ dmd hello.d
object.d: module object cannot read file 'object.d'

When I try with build (bud)

$ bud hello.d -Mtango
object.d: module object cannot read file 'object.d'

When I switch back to libphobos:

$ dmd hello.d -I/usr/local/share/dmdsrc/phobos
hello.d(1): module stdio cannot read file 'tango/stdc/stdio.d'

When I try explicitly using the tango "libphobos" that was created:

$dmd hello.d -I/usr/local/include/tango/
object.d: module object cannot read file 'object.d'

Any suggestions on how to fix this?

As mentioned in the installation HowTo?, the dmd.conf replacement does not always work out correctly. Could you check your dmd.conf (either in /etc or similar), and post the file content after the execution of the script?

Posted: 02/04/07 17:56:20

Jim Panic wrote:

As mentioned in the installation HowTo?, the dmd.conf replacement does not always work out correctly. Could you check your dmd.conf (either in /etc or similar), and post the file content after the execution of the script?

In particular the quoting (use of ") in the DFLAGS variable can be off, it needs to be the first character after = and the last after all the options.

Posted: 02/04/07 21:30:04

Hi!

Thanks for the quick reply,

Here is my dmd.conf

[Environment]
;;DFLAGS=-I/usr/local/share/dmdsrc/phobos
DFLAGS=-I"${PREFIX}/include/tango/ -L-L${PREFIX}/lib/ -version=Posix -version$

JJG

Posted: 02/04/07 21:32:34

Sorry, copy from the terminal and didn't notice in preview:

[Environment]

;;DFLAGS=-I/usr/local/share/dmdsrc/phobos

DFLAGS=-I"${PREFIX}/include/tango/ -L-L${PREFIX}/lib/ -version=Posix -version=Tango"

I am trying playing around with the quotation marks as you suggest, but the follow doesn't help the situation at all:

[Environment]

;;DFLAGS=-I/usr/local/share/dmdsrc/phobos

DFLAGS="-I${PREFIX}/include/tango/ -L-L${PREFIX}/lib/ -version=Posix -version=Tango"

Posted: 02/04/07 21:44:53

jgeewax: Seems to me that the quotation marks were wrong in the first case, and corrected in the second. There is another problem though (if that is your whole file), PREFIX isn't set to anything. Add a line before DFLAGS saying for instance

PREFIX=/usr/local