I had to install D on a new Mac machine. The initial experience is pretty poor right now. Tried searching, but didn't see any other threads about this?
-
dlang.org directs you to download the DMD2.pkg - however, MacOS will not allow you to open this: "Apple could not verify 'DMD2.pkg' is free of malware that may harm your Mac or compromise your privacy." - you have to work around this by going to system privacy settings and enabling it. Not a good first impression though.
-
Once installed, dmd just insta-crashes:
$ dmd
zsh: segmentation fault dmd
This is due to a known (and fixed on nightly) issue with TLS changes on the most recent Mac, but you'll only find out about this if you go googling for the error.
- Finally, since dmd doesn't support arm64 yet, unless you are careful you are very likely to run into various linking issues with e.g. libraries installed with arm64 with homebrew.
This is all a bit unfortunate, especially when we see e.g. the recent thread on hackernews for folks excited about D. I'm sure more than a handful of people decided to try out D after that post, and probably we lost a bunch of them due to these issue.
In terms of solutions:
-
Looks like we just need to notarise the .pkg? Probably needs the foundation to setup an Apple Developer account if it doesn't already have one, then it should just be a matter of running some Apple command-line tools as part of deployment.
-
Really, this should have been hot-fixed once the fix made it to nightly. I understand a new compiler is coming soon, so maybe this won't be a problem for long, but perhaps worth retrospecting on how this managed to stay broken for so long (appears to be a few months now that latest dmd crashes on latest Mac).
-
I think this has been discussed before, but perhaps we should direct people to ldc2 for now as the main download? Or perhaps just make it clear on the website that dmd is x86_64 only for now and provide the alternatives on the homepage.