Unable to install ocamlfind #5880

Closed
hgouraud opened this Issue Mar 4, 2016 · 12 comments

Projects

None yet

8 participants

@hgouraud
Contributor
hgouraud commented Mar 4, 2016

Opam installed succesfully on a Mac Air, El Capitan (10.11)
Ocaml and camlp5 installed succesfully.
Failed to install ocamlfinf!!!

MacAir-H:~ Henri$ opam install ocamlfind
The following actions will be performed:
  ∗  install conf-pkg-config 1.0              [required by conf-ncurses]
  ∗  install conf-ncurses    1                [required by ocamlfind]
  ∗  install ocamlfind       1.6.1
===== ∗  3 =====
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫 
[ocamlfind] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫 
[ERROR] The compilation of conf-pkg-config failed at "pkg-config --help".

#=== ERROR while installing conf-pkg-config.1.0 ===============================#
# opam-version 1.2.2
# os           darwin
# command      pkg-config --help
# path         /Users/Henri/ocamlbrew/ocaml-4.02.3/.opam/4.02.1/build/conf-pkg-config.1.0
# compiler     4.02.1
# exit-code    127
# env-file     /Users/Henri/ocamlbrew/ocaml-4.02.3/.opam/4.02.1/build/conf-pkg-config.1.0/conf-pkg-config-79808-7afd23.env
# stdout-file  /Users/Henri/ocamlbrew/ocaml-4.02.3/.opam/4.02.1/build/conf-pkg-config.1.0/conf-pkg-config-79808-7afd23.out
# stderr-file  /Users/Henri/ocamlbrew/ocaml-4.02.3/.opam/4.02.1/build/conf-pkg-config.1.0/conf-pkg-config-79808-7afd23.err



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫 
The following actions were aborted
  ∗  install conf-ncurses 1    
  ∗  install ocamlfind    1.6.1
The following actions failed
  ∗  install conf-pkg-config 1.0
No changes have been performed

=-=- conf-pkg-config.1.0 troobleshooting =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫 
=> This package relies on external (system) dependencies that may be missing. `opam depext conf-pkg-config.1.0' may help you find the correct installation for your
   system.
MacAir-H:~ Henri$ 

Running opam depext shows no dependency missing

Regards
Henri

@micksulley

I have the same issue on Raspbian. opam install conf-m4.1 fails

=-=- conf-m4.1 troobleshooting =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing. `opam depext
   conf-m4.1' may help you find the correct installation for your system.

 but

pi@raspberrypi:~/geneweb $ opam depext
# Detecting depexts using flags: arm armv7 linux raspbian
# No extra OS packages requirements found.
@avsm
Member
avsm commented Mar 6, 2016

The issue is here is that raspbian is not a recognised external OS. It ought to be mapped onto debian for now.

@dsheets dsheets added a commit to dsheets/opam-depext that referenced this issue Mar 6, 2016
@dsheets dsheets Add raspbian as a distro synonym for Debian 34749c0
@dsheets dsheets referenced this issue in ocaml/opam-depext Mar 6, 2016
Merged

Add raspbian as a distro synonym for Debian #41

@pirbo
Contributor
pirbo commented Mar 7, 2016

Same issue!
I would say that the problem is that the "build" command of cons-ncurses is

["pkg-config" "ncurses"] { os != "darwin" & os != "freebsd" & os != "netbsd" & os != "openbsd" }

therefore the depend line should be

"conf-pkg-config" { os != "darwin" & os != "freebsd" & os != "netbsd" & os != "openbsd" }

