www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Mac Mini for AArch64 Compiler Development

reply Walter Bright <newshound2 digitalmars.com> writes:
I've reached the point where I need to acquire a Mac Mini to further develop
the 
dmd AArch64 code generator.

They're expensive, so I don't want to buy the wrong one.

Which model should I obtain?
Aug 09
next sibling parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 10/08/2025 4:33 AM, Walter Bright wrote:
 I've reached the point where I need to acquire a Mac Mini to further 
 develop the dmd AArch64 code generator.
 
 They're expensive, so I don't want to buy the wrong one.
 
 Which model should I obtain?
At this stage all you need is a Mac Book Air M1 16gb ram. As long as its reset and not logged in, like $300 go for second hand (ideally ex-lease). For a Mac Mini, you can ignore Pro, Max and Ultra chips. You are not planning on doing data processing using GPU's or the CPU to warrant needing the better chips. As far as I'm aware. The NZ price for this is $1500, so around $1000USD. https://www.harveynorman.co.nz/apple-computers/imac/apple-mac-mini-m4-chip-with-10-core-cpu-and-10-core-gpu-16gb-ram-512gb-ssd-2024.html I've been thinking it might be good for me to get a new Mac Book Air M4 16gb ram and we'd have a similar set of use cases. Specifically for its multi-use capabilities. I.e. can be taken outside the house (including a conference).
Aug 09
prev sibling next sibling parent Sergey <kornburn yandex.ru> writes:
On Saturday, 9 August 2025 at 16:33:06 UTC, Walter Bright wrote:
 I've reached the point where I need to acquire a Mac Mini to 
 further develop the dmd AArch64 code generator.

 They're expensive, so I don't want to buy the wrong one.

 Which model should I obtain?
I don't know how memory intensive dmd build, but I think 16 Gb or even 32Gb will be better. It should be either m1 or m4 chip. I agree that Pro/Max/Ultra versions don't worth it for CPU use case - better to have some extra RAM. Other parameters probably are not important. Maybe Luna can suggest something as well
Aug 09
prev sibling next sibling parent Luna <luna foxgirls.gay> writes:
On Saturday, 9 August 2025 at 16:33:06 UTC, Walter Bright wrote:
 I've reached the point where I need to acquire a Mac Mini to 
 further develop the dmd AArch64 code generator.

 They're expensive, so I don't want to buy the wrong one.

 Which model should I obtain?
I'd recommend getting the M4 model, they start with 16 GB of ram nowadays. Though getting the M4 + 24 GB ram model might be more future proof.
Aug 09
prev sibling next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
Thanks for the suggestions, everyone! I ordered one today.
Aug 10
parent reply Walter Bright <newshound2 digitalmars.com> writes:
I have it set up now, it is compiling code for X86_64 and AArch64!

Next I need to install git and connect it to github.
Aug 13
parent reply Sergey <kornburn yandex.ru> writes:
On Wednesday, 13 August 2025 at 21:14:56 UTC, Walter Bright wrote:
 I have it set up now, it is compiling code for X86_64 and 
 AArch64!

 Next I need to install git and connect it to github.
You can install homebrew - it is popular macOS package manager. After that you can do: ```bash brew install git ``` for github - simplest GUI is GitHub for Desktop But regular cli should work as well
Aug 13
parent reply Walter Bright <newshound2 digitalmars.com> writes:
Thanks! I got git installed.

It took me a while to get ssh and its utilities installed. The google 
instructions were wrong, of course. I am baffled why such a basic utility is
not 
included by Apple.

I also installed the Mac version of dmd. All of the executables in it promptly 
seg fault. And yes, I also installed Rosetta and verified its installation. I 
have no idea what's going on here.
Aug 13
next sibling parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 14/08/2025 5:12 PM, Walter Bright wrote:
 I also installed the Mac version of dmd. All of the executables in it 
 promptly seg fault. And yes, I also installed Rosetta and verified its 
 installation. I have no idea what's going on here.
Try the nightly.
Aug 13
prev sibling next sibling parent reply Luna <luna foxgirls.gay> writes:
On Thursday, 14 August 2025 at 05:12:19 UTC, Walter Bright wrote:
 Thanks! I got git installed.

 It took me a while to get ssh and its utilities installed. The 
 google instructions were wrong, of course. I am baffled why 
 such a basic utility is not included by Apple.

 I also installed the Mac version of dmd. All of the executables 
 in it promptly seg fault. And yes, I also installed Rosetta and 
 verified its installation. I have no idea what's going on here.
