Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Silicon support #78

Open
neilsf opened this issue May 14, 2024 · 5 comments
Open

Apple Silicon support #78

neilsf opened this issue May 14, 2024 · 5 comments

Comments

@neilsf
Copy link

neilsf commented May 14, 2024

The macos-latest runner at GitHub is now an arm64 machine. It looks like this action (or DMD?) does not support it:

Error: The dmd compiler is not supported for non-x64 architecture
    at run (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/src/main.ts:35:1)
    at Object.399 (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/src/main.ts:109:1)
    at exports (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/webpack/bootstrap:14:1)
    at __webpack_require__ (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/webpack/runtime/compat:2:1)
    at Object.<anonymous> (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/webpack/startup:4:1)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Function.Module._load (node:internal/modules/cjs/loader:93[8](https://github.com/neilsf/xc-basic3/actions/runs/9084783366/job/24966555812#step:3:9):12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    ````
Any chance to make this run on Apple Silicon runners?
Thanks
@WebFreak001
Copy link
Member

DMD is unsupported on arm, on ARM your only compiler choices are LDC and GDC (and on mac really only LDC)

@Geod24
Copy link
Member

Geod24 commented May 24, 2024

We should at least make the default on arm be LDC.

@WebFreak001
Copy link
Member

WebFreak001 commented May 25, 2024

the default should be ldc if not set and not x86, but I'll make a PR to add an explicit auto value and also make it work in case the yml file does funny things

@s-ludwig
Copy link

s-ludwig commented Jul 8, 2024

Since there is the transparent Rosetta translation layer, shouldn't DMD generally work just fine? It won't output native ARM executables, of course, but that may not be necessary anyway.

@the-horo
Copy link
Collaborator

Since there is the transparent Rosetta translation layer, shouldn't DMD generally work just fine? It won't output native ARM executables, of course, but that may not be necessary anyway.

It looks like install.sh allows dmd to be installed on arm64 macs so I see no reason why the action should hard fail on macos-latest:
https://github.com/dlang/installer/blob/5c1e63782abc145e8b63a1e3a60c8ca3cff19885/script/install.sh#L1324-L1330

I'll go and remove the checks and everything should just work.

The action also (tries to) default to ldc-latest on non-x86 and dmd-latest on x86. I think it's fine to leave this as is even if dmd would work on arm64 macs.

the-horo added a commit to the-horo/setup-dlang that referenced this issue Jul 11, 2024
There is already code in the action that picks between dmd-latest and
ldc-latest based on the CPU architecture when a D compiler is not
specified. Having the default value in action.yml prevented this code
from ever running. This leads to users receiving an error message and
having to specify `dc: ldc` manually.

Bug: dlang-community#78

Signed-off-by: Andrei Horodniceanu <[email protected]>
the-horo added a commit to the-horo/setup-dlang that referenced this issue Jul 13, 2024
There is already code in the action that picks between dmd-latest and
ldc-latest based on the CPU architecture when a D compiler is not
specified. Having the default value in action.yml prevented this code
from ever running. This leads to users receiving an error message and
having to specify `dc: ldc` manually.

Bug: dlang-community#78

Signed-off-by: Andrei Horodniceanu <[email protected]>
Geod24 pushed a commit that referenced this issue Jul 18, 2024
There is already code in the action that picks between dmd-latest and
ldc-latest based on the CPU architecture when a D compiler is not
specified. Having the default value in action.yml prevented this code
from ever running. This leads to users receiving an error message and
having to specify `dc: ldc` manually.

Bug: #78

Signed-off-by: Andrei Horodniceanu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants