macOS Sonoma Linker Issue

Renato renato at athaydes.com
Sat Jan 6 20:02:20 UTC 2024


>> On Friday, 22 December 2023 at 17:45:27 UTC, Renato wrote:
>>>
>>> I'm afraid I've lost interest to make it work at this point :(
>>
>> Did you add "-L-ld_classic"?
>
> That's the first thing I did... without that, LDC still 
> compiles , but logs a huge amount of things like this (it keeps 
> going for a few hundred of these):
>

I decided to continue with my struggles after all :).

I found out now that this flag is only required on my Mac x86 
(Macbook Air with Intel processor), but not on my Mac M1 (ARM), 
even though I am on the exact same MacOS version in both machines.

So I had to do this on my dub file:

```
lflags "-ld_classic" platform="osx-x86_64"
```

That works fine locally.

But unfortunately, this is causing my build on GitHub Actions to 
fail on `macos-latest` (the flag is not recognized: `ld: library 
not found for -ld_classic`).

https://github.com/renatoathaydes/dzipper/actions/runs/7433575723/job/20226754138

I just had a quick look and GH Actions [seems to be using MacOS 
12](https://github.blog/changelog/2022-10-03-github-actions-jobs-running-on-macos-latest-are-now-running-on-macos-12/).

My laptops are using MacOS Sonoma (14.1.1).

Does dub allow specifying not just the OS and architecture, but 
the OS version?? Probably not , right? This linker issue is such 
a messy problem to have.




More information about the Digitalmars-d-learn mailing list