Closed hlclemson closed 9 months ago
Hi, thanks for trying it. Which nim version do you have installed? It probably won't compile with a Nim version less than 2.0.0
I am using the latest version of Nim. I don't think I am using the incompatible version.
-------------------- Info --------------------------- [anon@ArchLinux ~]$ nim -v Nim Compiler Version 2.0.2 [Linux: amd64] Compiled at 2023-12-24 Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
How did you install Nim, and does the folder /usr/lib/nim/dist/checksums/src/checksums exist on your machine? I built the nim compiler locally instead of using choosenim or prebuilt binaries, although that shouldn't make a difference I think.
If it exists maybe you could try compiling with --path:/usr/lib/nim or some subfolder of that
Ah, it seems that the problem arises from the fact that I do not have the "/usr/lib/nim/dist" directory on my machine. I installed prebuilt binaries available on the official Arch repository.
Passing the additional flag --path:/usr/lib/nim in the build command doesn't seem to fix the problem.
-------------------- Commands --------------------------- [anon@ArchLinux]$ pacman -Ss nim$ extra/nim 2.0.2-1 [installed] Imperative, multi-paradigm, compiled programming language
[anon@ArchLinux]$ nimble buildDesktop --path:/usr/lib/nim --app:console -D:forceLogToFile -D:enableGui=false -D:enableTerminal=true
Executing task buildDesktop in /home/anon/Programs/Absytree/absytree.nimble
extension:
Additional command line params: --path:/usr/lib/nim --app:console -D:forceLogToFile -D:enableGui=false -D:enableTerminal=true
Hint: used config file '/etc/nim/nim.cfg' [Conf]
Hint: used config file '/etc/nim/config.nims' [Conf]
Hint: used config file '/home/anon/Programs/Absytree/config.nims' [Conf]
.........................................................................
Compiling for linux
.............................................................
Terminal backend enabled
................................
/home/anon/Programs/Absytree/src/misc/custom_async.nim(9, 13) Warning: use the nimble packages malebolgia
, taskpools
or weave
instead; threadpool is deprecated [Deprecated]
.......................................................................
/usr/lib/nim/compiler/modulegraphs.nim(15, 39) Error: cannot open file: ../dist/checksums/src/checksums/md5
stack trace: (most recent call last)
/tmp/nimblecache-659962185/nimscriptapi_2224927682.nim(210, 16)
/home/anon/Programs/Absytree/absytree.nimble(56, 3) buildDesktopTask
/usr/lib/nim/system/nimscript.nim(285, 7) selfExec
/usr/lib/nim/system/nimscript.nim(285, 7) Error: unhandled exception: FAILED: /usr/bin/nim c -o:ast -d:exposeScriptingApi --path:/usr/lib/nim --app:console -D:forceLogToFile -D:enableGui=false -D:enableTerminal=true ./src/absytree.nim [OSError]
Tip: 1 messages have been suppressed, use --verbose to show them.
nimscriptwrapper.nim(160) execScript
Error: Exception raised during nimble script execution
ok, choosenim includes the dist folder, so maybe you could try that. I'll see tomorrow if I can fix that somehow on my end
Unfortunately I don't think I can easily fix this. The editor needs to import the nim compiler to run nimscript, and it seems the only solution right now is to include the compiler modules from the installed nim version (see https://github.com/nim-lang/Nim/issues/23049, https://github.com/nim-lang/nimble/issues/1163, https://github.com/nim-lang/nimble/issues/1166).
I guess the version from the arch repository doesn't include some of the files (the dist folder) which we need, so you have to install nim using choosenim, the prebuilt binaries from https://nim-lang.org/install_unix.html or compile nim from source.
I could successfully compile the program after installing choosenim. Thank you for your help!
Hi, thank you for sharing your cool project!
However, it seems that it fails to compile on my system for some reason.
Could you let me know if this is OS specific problem?
---------------------System Info --------------------- OS: Arch Linux x86_64 Kernel: 6.6.9-arch1-1 Shell: bash 5.2.21 DE: KDE Plasma 5.27.10 WM: KWin (Wayland) WM Theme: Breeze Theme: Breeze (Dark) [QT], Breeze [GTK2/3] Icons: breeze-dark [QT], breeze-dark [GTK2/3/4] Font: Fira Sans (10pt) [QT], Fira Sans (10pt) [GTK2/3/4] Cursor: breeze (24px) Terminal: foot 1.16.2 Terminal Font: Noto Sans Mono (10pt) CPU: 11th Gen Intel(R) Core(TM) i7-11800H (16) @ 4.60 GHz GPU 1: Intel UHD Graphics GPU 2: NVIDIA GeForce RTX 3070 Mobile / Max-Q Memory: 31.20 GiB
---------------------Executed Commands ---------------------
nimble setup nimble buildDesktop --app:console -D:forceLogToFile -D:enableGui=false -D:enableTerminal=true
--------------------- Error Log --------------------- Executing task buildDesktop in /home/anon/Programs/Absytree/absytree.nimble extension: Additional command line params: --app:console -D:forceLogToFile -D:enableGui=false -D:enableTerminal=true Hint: used config file '/etc/nim/nim.cfg' [Conf] Hint: used config file '/etc/nim/config.nims' [Conf] Hint: used config file '/home/anon/Programs/Absytree/config.nims' [Conf] ......................................................................... Compiling for linux ............................................................. Terminal backend enabled ................................ /home/anon/Programs/Absytree/src/misc/custom_async.nim(9, 13) Warning: use the nimble packages
malebolgia
,taskpools
orweave
instead; threadpool is deprecated [Deprecated] ....................................................................... /usr/lib/nim/compiler/modulegraphs.nim(15, 39) Error: cannot open file: ../dist/checksums/src/checksums/md5 stack trace: (most recent call last) /tmp/nimblecache-659962185/nimscriptapi_2224927682.nim(210, 16) /home/anon/Programs/Absytree/absytree.nimble(56, 3) buildDesktopTask /usr/lib/nim/system/nimscript.nim(285, 7) selfExec /usr/lib/nim/system/nimscript.nim(285, 7) Error: unhandled exception: FAILED: /usr/bin/nim c -o:ast -d:exposeScriptingApi --app:console -D:forceLogToFile -D:enableGui=false -D:enableTerminal=true ./src/absytree.nim [OSError] Tip: 1 messages have been suppressed, use --verbose to show them. nimscriptwrapper.nim(160) execScript