www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Getting a development dmd tree going

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
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.

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 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.

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

Thanks!
Mar 24 2020
next sibling parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
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
Mar 24 2020
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 3/24/2020 5:58 PM, Steven Schveighoffer wrote:
 Yeah, there's a whole swath of dmd binaries that don't work on Catalina.
With which dmd release do they work on Catalina?
Mar 24 2020
next sibling parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
On 3/24/20 9:37 PM, Walter Bright wrote:
 On 3/24/2020 5:58 PM, Steven Schveighoffer wrote:
 Yeah, there's a whole swath of dmd binaries that don't work on Catalina.
With which dmd release do they work on Catalina?
I have these compilers installed with dvm: dmd-2.040 dmd-2.050 dmd-2.051 dmd-2.057 dmd-2.058 dmd-2.060 dmd-2.064 dmd-2.065.0 dmd-2.066.0 dmd-2.067.1 dmd-2.068.0 dmd-2.068.1 dmd-2.068.2 dmd-2.069.0 dmd-2.069.1 dmd-2.070.0 dmd-2.070.2 dmd-2.071.0 dmd-2.071.0-b1 dmd-2.071.1 dmd-2.072.0 dmd-2.072.2 dmd-2.073.0 dmd-2.073.1 dmd-2.074.0 dmd-2.074.1 dmd-2.075.0 dmd-2.075.1 dmd-2.076.0 dmd-2.076.1 dmd-2.077.0 dmd-2.078.0 dmd-2.078.1 dmd-2.079.0 dmd-2.080.0 dmd-2.080.1 dmd-2.081.0 dmd-2.082.1 dmd-2.083.0 dmd-2.086.0 dmd-2.086.1 dmd-2.088.0 dmd-2.089.0 dmd-2.089.1 dmd-2.090.0 dmd-2.090.1 I did a simple test through all of them, just dmd --version. I get this error: dyld: lazy symbol binding failed: Symbol not found: _dyld_enumerate_tlv_storage Starting at 2.073.0 The thing starts working again with 2.088.0. So all the compilers from 2.073 - 2.087 are not usable on Catalina, according to that test. The ones before are usable (or at least will run), the ones after are usable. -Steve
Mar 24 2020
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 3/24/2020 6:55 PM, Steven Schveighoffer wrote:
 So all the compilers from 2.073 - 2.087 are not usable on Catalina, according
to 
 that test.
 
 The ones before are usable (or at least will run), the ones after are usable.
Thank you. This should go in the documentation somewhere.
Mar 25 2020
parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
On 3/25/20 3:40 AM, Walter Bright wrote:
 On 3/24/2020 6:55 PM, Steven Schveighoffer wrote:
 So all the compilers from 2.073 - 2.087 are not usable on Catalina, 
 according to that test.

 The ones before are usable (or at least will run), the ones after are 
 usable.
Thank you. This should go in the documentation somewhere.
I wonder if it wouldn't be worth doing point releases for at least some of the affected versions. 2.088 isn't that old. Or maybe as needed when people are locked to a certain version that doesn't work for them. But I suppose OSX isn't a huge target platform for D developers. -Steve
Mar 25 2020
parent rikki cattermole <rikki cattermole.co.nz> writes:
On 26/03/2020 1:12 AM, Steven Schveighoffer wrote:
 On 3/25/20 3:40 AM, Walter Bright wrote:
 On 3/24/2020 6:55 PM, Steven Schveighoffer wrote:
 So all the compilers from 2.073 - 2.087 are not usable on Catalina, 
 according to that test.

 The ones before are usable (or at least will run), the ones after are 
 usable.
Thank you. This should go in the documentation somewhere.
I wonder if it wouldn't be worth doing point releases for at least some of the affected versions. 2.088 isn't that old. Or maybe as needed when people are locked to a certain version that doesn't work for them. But I suppose OSX isn't a huge target platform for D developers. -Steve
Agreed, lets do a batch of point releases and keep as many compiler versions going as possible. Hopefully the patch can be backported without much work.
Mar 25 2020
prev sibling parent reply Mathias Lang <pro.mathias.lang gmail.com> writes:
On Wednesday, 25 March 2020 at 01:37:12 UTC, Walter Bright wrote:
 On 3/24/2020 5:58 PM, Steven Schveighoffer wrote:
 Yeah, there's a whole swath of dmd binaries that don't work on 
 Catalina.
With which dmd release do they work on Catalina?
Things were fixed in https://dlang.org/changelog/2.087.1.html thanks to Jacob. It's not only DMD... Anything compiled with DMD < 2.087.1 since the introduction of native TLS won't work on Catalina. It's been a major pain as it creeps up everywhere (e.g. IDE support doesn't work out of the box because of https://github.com/dlang-community/DCD/issues/610 ). Jacob contacted Apple who didn't to care much for the issue: https://github.com/dlang/druntime/pull/2666#issuecomment-568177369
Mar 24 2020
next sibling parent WebFreak001 <d.forum webfreak.org> writes:
On Wednesday, 25 March 2020 at 04:13:20 UTC, Mathias Lang wrote:
 On Wednesday, 25 March 2020 at 01:37:12 UTC, Walter Bright 
 wrote:
 On 3/24/2020 5:58 PM, Steven Schveighoffer wrote:
 Yeah, there's a whole swath of dmd binaries that don't work 
 on Catalina.
With which dmd release do they work on Catalina?
Things were fixed in https://dlang.org/changelog/2.087.1.html thanks to Jacob. It's not only DMD... Anything compiled with DMD < 2.087.1 since the introduction of native TLS won't work on Catalina. It's been a major pain as it creeps up everywhere (e.g. IDE support doesn't work out of the box because of https://github.com/dlang-community/DCD/issues/610 ). Jacob contacted Apple who didn't to care much for the issue: https://github.com/dlang/druntime/pull/2666#issuecomment-568177369
fixed the token by using my own personal token now, but I think we should upgrade to using a dlang-bot token
Mar 25 2020
prev sibling parent Jacob Carlborg <doob me.com> writes:
On Wednesday, 25 March 2020 at 04:13:20 UTC, Mathias Lang wrote:

 Jacob contacted Apple who didn't to care much for the issue: 
 https://github.com/dlang/druntime/pull/2666#issuecomment-568177369
To be fair, we were using a private API. We've been living on borrowed time for many years. They could have removed the function at any point. -- /Jacob Carlborg
Mar 25 2020
prev sibling parent reply Mathias Lang <pro.mathias.lang gmail.com> writes:
On Wednesday, 25 March 2020 at 00:34:27 UTC, 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.
FWIW, I would just use Homebrew to install `dmd` and save myself a lot of trouble. Although, you probably want to go with LDC instead of DMD on Mac because debug infos are utterly broken (among other things). See [this report](https://issues.dlang.org/show_bug.cgi?id=20460) for the DMD bug, and [this report](https://issues.dlang.org/show_bug.cgi?id=20510) for why things won't work out of the box on any compiler.
Mar 24 2020
parent reply Jacob Carlborg <doob me.com> writes:
On 2020-03-25 05:22, Mathias Lang wrote:

 Although, you probably want to go with LDC
LDC has the same problem. Not sure which version of LDC works. -- /Jacob Carlborg
Mar 25 2020
parent Guillaume Piolat <firstname.lastname gmail.com> writes:
On Wednesday, 25 March 2020 at 08:48:39 UTC, Jacob Carlborg wrote:
 On 2020-03-25 05:22, Mathias Lang wrote:

 Although, you probably want to go with LDC
LDC has the same problem. Not sure which version of LDC works.
Use LDC 1.17.0 or later for Catalina support.
Mar 25 2020