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

Side-by-Side Installation

Moderators: larsivi kris

Posted: 02/20/07 18:54:21

I know this comes up now and then, so I figured I'd start a thread on the matter. :)

One problem I've run into with using Tango is that there's plenty of Phobos-based code out in the wild. To evaluate libraries and other works, or just maintain them as-is, so running with Tango doesn't always look like a good idea.

I know that some of us on the Tango team have scripts and such to flip-flop which libraries are in use. There may be some more transparent options too, but I wonder what those are.

So what is the reccomended way to run a workstation with both Phobos and Tango installed?

Author Message

Posted: 02/24/07 01:30:58

demise wrote:

A bit OT: Am I missing something? On the wiki start page reads "Compatible Libraries ... Derelict". However, the build of many derelict packages fails because of a missing std/string.d.

No you are not missing anything. After spending MANY hours trying to install Tango and make it work with Derelict and DSSS, I have thrown my hands up in frustration. I will come back after Tango leaves the Beta stage and is more supported in other D projects. As a newcomer to D I have found this Tango issue to be quite frustrating. Instead, I'm going to keep it simple, use Phobos for now (which actually works on my system), and focus on learning D fundamentals.

Posted: 02/24/07 22:30:00

I'm very sorry that things are this way. Unfortunately, this is still a transition perior for Tango, and it's kind of a catch 22 where other projects are concerned. They will need to be willing to support Tango in order to make it easy for the user to get started. This isn't the case for quite a few important projects, though. Incidentally, I thought derelict had been updated to support Tango, but I haven't tried it to see if this is so.

As for installation, we are looking at options to make the next release very simple for users. There should be no (or minimal) issues with installation if all works out as planned.

-JJR

Posted: 03/02/07 01:05:53

demise wrote:

Luckily the problems with Derelict are fixed now.

Glad to hear that!

demise wrote:

It would be nice if the next release could be installed via dsss straight out of the box (at least on Linux) and have prebuilt documentation for offline browsing.

dsss is just one way that tango can be shipped. It has it's own way of creating and using libs for installation. There is more than one way to use and ship Tango, currently. And for several reasons, we can't adopt just the dsss way as the preferred method for the next version.

For example, right now Tango is shipped as a core library (called libphobos.a or phobos.lib, depending on platform). This core library includes the gc, compiler specifics, and language-oriented dependencies. Every Tango project links with it as a minimum requirement. All other Tango modules are held in separate directories and are linked in "as needed" (io, text, net, etc). But neither dmd nor gdc will automatically compile these dependencies, nor will they direct the linker to combine them into the final executable. You need rebuild or build to do that. Build and rebuild both search the tango tree for all required modules and compile/link them into the final binary automatically, such that the final binary is built to the optimal size (ie, as few redundant objects as possible).

Tango could be made into one single library file, but this is not currently optimal on win32/dmd (as I understand it). gdc appears to have no problem with this, however. Using the gdc compiler, you may even make one large shared library out of the Tango package. The limitation with win32/dmd, however, keeps the standard installation method away from libraries for now.

DSSS, on the other hand, has it's own way of installing Tango, and it's own way of managing the Tango libraries and objects. It requires that you still build the core tango library separately and install it. Then it builds and installs multiple libraries constructed from each of the major Tango sections (io, net, text, etc). It certainly has it's own way of simplifying the process, but, as of yet, Tango has not decided if the dsss way of doing things is the optimal, or even simplest solution. So for now dsss remains an alternative install for Tango users.

A simple installation for a future Tango release may involve the shipping of a package including: (1) gdc or dmd compiler (2) complete Tango source tree and (3) pre-built tango library (all prepped to work "out of the box"). This would solve many problems that current users are having because it guarantees that the installed setup works in place. Removing the need for install scripts circumvents a whole class of issues. Also the advantage of shipping Tango this way is that multiple downloads may be listed for separate platforms and compilers, so no longer do all platform makefiles/scripts have to be included in a single platform's package.

As for including the whole of Tango as a library, I think that is still an important goal in the future, if it can be achieved reliably and practically. If it ends up continuing to be the source of the problem of bloated binaries, the current solution using rebuild and build will remain for the forseeable future. But, I'm really, really hoping not. :)

-JJR

Posted: 03/02/07 09:55:51

We are looking into all aspects of making installation easier on as many levels as possible. We hope to be at least somewhat on the way to achieve this goal by the next release.