A simple array comparsion will cause error: system module needs: appendString.
Test code:
var
arr1: array[6, uint8] = [0xC2u8, 0x12, 0x35, 0x98, 0x67, 0x00]
arr2: array[6, uint8] = [0xC3u8, 0x12, 0x35, 0x98, 0x67, 0x00]
proc printf(fmt: cstring) {. varargs, importc: "printf", header: "stdio.h".}
printf("%d", arr1 == arr2)
Cfg:
gc = "none"
define = "release"
deadCodeElim = "on"
os = "standalone"
LineDir = "off"
debuginfo
implicitStatic = "on"
system module needs: appendString.
proc rawoutput(s: string) = discard
proc panic(s: string) = discard
Here it is:
I can't test it at present. Even through, why 1.0.x is OK?
No, it does not work for me with your panicoverride.nim.
nim -v
Nim Compiler Version 1.2.0 [Windows: amd64]
Compiled at 2020-04-03
Copyright (c) 2006-2020 by Andreas Rumpf
git hash: 7e83adff84be5d0c401a213eccb61e321a3fb1ff
active boot switches: -d:release
The problem is associated with "==".
@leorize, by changing "standalone" to "any", the error is gone. But, in this case, some warnings appear (Warning: '....' uses GC'ed memory), and panicoverride.nim is not needed any more. See fatal.nim:
when hostOS == "standalone":
include "$projectpath/panicoverride"
proc sysFatal(exceptn: typedesc, message: string) {.inline.} =
panic(message)
....
So, --os:any is not a replacement of --os:standalone.
Each time there a pain in Nim, always look for a cure in C.
I have to get rid of "==" and call memcmp for a cure.