caml-list - the Caml user's mailing list
 help / Atom feed
* [Caml-list] problems with opam install lablgtk
@ 2019-08-02 11:53 Robert Muller
  2019-08-02 12:16 ` Vincent Laporte
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Muller @ 2019-08-02 11:53 UTC (permalink / raw)
  To: Ocaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 4489 bytes --]

Hello. I don't know the etiquette/MO for reporting an apparent problem with
opam and system packages (in particular, gtk). I added a comment to
issue #4282. But that issue had been closed and I'm not sure what happens
with comments on closed issues. It might be that I should've opened a new
issue but I wasn't sure about that. I'm copying my comment herewith even
though I'm pretty sure this is the wrong forum. Apologies all around. But
an assist would be greatly appreciated in any case.
Bob Muller
---------
I am unable to opam install lablgtk on MacOS 10.14.5 with homebrew. I
believe the problem might be due to some confusion/mismatch for the name of
the gtk package. I see it variously given as gtk, gtk+ and gtk+-2.0.

rm:~\> # MacOS Mojave 10.14.5
rm:~\> brew --version
Homebrew 2.1.9
Homebrew/homebrew-core (git revision c9f34; last commit 2019-08-02)
Homebrew/homebrew-cask (git revision 2e02d; last commit 2019-08-02)

rm:~\> brew list | grep gtk
gtk+
rm:~\> brew list | grep expat
expat
rm:~\> ls /usr/local/Cellar/expat/2.2.7/lib/pkgconfig/
expat.pc
rm:~\> echo $PKG_CONFIG_PATH
/opt/X11/lib/pkgconfig/
rm:~\> export
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/Cellar/expat/2.2.7/lib/pkgconfig/
rm:~\> pkg-config --modversion expat
2.2.7
rm:~\> ls /usr/local/Cellar/gtk+/2.24.32_3/lib/pkgconfig/
gail.pc                 gdk-quartz-2.0.pc       gtk+-quartz-2.0.pc
gdk-2.0.pc              gtk+-2.0.pc             gtk+-unix-print-2.0.pc
rm:~\> export
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/Cellar/gtk+/2.24.32_3/lib/pkgconfig/
rm:~\> pkg-config --modversion gtk+-2.0
2.24.32

rm:~\> opam depext lablgtk
# Detecting depexts using vars: arch=x86_64, os=macos,
os-distribution=homebrew, os-family=homebrew
# The following system packages are needed:
expat
gtk
# The following new OS packages need to be installed: gtk
Updating Homebrew...
Warning: gtk+ 2.24.32_3 is already installed and up-to-date
To reinstall 2.24.32_3, run `brew reinstall gtk+`
# OS packages installation successful

rm:~\> opam install lablgtk
The following actions will be performed:
  ∗ install lablgtk 2.18.8

<><> Gathering sources
><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
[lablgtk.2.18.8] downloaded from cache at https://opam.ocaml.org/cache

<><> Processing actions
<><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
[ERROR] The compilation of lablgtk failed at
"/Users/muller/.opam/opam-init/hooks/sandbox.sh build ./configure --prefix
        /Users/muller/.opam/default
LABLGLDIR=/Users/muller/.opam/default/lib/lablgl".

#=== ERROR while compiling lablgtk.2.18.8
=====================================#
# context     2.0.5 | macos/x86_64 | ocaml-base-compiler.4.08.0 |
https://opam.ocaml.org#8355f6b0
# path        ~/.opam/default/.opam-switch/build/lablgtk.2.18.8
# command     ~/.opam/opam-init/hooks/sandbox.sh build ./configure --prefix
/Users/muller/.opam/default LABLGLDIR=/Users/muller/.opam/default/lib/lablgl
# exit-code   1
# env-file    ~/.opam/log/lablgtk-45226-c743ac.env
# output-file ~/.opam/log/lablgtk-45226-c743ac.out
### output ###
# [...]
# checking for suffix of object files... o
# checking whether we are using the GNU C compiler... yes
# checking whether cc accepts -g... yes
# checking for cc option to accept ISO C89... none needed
# checking whether C compiler accepts -fno-unwind-tables... yes
# checking platform... Unix
# checking native dynlink... checking for pkg-config...
/usr/local/bin/pkg-config
# checking for GTK+ - version >= 2.0.0... no
# *** Could not run GTK+ test program, checking why...
# *** The test program failed to compile or link. See the file config.log
for the
# *** exact error that occured. This usually means GTK+ is incorrectly
installed.
# configure: error: GTK+ is required



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

<><> lablgtk.2.18.8 troubleshooting
<><><><><><><><><><><><><><><><><><><><>  🐫
=> This package requires gtk+ 2.0 development packages installed on your
system
=> To solve pkg-config issues, you may need to do
   'export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig' and retry

The packages you requested declare the following system dependencies.
Please make sure they are installed before retrying:
    expat gtk

rm:~\>

[-- Attachment #2: Type: text/html, Size: 5581 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] problems with opam install lablgtk
  2019-08-02 11:53 [Caml-list] problems with opam install lablgtk Robert Muller
@ 2019-08-02 12:16 ` Vincent Laporte
  0 siblings, 0 replies; 2+ messages in thread
From: Vincent Laporte @ 2019-08-02 12:16 UTC (permalink / raw)
  To: Ocaml Mailing List

[-- Attachment #1.1: Type: text/plain, Size: 335 bytes --]

Hi Bob,

I remember a similar issue being fixed by telling pkg-config how to find
libffi, using:

export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig

Simply running “pkg-config --modversion gtk+-2.0” may not raise an
error: you should also try to run “pkg-config --cflags gtk+-2.0”.

Cheers,
--
Vincent.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 11:53 [Caml-list] problems with opam install lablgtk Robert Muller
2019-08-02 12:16 ` Vincent Laporte

caml-list - the Caml user's mailing list

Archives are clonable:
	git clone --mirror http://inbox.vuxu.org/caml-list
	git clone --mirror https://inbox.ocaml.org/caml-list

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.caml-list


AGPL code for this site: git clone https://public-inbox.org/ public-inbox