Hint: used config file '/data/opt/nim/config/nim.cfg' [Conf] Hint: system [Processing] Hint: widestrs [Processing] Hint: io [Processing] Hint: greetings [Processing] CC: stdlib_io.nim CC: stdlib_system.nim CC: greetings.nim Hint: [Link] /home/hl/.cache/nim/greetings_d/stdlib_io.nim.c.o: In function `echoBinSafe': stdlib_io.nim.c:(.text+0x246): undefined reference to `__builtin_saddll_overflow' /home/hl/.cache/nim/greetings_d/stdlib_io.nim.c.o: In function `readLine__FbqDHP9bu7nqCh9c04dnSOxw': stdlib_io.nim.c:(.text+0xdaf): undefined reference to `__builtin_saddll_overflow' stdlib_io.nim.c:(.text+0xe68): undefined reference to `__builtin_saddll_overflow' stdlib_io.nim.c:(.text+0x111a): undefined reference to `__builtin_ssubll_overflow' stdlib_io.nim.c:(.text+0x11ba): undefined reference to `__builtin_ssubll_overflow' stdlib_io.nim.c:(.text+0x1215): undefined reference to `__builtin_ssubll_overflow' stdlib_io.nim.c:(.text+0x130a): undefined reference to `__builtin_ssubll_overflow' stdlib_io.nim.c:(.text+0x13ca): undefined reference to `__builtin_ssubll_overflow' stdlib_io.nim.c:(.text+0x149b): undefined reference to `__builtin_saddll_overflow' stdlib_io.nim.c:(.text+0x14c4): undefined reference to `__builtin_ssubll_overflow' stdlib_io.nim.c:(.text+0x1506): undefined reference to `__builtin_saddll_overflow' stdlib_io.nim.c:(.text+0x15cf): undefined reference to `__builtin_ssubll_overflow' stdlib_io.nim.c:(.text+0x16be): undefined reference to `__builtin_saddll_overflow' stdlib_io.nim.c:(.text+0x1719): undefined reference to `__builtin_saddll_overflow' /home/hl/.cache/nim/greetings_d/stdlib_system.nim.c.o: In function `newSeq': stdlib_system.nim.c:(.text+0xa3c0): undefined reference to `__builtin_smulll_overflow' stdlib_system.nim.c:(.text+0xa3e3): undefined reference to `__builtin_saddll_overflow' /home/hl/.cache/nim/greetings_d/stdlib_system.nim.c.o: In function `atomicInc__v6qORsZ9azlHHhOL1JYACRAsystem': stdlib_system.nim.c:(.text+0xb98a): undefined reference to `__builtin_saddll_overflow' collect2: error: ld returned 1 exit status Error: execution of an external program failed: 'gcc -o /data/hl/devel/nim/begin/greetings /home/hl/.cache/nim/greetings_d/stdlib_io.nim.c.o /home/hl/.cache/nim/greetings_d/stdlib_system.nim.c.o /home/hl/.cache/nim/greetings_d/@mgreetings.nim.c.o -ldl'
Any idea how to rectify this?
Thanks @araq.
I had tried the bin tarball of 1.2.2 but couldn't install (error: 'nim-gdb missing' or similar). 1.2.0 however worked.
@halloleo you need to verify your installation. Kind of issue you have there and problems with building 1.2.2 you mention there and in other thread suggest, that something wrong with installation.
I'm suggest completely remove nim installed, verify there there no any artifacts left, ensure, that there no any outdated "system" nim versions.
Then follow steps in https://nim-lang.org/install_unix.html and verify downloaded tarball with sha256 checksum.
Also, as an option, you may consider using of https://github.com/dom96/choosenim
Hope this troubles will not prevent you from investigation of nim.
Good lack.
This happens for us with nim 1.2.0 also. But not with nim 0.20.0. Adding -d:nimEmulateOverflowChecks solves it, but why? Could someone explain why this happens? Is there a source-code change we could make? It doesn't happen everywhere or for other nim programs.
I found the line of code that causes it:
import json
var xray = %*
{"tests" : []}
echo xray.pretty() # <--
Ugh! I put that line back, cleared the cache, but now I cannot cause that error anymore. Now, why is it suddenly not happening?
... Ah. Switching to older gcc compiler does it. And I have to clear the cache whenever I change compilers. Ok, that's good to know.