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