Is there a recommended method to install nim built for aarch64 to M1 Macs? Both brew install him --HEAD and choosenim update devel --latest build the amd64 version:
$ nim --version
Nim Compiler Version 1.5.1 [MacOSX: amd64]
Compiled at 2021-04-18
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: 0a10af5a2ce27638c8298e96866a779928122269
active boot switches: -d:release
I'm happy to build it from source if that causes the least hassle for the maintainers and packagers.
Stu.
That build is with choosenim. It looks like the Homebrew --HEAD build fails:
15 lines from /Users/stu/Library/Logs/Homebrew/nim/01.sh:
2021-04-19 09:28:37 +1000
/bin/sh
build.sh
# OS: macosx
# CPU: arm
clang -o bin/nim -ldl -lm
Undefined symbols for architecture arm64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Do not report this issue to Homebrew/brew or Homebrew/core!
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
Try these steps please:
git clone https://github.com/nim-lang/nim.git nim
git clone -q --depth 1 https://github.com/nim-lang/csources_v1.git csources
cd csources
sh build.sh
cp bin/nim ../nim/bin/nim
cd ../nim
bin/nim c --skipUserCfg --skipParentCfg koch
./koch boot -d:release --skipUserCfg --skipParentCfg
The next major release will officially support the M1. (I use Nim on it successfully on a daily basis.)
Yep, that worked like a charm:
Nim Compiler Version 1.5.1 [MacOSX: arm64]
Compiled at 2021-04-19
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: f8038af5ecfa20deaa0b9b1e0d8a5f5915dd9780
active boot switches: -d:release