Issue when installing lablgtk with opam

250 views Asked by At

I'l trying to install a package (https://github.com/SchornacklabSLCU/amfinder) that use opam to install several libraries. However, two libraries failed to install: lablgtk and cairo2-gtk.I tried to install these two directly via opam (opam install labgtk) but got the same error:

User configuration:
  ~/.profile is already up-to-date.
[NOTE] Make sure that ~/.profile is well sourced in your ~/.bashrc.

[ERROR] There already is an installed switch named 4.08.0
[NOTE] Package camlzip is already installed (current version is 1.11).
[NOTE] Package magic-mime is already installed (current version is 1.2.0).
[NOTE] Package cairo2 is already installed (current version is 0.6.2).
[NOTE] Package odoc is already installed (current version is 2.0.0).
[NOTE] Package dune is already installed (current version is 2.9.1).
The following actions will be performed:
  ∗ install lablgtk    2.18.11
  ∗ install cairo2-gtk 0.6.2
===== ∗ 2 =====
Do you want to continue? [Y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved cairo2-gtk.0.6.2  (cached)
⬇ retrieved lablgtk.2.18.11  (cached)
[ERROR] The compilation of lablgtk.2.18.11 failed at "./configure --prefix /home/alr/.opam/4.08.0
        LABLGLDIR=/home/alr/.opam/4.08.0/lib/lablgl".

#=== ERROR while compiling lablgtk.2.18.11 ====================================#
# context     2.1.1 | linux/x86_64 | ocaml-base-compiler.4.08.0 | https://opam.ocaml.org#03fce048
# path        ~/.opam/4.08.0/.opam-switch/build/lablgtk.2.18.11
# command     ~/.opam/opam-init/hooks/sandbox.sh build ./configure --prefix /home/alr/.opam/4.08.0 LABLGLDIR=/home/alr/.opam/4.08.0/lib/lablgl
# exit-code   1
# env-file    ~/.opam/log/lablgtk-16902-8d49b3.env
# output-file ~/.opam/log/lablgtk-16902-8d49b3.out
### output ###
# [...]
# checking native dynlink... checking for pkg-config... /home/linuxbrew/.linuxbrew/bin/pkg-config
# checking for GTK+ - version >= 2.0.0...
# *** 'pkg-config --modversion gtk+-2.0' returned 2.24.33, but GTK+ (2.24.32)
# *** was found! If pkg-config was correct, then it is best
# *** to remove the old version of GTK+. You may also be able to fix the error
# *** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
# *** /etc/ld.so.conf. Make sure you have run ldconfig if that is
# *** required on your system.
# *** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
# *** to point to the correct configuration files
# no
# configure: error: GTK+ is required



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build lablgtk 2.18.11
└─
╶─ No changes have been performed

<><> lablgtk.2.18.11 troubleshooting ><><><><><><><><><><><><><><><><><><><><><>
=> This package requires gtk+ 2.0 development packages installed on your system
File "dune", line 4, characters 29-39:
4 |   (libraries lablgtk2 cairo2 cairo2-gtk camlzip magic-mime)
                                 ^^^^^^^^^^
Error: Library "cairo2-gtk" not found.

pkg-config --modversion gtk+-2.0returns 2.24.33

echo $LD_LIBRARY_PATHreturns empty path.

echo $PKG_CONFIG_PATHreturns /home/alr/.opam/4.08.0/lib/pkgconfig:

File /etc/ld.so.conf contains the following line: include /etc/ld.so.conf.d/*.conf

I am using WSL2 on Windows10 with Ubuntu18.04. libgtk2.0-dev is already installed.

I guess there is an error in path to library but cannot figure out how to solve it. Any help would be greatly appreciated.

Thanks

0

There are 0 answers