Bug in druntime that was fixed recently. Shouldn’t be an issue on nightly.
Aug 13
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 8/13/2025 11:18 PM, Luna wrote:
 On Thursday, 14 August 2025 at 05:12:19 UTC, Walter Bright wrote:
 Thanks! I got git installed.

 It took me a while to get ssh and its utilities installed. The google 
 instructions were wrong, of course. I am baffled why such a basic utility is 
 not included by Apple.

 I also installed the Mac version of dmd. All of the executables in it promptly 
 seg fault. And yes, I also installed Rosetta and verified its installation. I 
 have no idea what's going on here.
Bug in druntime that was fixed recently. Shouldn’t be an issue on nightly.
Thank you. The main download needs to be replace immediately.
Aug 14
next sibling parent xoxo <xororwr gmail.com> writes:
On Thursday, 14 August 2025 at 07:52:59 UTC, Walter Bright wrote:
 On 8/13/2025 11:18 PM, Luna wrote:
 On Thursday, 14 August 2025 at 05:12:19 UTC, Walter Bright 
 wrote:
 Thanks! I got git installed.

 It took me a while to get ssh and its utilities installed. 
 The google instructions were wrong, of course. I am baffled 
 why such a basic utility is not included by Apple.

 I also installed the Mac version of dmd. All of the 
 executables in it promptly seg fault. And yes, I also 
 installed Rosetta and verified its installation. I have no 
 idea what's going on here.
Bug in druntime that was fixed recently. Shouldn’t be an issue on nightly.
Thank you. The main download needs to be replace immediately.
2.111.0 (Apr 01, 2025) 2.110.0 (Mar 07, 2025) 2.109.1 (Jul 01, 2024) 2.109.0 (Jun 01, 2024) 2.108.1 (May 01, 2024) 2.108.0 (Apr 01, 2024) 2.107.1 (Mar 01, 2024) 2.107.0 (Feb 01, 2024) 2.106.1 (Jan 01, 2024) 2.106.0 (Dec 01, 2023) 2.105.3 (Nov 01, 2023) 2.105.2 (Sep 15, 2023) 2.105.1 (Sep 01, 2023) 2.105.0 (Aug 01, 2023) 2.104.2 (Jul 15, 2023) 2.104.1 (Jul 01, 2023) 2.104.0 (Jun 01, 2023) 2.103.1 (May 01, 2023) 2.103.0 (Apr 01, 2023) 2.102.2 (Mar 01, 2023) 2.102.1 (Feb 15, 2023) 2.102.0 (Feb 01, 2023) 2.101.2 (Jan 01, 2023) We have been complaining for over a very long while..
Aug 14
prev sibling next sibling parent reply Luna <luna foxgirls.gay> writes:
On Thursday, 14 August 2025 at 07:52:59 UTC, Walter Bright wrote:
 On 8/13/2025 11:18 PM, Luna wrote:
 On Thursday, 14 August 2025 at 05:12:19 UTC, Walter Bright 
 wrote:
 Thanks! I got git installed.

 It took me a while to get ssh and its utilities installed. 
 The google instructions were wrong, of course. I am baffled 
 why such a basic utility is not included by Apple.

 I also installed the Mac version of dmd. All of the 
 executables in it promptly seg fault. And yes, I also 
 installed Rosetta and verified its installation. I have no 
 idea what's going on here.
Bug in druntime that was fixed recently. Shouldn’t be an issue on nightly.
Thank you. The main download needs to be replace immediately.
I highly recommend installing the Xcode command line tools instead of relying on third party packages for stuff like git and co. Apple doesn’t ship dev tools by default and you have to explicitly install them. `xcode-select --install` Should install the compiler toolchains and all the Apple dev tools Additionally I recommend running `sudo spctl --master-disable` which allows you to run unsigned software; after running the command you can enable unsigned software in the system settings
Aug 14
next sibling parent Luna <luna foxgirls.gay> writes:
On Thursday, 14 August 2025 at 16:35:20 UTC, Luna wrote:
 On Thursday, 14 August 2025 at 07:52:59 UTC, Walter Bright 
 wrote:
 On 8/13/2025 11:18 PM, Luna wrote:
 [...]
