ocaml / opam-repository

Main public package repository for opam, the source package manager of OCaml.
https://opam.ocaml.org
Creative Commons Zero v1.0 Universal
518 stars 1.14k forks source link

When installing "conf-gtk3.18", error "This package requires gtk+ 3.0 development packages installed on your system", while it is installed #23435

Open ckeller opened 1 year ago

ckeller commented 1 year ago

Hello I am running Linux debian sid. When I try to install conf-gtk3.18, I get the error "This package requires gtk+ 3.0 development packages installed on your system", but libgtk-3-dev and libgtksourceview-3.0-dev are both installed on my system. Do I miss some system package? Many thanks!

kit-ty-kate commented 1 year ago

What version of opam do you have? What is the actual build failure message (the section starting with ### ERROR conf-gtk3.18) ?

ckeller commented 1 year ago

Hi @kit-ty-kate The version of opam is 2.1.2. Here is the complete output:

$ opam install conf-gtk3.18
The following actions will be performed:
  ∗ install conf-gtk3 18

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of conf-gtk3.18 failed at "pkg-config --short-errors --print-errors --atleast-version 3.18 gtk+-3.0".

#=== ERROR while compiling conf-gtk3.18 =======================================#
# context     2.1.2 | linux/x86_64 | ocaml-base-compiler.4.09.0 | https://opam.ocaml.org#9927cc26
# path        ~/.opam/s02/.opam-switch/build/conf-gtk3.18
# command     ~/.opam/opam-init/hooks/sandbox.sh build pkg-config --short-errors --print-errors --atleast-version 3.18 gtk+-3.0
# exit-code   1
# env-file    ~/.opam/log/conf-gtk3-9197-1df69d.env
# output-file ~/.opam/log/conf-gtk3-9197-1df69d.out
### output ###
# Package 'gtk+-3.0' was not found

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build conf-gtk3 18
└─ 
╶─ No changes have been performed

<><> conf-gtk3.18 troubleshooting <><><><><><><><><><><><><><><><><><><><><><><>
=> This package requires gtk+ 3.0 development packages installed on your system
kit-ty-kate commented 1 year ago

That's really weird. According to https://packages.debian.org/sid/amd64/libgtk-3-dev/filelist /usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-3.0.pc is installed and should be found by pkg-config.

Do you have any PKG_CONFIG_* variables defined in your environment?

ckeller commented 1 year ago

According to the generated .env file: PKG_CONFIG_PATH=HOME/.opam/SWITCH/lib/pkgconfig where HOME is my home and SWITCH is the name of the current switch. May it be the problem?