February 11, 2016
On 2/10/16 6:30 PM, Márcio Martins wrote:
> I decided to try a couple ideas in druntime and followed this
> http://wiki.dlang.org/Starting_as_a_Contributor#Fetch_dmd_from_GitHub
>
> Everything went fast and smooth - I have a custom built dmd version.
> Bootstrapping and building dmd was suspiciously fast - took around 15
> secs maybe, if I remember right,
>
>
> I did my changes to druntime, rebuilt with make -f posix.mak
>
> Compiled a test case with ../dmd/src/dmd test.d, but my changes were not
> reflected.
>
> So, I double check I actually did recompile druntime and look for the
> output lib files, and immediately thought that it must be picking up the
> system include and lib paths instead of this development env.
>
> I create a dmd.conf in ../dmd/src right next to my custom dmd binary,
> but still doesn't work.
> I try again invoking ../dmd/src/dmd -conf=../dmd/src/dmd.conf but still
> nothing.
> I try passing the -I and -L arguments in the command line but still it
> is not using my custom druntime.
>
> At this point I flip the table and give up - what could I be doing wrong?
>
> My expectation was that given I followed the official "tutorial"
> closely, everything was going to just work, instead I spent about 2
> hours on this and got nowhere...
>
> dmd should have a verbose mode where it outputs what it's trying to do
> and with which settings, so I could have a chance at seeing what I have
> messed up, and what linker command it is invoking, ... as it is, I felt
> totally in the dark, and that just adds to the frustration.
>
> I am on Ubuntu 15 and got a system-wide dmd installed from the official
> .deb package.

Hi Márcio, thanks for reaching out. You actually did everything right and you succeeded. The only thing missing is a misunderstanding that I'll fix in the document.

That page is meant for folks who want to change dmd, phobos, or druntime. With your setup, if you make a change to druntime and rebuild it (and phobos), the change _will_ be reflected properly. E.g. put an assert(0); in some unittest and see it failing. This is because all paths to dmd, druntime, phobos are set up properly in the makefiles.

However, when you tried to compile some independent program outside these, indeed your system defaults entered in action. You need a different command line for those, which I'll specify in http://wiki.dlang.org/Starting_as_a_Contributor.


Thanks,

Andrei

February 11, 2016
On Thursday, 11 February 2016 at 04:37:39 UTC, Jonathan M Davis wrote:
> On Thursday, 11 February 2016 at 02:07:54 UTC, Etienne wrote:
>> On Wednesday, 10 February 2016 at 23:30:03 UTC, Márcio Martins wrote:
>>> [...]
>>
>> It took me way more than 2 hours to grasp how this build process works. It wasn't until I had read through the whole source code actually.
>
> It's also a pain to edit. It's been suggested several times that we change the build system (e.g. to use https://github.com/atilaneves/reggae), but IIRC, Walter and Andrei have generally been opposed to the idea of changing it. It's one of those things that frequent contributors have more or less sorted out and don't usually worry about much anymore (aside perhaps from the rare occasions when they need to edit the makefiles), whereas it definitely tends to bite folks who aren't familiar with it. And building the documentation is that much worse.

Tell me about it. I'm still not 100% sure what I need to do to build the docs and only managed the 1st time at DConf 2015 with Robert next to me telling me what to do.

Atila
February 11, 2016
On Thursday, 11 February 2016 at 04:48:31 UTC, Laeeth Isharc wrote:
> On Wednesday, 10 February 2016 at 23:30:03 UTC, Márcio Martins wrote:
>> [...]
>
> When you figure it out maybe you could draft a clear explanation of whats missing from the existing wiki instructions to append as a set of hints and tips.

Updating the wiki is good, but not nearly as important as a command you run that just works.

Atila
February 11, 2016
On 2/10/16 6:30 PM, Márcio Martins wrote:
> I decided to try a couple ideas in druntime and followed this
> http://wiki.dlang.org/Starting_as_a_Contributor#Fetch_dmd_from_GitHub

OK, I added this section: http://wiki.dlang.org/Starting_as_a_Contributor#Running_Independent_Programs

Please let me know if it floats your boat. Thanks!


Andrei

February 11, 2016
On 2/11/16 9:08 AM, Atila Neves wrote:
> I'm still not 100% sure what I need to do to build the docs

Does http://wiki.dlang.org/Starting_as_a_Contributor#Fetch_and_build_dlang.org help? -- Andrei
February 11, 2016
On Thursday, 11 February 2016 at 11:49:35 UTC, Vladimir Panteleev wrote:
> Digger can do it in one command too, without any changes in the current build process.

Yeah, digger is pretty cool.

> Does your command also build the PDF, CHM and eBook?

No, I see negative value in supporting these formats as part of the build and dropped them entirely.
February 11, 2016
On Thursday, 11 February 2016 at 14:19:13 UTC, Andrei Alexandrescu wrote:
> On 2/10/16 6:30 PM, Márcio Martins wrote:
>> I decided to try a couple ideas in druntime and followed this
>> http://wiki.dlang.org/Starting_as_a_Contributor#Fetch_dmd_from_GitHub
>
> OK, I added this section: http://wiki.dlang.org/Starting_as_a_Contributor#Running_Independent_Programs
>
> Please let me know if it floats your boat. Thanks!
>
>
> Andrei

Great, thanks Andrei!

Here is my first contribution: https://github.com/D-Programming-Language/druntime/pull/1497

Go ahead and destroy!
February 11, 2016
On Thursday, 11 February 2016 at 12:59:52 UTC, Vladimir Panteleev wrote:
> On Thursday, 11 February 2016 at 12:08:53 UTC, Márcio Martins wrote:
>> On a separate topic: are the official DMD releases compiled with the previous version of DMD or GDC? How does that work?
>
> Yes, with a previous DMD version. IIRC, there is a makefile target which downloads an older DMD, if necessary.

IIRC, it uses 2.067 and will continue to do so until GDC and LDC have switched to using the D version of the frontend instead of the older, C++ version.

- Jonathan M Davis
February 12, 2016
On 12/02/2016 4:10 AM, Jonathan M Davis wrote:
>
> IIRC, it uses 2.067 and will continue to do so until GDC and LDC have
> switched to using the D version of the frontend instead of the older,
> C++ version.
>

Most likely we will stick with 2.067 until GDC and LDC both have 2.068 releases.  There are a couple bugs in 2.067 that affect building DMD, but using it as a host compiler has been fairly painless so far and I don't think there's any huge motivation to bump it up.
1 2 3 4
Next ›   Last »