hbons / webkit2-sharp

C# bindings for WebKit 2 with GTK+ 3
MIT License
2 stars 2 forks source link

FTBFS with WebKitGTK 2.40.0 #6

Open bobby285271 opened 1 year ago

bobby285271 commented 1 year ago
Making all in sources/glue
make[1]: Entering directory '/build/source/sources/glue'
/nix/store/zlf0f88vj30sc7567b80l52d19pbdmy2-bash-5.2-p15/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"webkit2-sharp\" -DPACKAGE_TARNAME=\"webkit2-sharp\" -DPACKAGE_VERSION=\"2.10.9\" -DPACKAGE_STRING=\"webkit2-sharp\ 2.10.9\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"webkit2-sharp\" -DVERSION=\"2.10.9\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -pthread -I/nix/store/j49ym3y8lq669w6vcmdl9yapbwz3m54i-webkitgtk-2.40.0+abi=4.0-dev/include/webkitgtk-4.0 -I/nix/store/f69dd49a9kaxsb33ylvqa51f6bammsav-gtk+3-3.24.37-dev/include/gtk-3.0 -I/nix/store/3m8yx39r5g8w5pj21q2yc0js0q1pdsj9-at-spi2-core-2.48.0-dev/include/atk-1.0 -I/nix/store/39y7z1csp1gwbv4kapxf9kxx3rj29403-glib-2.76.1-dev/include -I/nix/store/39y7z1csp1gwbv4kapxf9kxx3rj29403-glib-2.76.1-dev/include/glib-2.0 -I/nix/store/pdg7ljsallvykhjwdh8193i2s4p3a4k4-glib-2.76.1/lib/glib-2.0/include -I/nix/store/byd60fgkicd0fl5fvpds96jx6qq1rf3d-cairo-1.16.0-dev/include/cairo -I/nix/store/8k1k5skz60xawzy4v3b5wdazq2ps8r6c-freetype-2.13.0-dev/include/freetype2 -I/nix/store/8k1k5skz60xawzy4v3b5wdazq2ps8r6c-freetype-2.13.0-dev/include -I/nix/store/4jgr65if55lvw95q62yqapkqim13fcrp-gdk-pixbuf-2.42.10-dev/include/gdk-pixbuf-2.0 -I/nix/store/j9cgl2qpfjyrgqlf9rbr1i5w2z8b2gqx-pango-1.50.14-dev/include/pango-1.0 -I/nix/store/8y4q81sliddcdg4kiigvs23f3p1a5axy-harfbuzz-7.1.0-dev/include/harfbuzz -I/nix/store/xdr87ck43nj35kv2nv4cdqk05yzv7qn8-libsoup-2.74.3-dev/include/libsoup-2.4 -I../..    -g -O2 -c -o generated.lo generated.c
libtool: compile:  gcc -DPACKAGE_NAME=\"webkit2-sharp\" -DPACKAGE_TARNAME=\"webkit2-sharp\" -DPACKAGE_VERSION=\"2.10.9\" "-DPACKAGE_STRING=\"webkit2-sharp 2.10.9\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"webkit2-sharp\" -DVERSION=\"2.10.9\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -pthread -I/nix/store/j49ym3y8lq669w6vcmdl9yapbwz3m54i-webkitgtk-2.40.0+abi=4.0-dev/include/webkitgtk-4.0 -I/nix/store/f69dd49a9kaxsb33ylvqa51f6bammsav-gtk+3-3.24.37-dev/include/gtk-3.0 -I/nix/store/3m8yx39r5g8w5pj21q2yc0js0q1pdsj9-at-spi2-core-2.48.0-dev/include/atk-1.0 -I/nix/store/39y7z1csp1gwbv4kapxf9kxx3rj29403-glib-2.76.1-dev/include -I/nix/store/39y7z1csp1gwbv4kapxf9kxx3rj29403-glib-2.76.1-dev/include/glib-2.0 -I/nix/store/pdg7ljsallvykhjwdh8193i2s4p3a4k4-glib-2.76.1/lib/glib-2.0/include -I/nix/store/byd60fgkicd0fl5fvpds96jx6qq1rf3d-cairo-1.16.0-dev/include/cairo -I/nix/store/8k1k5skz60xawzy4v3b5wdazq2ps8r6c-freetype-2.13.0-dev/include/freetype2 -I/nix/store/8k1k5skz60xawzy4v3b5wdazq2ps8r6c-freetype-2.13.0-dev/include -I/nix/store/4jgr65if55lvw95q62yqapkqim13fcrp-gdk-pixbuf-2.42.10-dev/include/gdk-pixbuf-2.0 -I/nix/store/j9cgl2qpfjyrgqlf9rbr1i5w2z8b2gqx-pango-1.50.14-dev/include/pango-1.0 -I/nix/store/8y4q81sliddcdg4kiigvs23f3p1a5axy-harfbuzz-7.1.0-dev/include/harfbuzz -I/nix/store/xdr87ck43nj35kv2nv4cdqk05yzv7qn8-libsoup-2.74.3-dev/include/libsoup-2.4 -I../.. -g -O2 -c generated.c  -fPIC -DPIC -o .libs/generated.o
In file included from /nix/store/wb2dlc8kpvrn960vq7j7c8822pi43n48-glibc-2.37-8-dev/include/stdio.h:33,
                 from /nix/store/j9cgl2qpfjyrgqlf9rbr1i5w2z8b2gqx-pango-1.50.14-dev/include/pango-1.0/pango/pango-utils.h:25,
                 from /nix/store/j9cgl2qpfjyrgqlf9rbr1i5w2z8b2gqx-pango-1.50.14-dev/include/pango-1.0/pango/pango.h:51,
                 from /nix/store/f69dd49a9kaxsb33ylvqa51f6bammsav-gtk+3-3.24.37-dev/include/gtk-3.0/gdk/gdktypes.h:35,
                 from /nix/store/f69dd49a9kaxsb33ylvqa51f6bammsav-gtk+3-3.24.37-dev/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30,
                 from /nix/store/f69dd49a9kaxsb33ylvqa51f6bammsav-gtk+3-3.24.37-dev/include/gtk-3.0/gdk/gdk.h:32,
                 from /nix/store/f69dd49a9kaxsb33ylvqa51f6bammsav-gtk+3-3.24.37-dev/include/gtk-3.0/gtk/gtk.h:30,
                 from /nix/store/j49ym3y8lq669w6vcmdl9yapbwz3m54i-webkitgtk-2.40.0+abi=4.0-dev/include/webkitgtk-4.0/webkit/WebKitAuthenticationRequest.h:31,
                 from /nix/store/j49ym3y8lq669w6vcmdl9yapbwz3m54i-webkitgtk-2.40.0+abi=4.0-dev/include/webkitgtk-4.0/webkit2/webkit2.h:30,
                 from generated.c:4:
