I used the latest code from github. Issued
git submodule update --init --recursive
nimble frontend
I get this error: Error: No binaries built, did you specify a valid binary name?.
Nim version: Nim Compiler Version 1.0.6 [MacOSX: amd64]
How to go further?
Check https://github.com/nim-lang/nimforum/blob/master/nimforum.nimble and you'll find:
task backend, "Compiles and runs the forum backend":
exec "nimble c src/forum.nim"
exec "./src/forum"
task frontend, "Builds the necessary JS frontend (with CSS)":
exec "nimble c -r src/buildcss"
exec "nimble js -d:release src/frontend/forum.nim"
mkDir "public/js"
cpFile "src/frontend/forum.js", "public/js/forum.js"
so execute "nimble backend" to build backend and "nimble frontend" to build frontend (see other tasks too)
Verifying dependencies for [email protected]
Reading official package list
Checking for jester@#d8a03aa
Info: Dependency on jester@#d8a03aa already satisfied
Verifying dependencies for jester@#d8a03aa
Reading official package list
Checking for httpbeast@>= 0.2.2
Info: Dependency on httpbeast@>= 0.2.2 already satisfied
Verifying dependencies for [email protected]
Reading official package list
Checking for https://github.com/timotheecour/asynctools@#pr_fix_compilation
Info: Dependency on https://github.com/timotheecour/asynctools@#pr_fix_compilation already satisfied
Verifying dependencies for asynctools@#pr_fix_compilation
Reading official package list
Checking for https://github.com/timotheecour/asynctools@#pr_fix_compilation
Info: Dependency on https://github.com/timotheecour/asynctools@#pr_fix_compilation already satisfied
Verifying dependencies for asynctools@#pr_fix_compilation
Reading official package list
Checking for bcrypt@#head
Info: Dependency on bcrypt@#head already satisfied
Verifying dependencies for bcrypt@#head
Reading official package list
Checking for hmac@#9c61ebe2fd134cf97
Info: Dependency on hmac@#9c61ebe2fd134cf97 already satisfied
Verifying dependencies for hmac@#9c61ebe2fd134cf97
Reading official package list
Checking for nimSHA2@any version
Info: Dependency on nimSHA2@any version already satisfied
Verifying dependencies for [email protected]
Reading official package list
Checking for sha1@any version
Info: Dependency on sha1@any version already satisfied
Verifying dependencies for [email protected]
Reading official package list
Checking for recaptcha@#d06488e
Info: Dependency on recaptcha@#d06488e already satisfied
Verifying dependencies for recaptcha@#d06488e
Reading official package list
Checking for sass@#649e0701fa5c
Info: Dependency on sass@#649e0701fa5c already satisfied
Verifying dependencies for sass@#649e0701fa5c
Reading official package list
Checking for karax@#f6bda9a
Installing karax@#f6bda9a
Reading official package list
Downloading https://github.com/pragmagic/karax using git
Executing git clone --recursive https://github.com/pragmagic/karax /var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468/githubcom_pragmagickarax_#f6bda9a
Finished with exit code 0
Output Cloning into '/var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468/githubcom_pragmagickarax_#f6bda9a'...
Executing git checkout --force f6bda9a
Finished with exit code 0
Output Note: switching to 'f6bda9a'.
... You are in 'detached HEAD' state. You can look around, make experimental
... changes and commit them, and you can discard any commits you make in this
... state without impacting any branches by switching back to a branch.
... If you want to create a new branch to retain commits you create, you may
... do so (now or later) by using -c with the switch command. Example:
... git switch -c <new-branch-name>
... Or undo this operation with:
... git switch -
... Turn off this advice by setting config variable advice.detachedHead to false
... HEAD is now at f6bda9a Reactive value (#129)
Executing git submodule update --recursive
Finished with exit code 0
Debug: Executing nim e --hints:off --verbosity:0 -p:/var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimblecache '/private/var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468/githubcom_pragmagickarax_#f6bda9a/karax_30468.nims' /var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468.out printPkgInfo
Warning: Not removing temporary path because of debug verbosity: /var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468.out
Warning: Not removing temporary path because of debug verbosity: /private/var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468/githubcom_pragmagickarax_#f6bda9a/karax_30468.nims
Info /private/var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468/githubcom_pragmagickarax_#f6bda9a/karax_30468.nims(5, 22) Warning: imported and not used: 'strutils' [UnusedImport]
Debug: Executing nim e --hints:off --verbosity:0 -p:/var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimblecache '/var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468/githubcom_pragmagickarax_#f6bda9a/karax_30468.nims' /var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468.out printPkgInfo
Info /private/var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468/githubcom_pragmagickarax_#f6bda9a/karax_30468.nims(5, 22) Warning: imported and not used: 'strutils' [UnusedImport]
Verifying dependencies for karax@#f6bda9a
Installing karax@#f6bda9a
Warning: Not removing temporary path because of debug verbosity: /var/folders/k_/013v486j1w98mvzh31dcwmvm0000gn/T/nimble_30468
Error: No binaries built, did you specify a valid binary name?
I was trying to work through the Development instructions and I ran into the same issue as above while running nimble devdb. Running nimble install karax@#f6bda9a indeed fixes this issue for me.
I do still have a problem: nimble frontend fails since it is not able to load libsass.so. I did try to install it both trying* apt install libsass0 and following** this install script, but I was not successful. Anyone has suggestions on how to install that?
*: libsass0 provides a libsass.so.0 (which is an alias for a libsass.so.0.0.9) in a folder (/usr/lib/x86_64-linux-gnu). Adding that folder to path or copying in nimforum folder and renaming libsass.so.0.0.9 to libsass.so does not solve the issue.
**: I end up with a libsass.a which is a static library. I guess it should not be that difficult to ask to compile a dynamic library but I know very little of that to just guess.
Thanks for the suggestions. In the end I was able to solve the issue by making a copy of libsass.so in usr/lib. I did actually find a plain libsass.so installing sassc with snap (I did run find \ -name "libsass.so" to find out I had such a file). I think it is kind of critical to have it in usr/lib (at least it might be so according to this forum thread).
So now the buildcss part goes through fine. I still have an issue when compiling frontend because of a Karax error, but I see that it is an issue that should not be available with a more recent Karax release (it probably is tied to 1.2, that is why in recent nimforum updates it was not caught). I will try later if this is the case and report back here.