pkg-config is installed.

which pkg-config yields:
/usr/bin/pkg-config

How can I make sure that "the command will return meaningful compilation and linking flags for the required
packages"?

Regards,
Johan


2016-03-01 14:01 GMT+09:00 Markus Mottl <markus.mottl@gmail.com>:
Considering that two unrelated packages are apparently failing on the
exact same command (pkg-config), I assume that this is the source of
the problem.  Maybe `pkg-config` needs to be installed first, or the
right one needs to be in your path.  Just make sure the command will
return meaningful compilation and linking flags for the required
packages, and installation through OPAM should work.

Regards,
Markus

On Mon, Feb 29, 2016 at 11:50 PM, Johan Mazel <johan.mazel@gmail.com> wrote:
> Hi
> First of all, I am not sure if I am writing this to the correct mailing
> list. If not, please tell me where should I send this.
>
> I am trying to install gsl (https://opam.ocaml.org/packages/gsl/gsl.1.19.1/)
> with opam.
> I previously installed OCaml 4.02.3 with opam.
>
> I get this message error when I do "opam install gsl":
>
> The following actions will be performed:
>   ∗  install conf-ncurses 1                   [required by ocamlfind]
>   ∗  install conf-gsl     1                   [required by gsl]
>   ∗  install ocamlfind    1.6.1               [required by gsl]
>   ∗  install gsl          1.19.1
> ===== ∗  4 =====
> Do you want to continue ? [Y/n] y
>
> =-=- Gathering sources
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> [gsl] Archive in cache
> [ocamlfind] Archive in cache
>
> =-=- Processing actions
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> [ERROR] The compilation of conf-gsl failed at "pkg-config gsl".
> [ERROR] The compilation of conf-ncurses failed at "pkg-config ncurses".
>
> #=== ERROR while installing conf-gsl.1
> ========================================#
> # opam-version 1.2.2
> # os           linux
> # command      pkg-config gsl
> # path         /home/jmazel/.opam/4.02.3/build/conf-gsl.1
> # compiler     4.02.3
> # exit-code    127
> # env-file
> /home/jmazel/.opam/4.02.3/build/conf-gsl.1/conf-gsl-10926-5f1023.env
> # stdout-file
> /home/jmazel/.opam/4.02.3/build/conf-gsl.1/conf-gsl-10926-5f1023.out
> # stderr-file
> /home/jmazel/.opam/4.02.3/build/conf-gsl.1/conf-gsl-10926-5f1023.err
>
>
> #=== ERROR while installing conf-ncurses.1
> ====================================#
> # opam-version 1.2.2
> # os           linux
> # command      pkg-config ncurses
> # path         /home/jmazel/.opam/4.02.3/build/conf-ncurses.1
> # compiler     4.02.3
> # exit-code    127
> # env-file
> /home/jmazel/.opam/4.02.3/build/conf-ncurses.1/conf-ncurses-10926-58c514.env
> # stdout-file
> /home/jmazel/.opam/4.02.3/build/conf-ncurses.1/conf-ncurses-10926-58c514.out
> # stderr-file
> /home/jmazel/.opam/4.02.3/build/conf-ncurses.1/conf-ncurses-10926-58c514.err
> ### stdout ###
>
>
>
>
> =-=- Error report
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> The following actions were aborted
>   ∗  install gsl       1.19.1
>   ∗  install ocamlfind 1.6.1
> The following actions failed
>   ∗  install conf-gsl     1
>   ∗  install conf-ncurses 1
> No changes have been performed
>
> =-=- conf-gsl.1 troobleshooting
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> => This package relies on external (system) dependencies that may be
> missing. `opam depext conf-gsl.1' may help you find the correct installation
> for
>    your system.
>
> =-=- conf-ncurses.1 troobleshooting
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> => This package relies on external (system) dependencies that may be
> missing. `opam depext conf-ncurses.1' may help you find the correct
> installation
>    for your system.
>
> opam depext conf-gsl.1 yields:
> # Detecting depexts using flags: x86_64 linux debian
> # The following system packages are needed:
> #  - libgsl0-dev
> Not running as root, the following command will be run through "sudo":
>     apt-get install -qq -yy libgsl0-dev
> # OS packages installation successful
>
> opam depext conf-ncurses.1 yields:
> # Detecting depexts using flags: x86_64 linux debian
> # The following system packages are needed:
> #  - ncurses-dev
> Not running as root, the following command will be run through "sudo":
>     apt-get install -qq -yy ncurses-dev
> # OS packages installation successful
>
> If I rerun "opam install gsl", I get the same output as above.
> And no matter how many times I run "opam depext conf-gsl.1" and "opam depext
> conf-ncurses.1", no new packages are installed.
>
> libncurses5-dev is installed. Its version is 6.0+20160213-1.
> libgsl-dev is installed. Its version is 2.1+dfsg-2.
>
> As a side note, on my system compiler (4.02.3), libocamlgsl-ocaml-dev is
> installed and it has no dependency problems.
>
> Thank you very much for your time.
> Regards,
> Johan
>
>
>
>



--
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com