Closed doongjohn closed 3 years ago
Are you able to install nimgit2? gittyup?
I had no problem installing gittyup
❯ nimble install https://github.com/disruptek/gittyup
Downloading https://github.com/disruptek/gittyup using git
Verifying dependencies for gittyup@2.6.0
Info: Dependency on nimgit2@>= 0.3.1 & < 0.4.0 already satisfied
Verifying dependencies for nimgit2@0.3.4
Info: Dependency on nimterop@>= 0.6.3 already satisfied
Verifying dependencies for nimterop@0.6.11
Info: Dependency on regex@>= 0.15.0 already satisfied
Verifying dependencies for regex@0.18.0
Info: Dependency on unicodedb@>= 0.7.2 already satisfied
Verifying dependencies for unicodedb@0.9.0
Info: Dependency on cligen@>= 1.0.0 already satisfied
Verifying dependencies for cligen@1.3.2
Info: Dependency on https://github.com/disruptek/badresults@< 2.0.0 already satisfied
Verifying dependencies for badresults@1.0.1
Info: Dependency on https://github.com/disruptek/testes@> 0.4.0 & < 1.0.0 already satisfied
Warning: Package 'testes' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'testespkg', but file 'bytes2human.nim' is in a directory named 'bytes2human/src' instead. This will be an error in the future.
Hint: If 'bytes2human/src' contains source files for building 'testes', rename it to 'testespkg'. Otherwise, prevent its installation by adding `skipDirs = @["bytes2human/src"]` to the .nimble file.
Verifying dependencies for testes@0.9.0
Info: Dependency on https://github.com/disruptek/grok@>= 0.0.4 & < 1.0.0 already satisfied
Verifying dependencies for grok@0.2.0
Info: Dependency on https://github.com/juancarlospaco/nim-bytes2human@any version already satisfied
Verifying dependencies for bytes2human@0.2.2
Info: Dependency on nimterop@<= 0.6.11 already satisfied
Verifying dependencies for nimterop@0.6.11
Info: Dependency on regex@>= 0.15.0 already satisfied
Verifying dependencies for regex@0.18.0
Info: Dependency on unicodedb@>= 0.7.2 already satisfied
Verifying dependencies for unicodedb@0.9.0
Info: Dependency on cligen@>= 1.0.0 already satisfied
Verifying dependencies for cligen@1.3.2
Info: Dependency on regex@>= 0.15.0 already satisfied
Verifying dependencies for regex@0.18.0
Info: Dependency on unicodedb@>= 0.7.2 already satisfied
Verifying dependencies for unicodedb@0.9.0
Installing gittyup@2.6.0
Prompt: gittyup@2.6.0 already exists. Overwrite? [y/N]
Answer: y
Success: gittyup installed successfully.
I would try nimble install https://github.com/disruptek/nimph
. If that doesn't work, I'd try using the bootstrap.sh
. I'm assuming that something in the bootstrap-nonimble.sh
isn't working for you on termux... [edit: it does seem that you're using the nonimble
bootstrap].
# Resetting /data/data/com.termux/files/home/.cache/nim/nimterop/nimgit2/libgit2Dyn
stack trace: (most recent call last)
getheader.nim(482, 23)
getheader.nim(235, 11) buildLibrary
assertions.nim(30, 26) failedAssertImpl
assertions.nim(23, 11) raiseAssert
fatal.nim(49, 5) sysFatal
/data/data/com.termux/files/home/.nimble/pkgs/nimgit2-0.3.4/nimgit2.nim(27, 10) template/generic instantiation of `getHeader` from here
/data/data/com.termux/files/usr/lib/nim/lib/system/fatal.nim(49, 5) Error: unhandled exception: getheader.nim(235, 12) `buildStatus.built`
Build configuration failed - No build files found in /data/data/com.termux/files/home/.cache/nim/nimterop/nimgit2/libgit2Dyn
[AssertionDefect]
Prompt: Build failed for 'https://github.com/disruptek/nimph@1.0.8', would you like to try installing 'https://github.com/disruptek/nimph@#head' (latest unstable)? [y/N]
Answer:
similar error with nimble 🤔
❯ cd /data/data/com.termux/files/home/.cache/nim/nimterop/nimgit2/libgit2Dyn
❯ ls
. include CMakeLists.txt
.. script COPYING
.git src README.md
.github tests SECURITY.md
azure-pipelines .HEADER api.docurium
cmake .editorconfig azure-pipelines.yml
deps .gitattributes git.git-authors
docs .gitignore package.json
examples .mailmap
fuzzers AUTHORS
is there anything wrong in this directory?
What you should have in that directory is a subdirectory buildcache
that holds the actual libgit2
shared libraries.
Since it seems like Nimble doesn't mind trying to install nimgit2
, I would remove your .cache/nim
directory and try running the bootstrap.sh
script. If this gets nimgit2
built correctly, then it will probably successfully build Nimph. I think if you try to run gittyup
tests from the git repository in nimph/src/gittyup
, they won't work because nimgit2
never actually built libgit2.so
.
You may be the first person to attempt aarch64
. The CI does test both bootstrap scripts and building Nimph using nimph
itself, so we should probably focus on the specifics of your platform...
hmm I've cloned nimgit2, nimterop and nimble test
both failed.
nimterop:
================
Running: nim cpp --hints:off -d:checkAbi -r tests/tast2.nim
# Importing /data/data/com.termux/files/home/temp/nimterop/tests/include/tast2.h
# Saved to /data/data/com.termux/files/home/temp/nimterop/tests/tast2wrapped.nim
Ran: nim cpp --hints:off -d:checkAbi -r tests/tast2.nim
Time taken: 1 second, 798 milliseconds, 539 microseconds, and 345 nanoseconds
stack trace: (most recent call last)
/data/data/com.termux/files/home/nimblecache-0/nimscriptapi_1260671386.nim(187, 16)
/data/data/com.termux/files/home/temp/nimterop/nimterop.nimble(99, 12) testTask
/data/data/com.termux/files/home/temp/nimterop/nimterop.nimble(58, 12) basicTask
/data/data/com.termux/files/home/temp/nimterop/nimterop.nimble(31, 14) execTest
/data/data/com.termux/files/home/temp/nimterop/nimterop/docs.nim(72, 22) buildDocs
/data/data/com.termux/files/home/temp/nimterop/nimterop/docs.nim(33, 11) execAction
/data/data/com.termux/files/usr/lib/nim/lib/system/assertions.nim(30, 26) failedAssertImpl
/data/data/com.termux/files/usr/lib/nim/lib/system/assertions.nim(23, 11) raiseAssert
/data/data/com.termux/files/usr/lib/nim/lib/system/fatal.nim(49, 5) sysFatal
/data/data/com.termux/files/usr/lib/nim/lib/system/fatal.nim(49, 5) Error: unhandled exception: /data/data/com.termux/files/home/temp/nimterop/nimterop/docs.nim(33, 12) `ret == 0` Command failed: 1
cmd: /data/data/com.termux/files/usr/lib/nim/bin/nim doc --hints:off -o:/data/data/com.termux/files/home/temp/nimterop/build/html_tast2_docs --project --index:on /data/data/com.termux/files/home/temp/nimterop/tests/tast2.nim
result:
getDocHacksJs: cmd: /data/data/com.termux/files/usr/lib/nim/bin/nim js -d:release /data/data/com.termux/files/usr/lib/nim/tools/dochack/dochack.nim
oserr.nim(94) raiseOSError
Error: unhandled exception: No such file or directory
Additional info: "/data/data/com.termux/files/usr/lib/nim/tools/dochack" [OSError]
fatal.nim(49) sysFatal
Error: unhandled exception: nimpaths.nim(45, 14) `execShellCmd(cmd) == 0` /data/data/com.termux/files/usr/lib/nim/bin/nim js -d:release /data/data/com.termux/files/usr/lib/nim/tools/dochack/dochack.nim [AssertionDefect] [AssertionDefect]
Tip: 1 messages have been suppressed, use --verbose to show them.
Error: Exception raised during nimble script execution
nimgit2:
# Removing /data/data/com.termux/files/home/.cache/nim/nimterop/nimgit2/libgit2Dyn
# Downloading v1.0.0.zip
# Extracting v1.0.0.zip
stack trace: (most recent call last)
/data/data/com.termux/files/home/.nimble/pkgs/nimterop-0.6.11/nimterop/build/getheader.nim(482, 23)
/data/data/com.termux/files/home/.nimble/pkgs/nimterop-0.6.11/nimterop/build/getheader.nim(235, 11) buildLibrary
/data/data/com.termux/files/usr/lib/nim/lib/system/assertions.nim(30, 26) failedAssertImpl
/data/data/com.termux/files/usr/lib/nim/lib/system/assertions.nim(23, 11) raiseAssert
/data/data/com.termux/files/usr/lib/nim/lib/system/fatal.nim(49, 5) sysFatal
/data/data/com.termux/files/home/temp/nimgit2/nimgit2.nim(27, 10) template/generic instantiation of `getHeader` from here
/data/data/com.termux/files/usr/lib/nim/lib/system/fatal.nim(49, 5) Error: unhandled exception: /data/data/com.termux/files/home/.nimble/pkgs/nimterop-0.6.11/nimterop/build/getheader.nim(235, 12) `buildStatus.built`
Build configuration failed - No build files found in /data/data/com.termux/files/home/.cache/nim/nimterop/nimgit2/libgit2Dyn
[AssertionDefect]
stack trace: (most recent call last)
/data/data/com.termux/files/home/nimblecache-0/nimscriptapi_1260671386.nim(187, 16)
/data/data/com.termux/files/home/temp/nimgit2/nimgit2.nimble(44, 14) testTask
/data/data/com.termux/files/home/temp/nimgit2/nimgit2.nimble(27, 8) testDynTask
/data/data/com.termux/files/usr/lib/nim/lib/system/nimscript.nim(260, 7) exec
/data/data/com.termux/files/usr/lib/nim/lib/system/nimscript.nim(260, 7) Error: unhandled exception: FAILED: nim c -f -d:git2DL -d:git2SetVer=1.0.0 --path:.. -r tests/tnimgit2.nim [OSError]
Tip: 1 messages have been suppressed, use --verbose to show them.
Error: Exception raised during nimble script execution
Do you want to see if you can even build libgit2 manually? I can only assume that it is supported on aarch64, but if you cannot build it, there's no point in debugging nimterop. If you can, then you may be able use that copy of the library instead. I'm not sure Nimph is worth the headache, honestly.
cc @genotrance
I've built libgit2 and that error is gone but this happens now 🤦
<... other cc logs ...>
CC: nimph.nim
Killed
unable to build nimph
Neat! Out of memory?
Yea it seems like it. Thanks for the help!
Can you use a swapfile? I think Nim uses something like 1.1gig of memory to compile Nimph on my machine.
Is this termux specific error? (I can't use a pc right now)