Thank you. The main download needs to be replace immediately.
I highly recommend installing the Xcode command line tools instead of relying on third party packages for stuff like git and co. Apple doesn’t ship dev tools by default and you have to explicitly install them. `xcode-select --install` Should install the compiler toolchains and all the Apple dev tools Additionally I recommend running `sudo spctl --master-disable` which allows you to run unsigned software; after running the command you can enable unsigned software in the system settings
Correction, it’s `sudo spctl --global-disable`
Aug 14
prev sibling next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/14/2025 9:35 AM, Luna wrote:
 `xcode-select --install`
Thank you. I will give that a try.
Aug 14
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
Thank you. I did these, and downloaded the nightly, which works!
Aug 15
prev sibling parent reply Renato Athaydes <renato athaydes.com> writes:
On Thursday, 14 August 2025 at 07:52:59 UTC, Walter Bright wrote:
 On Thursday, 14 August 2025 at 05:12:19 UTC, Walter Bright
Thank you. The main download needs to be replace immediately.
Yes, please! I hope that with Walter now owning a Mac, we can finally have stuff work without segmentation faults, linker issuers, C stdlib errors (like int128.h being invalid when using importC)! I just opened this ticket the other day, which shows what the Mac experience looks like for someone trying D (if they get past the fact most D things immediately segfault, including DMD and serve-d): https://github.com/Pure-D/serve-d/issues/403
Aug 16
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
The nightly does work. We'll see about the rest.
Aug 16
parent reply Renato Athaydes <renato athaydes.com> writes:
On Saturday, 16 August 2025 at 17:25:45 UTC, Walter Bright wrote:
 The nightly does work. We'll see about the rest.
I cannot see a nightly here: https://downloads.dlang.org/pre-releases/2025/ or https://downloads.dlang.org/nightlies/ The latter seems to have last been updated in 2020. Where do you get the lates nightly?? Would be nice if the install script told me, but it doesn't seem to be able to list available versions.
Aug 19
next sibling parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 20/08/2025 6:24 AM, Renato Athaydes wrote:
 On Saturday, 16 August 2025 at 17:25:45 UTC, Walter Bright wrote:
 The nightly does work. We'll see about the rest.
I cannot see a nightly here: https://downloads.dlang.org/pre- releases/2025/ or https://downloads.dlang.org/nightlies/ The latter seems to have last been updated in 2020. Where do you get the lates nightly?? Would be nice if the install script told me, but it doesn't seem to be able to list available versions.
https://github.com/dlang/dmd/releases
Aug 19
prev sibling parent Renato Athaydes <renato athaydes.com> writes:
On Tuesday, 19 August 2025 at 18:24:34 UTC, Renato Athaydes wrote:
 On Saturday, 16 August 2025 at 17:25:45 UTC, Walter Bright 
 wrote:
 The nightly does work. We'll see about the rest.
I cannot see a nightly here: https://downloads.dlang.org/pre-releases/2025/ or https://downloads.dlang.org/nightlies/ The latter seems to have last been updated in 2020. Where do you get the lates nightly?? Would be nice if the install script told me, but it doesn't seem to be able to list available versions.
Found it, it's documented here: https://dlang.org/install.html So the command is: ``` ~/dlang/install.sh install dmd-nightly ``` I am used to stuff like SDKMAN and rustup where you can do something like `install.sh ls` or something similar and it shows which versions you can download... would be simple to implement that, probably... and very helpful.
Aug 19
prev sibling parent Renato Athaydes <renato athaydes.com> writes:
On Saturday, 16 August 2025 at 17:22:03 UTC, Renato Athaydes 
wrote:
 int128.h being invalid when using importC)!
I meant float128 (which was already fixed, I know - but that was the previous show stopper on Mac).
Aug 16
prev sibling next sibling parent reply Derek Fawcus <dfawcus+dlang employees.org> writes:
On Thursday, 14 August 2025 at 05:12:19 UTC, Walter Bright wrote:
 Thanks! I got git installed.

 It took me a while to get ssh and its utilities installed. The 
 google instructions were wrong, of course. I am baffled why 
 such a basic utility is not included by Apple.