which is not possible I guess (I don't find the formal description of in opam manual)

Anyway, this is super annoying to have lost ocamlfind and all these reverse dependencies with no possible foldback !!!

@OCamlPro-Henry OCamlPro-Henry added a commit to OCamlPro-Henry/opam-repository that referenced this issue Mar 7, 2016
@OCamlPro-Henry OCamlPro-Henry conf-ncurses: Do not depend on `conf-pkg-config` when not required
This is a fix for:

  ocaml#5880 (comment)

which was introduced in PRs:

- ocaml#5854
- ocaml#5851
b309917
@OCamlPro-Henry OCamlPro-Henry added a commit to OCamlPro-Henry/opam-repository that referenced this issue Mar 7, 2016
@OCamlPro-Henry OCamlPro-Henry conf-ncurses: Do not depend on `conf-pkg-config` when not required
This is a fix for:

  ocaml#5880 (comment)
34c2e17
@OCamlPro-Henry
Contributor

Well, the constraint in the depends is possible and should have been there already... It should be fixed by #5898.

@OCamlPro-Henry
Contributor

I am surprised this error has not been caught by the CI.

@pirbo
Contributor
pirbo commented Mar 7, 2016

Thanks very much for reactivity!
Well I've been bitten by that already: travis OS X nodes install their dependencies through homebrew
and as soon as you've installed something through home-brew, you've got pkg-config :-)

@OCamlPro-Henry
Contributor

Hmm, I might have spoken too fast (or too late in the evening) :-( adding the "os" predicate in depends made the dependency ignored on linux too.

@AltGr what am I missing here ?

@OCamlPro-Henry OCamlPro-Henry added a commit to OCamlPro-Henry/opam-repository that referenced this issue Mar 8, 2016
@OCamlPro-Henry OCamlPro-Henry conf-ncurses: Do not depend on `conf-pkg-config` when not required
This is a fix for:

  ocaml#5880 (comment)

A simpler fix would be to have a single package, and to add a "filter"
on the `conf-pkg-config` dependency. Unfortunatly, this kind of filter
is not yet possible.
7916cde
@rathereasy

I'm on Ubuntu 15.04 and I'm getting the "The compilation of conf-pkg-config.1.0 failed" error. Is there a quick fix to this?

@jstolarek
Contributor

Getting the same error on openSUSE 11.4. I have pkg-config and development versions of ncurses installed.

@jstolarek
Contributor

I have diagnosed the cause, at least on my system. It turns out that older versions of ncurses (5.7 on my machine) don't come with *.pc files for pkg-config. A workaround for me was to get sources of ncurses 6.0 and build it with --enable-pc-files. For some reason on my machine the script generated by make to create the *.pc files (located at misc/gen-pkgconfig) did not have permissions to execute and so the files were not generated during the build. I had to run the script manually. Then I had to edit the *pc files to match version of ncurses installed on my machine (obtained with ncurses5-config --version) and copy those files to /usr/share/pkgconfig.

@gasche
Member
gasche commented Jun 1, 2016

It seems that older versions of ncurses use a special-purpose ncurses5-config script instead of pkg-config. So we could alternatively try that instead of pkg-config in the conf-ncurses package. I don't have the time to try to implement such a package right now, but if I (or someone else) does it, would you maybe be able to test the result?

@hgouraud
Contributor
hgouraud commented Jun 1, 2016

Yes, to the best of my ability, which is limited!!

Henri

Envoyé de mon iPhone

Le 1 juin 2016 à 04:14, Gabriel Scherer notifications@github.com a écrit :

It seems that older versions of ncurses use a special-purpose ncurses5-config script instead of pkg-config. So we could alternatively try that instead of pkg-config in the conf-ncurses package. I don't have the time to try to implement such a package right now, but if I (or someone else) does it, would you maybe be able to test the result?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@gasche gasche added a commit to gasche/opam-repository that referenced this issue Jun 2, 2016
@gasche gasche ocamlfind does not depend on ncurses
There have been several installation issues with ocamlfind recently due
to the fact that conf-ncurses uses pkg-config to check installability,
which is only valid under recent ncurses versions. But in fact ocamlfind
does not depend on ncurses at all (I just checked with Gerd Stolpmann),
so there is no reason for the dependency in the first place.

fixes #5880
b15bb12
@lefessan lefessan closed this in #6657 Jun 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment