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

Package manager breaks if your current pwd contains a file or directory called "libgit2" #51293

Closed
Keno opened this issue Sep 13, 2023 · 1 comment · Fixed by #51294
Closed
Labels
libgit2 The libgit2 library or the LibGit2 stdlib module
Milestone

Comments

@Keno
Copy link
Member

Keno commented Sep 13, 2023

$ mkdir libgit2; julia -e 'using Pkg; Pkg.update()'
    Updating registry at `~/.julia/registries/General.toml`
ERROR: could not load library "libgit2"
libgit2: cannot open shared object file: No such file or directory
Stacktrace:
  [1] macro expansion
    @ ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/LibGit2/src/error.jl:109 [inlined]
  [2] initialize()
    @ LibGit2 ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/LibGit2/src/LibGit2.jl:986
  [3] (::LibGit2.var"#162#163")()
    @ LibGit2 ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/LibGit2/src/LibGit2.jl:975
  [4] lock(f::LibGit2.var"#162#163", l::ReentrantLock)
    @ Base ./lock.jl:229
  [5] ensure_initialized
    @ ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/LibGit2/src/LibGit2.jl:971 [inlined]

This is caused by a combination of:

  1. The LibGit2 stdlib uses plain libgit2 as the library name
  2. We stat the literal name passed in jl_dlopen and don't query the extensions if the file exists
@Keno Keno added the libgit2 The libgit2 library or the LibGit2 stdlib module label Sep 13, 2023
@Keno Keno added this to the 1.10 milestone Sep 13, 2023
@ygol55
Copy link

ygol55 commented Sep 14, 2023

It worked for me when copying the exact command that you've written. You should check if there's some problem with you're connection or computer, or you should be more specific about your problem

IanButterworth pushed a commit that referenced this issue Sep 16, 2023
nalimilan pushed a commit that referenced this issue Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libgit2 The libgit2 library or the LibGit2 stdlib module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants