Jump to page: 1 2
Thread overview
Tutorial on how to build DMD/druntime/phobos and docs from source?
Jan 27, 2013
Chad Joan
Jan 27, 2013
H. S. Teoh
Jan 28, 2013
Chad Joan
Jan 28, 2013
H. S. Teoh
Jan 28, 2013
Philippe Sigaud
Jan 28, 2013
H. S. Teoh
Jan 29, 2013
Philippe Sigaud
Jan 30, 2013
timewulf
Jan 31, 2013
Philippe Sigaud
Jan 31, 2013
Philippe Sigaud
Feb 01, 2013
timewulf
Feb 01, 2013
timewulf
Feb 01, 2013
timewulf
January 27, 2013
I remember there being a tutorial on how to build DMD and such from source.  I've been searching for a while and can't find it.  It won't show up on google searches.  Does anyone have a link?

Right now I'm most interested in a tutorial on how to build the docs.

Thanks.
January 27, 2013
On Sun, Jan 27, 2013 at 04:13:08PM -0500, Chad Joan wrote:
> I remember there being a tutorial on how to build DMD and such from source.  I've been searching for a while and can't find it.  It won't show up on google searches.  Does anyone have a link?

http://wiki.dlang.org/Building_DMD


> Right now I'm most interested in a tutorial on how to build the docs.
[...]

For docs, checkout "d-programming-language.org" from github, and run make on it to generate the HTML, CSS, etc.. Then checkout phobos and run 'make html'. I forget the exact commands but there should be analogous commands for druntime (and maybe dmd).

You may need to tweak the directory structure a bit to get everything to be installed in the right places; I don't remember the details off-hand (I'm usually just interested in a single .html file so I just copy that to the web server's directory).


T

-- 
Meat: euphemism for dead animal. -- Flora
January 28, 2013
On 01/27/2013 04:34 PM, H. S. Teoh wrote:
> On Sun, Jan 27, 2013 at 04:13:08PM -0500, Chad Joan wrote:
>> I remember there being a tutorial on how to build DMD and such from
>> source.  I've been searching for a while and can't find it.  It
>> won't show up on google searches.  Does anyone have a link?
>
> http://wiki.dlang.org/Building_DMD
>

Exactly what I was thinking of.

>
>> Right now I'm most interested in a tutorial on how to build the docs.
> [...]
>
> For docs, checkout "d-programming-language.org" from github, and run
> make on it to generate the HTML, CSS, etc.. Then checkout phobos and run
> 'make html'. I forget the exact commands but there should be analogous
> commands for druntime (and maybe dmd).
>
> You may need to tweak the directory structure a bit to get everything to
> be installed in the right places; I don't remember the details off-hand
> (I'm usually just interested in a single .html file so I just copy that
> to the web server's directory).
>
>
> T
>

Cool, thank you!
January 28, 2013
On 01/27/2013 10:13 PM, Chad Joan wrote:
> I remember there being a tutorial on how to build DMD and such from source.
> I've been searching for a while and can't find it.  It won't show up on google
> searches.  Does anyone have a link?

Besides the wiki, see: https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/
January 28, 2013
On Mon, Jan 28, 2013 at 03:20:32PM +0100, Joseph Rushton Wakeling wrote:
> On 01/27/2013 10:13 PM, Chad Joan wrote:
> >I remember there being a tutorial on how to build DMD and such from source.  I've been searching for a while and can't find it.  It won't show up on google searches.  Does anyone have a link?
> 
> Besides the wiki, see: https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/

Would you kindly add this info to the wiki? :-)


T

-- 
Recently, our IT department hired a bug-fix engineer. He used to work for Volkswagen.
January 28, 2013
>> Besides the wiki, see: https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/
>
> Would you kindly add this info to the wiki? :-)

Where on the page?
January 28, 2013
On Mon, Jan 28, 2013 at 09:24:46PM +0100, Philippe Sigaud wrote:
> >> Besides the wiki, see: https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/
> >
> > Would you kindly add this info to the wiki? :-)
> 
> Where on the page?

Ideally, integrate it into the current page structure. Or reorg the page as you see fit.


T

-- 
"Maybe" is a strange word.  When mom or dad says it it means "yes", but when my big brothers say it it means "no"! -- PJ jr.
January 29, 2013
On Mon, Jan 28, 2013 at 10:14 PM, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
> On Mon, Jan 28, 2013 at 09:24:46PM +0100, Philippe Sigaud wrote:
>> >> Besides the wiki, see: https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/
>> >
>> > Would you kindly add this info to the wiki? :-)
>>
>> Where on the page?
>
> Ideally, integrate it into the current page structure. Or reorg the page as you see fit.

OK, I integrated some explanations on dmd.conf. I also added /tools.git and explanations at the end.
January 30, 2013
On 29.01.2013 21:25, Philippe Sigaud wrote:
> On Mon, Jan 28, 2013 at 10:14 PM, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
>> On Mon, Jan 28, 2013 at 09:24:46PM +0100, Philippe Sigaud wrote:
>>>>> Besides the wiki, see: https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/
>>>>
>>>> Would you kindly add this info to the wiki? :-)
>>>
>>> Where on the page?
>>
>> Ideally, integrate it into the current page structure. Or reorg the page as you see fit.
> 
> OK, I integrated some explanations on dmd.conf. I also added /tools.git and explanations at the end.
> 

Hi all,

