golden
golden copied to clipboard
Can't install with nimble: nimterop versions
Trying to install golden with nimble, to use it with nim 1.4, raise an install error on nimterop versions:
$ nimble install golden --verbose | grep -B 5 -A 2 nimterop
Reading official package list
Checking for nimgit2@>= 0.3.1 & < 0.4.0
Info: Dependency on nimgit2@>= 0.3.1 & < 0.4.0 already satisfied
Verifying dependencies for [email protected]
Reading official package list
Checking for nimterop@>= 0.6.3
Info: Dependency on nimterop@>= 0.6.3 already satisfied
Verifying dependencies for [email protected]
Reading official package list
Checking for regex@>= 0.15.0
--
Reading official package list
Checking for https://github.com/disruptek/badresults@< 2.0.0
Info: Dependency on https://github.com/disruptek/badresults@< 2.0.0 already satisfied
Verifying dependencies for [email protected]
Reading official package list
Checking for nimterop@<= 0.6.12
Info: Dependency on nimterop@<= 0.6.12 already satisfied
Verifying dependencies for [email protected]
Reading official package list
Checking for regex@>= 0.15.0
--
Verifying dependencies for [email protected]
Reading official package list
Checking for unicodedb@>= 0.8.0
Info: Dependency on unicodedb@>= 0.8.0 already satisfied
Verifying dependencies for [email protected]
Error: Cannot satisfy the dependency on nimterop 0.6.12 and nimterop 0.6.13
I can't find which package requires nimterop 0.6.12 and why such a version restriction has been set.
https://github.com/disruptek/golden/blob/2bfc46e1565655d6e6256d0f441377eb232adb00/golden.nimble#L12 needs to change to <= 0.6.12
. That's what gittyup needs as well.
How is it that the requires
statement doesn't match 0.6.12
? It's clearly more than 0.6.2 and less than 1.0.0. nimterop-0.6.13
is installed for some reason but I don't know why Nimble thinks that is relevant...
It looks like this issue: https://github.com/nim-lang/nimble/issues/505
Log says both nimterop v0.6.12 and v0.6.13 are installed already but the dependency checker picks both versions and then dies at the end. I've not dabbled with the dependency code so cc @dom96.
I guess one solution is to use Nimph; another is to use Nimble in localdeps mode so it has no redundant copies of nimterop. A third way might be to manually edit the requirements to remove any version other than 0.6.12. A fourth solution would be to remove nimterop 0.6.13 from your global nimble package directory.
Yeah, this is a bug. Seems like simply picking the minimal version might help, but would need to take a look at the code again to know.
I was able to complete installation using the fourth solution: nimble uninstall [email protected]
.
Perhaps you should list in the README the external dependencies, for Ubuntu 20.04:
- cmake
- libssl-dev
- libgit2-28
Now, even if golden binary has been created, I can't run it:
$ golden
could not load: /tmp/nimble_11044/githubcom_disruptekgolden/libgit2.so
(compile with -d:nimDebugDlOpen for more information)
I'm also unable to regenerate it with $ ǹimble build -d:nimDebugDlOpen golden
. nimble
finds that the package is up to date and does not rebuild it.
I've tried bypassing the libgit2 library with $ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgit2.so.28.3 golden
without success. Well, I'm stuck!
This is a nimterop bug I forgot about - I'll get back to you on it.
@disruptek are you okay with switching to static linking libgit2? -d:git2Static should avoid this issue.
https://github.com/disruptek/golden/blob/master/src/golden.nim.cfg#L16
I'm okay with someone else using git2Static
, but it has never worked for me.