Getting a development dmd tree going

Steven Schveighoffer schveiguy at gmail.com
Wed Mar 25 00:58:44 UTC 2020


On 3/24/20 8:34 PM, Andrei Alexandrescu wrote:
> I tried to update my dmd installation on a OSX machine due to 
> https://issues.dlang.org/show_bug.cgi?id=20019. Sadly I reached an impasse.

Yeah, there's a whole swath of dmd binaries that don't work on Catalina.

> 
> First I tried to do what worked in the past - git rebase everything then 
> build dmd with AUTO_BOOTSTRAP=1, then druntime, then phobos, then tools. 
> That didn't work for reasons I mentioned in a couple of comments at 
> https://issues.dlang.org/show_bug.cgi?id=20019.
> 
> Then I thought I'd fall back to a more basic procedure, listed in 
> https://wiki.dlang.org/Starting_as_a_Contributor:
> 
> wget https://raw.githubusercontent.com/dlang/tools/master/setup.sh
> bash setup.sh

That probably needs updating.

> 
> That failed, too, apparently because building dmd first requires a 
> preexisting copy of dmd to build build.d. The setup procedure does not 
> cover that case.

Hm, here's what I have done:

1. download the latest copy of dmd zip file, expand it.
2. rm -rf src/*
3. git clone all 3 repositories into the src directory
4. use the downloaded bin file to build dmd (may have to set up your 
path). Or alternatively use a package installer (I use dvm). make -f 
posix.mak should work as long as there's a dmd in your path.
5. make -f posix.mak should work in druntime and phobos at that point.

Not a "batteries included" solution, but it works for me.

> So, shouldn't the procedure for getting D set up from scratch Just 
> Work(tm)?

I literally haven't changed anything in that setup for years (I just 
checked and the VERSION file says 2.064). I think maybe I had to update 
the dmd.conf once.

I also do symlinks from the build artifacts into the bin directory so I 
can run the development dmd on other things.

-Steve


More information about the Digitalmars-d mailing list