digitalmars.D - Bulding latest DMD and associated projects from github master
- Rob T (20/20) Nov 18 2012 First I cloned everything from github master, and that went well
- H. S. Teoh (40/51) Nov 18 2012 Please add the docs on how to build in a prominent place, like a README
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (7/56) Nov 18 2012 It's a good idea to append "DMD=../dmd/src/dmd" to the druntime and
- Rob T (6/8) Nov 18 2012 OK but the "why" is much more important than the "how", so can
- Jonathan M Davis (15/23) Nov 18 2012 So that it uses the dmd that you just built instead of the one in your =
- Andrei Alexandrescu (5/14) Nov 18 2012 I've had trouble too. If you don't specify that and have an existing dmd...
- Rob T (6/6) Nov 18 2012 It turns out that I have the stock dmd installed, and did not
- Joseph Rushton Wakeling (6/7) Nov 22 2012 Presumably if you just copied your newly-built dmd over the top of that ...
- Rob T (15/35) Nov 18 2012 Yup, I did that ...
- Joseph Rushton Wakeling (8/11) Nov 19 2012 Probably the reason why no official docs exist is because that blog post...
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (6/20) Nov 19 2012 Updated the blog post, thanks.
- Rob T (10/16) Nov 19 2012 There's errors/incompleteness with the following:
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (6/22) Nov 19 2012 That was supposed to say cd, not cp. Fixed.
- Joseph Rushton Wakeling (10/11) Nov 22 2012 The one other issue I had with those instructions -- you talk of copying...
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (7/19) Nov 22 2012 Fixed the dmd.conf instructions.
- Jordi Sayol (6/7) Nov 22 2012 man file should be copied as follow:
- Joseph Rushton Wakeling (4/9) Nov 22 2012 .... and if I want to put 'em in /opt/dmd instead of /usr/local .... ?
- Jordi Sayol (5/14) Nov 22 2012 Add the path to your man files in MANPATH environment variable.
- Jonathan M Davis (15/21) Nov 22 2012 the
- Nathan M. Swan (3/23) Nov 19 2012 Check this out:
- qznc (5/25) Dec 26 2012 There is a page in the wiki now:
- David Nadlinger (5/7) Dec 26 2012 It isn't; only parts of it are compiler-specific. Other areas are
First I cloned everything from github master, and that went well but I'm now encountering a lot of silly stumbling blocks due to inadequate documentation, for example it's clear how to build anything - period. There may be documentation somewhere(?), but all I could find was this external blog post http://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/ The instructions in the blog allowed me to successfully build DMD src with 64-bit arch on Linux. So far so good, but I'm sure this is not the end of the problems I'll encounter. Being new to this, I'll know immediately where the documentation is failing, so as I get stuck and unstuck I'm in a good position to create missing documentation or improve on the current documentation. If I'm to try and contribute, I have a few questions, for example can anyone contribute at this level (build process)? If I am allowed to contribute, then what's the process for making contributions? Thanks. --rt
Nov 18 2012
On Mon, Nov 19, 2012 at 01:40:08AM +0100, Rob T wrote:First I cloned everything from github master, and that went well but I'm now encountering a lot of silly stumbling blocks due to inadequate documentation, for example it's clear how to build anything - period.Please add the docs on how to build in a prominent place, like a README or something. Anyway, here's what I do (I'm on 64-bit Linux, so YMMV): - create a root directory to put dmd, druntime, and phobos as subdirs (you will have less pain this way). - git clone dmd, druntime, and phobos. - cd dmd/src; make -f posix.mak - cd druntime; make -f posix.mak - cd phobos; make -f posix.mak - If necessary, edit dmd.conf to find druntime/phobos in the right place. - You should now have a working compiler toolchain. [...]Being new to this, I'll know immediately where the documentation is failing, so as I get stuck and unstuck I'm in a good position to create missing documentation or improve on the current documentation. If I'm to try and contribute, I have a few questions, for example can anyone contribute at this level (build process)? If I am allowed to contribute, then what's the process for making contributions?[...] AFAIK, all contributions are welcome, subject to review by the respective maintainers. First and foremost, fork the project you want to contribute to on github (just go to github, navigate to D-Programming-Language, select dmd, druntime, phobos, etc., click on "fork", then clone your fork). Second, *always* create a git branch for making changes: git add $files git commit Next, go back to github, select your new branch, and click on "pull request". Type in some convincing message on why your changes should be merged into master. Then wait. And wait. And wait some more. Until the maintainer merges your branch, or has some feedback. (Well OK, the waiting part is improving, but still, don't expect things to happen overnight 'cos they probably won't.) T -- This sentence is false.
Nov 18 2012
On 19-11-2012 02:02, H. S. Teoh wrote:On Mon, Nov 19, 2012 at 01:40:08AM +0100, Rob T wrote:It's a good idea to append "DMD=../dmd/src/dmd" to the druntime and phobos make commands.First I cloned everything from github master, and that went well but I'm now encountering a lot of silly stumbling blocks due to inadequate documentation, for example it's clear how to build anything - period.Please add the docs on how to build in a prominent place, like a README or something. Anyway, here's what I do (I'm on 64-bit Linux, so YMMV): - create a root directory to put dmd, druntime, and phobos as subdirs (you will have less pain this way). - git clone dmd, druntime, and phobos. - cd dmd/src; make -f posix.mak - cd druntime; make -f posix.mak - cd phobos; make -f posix.mak - If necessary, edit dmd.conf to find druntime/phobos in the right place. - You should now have a working compiler toolchain.[...]-- Alex Rønne Petersen alex lycus.org http://lycus.orgBeing new to this, I'll know immediately where the documentation is failing, so as I get stuck and unstuck I'm in a good position to create missing documentation or improve on the current documentation. If I'm to try and contribute, I have a few questions, for example can anyone contribute at this level (build process)? If I am allowed to contribute, then what's the process for making contributions?[...] AFAIK, all contributions are welcome, subject to review by the respective maintainers. First and foremost, fork the project you want to contribute to on github (just go to github, navigate to D-Programming-Language, select dmd, druntime, phobos, etc., click on "fork", then clone your fork). Second, *always* create a git branch for making changes: git add $files git commit Next, go back to github, select your new branch, and click on "pull request". Type in some convincing message on why your changes should be merged into master. Then wait. And wait. And wait some more. Until the maintainer merges your branch, or has some feedback. (Well OK, the waiting part is improving, but still, don't expect things to happen overnight 'cos they probably won't.) T
Nov 18 2012
On Monday, 19 November 2012 at 01:06:25 UTC, Alex Rønne Petersen wrote:It's a good idea to append "DMD=../dmd/src/dmd" to the druntime and phobos make commands.OK but the "why" is much more important than the "how", so can you please explain to me why this is a good idea? Thanks! --rt
Nov 18 2012
On Monday, November 19, 2012 02:17:54 Rob T wrote:On Monday, 19 November 2012 at 01:06:25 UTC, Alex R=C3=B8nne Petersen==20 wrote:So that it uses the dmd that you just built instead of the one in your = path.=20 If you have separately instealled dmd, then it's to build using the wro= ng dmd=20 unless you explicitly tell it which one use. On my system, dmd is symli= nked to=20 the one that I built, so the only time that I have to provide DMD=3D is= when=20 running dmd's test suite (since it requires it for some reason), but I = don't=20 run that very often. If you're outright installing it somewhere though,= then=20 you'll need DMD=3Dpath. - Jonathan M DavisIt's a good idea to append "DMD=3D../dmd/src/dmd" to the druntime and phobos make commands.=20 OK but the "why" is much more important than the "how", so can you please explain to me why this is a good idea?
Nov 18 2012
On 11/18/12 8:17 PM, Rob T wrote:On Monday, 19 November 2012 at 01:06:25 UTC, Alex Rønne Petersen wrote:I've had trouble too. If you don't specify that and have an existing dmd installation, you'll end up using the stock compiler instead of the development one. AndreiIt's a good idea to append "DMD=../dmd/src/dmd" to the druntime and phobos make commands.OK but the "why" is much more important than the "how", so can you please explain to me why this is a good idea? Thanks! --rt
Nov 18 2012
It turns out that I have the stock dmd installed, and did not specify "DMD=..." yet it does run the compiled version. I think that may be because I've installed the compiled version into /usr/local/bin which is checked first. I got lucky. Will rebuild to make it solid. --rt
Nov 18 2012
On 11/19/2012 02:41 AM, Jonathan M Davis wrote:So that it uses the dmd that you just built instead of the one in your path.Presumably if you just copied your newly-built dmd over the top of that one, you won't have that problem? ;-) I've used purely from-source builds of dmd ever since discovering and succeeding in following those instructions, so the which-dmd-to-use issue has never really come up for me ...
Nov 22 2012
On Monday, 19 November 2012 at 01:00:31 UTC, H. S. Teoh wrote:Anyway, here's what I do (I'm on 64-bit Linux, so YMMV): - create a root directory to put dmd, druntime, and phobos as subdirs (you will have less pain this way).Yup, I did that ... BTW: I'm using Debian Wheezy x64- cd dmd/src; make -f posix.mak - cd druntime; make -f posix.mak - cd phobos; make -f posix.makTried that, but it built for X86, so I was immediately stuck until I found the blog that said to do this ... make -f posix.mak MODEL=64;- If necessary, edit dmd.conf to find druntime/phobos in the right place. - You should now have a working compiler toolchain.It all seems to work following the blog post instructions, but I need to verify a few things to be sure. I followed the blog post suggestions for copying everything into /usr/local/ folders since that is what I usually do anyway.First and foremost, fork the project you want to contribute to on github [...]I'll try what you are suggesting, but these instructions should be documented somewhere otherwise the next guy will just run into the same problems all over again, rinse and repeat forever.Then wait. And wait. And wait some more. Until the maintainer merges your branch, or has some feedback. (Well OK, the waiting part is improving, but still, don't expect things to happen overnight 'cos they probably won't.)I'll mercilessly bitch and complain if it takes too long ;) --rt
Nov 18 2012
On 11/19/2012 01:40 AM, Rob T wrote:There may be documentation somewhere(?), but all I could find was this external blog post http://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/Probably the reason why no official docs exist is because that blog post actually serves the purpose ... :-P Don't know about you, but I found that when building Phobos I had to not just cp -r std /usr/local/include/d2 but also, cp -r etc /usr/local/include/d2 ... in order for D programs to build without an error related to zlib.
Nov 19 2012
On 19-11-2012 15:46, Joseph Rushton Wakeling wrote:On 11/19/2012 01:40 AM, Rob T wrote:Updated the blog post, thanks. -- Alex Rønne Petersen alex lycus.org http://lycus.orgThere may be documentation somewhere(?), but all I could find was this external blog post http://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/Probably the reason why no official docs exist is because that blog post actually serves the purpose ... :-P Don't know about you, but I found that when building Phobos I had to not just cp -r std /usr/local/include/d2 but also, cp -r etc /usr/local/include/d2 ... in order for D programs to build without an error related to zlib.
Nov 19 2012
On Monday, 19 November 2012 at 19:02:18 UTC, Alex Rønne Petersen wrote:Updated the blog post, thanks.There's errors/incompleteness with the following:Next, we build Phobos, which is the standard library containing facilities for concurrency, regular expressions, I/O, signals, math, text manipulation, and so on: cp /usr/src/phobos; gmake -f posix.mak MODEL=64 DMD=../dmd/src/dmd;You should tell the user to cd into the correct folder first, and fix the cp command which is missing the source component. Excellent instructions otherwise, and a copy of these instructions should be included along with the sources. We'll also need a version for building & installing on Windows which is also absent from the sources. --rt
Nov 19 2012
On 19-11-2012 20:50, Rob T wrote:On Monday, 19 November 2012 at 19:02:18 UTC, Alex Rønne Petersen wrote:That was supposed to say cd, not cp. Fixed. -- Alex Rønne Petersen alex lycus.org http://lycus.orgUpdated the blog post, thanks.There's errors/incompleteness with the following:Next, we build Phobos, which is the standard library containing facilities for concurrency, regular expressions, I/O, signals, math, text manipulation, and so on: cp /usr/src/phobos; gmake -f posix.mak MODEL=64 DMD=../dmd/src/dmd;You should tell the user to cd into the correct folder first, and fix the cp command which is missing the source component. Excellent instructions otherwise, and a copy of these instructions should be included along with the sources. We'll also need a version for building & installing on Windows which is also absent from the sources. --rt
Nov 19 2012
On 11/19/2012 08:02 PM, Alex Rønne Petersen wrote:Updated the blog post, thanks.The one other issue I had with those instructions -- you talk of copying dmd.conf into /etc, but I've never come across a dmd.conf anywhere in the dmd source tree. I created one manually following instructions somewhere on dlang.org or digitalmars.com (I forget where), which I've attached; as you'll see, this is based on my installing everything in /opt/dmd rather than /usr/local. However, I've never found any way to auto-generate the dmd.conf file. Also, am I right that there are also man-files for dmd included in the source? Might be worth including a note on how to build and install those.
Nov 22 2012
On 22-11-2012 14:51, Joseph Rushton Wakeling wrote:On 11/19/2012 08:02 PM, Alex Rønne Petersen wrote:Fixed the dmd.conf instructions. There are man files but I honestly have no idea how to build them... -- Alex Rønne Petersen alex lycus.org http://lycus.orgUpdated the blog post, thanks.The one other issue I had with those instructions -- you talk of copying dmd.conf into /etc, but I've never come across a dmd.conf anywhere in the dmd source tree. I created one manually following instructions somewhere on dlang.org or digitalmars.com (I forget where), which I've attached; as you'll see, this is based on my installing everything in /opt/dmd rather than /usr/local. However, I've never found any way to auto-generate the dmd.conf file. Also, am I right that there are also man-files for dmd included in the source? Might be worth including a note on how to build and install those.
Nov 22 2012
Al 22/11/12 14:51, En/na Joseph Rushton Wakeling ha escrit:Also, am I right that there are also man-files for dmd included in the source? Might be worth including a note on how to build and install those.man file should be copied as follow: *.1 files at /usr/share/man/man1 or /usr/local/share/man/man1 dmd.conf.5 files at /usr/share/man/man5 or /usr/local/share/man/man5 -- Jordi Sayol
Nov 22 2012
On 11/22/2012 03:26 PM, Jordi Sayol wrote:Al 22/11/12 14:51, En/na Joseph Rushton Wakeling ha escrit:.... and if I want to put 'em in /opt/dmd instead of /usr/local .... ? Obviously the same dir structure, but do I need to put in place any extra notes e.g. in dmd.conf to ensure man can find them?Also, am I right that there are also man-files for dmd included in the source? Might be worth including a note on how to build and install those.man file should be copied as follow: *.1 files at /usr/share/man/man1 or /usr/local/share/man/man1 dmd.conf.5 files at /usr/share/man/man5 or /usr/local/share/man/man5
Nov 22 2012
Al 22/11/12 15:47, En/na Joseph Rushton Wakeling ha escrit:On 11/22/2012 03:26 PM, Jordi Sayol wrote:Add the path to your man files in MANPATH environment variable. $ export MANPATH=$MANPATH":/opt/dmd/man" -- Jordi SayolAl 22/11/12 14:51, En/na Joseph Rushton Wakeling ha escrit:.... and if I want to put 'em in /opt/dmd instead of /usr/local .... ? Obviously the same dir structure, but do I need to put in place any extra notes e.g. in dmd.conf to ensure man can find them?Also, am I right that there are also man-files for dmd included in the source? Might be worth including a note on how to build and install those.man file should be copied as follow: *.1 files at /usr/share/man/man1 or /usr/local/share/man/man1 dmd.conf.5 files at /usr/share/man/man5 or /usr/local/share/man/man5
Nov 22 2012
On Thursday, November 22, 2012 14:51:14 Joseph Rushton Wakeling wrote:On 11/19/2012 08:02 PM, Alex R=C3=B8nne Petersen wrote:ingUpdated the blog post, thanks.=20 The one other issue I had with those instructions -- you talk of copy=dmd.conf into /etc, but I've never come across a dmd.conf anywhere in=thedmd source tree.Yeah. For some reason, it's not in the dmd repository like it should be= . There=20 are a number of things that are not properly automated about the releas= e=20 process and which only Walter has access to (which is why we get issues= like=20 old source files being left in new releases of dmd). Andrei makes a sti= nk about=20 it every release, but AFAIK, Walter has yet to do anything to make it s= o that=20 anyone other than him could create the zip file for a release. - Jonathan M Davis
Nov 22 2012
On Monday, 19 November 2012 at 00:40:10 UTC, Rob T wrote:First I cloned everything from github master, and that went well but I'm now encountering a lot of silly stumbling blocks due to inadequate documentation, for example it's clear how to build anything - period. There may be documentation somewhere(?), but all I could find was this external blog post http://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/ The instructions in the blog allowed me to successfully build DMD src with 64-bit arch on Linux. So far so good, but I'm sure this is not the end of the problems I'll encounter. Being new to this, I'll know immediately where the documentation is failing, so as I get stuck and unstuck I'm in a good position to create missing documentation or improve on the current documentation. If I'm to try and contribute, I have a few questions, for example can anyone contribute at this level (build process)? If I am allowed to contribute, then what's the process for making contributions? Thanks. --rtCheck this out: https://github.com/carlor/dlang-workspace
Nov 19 2012
On Monday, 19 November 2012 at 00:40:10 UTC, Rob T wrote:First I cloned everything from github master, and that went well but I'm now encountering a lot of silly stumbling blocks due to inadequate documentation, for example it's clear how to build anything - period. There may be documentation somewhere(?), but all I could find was this external blog post http://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/ The instructions in the blog allowed me to successfully build DMD src with 64-bit arch on Linux. So far so good, but I'm sure this is not the end of the problems I'll encounter. Being new to this, I'll know immediately where the documentation is failing, so as I get stuck and unstuck I'm in a good position to create missing documentation or improve on the current documentation. If I'm to try and contribute, I have a few questions, for example can anyone contribute at this level (build process)? If I am allowed to contribute, then what's the process for making contributions? Thanks. --rtThere is a page in the wiki now: http://wiki.dlang.org/Building_DMD I wonder why druntime is a separate repository, though. It is strongly tied to dmd anyways.
Dec 26 2012
On Wednesday, 26 December 2012 at 10:09:59 UTC, qznc wrote:I wonder why druntime is a separate repository, though. It is strongly tied to dmd anyways.It isn't; only parts of it are compiler-specific. Other areas are e.g. just OS abstractions, and thus it is used by GDC and LDC as well. David
Dec 26 2012