Infer configure scripts are unable to find the oUnit library even though it is installed
- Dominant language
- OCaml
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 19h 36m
- Merged PRs (30d)
- 13
Description
I've been trying to get Infer to install on Gentoo Linux from an ebuild I created myself, but it is unable to find the oUnit library (dune) even though it is properly installed.
See:
```
equery files dev-ml/ounit2
[...]
/usr/lib64/ocaml/ounit2/dune-package
/usr/lib64/ocaml/ounit2/oUnit.a
/usr/lib64/ocaml/ounit2/oUnit.cma
/usr/lib64/ocaml/ounit2/oUnit.cmi
/usr/lib64/ocaml/ounit2/oUnit.cmt
/usr/lib64/ocaml/ounit2/oUnit.cmti
/usr/lib64/ocaml/ounit2/oUnit.cmx
/usr/lib64/ocaml/ounit2/oUnit.cmxa
/usr/lib64/ocaml/ounit2/oUnit.cmxs
/usr/lib64/ocaml/ounit2/oUnit.ml
/usr/lib64/ocaml/ounit2/oUnit.mli
/usr/lib64/ocaml/ounit2/oUnit2.cmi
/usr/lib64/ocaml/ounit2/oUnit2.cmt
/usr/lib64/ocaml/ounit2/oUnit2.cmti
/usr/lib64/ocaml/ounit2/oUnit2.cmx
/usr/lib64/ocaml/ounit2/oUnit2.ml
/usr/lib64/ocaml/ounit2/oUnit2.mli
[...]
```
The content of the dune package installed by dev-ml/ounit2::gentoo is the following:
[ounit2_dune-package.txt](https://github.com/user-attachments/files/24399354/ounit2_dune-package.txt)
As you can see the DUNE package for oUnit seems to be called ounit2 and not oUnit.
This is the same for the examples in the ounit github repository:
https://github.com/gildor478/ounit/blob/master/examples/dune
So maybe you should oUnit by ounit2 in your dune package dependencies?
See the full logs:
[ebuild_infer_clean_compile.txt](https://github.com/user-attachments/files/24399366/ebuild_infer_clean_compile.txt)
EDIT:
The faulty line is that one:
https://github.com/facebook/infer/blob/e77c0efb365b34ef071b297a5d4231312acefdf2/configure.ac#L336
I replaced it by `AC_ASSERT_OCAML_PKG([ounit2])` and it worked.
Contributor guide
Assessment
This issue has not been assessed yet.