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

Libargon2 does not properly update LD_LIBRARY_PATH (Fatal error: exception Dl.DL_error("libargon2.so.1: cannot open shared object file: No such file or directory")) #277559

Closed
MarcCoquand opened this issue Dec 29, 2023 · 3 comments
Labels
0.kind: bug Something is broken

Comments

@MarcCoquand
Copy link

Describe the bug

A clear and concise description of what the bug is.

I currently am trying to use Libargon for my project as a system dependency. It installs without fail, however, I get errors when I try to run my program that depends on it I get the error

Fatal error: exception Dl.DL_error("libargon2.so.1: cannot open shared object file: No such file or directory")

I was able to resolve it on linux by adding the flag

export LD_LIBRARY_PATH=$(nix eval --raw nixpkgs#libargon2.outPath)/lib:$LD_LIBRARY_PATH

However, this doesn't solve the issue for OS X, where I get the error

Fatal error: exception Dl.Dl_error("dlopen(libargon2.so.1, 0x000A): tried: 'libargon2.so.1' (no such file)

Which with my limited knowledge I assume is due to it missing from the OS X library path.

@MarcCoquand MarcCoquand added the 0.kind: bug Something is broken label Dec 29, 2023
@eclairevoyant
Copy link
Contributor

It installs without fail

How are you installing libargon? And can you provide a sample nix expression that reproduces this issue?

@MarcCoquand
Copy link
Author

MarcCoquand commented Dec 30, 2023

Hey! I created a minimal repo here that reproduces the error with direnv.

https://git.sr.ht/~marcc/minimalerror (The link to clone, you can see the source code under tree)

If you install everything then run

dune build 
dune exec -- _build/default/bin/main.exe

Then you will get the error I posted above. It includes the nix flake and everything.

@MarcCoquand
Copy link
Author

This is caused by a downstream issue, where the library I use does not correctly reference libargon2 (ocaml/opam-repository#24314). As such I am closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants