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

Error while installing cppo_ocamlbuild package via OPAM #63

Closed
db4 opened this issue Sep 17, 2018 · 5 comments
Closed

Error while installing cppo_ocamlbuild package via OPAM #63

db4 opened this issue Sep 17, 2018 · 5 comments

Comments

@db4
Copy link

db4 commented Sep 17, 2018

I'm trying to install cppo_ocamlbuild for OCaml 4.02.3 via OPAM. With dune 1.0.0 it worked but now (after upgrade to dune 1.2.0) I get an error:

#=== ERROR while installing cppo_ocamlbuild.1.6.0 =============================#
# opam-version 1.2.2
# os           linux
# command      jbuilder build -p cppo_ocamlbuild -j 4
# path         /home/dbely/.opam/4.02.3+local+gcc5+x64+fpic/build/cppo_ocamlbuild.1.6.0
# compiler     4.02.3+local+linux+fpic
# exit-code    1
# env-file     /home/dbely/.opam/4.02.3+local+gcc5+x64+fpic/build/cppo_ocamlbuild.1.6.0/cppo_ocamlbuild-28557-320155.env
# stdout-file  /home/dbely/.opam/4.02.3+local+gcc5+x64+fpic/build/cppo_ocamlbuild.1.6.0/cppo_ocamlbuild-28557-320155.out
# stderr-file  /home/dbely/.opam/4.02.3+local+gcc5+x64+fpic/build/cppo_ocamlbuild.1.6.0/cppo_ocamlbuild-28557-320155.err
### stderr ###
# [...]
# 5 | (ocamlyacc (cppo_parser))
#     ^^^^^^^^^^^^^^^^^^^^^^^^^
# Warning: File cppo_parser.mli is both generated by a rule and present in the source tree.
# As a result, the rule is currently ignored, however this will become an error in the future.
# To keep the current behavior and get rid of this warning, add a field (fallback) to the rule.
# File "ocamlbuild_plugin/jbuild", line 8, characters 14-24:
# 8 |   (libraries (ocamlbuild))))
#                   ^^^^^^^^^^
# Error: Library "ocamlbuild" not found.
# Hint: try: dune external-lib-deps --missing -p cppo_ocamlbuild @install
@db4
Copy link
Author

db4 commented Oct 11, 2018

OK, I've finally found the problem. cppo_ocamlbuild actually requires ocamlfind to find ocamlbuild library, which is not specified in its dependencies. So then I deploy OPAM and packages in a fresh environment, ocamlfind may not be installed before cppo_ocamlbuild build.

@mjambon
Copy link
Member

mjambon commented Oct 11, 2018

I'm no ocamlbuild user myself. I see there's an ocamlbuild-pkg which seems to have the correct dependencies. So, perhaps the fix is to replace the ocamlbuild dependency by ocamlbuild-pkg in the opam package for cppo_ocamlbuild. Please confirm and/or submit a pull request to opam-repository.

@db4
Copy link
Author

db4 commented Oct 12, 2018

Someone else has independently found and fixed that: ocaml/opam-repository#12640

@mjambon
Copy link
Member

mjambon commented Oct 12, 2018

Great. The corresponding PR is at ocaml/opam-repository#12782.
We can close this issue when that PR gets merged.

@db4
Copy link
Author

db4 commented Jul 31, 2019

ocaml/opam-repository#12782 is merged so closing the issue.

@db4 db4 closed this as completed Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants