www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Installing ldc beta on macOS

reply Joel <joelcnz gmail.com> writes:
(see title)
https://github.com/ldc-developers/ldc/releases/tag/v1.41.0-beta1

I tried homebrew, and that compiles, but doesn't run. (I've 
uninstalled it from there).

I noticed a fix on a recent thread - the latest version 
executable files don't fail.
Sep 22 2025
parent reply kinke <noone nowhere.com> writes:
On Monday, 22 September 2025 at 09:40:45 UTC, Joel wrote:
 (see title)
 https://github.com/ldc-developers/ldc/releases/tag/v1.41.0-beta1

 I tried homebrew, and that compiles, but doesn't run. (I've 
 uninstalled it from there).

 I noticed a fix on a recent thread - the latest version 
 executable files don't fail.
Compatibility with macOS v15.4+ was fixed in v1.41.0 final, see the [changelog](https://github.com/ldc-developers/ldc/releases/tag/v1.41.0). And FWIW, https://github.com/ldc-developers/ldc-developers.github.io/blo /master/LATEST_BETA points to v1.41.0 final (as always whenever there's no newer beta than the latest final).
Sep 22 2025
parent reply Joel <joelcnz gmail.com> writes:
On Monday, 22 September 2025 at 10:28:42 UTC, kinke wrote:
 On Monday, 22 September 2025 at 09:40:45 UTC, Joel wrote:
 (see title)
 https://github.com/ldc-developers/ldc/releases/tag/v1.41.0-beta1

 I tried homebrew, and that compiles, but doesn't run. (I've 
 uninstalled it from there).
I don't think home brew has the latest version. How do I install ldc with out home brew?
Sep 22 2025
next sibling parent Serg Gini <kornburn yandex.ru> writes:
On Monday, 22 September 2025 at 22:34:18 UTC, Joel wrote:
 On Monday, 22 September 2025 at 10:28:42 UTC, kinke wrote:
 On Monday, 22 September 2025 at 09:40:45 UTC, Joel wrote:
 (see title)
 https://github.com/ldc-developers/ldc/releases/tag/v1.41.0-beta1

 I tried homebrew, and that compiles, but doesn't run. (I've 
 uninstalled it from there).
I don't think home brew has the latest version. How do I install ldc with out home brew?
There are a plethora of options! 1) Just download archive from GitHub Releases. Extract it to your favorite folder. Add this folder to the PATH. (unlock externally downloaded binary files - specific macOS protection) Done. 2) This is the script from macOS D maintainer - which is installing LDC with some common tools into /opt/SDKs. Better to remove /opt/SDKs first. ```bash if [[ ! -d /opt/SDKs ]]; then sudo mkdir -p /opt/SDKs/ sudo chmod -R 777 /opt/SDKs curl -o /opt/SDKs/init.sh https://gist.githubusercontent.com/LunaTheFoxgirl/60cda49e9fd9b95c837f2d4c09706523/raw/7e9fee07357459dcc55df8de5ae4f40a6d5a34a4/init.sh chmod +x /opt/SDKs/init.sh echo "source /opt/SDKs/init.sh" | sudo tee -a /etc/profile fi echo "Setting up .buildtmp..." mkdir .buildtmp; cd .buildtmp if [[ ! -d /opt/SDKs/ldc2 ]]; then echo "Downloading LDC2..." mkdir -p /opt/SDKs/ldc2 curl -L https://github.com/ldc-developers/ldc/releases/download/v1.41.0/ldc2-1.41.0- sx-universal.tar.xz -o ldc2.tar.xz echo "Extracting LDC2..." tar xf ldc2.tar.xz echo "Installing LDC2...." mv ldc2-1.41.0-osx-universal/* /opt/SDKs/ldc2 export PATH=/opt/SDKs/ldc2/bin:$PATH rm -r ldc2* echo "Building latest dub from source..." git clone https://github.com/dlang/dub dub build --root=dub/ --build=release echo "Staging dub into /opt/SDKs/ldc2/bin..." cp dub/bin/dub /opt/SDKs/ldc2/bin/ fi echo "Rebuilding serve-d and dcd..." if [[ ! -d "/opt/SDKs/serve-d" ]]; then echo "Install directory not found, creating..." mkdir -p /opt/SDKs/serve-d/bin mkdir -p /opt/SDKs/dcd/bin fi git clone https://github.com/Pure-D/serve-d git clone https://github.com/dlang-community/DCD dub build --root=dcd --dest=/opt/SDKs/ --build=release --config=client dub build --root=dcd --dest=/opt/SDKs/ --build=release --config=server dub build --root=serve-d --build=release cp serve-d/serve-d /opt/SDKs/serve-d/bin/ echo "Cleaning up..." cd .. rm -rf .buildtmp echo "Done!" ``` 3) There is also this project https://code.dlang.org/packages/ldcup
Sep 23 2025
prev sibling next sibling parent reply Paolo Invernizzi <paolo.invernizzi gmail.com> writes:
On Monday, 22 September 2025 at 22:34:18 UTC, Joel wrote:
 On Monday, 22 September 2025 at 10:28:42 UTC, kinke wrote:
 On Monday, 22 September 2025 at 09:40:45 UTC, Joel wrote:
 (see title)
 https://github.com/ldc-developers/ldc/releases/tag/v1.41.0-beta1

 I tried homebrew, and that compiles, but doesn't run. (I've 
 uninstalled it from there).
