-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Dub build fails to build project on macOS with M1 chip #2954
Comments
@kinke : Any idea ? |
So the immediate problem is this?
The most suspicious thing IMO is the |
I've run the command without the arch specification and the build executed successfully. Running the command with verbose compiler logging, I noticed the following diff:
Looking back in DMD's dub file, I can see the arch being propagated using dub's arch env var (which I presume to be
Does this still look like a dub issue? |
Okay thx, now I think I know what happens - the Now I'm definitely no fan of recursive dub calls in pregenerate/build commands, as used by the DMD dub recipe here. I've seen weird issues due to the extra environment variables. Not sure what the best way forward is - either killing the |
Okay, after looking at DMD's dub.sdl, I think that should be fixed - it builds & runs a little |
Looks as if dlang/dmd#9275 actually broke working cross-compilation before, despite its name. ;) |
I've had issues as well. Recursive dub calls are quite popular from my experience, so we probably need to harden the testsuite around it, because they are quite convenient. |
I'm thinking about drafting a PR in dmd repo and removing the I think using a macOS-arm64 triple would be better for the pregen command, but I think that would mean the pregen command for |
The thing is: that So the only robust way of making sure you build a Using .d files for autogenerating little And that |
I've had a go at it: dlang/dmd#16756 |
System information
Bug Description
Repo: https://github.com/Dlang-UPB/D-scanner
When trying to build the project's DMD dependency with dub build, the build fails with 'exit code 1' when running the following pregenerate command: https://github.com/dlang/dmd/blob/master/dub.sdl#L53-L61
When running the command manually, the linker reports that the 'phobos2-ldc' lib is not found. When specifying the library path via 'LIBRARY_PATH' or 'DFLAGS' env vars, the manual command works, but dub build still won't build the project.
How to reproduce?
Expected Behavior
The program should build successfully when using dub, and without having to set any additional library paths.
Logs
Additional information
The same project built using makefile on the same OS and with the same compiler builds successfully, without having to set any additional library paths.
If needed, we can provide access to the target macOS machine via our Github actions flow.
The text was updated successfully, but these errors were encountered: