Open Blaisorblade opened 1 year ago
This fails to build both on opam and with dune b -p lablgtk3, but completes with dune b lablgtk3.install...
opam
dune b -p lablgtk3
dune b lablgtk3.install
Build error from opam:
#=== ERROR while compiling lablgtk3.3.1.3 =====================================# # context 2.1.5 | macos/arm64 | ocaml-option-flambda.1 ocaml-variants.4.14.1+options | https://opam.ocaml.org#f5e63043 # path ~/.opam/4.14.1+flambda/.opam-switch/build/lablgtk3.3.1.3 # command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p lablgtk3 -j 11 # exit-code 1 # env-file ~/.opam/log/lablgtk3-1816-d191f5.env # output-file ~/.opam/log/lablgtk3-1816-d191f5.out ### output ### # [...] # File "src/dune", line 29, characters 3-11: # 29 | ml_pango cairo_pango_stubs # ^^^^^^^^ # (cd _build/default/src && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -pthread -D_FILE_OFFSET_BITS=64 -I/opt/homebrew/Cellar/libffi/3.4.4/include -I/opt/homebrew/Cellar/gtk+3/3.24.37/include/gtk-3.0 -I/opt/homebrew/Cellar/glib/2.76.2/include/gio-unix-2.0 -I/opt/homebrew/Cellar/cairo/1.16.0_5/include/cairo -I/opt/homebrew/Cellar/libepoxy/1.5.10/include -I/opt/homebrew/Cellar/pango/1.50.14/inc[...] # In file included from ml_pango.c:26: # In file included from /opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0/pango/pango.h:25: # In file included from /opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0/pango/pango-attributes.h:25: # In file included from /opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0/pango/pango-font.h:25: # /opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0/pango/pango-coverage.h:25:10: fatal error: 'glib-object.h' file not found # #include <glib-object.h> # ^~~~~~~~~~~~~~~ # 1 error generated.
For context — /opt/homebrew/Cellar/glib/2.76.3/include/glib-2.0/glib-object.h exists and can be found in a path listed by pkg-config:
/opt/homebrew/Cellar/glib/2.76.3/include/glib-2.0/glib-object.h
pkg-config
$ pkg-config --cflags gtk+-3.0 -I/opt/homebrew/Cellar/libffi/3.4.4/include -I/opt/homebrew/Cellar/gtk+3/3.24.38/include/gtk-3.0 -I/opt/homebrew/Cellar/glib/2.76.3/include/gio-unix-2.0 -I/opt/homebrew/Cellar/cairo/1.16.0_5/include/cairo -I/opt/homebrew/Cellar/libepoxy/1.5.10/include -I/opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0 -I/opt/homebrew/Cellar/harfbuzz/7.3.0/include/harfbuzz -I/opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0 -I/opt/homebrew/Cellar/fribidi/1.0.13/include/fribidi -I/opt/homebrew/Cellar/harfbuzz/7.3.0/include/harfbuzz -I/opt/homebrew/Cellar/graphite2/1.3.14/include -I/opt/homebrew/Cellar/atk/2.38.0/include/atk-1.0 -I/opt/homebrew/Cellar/cairo/1.16.0_5/include/cairo -I/opt/homebrew/Cellar/pixman/0.42.2/include/pixman-1 -I/opt/homebrew/Cellar/fontconfig/2.14.2/include -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/Cellar/libxcb/1.15_1/include -I/opt/homebrew/Cellar/libxrender/0.9.11/include -I/opt/homebrew/Cellar/libxext/1.3.5/include -I/opt/homebrew/Cellar/libx11/1.8.4/include -I/opt/homebrew/Cellar/libxcb/1.15_1/include -I/opt/homebrew/Cellar/libxau/1.0.11/include -I/opt/homebrew/Cellar/libxdmcp/1.1.4/include -I/opt/homebrew/Cellar/gdk-pixbuf/2.42.10_1/include/gdk-pixbuf-2.0 -I/opt/homebrew/Cellar/libpng/1.6.39/include/libpng16 -I/opt/homebrew/Cellar/libtiff/4.5.0/include -I/opt/homebrew/Cellar/zstd/1.5.5/include -I/opt/homebrew/Cellar/jpeg-turbo/2.1.5.1/include -I/opt/homebrew/Cellar/glib/2.76.3/include -I/opt/homebrew/Cellar/glib/2.76.3/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.76.3/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre2/10.42/include -I/opt/homebrew/Cellar/xorgproto/2022.2/include
I see https://github.com/garrigue/lablgtk/blob/lablgtk3/src/dune suggests dune_config -pkg gtk+-3.0 -version 3.18; that one gives
dune_config -pkg gtk+-3.0 -version 3.18
$ cat cflag-gtk+-3.0.sexp; echo ("-I/opt/homebrew/Cellar/libffi/3.4.4/include" "-I/opt/homebrew/Cellar/gtk+3/3.24.38/include/gtk-3.0" "-I/opt/homebrew/Cellar/glib/2.76.3/include/gio-unix-2.0" "-I/opt/homebrew/Cellar/cairo/1.16.0_5/include/cairo" "-I/opt/homebrew/Cellar/libepoxy/1.5.10/include" "-I/opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0" "-I/opt/homebrew/Cellar/harfbuzz/7.3.0/include/harfbuzz" "-I/opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0" "-I/opt/homebrew/Cellar/fribidi/1.0.13/include/fribidi" "-I/opt/homebrew/Cellar/harfbuzz/7.3.0/include/harfbuzz" "-I/opt/homebrew/Cellar/graphite2/1.3.14/include" "-I/opt/homebrew/Cellar/atk/2.38.0/include/atk-1.0" "-I/opt/homebrew/Cellar/cairo/1.16.0_5/include/cairo" "-I/opt/homebrew/Cellar/pixman/0.42.2/include/pixman-1" "-I/opt/homebrew/Cellar/fontconfig/2.14.2/include" "-I/opt/homebrew/opt/freetype/include/freetype2" "-I/opt/homebrew/Cellar/libxcb/1.15_1/include" "-I/opt/homebrew/Cellar/libxrender/0.9.11/include" "-I/opt/homebrew/Cellar/libxext/1.3.5/include" "-I/opt/homebrew/Cellar/libx11/1.8.4/include" "-I/opt/homebrew/Cellar/libxcb/1.15_1/include" "-I/opt/homebrew/Cellar/libxau/1.0.11/include" "-I/opt/homebrew/Cellar/libxdmcp/1.1.4/include" "-I/opt/homebrew/Cellar/gdk-pixbuf/2.42.10_1/include/gdk-pixbuf-2.0" "-I/opt/homebrew/Cellar/libpng/1.6.39/include/libpng16" "-I/opt/homebrew/Cellar/libtiff/4.5.0/include" "-I/opt/homebrew/Cellar/zstd/1.5.5/include" "-I/opt/homebrew/Cellar/jpeg-turbo/2.1.5.1/include" "-I/opt/homebrew/Cellar/glib/2.76.3/include" "-I/opt/homebrew/Cellar/glib/2.76.3/include/glib-2.0" "-I/opt/homebrew/Cellar/glib/2.76.3/lib/glib-2.0/include" "-I/opt/homebrew/opt/gettext/include" "-I/opt/homebrew/Cellar/pcre2/10.42/include" "-I/opt/homebrew/Cellar/xorgproto/2022.2/include" "-DHAS_GTKQUARTZ") $ cat clink-gtk+-3.0.sexp ; echo ("-L/opt/homebrew/Cellar/gtk+3/3.24.38/lib" "-L/opt/homebrew/Cellar/pango/1.50.14/lib" "-L/opt/homebrew/Cellar/harfbuzz/7.3.0/lib" "-L/opt/homebrew/Cellar/atk/2.38.0/lib" "-L/opt/homebrew/Cellar/cairo/1.16.0_5/lib" "-L/opt/homebrew/Cellar/gdk-pixbuf/2.42.10_1/lib" "-L/opt/homebrew/Cellar/glib/2.76.3/lib" "-L/opt/homebrew/opt/gettext/lib" "-lgtk-3" "-lgdk-3" "-Wl,-framework,Cocoa" "-Wl,-framework,Carbon" "-Wl,-framework,CoreGraphics" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-latk-1.0" "-lcairo-gobject" "-lcairo" "-lgdk_pixbuf-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lintl")
This fails to build both on
opam
and withdune b -p lablgtk3
, but completes withdune b lablgtk3.install
...Build error from
opam
:For context —
/opt/homebrew/Cellar/glib/2.76.3/include/glib-2.0/glib-object.h
exists and can be found in a path listed bypkg-config
:I see https://github.com/garrigue/lablgtk/blob/lablgtk3/src/dune suggests
dune_config -pkg gtk+-3.0 -version 3.18
; that one gives