When I tried to execute dub run on my M1 mac, it exit with an error code 1. After reading the document on the Dlang.org, it seems it's not support for M1 arch. What is your opinion? Here's the full log of dub run --verbose
Using dub registry url 'https://code.dlang.org/'
Determined package version using GIT: wiziz ~master
Scanning local packages...
Found dependency vibe-d 0.8.6
Found dependency vibe-d:stream 0.8.6
Found dependency vibe-d:core 0.8.6
Found dependency vibe-d:data 0.8.6
Found dependency vibe-d:utils 0.8.6
Found dependency stdx-allocator 2.77.5
Found dependency vibe-core 1.16.0
Found dependency eventcore 0.9.13
Found dependency taggedalgebraic 0.11.20
Found dependency libasync 0.8.6
Found dependency memutils 1.0.4
Found dependency libevent 2.0.2+2.0.16
Found dependency vibe-d:web 0.8.6
Found dependency vibe-d:http 0.8.6
Found dependency vibe-d:inet 0.8.6
Found dependency vibe-d:textfilter 0.8.6
Found dependency vibe-d:tls 0.8.6
Found dependency openssl 1.1.6+1.0.1g
Found dependency botan 1.12.19
Found dependency botan-math 1.0.3
Found dependency vibe-d:crypto 0.8.6
Found dependency mir-linux-kernel 1.0.1
Found dependency diet-ng 1.7.5
Found dependency vibe-d:mail 0.8.6
Found dependency vibe-d:redis 0.8.6
Found dependency vibe-d:mongodb 0.8.6
Generating using build
Pre-gen Running commands for vibe-d:tls
Running rdmd --eval='
auto dir = environment.get("DUB_PACKAGE_DIR");
if (dir.buildPath("tls").exists) {
dir = dir.buildPath("tls");
}
auto opensslVersion = "0.0.0";
try {
const res = execute(["openssl", "version"]).output;
if (res.canFind("OpenSSL ")) {
opensslVersion = res.splitter(" ").dropOne.front.filter!(not!(std.uni.isAlpha)).text;
}
} catch (Exception e) { writeln("Warning: ", e); }
auto data = text("module openssl_version;\nenum OPENSSL_VERSION=\"", opensslVersion, "\";");
auto output = dir.buildPath("openssl_version.d");
if (!output.exists || output.readText.strip != data.strip)
data.toFile(output);
' || true
/Library/D/dmd/src/phobos/std/math/exponential.d(3791): Error: number `0x0.8p-126f` is not representable as a `float`
/Library/D/dmd/src/phobos/std/math/exponential.d(3791): https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3791): Error: number `0x0.8p-126f` is not representable as a `float`
/Library/D/dmd/src/phobos/std/math/exponential.d(3791): https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3793): Error: number `0x0.555556p-126f` is not representable as a `float`
/Library/D/dmd/src/phobos/std/math/exponential.d(3793): https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3793): Error: number `0x0.555556p-126f` is not representable as a `float`
/Library/D/dmd/src/phobos/std/math/exponential.d(3793): https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3804): Error: number `0x0.8p-1022` is not representable as a `double`
/Library/D/dmd/src/phobos/std/math/exponential.d(3804): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3804): Error: number `0x0.8p-1022` is not representable as a `double`
/Library/D/dmd/src/phobos/std/math/exponential.d(3804): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3806): Error: number `0x0.5555555555555p-1022` is not representable as a `double`
/Library/D/dmd/src/phobos/std/math/exponential.d(3806): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3806): Error: number `0x0.5555555555555p-1022` is not representable as a `double`
/Library/D/dmd/src/phobos/std/math/exponential.d(3806): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral
Failed: ["/Library/D/dmd/bin/dmd", "-d", "-v", "-o-", "/var/folders/wd/4nqmml0d01z66nt214ll6r380000gn/T/.rdmd-501/eval.B6BE4FD57303EFBF9FD0D3A0AE79AF5C.d", "-I/var/folders/wd/4nqmml0d01z66nt214ll6r380000gn/T/.rdmd-501"]
Configuring dependent wiziz, deps:"vibe-d"
Configuring dependent vibe-d, deps:"vibe-core", "vibe-d:data", "vibe-d:utils", "vibe-d:crypto", "vibe-d:data", "vibe-d:http", "vibe-d:inet", "vibe-d:mail", "vibe-d:mongodb", "vibe-d:redis", "vibe-d:stream", "vibe-d:textfilter", "vibe-d:tls", "vibe-d:utils", "vibe-d:web"
Configuring dependent vibe-core, deps:"eventcore", "stdx-allocator"
Configuring dependent eventcore, deps:"taggedalgebraic"
Configuring dependent taggedalgebraic, deps:
Configuring dependent stdx-allocator, deps:
Configuring dependent vibe-d:data, deps:"vibe-d:utils"
Configuring dependent vibe-d:utils, deps:"stdx-allocator"
Configuring dependent vibe-d:crypto, deps:"mir-linux-kernel", "vibe-core", "vibe-d:data", "vibe-d:utils"
Configuring dependent mir-linux-kernel, deps:
Configuring dependent vibe-d:http, deps:"diet-ng", "vibe-d:crypto", "vibe-d:inet", "vibe-d:textfilter", "vibe-d:tls"
Configuring dependent diet-ng, deps:
Configuring dependent vibe-d:inet, deps:"vibe-core", "vibe-d:data", "vibe-d:utils", "vibe-d:stream", "vibe-d:textfilter"
Configuring dependent vibe-d:stream, deps:"vibe-core", "vibe-d:data", "vibe-d:utils"
Configuring dependent vibe-d:textfilter, deps:"vibe-core", "vibe-d:data", "vibe-d:utils"
Configuring dependent vibe-d:tls, deps:"vibe-d:stream"
Configuring dependent vibe-d:mail, deps:"vibe-d:inet", "vibe-d:tls"
Configuring dependent vibe-d:mongodb, deps:"vibe-d:http"
Configuring dependent vibe-d:redis, deps:"vibe-d:http"
Configuring dependent vibe-d:web, deps:"vibe-d:http"
Starting Performing "debug" build using /Library/D/dmd/bin/dmd for x86_64.
Up-to-date taggedalgebraic 0.11.20: target for configuration [library] is up to date.
Using existing build in /Users/eddie/.dub/cache/taggedalgebraic/0.11.20/build/library-debug-A6a6B6nvYz4d6hQaLzlQHQ.
Copying target from /Users/eddie/.dub/cache/taggedalgebraic/0.11.20/build/library-debug-A6a6B6nvYz4d6hQaLzlQHQ/libtaggedalgebraic.a to /Users/eddie/.dub/packages/taggedalgebraic-0.11.20/taggedalgebraic
Target '/Users/eddie/.dub/cache/eventcore/0.9.13/build/cfrunloop-debug-MD_jM2_wnD1eH8wi1H58Ew/libeventcore.a' doesn't exist, need rebuild.
Building eventcore 0.9.13: building configuration [cfrunloop]
[cwd=/Users/eddie/Projects/wiziz] /Library/D/dmd/bin/dmd -lib -of/Users/eddie/.dub/cache/eventcore/0.9.13/build/cfrunloop-debug-MD_jM2_wnD1eH8wi1H58Ew/libeventcore.a -debug -g -w -version=EventcoreCFRunLoopDriver -version=Have_eventcore -version=Have_taggedalgebraic -I../../.dub/packages/eventcore-0.9.13/eventcore/source/ -I../../.dub/packages/taggedalgebraic-0.11.20/taggedalgebraic/source/ ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/core.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/driver.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/libasync.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/cfrunloop.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/dns.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/driver.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/epoll.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/events.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/kqueue.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/pipes.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/processes.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/select.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/signals.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/sockets.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/watchers.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/threadedfile.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/timer.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/core.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/dns.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/driver.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/events.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/files.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/pipes.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/processes.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/signals.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/sockets.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/winapi/watchers.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/internal/consumablequeue.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/internal/corefoundation.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/internal/coreservices.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/internal/dlist.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/internal/ioworker.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/internal/utils.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/internal/win32.d ../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/socket.d -L-framework -LCoreFoundation -L-framework -LCoreServices -vcolumns
/Library/D/dmd/src/phobos/std/math/exponential.d(3791,36): Error: number `0x0.8p-126f` is not representable as a `float`
/Library/D/dmd/src/phobos/std/math/exponential.d(3791,36): https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3791,75): Error: number `0x0.8p-126f` is not representable as a `float`
/Library/D/dmd/src/phobos/std/math/exponential.d(3791,75): https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3793,36): Error: number `0x0.555556p-126f` is not representable as a `float`
/Library/D/dmd/src/phobos/std/math/exponential.d(3793,36): https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3793,80): Error: number `0x0.555556p-126f` is not representable as a `float`
/Library/D/dmd/src/phobos/std/math/exponential.d(3793,80): https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3804,37): Error: number `0x0.8p-1022` is not representable as a `double`
/Library/D/dmd/src/phobos/std/math/exponential.d(3804,37): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3804,77): Error: number `0x0.8p-1022` is not representable as a `double`
/Library/D/dmd/src/phobos/std/math/exponential.d(3804,77): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3806,37): Error: number `0x0.5555555555555p-1022` is not representable as a `double`
/Library/D/dmd/src/phobos/std/math/exponential.d(3806,37): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(3806,89): Error: number `0x0.5555555555555p-1022` is not representable as a `double`
/Library/D/dmd/src/phobos/std/math/exponential.d(3806,89): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral
/Library/D/dmd/src/phobos/std/math/exponential.d(2670,21): Error: undefined identifier `core.stdc.math.FP_ILOGB0`
/Library/D/dmd/src/phobos/std/math/exponential.d(2672,21): Error: undefined identifier `core.stdc.math.FP_ILOGBNAN`
../../.dub/packages/taggedalgebraic-0.11.20/taggedalgebraic/source/taggedalgebraic/taggedunion.d(38,7): Error: CTFE failed because of previous errors in `commonAlignment`
../../.dub/packages/taggedalgebraic-0.11.20/taggedalgebraic/source/taggedalgebraic/taggedalgebraic.d(121,20): Error: template instance `taggedalgebraic.taggedunion.TaggedUnion!(U)` error instantiating
../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/internal/utils.d(258,20): instantiated from here: `TaggedAlgebraic!(U)`
../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/driver.d(330,3): instantiated from here: `AlgebraicChoppedVector!(FDSlot, StreamSocketSlot, StreamListenSocketSlot, DgramSocketSlot, DNSSlot, WatcherSlot, EventSlot, SignalSlot, PipeSlot)`
../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/internal/utils.d(262,18): called from here: `accessors()`
../../.dub/packages/eventcore-0.9.13/eventcore/source/eventcore/drivers/posix/driver.d(325,9): Error: class `eventcore.drivers.posix.driver.PosixEventLoop` cannot infer `abstract` attribute due to circular dependencies
FAIL /Users/eddie/.dub/cache/eventcore/0.9.13/build/cfrunloop-debug-MD_jM2_wnD1eH8wi1H58Ew eventcore staticLibrary
Error /Library/D/dmd/bin/dmd failed with exit code 1.
I think it is dmd (the compiler) that doesn’t work on M1. Dub (the build tool) should work. Can you try again with a different compiler, probably ldc or gdc, and let me know if that works?
When I tried to execute
dub run
on my M1 mac, it exit with an error code 1. After reading the document on the Dlang.org, it seems it's not support for M1 arch. What is your opinion? Here's the full log ofdub run --verbose