I don't think home brew has the latest version. How do I install ldc with out home brew?
Homebrew has the latest version, and before that the maintainer back ported the fix also to prior versions. https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/l/ldc.rb
Sep 23 2025
parent Joel <joelcnz gmail.com> writes:
On Tuesday, 23 September 2025 at 12:55:43 UTC, Paolo Invernizzi 
wrote:
 On Monday, 22 September 2025 at 22:34:18 UTC, Joel wrote:
 On Monday, 22 September 2025 at 10:28:42 UTC, kinke wrote:
 On Monday, 22 September 2025 at 09:40:45 UTC, Joel wrote:
 (see title)
 https://github.com/ldc-developers/ldc/releases/tag/v1.41.0-beta1

 I tried homebrew, and that compiles, but doesn't run. (I've 
 uninstalled it from there).
I don't think home brew has the latest version. How do I install ldc with out home brew?
Homebrew has the latest version, and before that the maintainer back ported the fix also to prior versions. https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/l/ldc.rb
I'd unistalled brews ldc, and reinstalled ldc, but I get (I'm using a Intel machine): clang: error: invalid Darwin version number: macos15 clang: error: invalid version number in '--target=x86_64-apple-macos15' Error: /usr/bin/cc failed with status: 1 Error ldc2 failed with exit code 1.
Sep 23 2025
prev sibling parent Christian =?UTF-8?B?S8O2c3RsaW4=?= <christian.koestlin gmail.com> writes:
On Monday, 22 September 2025 at 22:34:18 UTC, Joel wrote:
 On Monday, 22 September 2025 at 10:28:42 UTC, kinke wrote:
 On Monday, 22 September 2025 at 09:40:45 UTC, Joel wrote:
 (see title)
 https://github.com/ldc-developers/ldc/releases/tag/v1.41.0-beta1

 I tried homebrew, and that compiles, but doesn't run. (I've 
 uninstalled it from there).
I don't think home brew has the latest version. How do I install ldc with out home brew?
I really like the installer script on dlang.org: https://dlang.org/download.html https://dlang.org/install.html `curl -fsS https://dlang.org/install.sh | bash -s ldc` this will install the selected version e.g. into $HOME/dlang/ldc-1.42.0. There will be an activate.{sh,fish} scripts to setup all env variables correctly in your shell. With that you can easily install different versions of the toolchain and switch on demand between them. Kind regards, Christian
Apr 10