Closed Vaipex closed 2 years ago
Hi! Can I confirm the version of nim you are using?
I think that error message is consistent with loony being built outside gc:arc
or gc:orc
. It only supports those memory managers at the moment.
From the error you have provided it appears that you do not have the std/atomics fetchAdd proc in your scope.
Judging from the code of atomics https://github.com/nim-lang/Nim/blob/devel/lib/system/atomics.nim it would seem that the operation will only be available when compiled with —threads:on
Please ensure you have the following compiler switches:
—gc:arc —threads:on
Give it another shot and let us know if there are further issues.
Yeah, I just came to the same realization. :laughing:
Hi, Im using `Nim Compiler Version 1.5.1 [Linux: amd64] Compiled at 2021-09-23 Copyright (c) 2006-2021 by Andreas Rumpf
git hash: 6163bdd279a2c33d4290223cc7f466c8070b8ce4 active boot switches: -d:release`
I already compiled it with nim c --threads:on --gc:arc test.nim
still the same error
Quite odd! Despite the procedures push/pop using the templates, for some reason it required you to import the std/atomics to work. Either way; it has been patched by changing the templates to procedures for now to avoid polluting your name space.
Everything should work with the latest tag.
Thanks :)
compiled successfully
Thanks for letting us know 🙂 if you have questions or ideas give us a shout
Hi, I tried to use the example code from the readme (https://github.com/nim-works/loony#how-to-use) but I got some errors
Hint: used config file '/home/---/.choosenim/toolchains/nim-#devel/config/nim.cfg' [Conf] Hint: used config file '/home/---/.choosenim/toolchains/nim-#devel/config/config.nims' [Conf] ................................................................ /home/---/Desktop/Nim/test.nim(10, 11) template/generic instantiation of
pushfrom here /home/---/.nimble/pkgs/loony-0.1.1/loony.nim(177, 27) template/generic instantiation of
fetchIncTailfrom here /home/---/.nimble/pkgs/loony-0.1.1/loony.nim(71, 26) Error: attempting to call undeclared routine: 'fetchAdd'
This happens both on the 0.1.0 and 0.1.1