this thread helped me much, but I ran into some trouble during bootstrapping dmd, because of some todos, not mentioned in the wiki.

First I will give you a field report, explaining my way, I installed dmd
from source (not really a shortstory ;-)) ..) and then, I hope, I will
ask some not so silly questions.

I use gentoo and installed dmd-2.60, because that's actually the last version in portage (the gentoo packagemanager). All went ok, I tested some little d-examples and then I wanted to get dmd-2.61 to run.

Now the trouble begun:

First I followed the wiki, tried to use the actual git version: dmd compiles, but the druntime and phobos don't do the same. Much warnings and some errors were shown.

Ok, I'll go the same way with the last release: dmd.2.61.zip

But mostly the same happened, some other warnings and errors, but the libraries won't compile.

It took me some time to realize, that it was dmd-2.60 that caused the errors: To compile the libraries out of 2.61 or git, one needs a recent compiler.

Nice: I found it as binary in the linux directory in the root of 'dmd.2.61.zip'.

Luck: My PATH-Variable points to /usr/local/bin:/usr/bin:..., The portage version of dmd-2.60 was installed in /usr/bin, so I copied the 2.61-binaries to /usr/local/bin without need to delete the old version before.

druntime and phobos now compiled without errors, but even the tools made some trouble again. The phobos- and druntime-sources were not found at the right places. This time there's even a reasonable hint, so I know, where the sources are searched for. After copying to the right path, now even the tools got compiled.

Until now I'm not convinced, that the result of my work is a clean dmd
v.2.62 (git) compiler environment or a mix out of v.2.60 (the
gentoo-package), v.2.61 (out of the zip) and the git-sources and
compilations itself.

Why? There's a dmd.conf in /etc, which points to the libraries and
include-files of version 2.60. There's another one in /usr/local/bin
which I copied there together with the binaries I mentioned above and in
the wiki is mentioned, to create a dmd.conf in /usr/src/d/dmd/src/ and
it seems to me, that dmd looks at some default places to find what it needs.


Now my questions / suggestions:

At what places and in which order dmd searches for dmd.conf files?

What files should be placed in what linux-directories? It can't be reasonable, to set the "PATH"-Variable to /usr/src/dmd/src, to get the latest dmd-compiler running, even so for Library- and Include-Paths. Whith next git-update, there will be a newly generated mix of versions again.

So what files do one need to copy to the standard-directories of Linux, so that all functionality of dmd will be reachable for daily use?

In the wiki it should be mentioned, that one needs a recent enough dmd-compiler, to get this stuff running, where to get it and with what steps to install it.

An idea: Like in the dmd.2.61.zip, there could be a directory "linux" in the git-repository, with the needed bin-files in it. I would even appreciate, if there would be the whole compiler-environment with bins, libraries, includes and sources all of the same version, so one has a clean environment for bootstrapping dmd2 / druntime / phobos from git-sources.

My problem was, that gentoo isn't able, to install .deb- or .rpm-files. That's why I wanted to create it from source, but whithout knowing what I know now, that was a bad task.

I hope this report points out, what problems occur for people dealing new with dmd. It's not already a checklist, howto bootstrap dmd, but this report together with your knowledge of dmd, can help improve the wiki and the bootstrapping itself.

Sorry, that it got so long, but leaving anything out wouldn't point out, what I wanted to say.

Thanks all for your work on dmd. Maybe - and I hope so - I can help a bit in the future and do some of the work myself.

Greetings, Timewulf
January 31, 2013
On 01/30/2013 01:58 PM, timewulf wrote:
> It took me some time to realize, that it was dmd-2.60 that caused the
> errors: To compile the libraries out of 2.61 or git, one needs a recent
> compiler.

More specifically, you should be compiling Phobos and druntime releases (or latest up-to-date git source) with the corresponding DMD release/latest dev version.

Funnily enough I never ran into this issue because before building from source I scrubbed all previous DMD installs from my system, or -- when updating from-source builds -- I would copy the newly-built dmd to the appropriate path location before building runtime/Phobos, so conveniently overwriting the old dmd.

Alex' tutorial on his (old) blog is really useful because it emphasizes the necessity of using the newly-built DMD rather than the old one.  And it's as simple as adding "DMD=../dmd/src/dmd" when invoking make.


> At what places and in which order dmd searches for dmd.conf files?

I think the _first_ location is the same directory as the dmd executable being used.  That's where I put it, at any rate (which in my case, is /opt/dmd/bin/).

> What files should be placed in what linux-directories? It can't be
> reasonable, to set the "PATH"-Variable to /usr/src/dmd/src, to get the
> latest dmd-compiler running, even so for Library- and Include-Paths.
> Whith next git-update, there will be a newly generated mix of versions
> again.
>
> So what files do one need to copy to the standard-directories of Linux,
> so that all functionality of dmd will be reachable for daily use?
>
> In the wiki it should be mentioned, that one needs a recent enough
> dmd-compiler, to get this stuff running, where to get it and with what
> steps to install it.

I think you'll find Alex' blog post answers all your questions.  To give the link again:
https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/

I personally find it more convenient to put my from-source dmd installs in /opt/dmd, just because then it's easier to scrub it from the system without risking touching anything else.  Of course, you then have to do some adding to $PATH, but that's easy enough -- I actually include the following script in /etc/profile.d:

	for d in /opt/*/bin; do
		PATH="$PATH:$d"
	done

... which is maybe a bit unsubtle but does the job for me. :-)
« First   ‹ Prev
1 2