macOS Sonoma Linker Issue
Renato
renato at athaydes.com
Fri Dec 22 17:15:30 UTC 2023
On Friday, 22 December 2023 at 12:49:35 UTC, Guillaume Piolat
wrote:
> On Thursday, 21 December 2023 at 23:25:55 UTC, Renato wrote:
>> ld: symbol(s) not found for architecture x86_64
>
> Make sure you're using the "osx-universal" package in order to
> have both arch.
> https://github.com/ldc-developers/ldc/releases/tag/v1.35.0
>
> That said, for consumer software it may be a good idea to use
> eg: LDC 1.28 for x86_64 and LDC 1.35 for arm64 builds. You can
> stich the binaries together, which will give compatibility with
> all macOS from 10.12 up to Sonoma (well, if you also: codesign,
> notarize, make a DMG...).
I installed using the script as the downloads page suggests... it
installed the correct architecture for me:
```
▶ curl -fsS https://dlang.org/install.sh | bash -s ldc
Downloading https://dlang.org/d-keyring.gpg
######################################################################## 100.0%
Downloading https://dlang.org/install.sh
######################################################################## 100.0%
The latest version of this script was installed as
~/dlang/install.sh.
It can be used it to install further D compilers.
Run `~/dlang/install.sh --help` for usage information.
Downloading and unpacking
https://github.com/ldc-developers/ldc/releases/download/v1.35.0/ldc2-1.35.0-osx-x86_64.tar.xz
######################################################################## 100.0%
Using dub 1.34.0 shipped with ldc-1.35.0
Run `source ~/dlang/ldc-1.35.0/activate` in your shell to use
ldc-1.35.0.
This will setup PATH, LIBRARY_PATH, LD_LIBRARY_PATH, DMD, DC, and
PS1.
Run `deactivate` later on to restore your environment.
```
Are you sure this shouldn't have just worked?
I then tried as suggested above to install the universal release:
```
~/dlang/install.sh install ldc2-1.35.0-osx-universal
Downloading and unpacking
https://github.com/ldc-developers/ldc/releases/download/v1.35.0-osx-universal/ldc2-1.35.0-osx-universal-osx-x86_64.tar.xz
curl: (22) The requested URL returned error: 404
```
I don't want to just download the binary and unpack it myself
because apparently the install script's "activate" command sets
up a bunch of environment variables that I will need later.
Can't `install.sh` install this universal release?
More information about the Digitalmars-d-learn
mailing list