Nim - just built from the latest sources on GitHub:
$ nim --version Nim Compiler Version 1.7.3 [NetBSD: amd64] Compiled at 2022-11-30 Copyright (c) 2006-2022 by Andreas Rumpf git hash: 84ea62ea0d64ba454d0f53beb4f3f16d0582ab45 active boot switches: -d:release
Tests succeed/fail the same as on the pkgsrc-produced 1.6.10 version.
If an executable is produced without -d:release, I am getting:
(gdb) run Starting program: /home/xci/src/nimbits/string04 Program received signal SIGSEGV, Segmentation fault. 0x0000000000415706 in nimZeroMem () (gdb) bt #0 0x0000000000415706 in nimZeroMem () #1 0x0000000000415b51 in threadVarAlloc__system_2150 () #2 0x0000000000415bad in initThreadVarsEmulation () #3 0x0000000000415bdd in PreMain () #4 0x0000000000415bff in NimMain () #5 0x0000000000415c3e in main ()
This happens with any program, even a one-liner containing just 'echo "Hello, world.".
The executables produced by 1.6.10 do not have the problem.
I didn't want to raise an issue on GitHub yet, as I might be missing something simple - in the failing case I am running nim without any installation, just by setting the PATH to the Nim/bin directory.
Any ideas?
On a very -current NetBSD-amd64 my tests now mostly pass:
PASS: tests/stdlib/tyield.nim js ( 0.67 sec)
FAILURE! total: 302 passed: 288 skipped: 10 failed: 4
tests failed
One needs:
--- config/nim.cfg.ORIG 2022-12-11 21:41:33.973497874 +0000
+++ config/nim.cfg 2022-12-11 21:45:59.081698599 +0000
@@ -181,10 +181,9 @@
gcc.maxerrorsimpl = "-fmax-errors=3"
-@if freebsd:
+@if freebsd or netbsd:
tlsEmulation:off
@elif bsd:
- # at least NetBSD has problems with thread local storage:
tlsEmulation:on
@end
(prior to this I had some 170 failures reported).