$ opam install lablgtk
The following actions will be performed:
∗ install lablgtk 2.18.7
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
[lablgtk.2.18.7] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
[ERROR] The compilation of lablgtk failed at
"/Users/yimingxu/.opam/opam-init/hooks/sandbox.sh build ./configure
--prefix /Users/yimingxu/.opam/default
LABLGLDIR=/Users/yimingxu/.opam/default/lib/lablgl".
#=== ERROR while compiling lablgtk.2.18.7 =====================================#
# context 2.0.3 | macos/x86_64 | ocaml-base-compiler.4.07.1 | https://opam.ocaml.org#fe723de2
# path ~/.opam/default/.opam-switch/build/lablgtk.2.18.7
# command ~/.opam/opam-init/hooks/sandbox.sh build ./configure --prefix /Users/yimingxu/.opam/default LABLGLDIR=/Users/yimingxu/.opam/default/lib/lablgl
# exit-code 1
# env-file ~/.opam/log/lablgtk-35119-d8a4ae.env
# output-file ~/.opam/log/lablgtk-35119-d8a4ae.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.7
└─
╶─ No changes have been performed
<><> lablgtk.2.18.7 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
$ brew search gtk
==> Formulae
clutter-gtk gtk-doc gtk-murrine-engine gtkglext gtksourceview3 gtkspell3 pygtksourceview
gtk+ ✔ gtk-engines gtk-vnc gtkmm gtksourceview4 lablgtk ✔ qalculate-gtk
gtk+3 ✔ gtk-gnutella gtkdatabox gtkmm3 gtksourceviewmm pygtk ✔
gtk-chtheme gtk-mac-integration ✔ gtkextra ✔ gtksourceview ✔ gtksourceviewmm3 pygtkglext
==> Casks
gtkwave
$ git submodule sync
Synchronizing submodule url for 'coq-HoTT'
Synchronizing submodule url for 'etc/coq-dpdgraph'
Synchronizing submodule url for 'etc/coq-scripts'
$ git submodule update --init --recursive
~/scratch/HoTT/coq-HoTT ~/scratch/HoTT ~/scratch/HoTT/etc ~/scratch/HoTT
$ ./configure -local
You have OCaml 4.07.1. Good!
You have OCamlfind 1.8.0. Good!
You have native-code compilation. Good!
You have the Num library installed. Good!
Warning: Could not check the version of lablgtk2.
Make sure your version is at least 2.18.3.
LablGtk2 found (in OCaml library, an unknown version), with native threads:
=> native CoqIde will be built.
...OCAMLOPT -o bin/coqide
ocamlfind: Package `lablgtk2.sourceview2' not found
make[1]: *** [bin/coqide] Error 2
make: *** [submake] Error 2
I've tried "brew install gtksourceview", but this doesn't help. The available gtk related casks on brew are
$ brew search gtk
==> Formulae
clutter-gtk gtk-gnutella gtkglext gtksourceviewmm pygtksourceview
gtk+ ✔ gtk-mac-integration ✔ gtkmm gtksourceviewmm3 qalculate-gtk
gtk+3 ✔ gtk-murrine-engine gtkmm3 gtkspell3
gtk-chtheme gtk-vnc gtksourceview ✔ lablgtk ✔
gtk-doc gtkdatabox gtksourceview3 pygtk ✔
gtk-engines gtkextra gtksourceview4 pygtkglext
==> Casks
gtkwave
The packages you requested declare the following system dependencies. Please make sure they are installed before retrying:
pkg-config
but after "brew install pkgconfig" it fails with two apparently independent error messages:
#=== ERROR while compiling conf-gtksourceview.2 ===============================#
# context 2.0.3 | macos/x86_64 | ocaml-system.4.07.1 | https://opam.ocaml.org#1a9d5b0d
# path ~/.opam/default/.opam-switch/build/conf-gtksourceview.2
# command ~/.opam/opam-init/hooks/sandbox.sh build pkg-config --short-errors --print-errors gtksourceview-2.0
# exit-code 1
# env-file ~/.opam/log/conf-gtksourceview-52952-dd682e.env
# output-file ~/.opam/log/conf-gtksourceview-52952-dd682e.out
### output ###
# Package 'libffi', required by 'gobject-2.0', not found
The packages you requested declare the following system dependencies. Please make sure they are installed before retrying:
gtksourceview libxml2
At this point brew reports that all of libffi, libxml2, and gtksourceview are installed. What's going on? Uninstalling and reinstalling those, we get a helpful message from brew:
libffi is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.
For compilers to find libffi you may need to set:
export LDFLAGS="-L/usr/local/opt/libffi/lib"
For pkg-config to find libffi you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
(and a similar message about libxml2). So we now try
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/gtksourceview/lib/pkgconfig"
opam install conf-gtksourceview lablgtk
and it succeeds! Re-running etc/install_coq.sh we get a little further... on to our next error:
...
OCAMLOPT ide/preferences.ml
File "ide/preferences.ml", line 1:
Error: The files /Users/scott/.opam/default/lib/lablgtk2/gSourceView2.cmi
and ide/tags.cmi make inconsistent assumptions over interface GText
make[1]: *** [ide/preferences.cmx] Error 2
make: *** [submake] Error 2
Any suggestions for this?
best regards,
Scott