Jump to page: 1 2 3
Thread overview
Bulding latest DMD and associated projects from github master
Nov 19, 2012
Rob T
Nov 19, 2012
H. S. Teoh
Nov 19, 2012
Rob T
Nov 19, 2012
Jonathan M Davis
Nov 19, 2012
Rob T
Nov 19, 2012
Rob T
Nov 19, 2012
Rob T
Nov 22, 2012
Jordi Sayol
Nov 22, 2012
Jordi Sayol
Nov 22, 2012
Jonathan M Davis
Nov 19, 2012
Nathan M. Swan
Dec 26, 2012
qznc
Dec 26, 2012
David Nadlinger
November 19, 2012
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

November 19, 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 clone git://github.com/myname/dmd.git # checkout your fork
	git checkout -b my_super_duper_fixes	# make a topic branch
	vim $files			# make changes here
	make -f posix.mak unittest	# make sure you didn't break stuff
	git add $files
	git commit
	git push -u origin my_super_duper_fixes # push new branch to github

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.
November 19, 2012
On 19-11-2012 02:02, H. S. Teoh wrote:
> 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.

It's a good idea to append "DMD=../dmd/src/dmd" to the druntime and phobos make commands.

>
>
> [...]
>> 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 clone git://github.com/myname/dmd.git # checkout your fork
> 	git checkout -b my_super_duper_fixes	# make a topic branch
> 	vim $files			# make changes here
> 	make -f posix.mak unittest	# make sure you didn't break stuff
> 	git add $files
> 	git commit
> 	git push -u origin my_super_duper_fixes # push new branch to github
>
> 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
>

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
November 19, 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.mak

Tried 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

November 19, 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



November 19, 2012
On Monday, November 19, 2012 02:17:54 Rob T wrote:
> 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?

So that it uses the dmd that you just built instead of the one in your path. If you have separately instealled dmd, then it's to build using the wrong dmd unless you explicitly tell it which one use. On my system, dmd is symlinked to the one that I built, so the only time that I have to provide DMD= is when running dmd's test suite (since it requires it for some reason), but I don't run that very often. If you're outright installing it somewhere though, then you'll need DMD=path.

- Jonathan M Davis
November 19, 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:
>>
>> 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

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.

Andrei

November 19, 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
November 19, 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.
November 19, 2012
On 19-11-2012 15:46, Joseph Rushton Wakeling wrote:
> 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.

Updated the blog post, thanks.

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
« First   ‹ Prev
1 2 3