generated.c: In function 'webkit2sharp_webkit2_webviewbase_get_parentInstance_offset':
/nix/store/39y7z1csp1gwbv4kapxf9kxx3rj29403-glib-2.76.1-dev/include/glib-2.0/glib/gmacros.h:966:16: error: 'WebKitWebViewBase' {aka 'struct _WebKitWebViewBase'} has no member named 'parentInstance'
  966 |       ((glong) offsetof (struct_type, member))
      |                ^~~~~~~~
generated.c:11:23: note: in expansion of macro 'G_STRUCT_OFFSET'
   11 |         return (guint)G_STRUCT_OFFSET (WebKitWebViewBase, parentInstance);
      |                       ^~~~~~~~~~~~~~~
make[1]: *** [Makefile:479: generated.lo] Error 1
make[1]: Leaving directory '/build/source/sources/glue'
make: *** [Makefile:474: all-recursive] Error 1

(Full log: https://hydra.nixos.org/build/215404629/nixlog/2)

I checked the docs in https://webkitgtk.org/reference/webkit2gtk/stable/class.WebViewBase.html and tried to replace parentInstance here to parent, it seems to build. But perhaps this is a generated file and should probably be re-generated? Or should this be something that is expected to be stable and should notify upstream?

hbons commented 1 year ago

I think these bindings were autogenerated using gobject-introspection. I just took the webkitgtk bindings and bumped the version numbers to build with the (then new) gtk+3. I can't be of much help here. :)

hbons commented 1 year ago

More info here: https://github.com/hbons/webkit2-sharp/issues/5

HinTak commented 8 months ago

Argh, the idiot at fedora just changed the generated c code without changing the generated c# code also to match. 😞

HinTak commented 8 months ago

See my comment at https://bugzilla.redhat.com/show_bug.cgi?id=2252635#c3 regarding the broken patch and how to fix it correctly, in comment 4.

HinTak commented 8 months ago

I regenerated the api.raw file from using current webkit gir's and found that section to differ. See #7

HinTak commented 8 months ago

The interesting thing is that the glue lib is now empty and there is no need to ship it.