Huh? Every Mac I've used since 10.4 came out has had SSH present out of the box, and enabling SSH was simply a case of allowing remote access from the system settings.
Aug 14
next sibling parent Derek Fawcus <dfawcus+dlang employees.org> writes:
On Thursday, 14 August 2025 at 11:07:16 UTC, Derek Fawcus wrote:
 On Thursday, 14 August 2025 at 05:12:19 UTC, Walter Bright 
 wrote:
 Thanks! I got git installed.

 It took me a while to get ssh and its utilities installed. The 
 google instructions were wrong, of course. I am baffled why 
 such a basic utility is not included by Apple.
Huh? Every Mac I've used since 10.4 came out has had SSH present out of the box, and enabling SSH was simply a case of allowing remote access from the system settings.
As to git, it comes with Xcode - or possibly the associated command line tools. Certainly I'm using the Apple compiled version on my Macs.
Aug 14
prev sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
What about sshfs?
Aug 14
next sibling parent reply Luna <luna foxgirls.gay> writes:
On Thursday, 14 August 2025 at 17:28:29 UTC, Walter Bright wrote:
 What about sshfs?
You can possibly compile it against MacFuse, but FUSE is a linux-only technology otherwise. macOS does support SMB shares and can easily create shares for folders if you need it, however. https://macfuse.github.io/
Aug 14
parent Luna <luna foxgirls.gay> writes:
On Thursday, 14 August 2025 at 17:58:16 UTC, Luna wrote:
 On Thursday, 14 August 2025 at 17:28:29 UTC, Walter Bright 
 wrote:
 What about sshfs?
You can possibly compile it against MacFuse, but FUSE is a linux-only technology otherwise. macOS does support SMB shares and can easily create shares for folders if you need it, however. https://macfuse.github.io/
Actually, the macFUSE project already provides an sshfs port as well https://github.com/libfuse/sshfs/releases/download/sshfs-3.7.3/sshfs-3.7.3-ccb6821.pkg So yeah, you should be able to install macFUSE from their website, then the sshfs package and have support for it.
Aug 14
prev sibling parent reply Derek Fawcus <dfawcus+dlang employees.org> writes:
On Thursday, 14 August 2025 at 17:28:29 UTC, Walter Bright wrote:
 What about sshfs?
Never seen the need, I just use sftp if necessary, but mainly git syncing. What I tend to do is have a git repo on my workstation, and parallel git repo's on the dev servers. Then I simply push and fetch between the two over SSH, editing and committing wherever is most convenient. So mainly on the workstation. When compiling and doing UTs on the server I'd often commit there after fixing something, and use git over ssh to fetch back to my workstation. Driving all fetch/push actions from the local workstation side. So not having a filesystem abstraction over the top of it has never been an issue. Mind, I'm often doing this across trans-Atlantic links, and so explicitly working with git that way is more comfortable than the 100ms+ delay of direct FS interactions.
Aug 14
parent reply Walter Bright <newshound2 digitalmars.com> writes:
My machines are all connected via a LAN, so no lag problems. I use sshfs to do 
cross-compilation.
Aug 14
parent reply Derek Fawcus <dfawcus+dlang employees.org> writes:
On Thursday, 14 August 2025 at 22:29:07 UTC, Walter Bright wrote:
 My machines are all connected via a LAN, so no lag problems. I 
 use sshfs to do cross-compilation.
Since I assume one of those is a windows machine, I'd just be inclined to use CIFS. As windows, macOS, and Linux will all have support out of the box - the latter may need samba installed, not sure. If windows wasn't in the mix, and since it is a private LAN, I'd just use NFS - despite its flaws.
Aug 14
parent Walter Bright <newshound2 digitalmars.com> writes:
I'm using the putty utilities on Windows.
Aug 15
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
This is covered extensively in https://github.com/dlang/dmd/issues/21126

Thanks to everyone helping out with finding the cause!
Aug 14
prev sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
I've got everything installed now, and was able to bootstrap the compiler. 
"hello world" compiles and runs.

And, finally, I got my text editor compiled natively. I can only suffer under 
nano so much!
Aug 15
parent Walter Bright <newshound2 digitalmars.com> writes:
Thanks everyone for the help!
Aug 16