Dub build fails to build my project on macOS with M1 chip
Vladiwostok
riciuvlad at gmail.com
Tue Jul 23 17:48:05 UTC 2024
Dub issue: https://github.com/dlang/dub/issues/2954
My repo: https://github.com/Dlang-UPB/D-scanner
Greetings,
When trying to build my project on a macOS machine with the M1
chip using the ldc compiler and 'dub build', the build fails when
trying to run dmd's pregenerate command.
When running the command manually, I can see that the linker
cannot find the 'phobos2-ldc' library. Setting either the
'LIBRARY_PATH' or 'DFLAGS' env vars with the library path, the
command executes successfully, but 'dub build' still fails.
I've created an issue in the dub repo and provided additional
information there.
I've tried a few workarounds. Tried setting the env var in the
dmd's dub file on my machine (even tried exporting it in the same
pregen command). Tried adding 'dflags-ldc' in the dub file.
Neither worked.
Has anyone encountered this issue? Does anyone have any ideas for
fixing it? I also accept workarounds until we get this issue
sorted.
Thanks!
More information about the Digitalmars-d
mailing list