Closed thangngoc89 closed 3 years ago
@osener have you tried on macos and linux with your PR?
@Khady I tried on macos 10.14.6 and it works for me
Just want to give a brief update, this new commit fails on CI (Github Actions, Ubuntu, with libargon2-0
) installed.
I will add some debug statements and re-run the CI job tomorrow.
error: build failed with exit code: 1
build log:
# esy-build-package: building: @opam/argon2@github:osener/ocaml-argon2:argon2.opam#ee70501
# esy-build-package: pwd: /home/runner/.esy/3/b/opam__s__argon2-afe3e6f2
# esy-build-package: running: 'dune' 'build' '-p' 'argon2' '-j' '4' '@install'
Error: Command failed: esy build-dependencies
ocamlopt src/argon2.cmxs (exit 2)
(cd _build/default && /home/runner/.esy/3__________________________________________________________________/i/ocaml-4.12.0-bfdfbfff/bin/ocamlopt.opt -w -40 -cclib -largon2 -g -shared -linkall -I src -o src/argon2.cmxs src/argon2.cmxa)
/usr/bin/ld: cannot find -largon2
/usr/bin/ld: cannot find -largon2
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking (exit code 1)
error: command failed: 'dune' 'build' '-p' 'argon2' '-j' '4' '@install' (exited with 1)
esy-build-package: exiting with errors above...
building @opam/argon2@github:osener/ocaml-argon2:argon2.opam#ee70501
Do you have libargon2-0-dev
installed as well?
@osener thank you. That fixed the error.
This library doesn't work on macOS 10.14.6 . argon2 is installed via homebrew.
Changing the
Dl.open
call here https://github.com/Khady/ocaml-argon2/blob/master/src/argon2.ml#L5 fromlibargon2.1.so
tolibargon2.1.dylib
fixes the issue.I'm willing to send a PR to fix this but I'm not sure how to do this. Please advice on the proper fix that works cross-platform