compile OS is Debian 10.4 x86_64 # nim --version Nim Compiler Version 1.2.0 [Linux: amd64] Compiled at 2020-04-03 Copyright (c) 2006-2020 by Andreas Rumpf
git hash: 7e83adff84be5d0c401a213eccb61e321a3fb1ff active boot switches: -d:release
echo "Hello World"
When I execute the hello program on Openwrt(arm_cortex-a9_vfpv3) # ./hello
arch all 1 arch noarch 1 arch arm_cortex-a9_vfpv3 10
I've had a similar problem when developing on Xilinx hardware (ZedBoard) using Rust & Cargo.
The error was due to linking against a different version of libc that was installed on my board (as @Yardanico said).
The solution I chose was to use musl-gcc in order to statically link the libc.
Thanks, I have resolved this problem:
nim -d:release --opt=size --passL:'-s -static' --cpu:arm --os:linux --gcc.exe:arm-openwrt-linux-gcc --gcc.linkerexe:arm-openwrt-linux-gcc c hello.nim