Greetings, I am a new comer to nim and first time poster. I am trying to cross
compile to linux from osx using the following command
$nim c --cpu:i386 --os:linux hello.nim
This is the error i am seeing ------------------------------ start
---------------- Error: execution of an external compiler program 'gcc -c -w
-I/Users/skota/.choosenim/toolchains/nim-0.19.4/lib -o
/Users/skota/.cache/nim/hello_d/hello.c.o
/Users/skota/.cache/nim/hello_d/hello.c' failed with exit code: 1
In file included from /Users/skota/.cache/nim/hello_d/hello.c:10:
/Users/skota/.choosenim/toolchains/nim-0.19.4/lib/nimbase.h:490:64: error:
'Nim_and_C_compiler_disagree_on_target_architecture' declared as an array with
a negative size|
---|---
typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) ==
sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated. --------------- end ---------------------------
uname output from linux target server Linux xxx-xx 3.10.0-957.5.1.el7.x86_64 #1
SMP Tue Jan 29 11:37:46 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
>From the error message, it appears i am missing some depenedencies for
>compilation. Not sure what i could be missing.
Any advice is appreciated.
Regards Skota