Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install with nimble: nimterop versions #21

Open
pmetras opened this issue Oct 22, 2020 · 8 comments
Open

Can't install with nimble: nimterop versions #21

pmetras opened this issue Oct 22, 2020 · 8 comments

Comments

@pmetras
Copy link

pmetras commented Oct 22, 2020

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 nimgit2@0.3.2
    Reading official package list
   Checking for nimterop@>= 0.6.3
      Info: Dependency on nimterop@>= 0.6.3 already satisfied
  Verifying dependencies for nimterop@0.6.13
    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 badresults@1.0.0
    Reading official package list
   Checking for nimterop@<= 0.6.12
      Info: Dependency on nimterop@<= 0.6.12 already satisfied
  Verifying dependencies for nimterop@0.6.12
    Reading official package list
   Checking for regex@>= 0.15.0
--
  Verifying dependencies for segmentation@0.1.0
    Reading official package list
   Checking for unicodedb@>= 0.8.0
      Info: Dependency on unicodedb@>= 0.8.0 already satisfied
  Verifying dependencies for unicodedb@0.9.0
     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.

@genotrance
Copy link
Collaborator

requires "nimterop >= 0.6.2 & < 1.0.0"
needs to change to <= 0.6.12. That's what gittyup needs as well.

@disruptek
Copy link
Owner

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...

@genotrance
Copy link
Collaborator

It looks like this issue: nim-lang/nimble#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.

@disruptek
Copy link
Owner

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.

@dom96
Copy link

dom96 commented Oct 22, 2020

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.

@pmetras
Copy link
Author

pmetras commented Oct 23, 2020

I was able to complete installation using the fourth solution: nimble uninstall nimble@0.6.13.

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!

@genotrance
Copy link
Collaborator

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

@disruptek
Copy link
Owner

I'm okay with someone else using git2Static, but it has never worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants