Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating new WebKitGTK bindings #26

Closed
hbons opened this issue Apr 9, 2016 · 21 comments
Closed

Creating new WebKitGTK bindings #26

hbons opened this issue Apr 9, 2016 · 21 comments

Comments

@hbons
Copy link
Contributor

hbons commented Apr 9, 2016

I'm not sure if this is the right place to ask, but I don't know where else to go. :)

I'm trying to create new WebKitGTK bindings using bindinator. The GNOME platform provides binaries for 2.4, which I'd like to make use to create an app bundle of SparkleShare, instead of going on the impossible road of trying to compile WebKit myself.

However, I get errors and I've no idea where to begin to start fixing them.
Here's how bindinator got configured:

[hbons@Fedora bindinator]$ ./autogen.sh 
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for xsltproc... /usr/bin/xsltproc
checking for xmllint... /usr/bin/xmllint
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GIR... yes
checking for gapi3-fixup... /usr/bin/gapi3-fixup
checking for uuidgen... /usr/bin/uuidgen
checking for perl... /usr/bin/perl
checking for unix2dos... /usr/bin/unix2dos
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bindinate/Makefile
config.status: creating bindinate/bindinate
config.status: creating bindinate/gir2gapi.xslt
config.status: executing default commands

Configuration summary
---------------------

   * Installation prefix: /usr/local

I changed the compiler command in bindinate/configure.ac.template to work with the new mono:

-       AC_PATH_PROG(CSC, gmcs, no)
+       AC_PATH_PROG(CSC, mcs, no)

Bindinate runs fine and creates the directory WebKit2-4.0:

[hbons@Fedora bindinator]$ bindinate --gir=WebKit2-4.0 -d=GLIB_SHARP,glib-sharp-3.0 -d=GTK_SHARP,gtk-sharp-3.0 -d=GIO_SHARP,gio-sharp-3.0 -d=GDK_SHARP,gdk-sharp-3.0 -d=SOUP_SHARP,soup-sharp-2.4
Processing WebKit2-4.0
PACKAGE: webkit2gtk-4.0
LIBS: libwebkit2gtk-4.0.so.37 libjavascriptcoregtk-4.0.so.18
LIBVERSIONS: 2.2 2.3 2.4 2.6 2.8 2.10 
BUILDLIBVERSIONS: 2.10 
LIB: webkit2gtk-4.0
SOLIB: libwebkit2gtk-4.0.so.37
GLUELIB: libwebkit2sharpglue-2.10.9.so

Configure the bindings:

[hbons@Fedora WebKit2-4.0]$ ./autogen.sh 
libtoolize: putting auxiliary files in '..'.
libtoolize: copying file '../ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:7: installing '../compile'
configure.ac:4: installing '../missing'
sources/glue/Makefile.am: installing '../depcomp'
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for MONO_DEPENDENCY... yes
checking for mono... /usr/bin/mono
checking for mcs... /usr/bin/mcs
checking for gacutil... /usr/bin/gacutil
checking for GTK_SHARP... yes
checking for gapi3-fixup... /usr/bin/gapi3-fixup
checking for gapi3-codegen... /usr/bin/gapi3-codegen
checking for xsltproc... /usr/bin/xsltproc
checking for unix2dos... /usr/bin/unix2dos
checking for xbuild... /usr/bin/xbuild
checking for mdassembler... /usr/bin/mdassembler
checking for monodocer... /usr/bin/monodocer
Package monodoc was not found in the pkg-config search path.
Perhaps you should add the directory containing `monodoc.pc'
to the PKG_CONFIG_PATH environment variable
No package 'monodoc' found
checking for WEBKIT2... yes
checking for GLIB_SHARP... yes
checking for GIO_SHARP... yes
checking for GDK_SHARP... yes
checking for SOUP_SHARP... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sources/Makefile
config.status: creating sources/glue/Makefile
config.status: creating sources/AssemblyInfo.cs
config.status: creating webkit2-sharp-4.0.pc
config.status: creating doc/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default commands

Configuration summary
---------------------

   * Installation prefix: /usr/local
   * compiler: /usr/bin/mcs
   * Documentation:  ()

But compiling fails with this error:

Making all in sources
make[1]: Entering directory '/home/hbons/Projects/bindinator/WebKit2-4.0/sources'
cp ./webkit2-sharp-api.raw ./webkit2-sharp-api.xml
chmod u+w ./webkit2-sharp-api.xml
/usr/bin/gapi3-fixup --api=./webkit2-sharp-api.xml --metadata=./webkit2-sharp.metadata
/usr/bin/gapi3-codegen --generate ./webkit2-sharp-api.xml  -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/glib-api.xml  -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/pango-api.xml -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/atk-api.xml -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/gtk-api.xml -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/gio-api.xml -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/gdk-api.xml -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/glib-api.xml  -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/gio-api.xml -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/glib-api.xml  -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/gdk-api.xml -I:/usr/lib64/pkgconfig/../../share/gapi-3.0/glib-api.xml   \
    --outdir=./generated \
    --glue-filename=./glue/generated.c --gluelib-name=libwebkit2sharpglue-2.10.9.so \
    --glue-includes=webkit2/webkit2.h, --gapidir=/usr/lib64/pkgconfig/../../share/gapi-3.0 \
    --assembly-name=webkit2-sharp && \
find ./generated/ -type f -name "*.cs" > ./generated.sources
WebKit2.ColorChooserRequest.Rgba - property has unknown type 'Gdk.RGBA' 
WebKit2.ColorChooserRequest.GetElementRectangle - Unknown type Gdk.Rectangle on parameter rect
WebKit2.ColorChooserRequest.GetRgba - Unknown type Gdk.RGBA on parameter rgba
WebKit2.ColorChooserRequest.SetRgba - Unknown type Gdk.RGBA on parameter rgba
WebKit2.ContextMenu.GetUserData - Unknown return type: GLib.Variant
WebKit2.ContextMenu.SetUserData - Unknown type GLib.Variant on parameter user_data
WebKit2.CookieManager.GetAcceptPolicy - Unknown type Gio.Cancellable on parameter cancellable
WebKit2.CookieManager.GetAcceptPolicyFinish - Unknown type Gio.AsyncResult on parameter _result
WebKit2.CookieManager.GetDomainsWithCookies - Unknown type Gio.Cancellable on parameter cancellable
WebKit2.CookieManager.GetDomainsWithCookiesFinish - Unknown type Gio.AsyncResult on parameter _result
WebKit2.FaviconDatabase.GetFavicon - Unknown type Gio.Cancellable on parameter cancellable
WebKit2.FaviconDatabase.GetFaviconFinish - Unknown return type: cairo.Surface*
WebKit2.URIRequest.GetHttpHeaders - Unknown return type: SoupMessageHeaders*
WebKit2.URIResponse.HttpHeaders - property has unknown type 'SoupMessageHeaders*' 
WebKit2.URIResponse.GetHttpHeaders - Unknown return type: SoupMessageHeaders*
WebKit2.URISchemeRequest.Finish - Unknown type Gio.InputStream on parameter stream
WebKit2.URISchemeRequest.FinishError - Unknown type GLib.Error on parameter error
WebKit2.WebContext.AllowTlsCertificateForHost - Unknown type Gio.TlsCertificate on parameter certificate
WebKit2.WebContext.GetPlugins - Unknown type Gio.Cancellable on parameter cancellable
WebKit2.WebContext.GetPluginsFinish - Unknown type Gio.AsyncResult on parameter _result
WebKit2.WebContext.RegisterUriScheme - Unknown type GLib.DestroyNotify on parameter user_data_destroy_func
WebKit2.WebContext.SetWebExtensionsInitializationUserData - Unknown type GLib.Variant on parameter user_data
WebKit2.WebResource.FailedWithTlsErrors - Unknown type Gio.TlsCertificate on parameter certificate
WebKit2.WebResource.FailedWithTlsErrors - Unknown type Gio.TlsCertificate on parameter certificate
WebKit2.WebResource.GetData - Unknown type Gio.Cancellable on parameter cancellable
WebKit2.WebResource.GetDataFinish - Returns an array with undeterminable length. Add null_term_array or array_length_param attribute with gapi-fixup.
WebKit2.WebView.ContextMenu - Unknown type Gdk.Event on parameter evnt
WebKit2.WebView.LoadFailedWithTlsErrors - Unknown type Gio.TlsCertificate on parameter certificate
WebKit2.WebView.ContextMenu - Unknown type Gdk.Event on parameter evnt
WebKit2.WebView.LoadFailedWithTlsErrors - Unknown type Gio.TlsCertificate on parameter certificate
WebKit2.WebView - implements unknown GInterface Atk.ImplementorIface
WebKit2.WebViewBase - implements unknown GInterface Atk.ImplementorIface
WebKit2.WindowProperties.Geometry - property has unknown type 'Gdk.Rectangle' 
WebKit2.WindowProperties.GetGeometry - Unknown type Gdk.Rectangle on parameter geometry
WebKit2.JavascriptResult.GetGlobalContext - Unknown return type: JSGlobalContextRef
WebKit2.JavascriptResult.GetValue - Unknown return type: JSValueRef
WebKit2.Global.DownloadErrorQuark - Unknown return type: GLib.Quark
WebKit2.Global.FaviconDatabaseErrorQuark - Unknown return type: GLib.Quark
WebKit2.Global.JavascriptErrorQuark - Unknown return type: GLib.Quark
WebKit2.Global.NetworkErrorQuark - Unknown return type: GLib.Quark
WebKit2.Global.PluginErrorQuark - Unknown return type: GLib.Quark
WebKit2.Global.PolicyErrorQuark - Unknown return type: GLib.Quark
WebKit2.Global.PrintErrorQuark - Unknown return type: GLib.Quark
WebKit2.Global.SnapshotErrorQuark - Unknown return type: GLib.Quark

Generation Summary:
  Enums: 31  Structs: 0  Boxed: 7  Opaques: 0  Interfaces: 1  Objects: 37  Callbacks: 1
  Properties: 109  Signals: 28  Methods: 212  Constructors: 16  Throttled: 24
Total Nodes: 466

mkdir -p ../out/V_2_10
/usr/bin/mcs -nowarn:169 -unsafe -target:library  -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/glib-sharp.dll  -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/cairo-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/pango-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/atk-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/gtk-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/gio-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/gdk-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/glib-sharp.dll  -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/gio-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/glib-sharp.dll  -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/gdk-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-3.0/glib-sharp.dll  -r:/usr/lib/mono/soup-sharp/soup-sharp.dll  \
    ./AssemblyInfo.cs  -out:../out/V_2_10/webkit2-sharp.dll -d:V_2_2,V_2_3,V_2_4,V_2_6,V_2_8,V_2_10 @./generated.sources
./AssemblyInfo.cs(11,12): warning CS1699: Use compiler option `keyfile' or appropriate project settings instead of `AssemblyKeyFile' attribute
./generated/WebKit2/PrintOperation.cs(19,34): error CS0234: The type or namespace name `WebView' does not exist in the namespace `WebKit2'. Are you missing an assembly reference?
./generated/WebKit2/PrintOperation.cs(71,18): error CS0234: The type or namespace name `WebView' does not exist in the namespace `WebKit2'. Are you missing an assembly reference?
./generated/WebKit2/Download.cs(491,18): error CS0234: The type or namespace name `WebView' does not exist in the namespace `WebKit2'. Are you missing an assembly reference?
./generated/WebKit2/NavigationPolicyDecision.cs(101,33): warning CS0108: `WebKit2.NavigationPolicyDecision.Parent' hides inherited member `WebKit2.PolicyDecision.Parent'. Use the new keyword if hiding was intended
./generated/WebKit2/PolicyDecision.cs(25,22): (Location of the symbol related to previous warning)
./generated/WebKit2/ResponsePolicyDecision.cs(49,33): warning CS0108: `WebKit2.ResponsePolicyDecision.Parent' hides inherited member `WebKit2.PolicyDecision.Parent'. Use the new keyword if hiding was intended
./generated/WebKit2/PolicyDecision.cs(25,22): (Location of the symbol related to previous warning)
./generated/WebKit2/URISchemeRequest.cs(114,18): error CS0234: The type or namespace name `WebView' does not exist in the namespace `WebKit2'. Are you missing an assembly reference?
./generated/WebKit2/WebInspector.cs(461,18): error CS0234: The type or namespace name `WebViewBase' does not exist in the namespace `WebKit2'. Are you missing an assembly reference?
./generated/WebKit2/FindController.cs(59,18): error CS0234: The type or namespace name `WebView' does not exist in the namespace `WebKit2'. Are you missing an assembly reference?
Compilation failed: 6 error(s), 3 warnings
Makefile:603: recipe for target '../out/V_2_10/webkit2-sharp.dll' failed
make[1]: *** [../out/V_2_10/webkit2-sharp.dll] Error 1
make[1]: Leaving directory '/home/hbons/Projects/bindinator/WebKit2-4.0/sources'
Makefile:484: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Help appreciated lots!

@shana
Copy link
Owner

shana commented Apr 11, 2016

Hey, sorry, just came back from a loooong trip.

Looks like it's not finding some of the types it needs. Is this webkitgtk version different from what https://github.com/stsundermann/webkitgtk-sharp is binding?

@sundermann
Copy link
Collaborator

Compilation errors probably rise because the WebView class is not found because it contains errors and as a result is not generated.

WebKit2.WebView - implements unknown GInterface Atk.ImplementorIface WebKit2.WebViewBase - implements unknown GInterface Atk.ImplementorIface

This is because in gtk-sharp the interface has been named differently what's in the gobject-introspection data. For my webkitgtk bindings I used this file to align the names with gtk-sharp. You should be able to just copy and paste it in to your bindings. (Maybe remove the soup-sharp file if you don't need soup-sharp or didn't bind it)

https://github.com/stsundermann/webkitgtk-sharp/blob/master/sources/webkitgtk-sharp.metadata

@hbons
Copy link
Contributor Author

hbons commented Apr 11, 2016

Thanks for the replies. :)

@shana I'm trying to bind webkit2gtk-4.0, as that's shipped in the gnome-sdk runtime: https://github.com/GNOME/gnome-sdk-images/blob/master/org.gnome.Sdk.json#L558

@stsundermann I copied in the file and got it to fix some of the errors. Some of the warnings mention parameters and I'm not sure how to fix that. Is there a spec for how the metadata file works?

For example: Gdk.Event exists in gtk-sharp:

WebKit2.WebView.ContextMenu - Unknown type Gdk.Event on parameter evnt

I'll work my way through the API and report back.

@sundermann
Copy link
Collaborator

You can try adding

<symbol type="marshal" cname="GdkEvent" name="Gdk.Event" marshal_type="IntPtr" call_fmt="{0} == null ? IntPtr.Zero : {0}.Handle" from_fmt="Gdk.Event.GetEvent ({0})"/> through metadata. I think there is documentation somewhere on the mono project page but you can also just look at the gtk-sharp samples. You don't need to fix all warnings if you do not need the API where the warning arises from. Most of the time if there's a warning then the method will just not be generated but the binding should still work though it might be incomplete.

@hbons
Copy link
Contributor Author

hbons commented Apr 11, 2016

It built! :)

This seems to have been enough:

<?xml version="1.0"?>
<metadata>
    <attr path="/api/namespace/object[@name='WebView']/implements/interface[@cname='GtkBuildable']" name="hidden">true</attr>
    <attr path="/api/namespace/object[@name='WebViewBase']/implements/interface[@cname='GtkBuildable']" name="hidden">true</attr>

    <attr path="/api/namespace/object[@name='WebView']/implements/interface[@cname='Atk.ImplementorIface']" name="cname">AtkImplementor</attr>
    <attr path="/api/namespace/object[@name='WebViewBase']/implements/interface[@cname='Atk.ImplementorIface']" name="cname">AtkImplementor</attr>
    <attr path="/api/namespace//object/field[@cname='parent_instance']" name="hidden">true</attr>
    <attr path="//field[@name='Parent']" name="hidden">true</attr>
</metadata>

Now I'll try to get this to run and implement the other objects after work.

@hbons
Copy link
Contributor Author

hbons commented Apr 11, 2016

Another question: are the dos2unix and unix2dos actually needed? I don't see them in configure.ac in @stsundermann's bindings, so wondering if they're safe to remove.

@shana
Copy link
Owner

shana commented Apr 11, 2016

@hbons They're used to output generated csproj files with CRLF line endings. It's not strictly required, it's just to make it easier to diff generated files. VS is not going to complain if the files use different line endings, nor is Monodevelop or the command line tools. TL;DR: feel free to remove it if you want 😄

@hbons
Copy link
Contributor Author

hbons commented Apr 12, 2016

Making progress. :)
I've opened a PR for a patch that will make bindinate work without unix2dos.

What about mdtool? I've disabled it for now, and it seems to still compile bindings just fine. MonoDevelop is quite a big dependency for just this. Seems it just converts the .csproj to a different format?

@shana
Copy link
Owner

shana commented Apr 12, 2016

@hbons xsltproc, mdtool and unix2dos are all dependencies introduced with 6eb7e95

These are there to make life easier for people working with VS or MD while developing bindings, and they're used with make csproj. You can add a flag to the configure process to make these (and the csproj target) optional if you want a leaner setup.

@hbons
Copy link
Contributor Author

hbons commented Apr 12, 2016

@shana ok, i'll create a flag to make it easier for build systems and make a new PR.

Now I'm hitting this "not implemented" error:
https://github.com/shana/bindinator/blob/master/bindinate/Makefile.am.template#L86

Stephan's for does have it implemented: https://github.com/stsundermann/bindinator/blob/master/bindinate/Makefile.am.template#L47

What's the story behind that one? :)

@shana
Copy link
Owner

shana commented Apr 12, 2016

Hmm, looks like @antoniusriha disabled those in 398cc19. Stephan is on the original implementation, which has those enabled.

@antoniusriha Do you remember what was broken about those targets?

@riccioclista
Copy link
Collaborator

Sorry, don't remember. I suppose, I may have disabled them, because they didn't work with the multi-version support I introduced. I probably had the intention to fix this later, but never did.

@shana
Copy link
Owner

shana commented Apr 13, 2016

@hbons I've pushed a couple of things to fix the install targets and make mdtool and unix2dos dependencies optional (and remove the perl dependency). Give it a whirl!

@hbons
Copy link
Contributor Author

hbons commented Apr 13, 2016

@shana wow thanks! Will try it soon. :)

Here's what happens on make install with Stephan's makefile, seems that the DLL var passed to gacutil is empty for some reason:

Making install in sources
make[1]: Entering directory '/run/build/webkit2-sharp/sources'
make[2]: Entering directory '/run/build/webkit2-sharp/sources'
make[2]: Nothing to be done for 'install-exec-am'.
echo "/app/bin/gacutil /i  /f /package webkit2-sharp /root /app/lib";  \
        /app/bin/gacutil /i  /f /package webkit2-sharp /root /app/lib || exit 1;
/app/bin/gacutil /i  /f /package webkit2-sharp /root /app/lib
Option /i takes 1 argument
Makefile:612: recipe for target 'install-data-local' failed
make[2]: *** [install-data-local] Error 1
make[2]: Leaving directory '/run/build/webkit2-sharp/sources'
Makefile:458: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/run/build/webkit2-sharp/sources'
Makefile:478: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
error: Child process exited with code 2

@hbons
Copy link
Contributor Author

hbons commented Apr 13, 2016

@shana compiles and installs! 👍

@hbons
Copy link
Contributor Author

hbons commented Apr 13, 2016

Now the app compiles, but it's missing the glue file. How do I make sure that's found?

Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for WebKit2.WebView ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for WebKit2.WebViewBase ---> System.DllNotFoundException: libwebkit2sharpglue-2.10.9.so
  at (wrapper managed-to-native) WebKit2.WebViewBase:webkit2sharp_webkit2_webviewbase_get_parentInstance_offset ()
  at WebKit2.WebViewBase..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---

@shana
Copy link
Owner

shana commented Apr 13, 2016

@hbons where did make install put it? Does it show up when you do ldconfig -p?

@hbons
Copy link
Contributor Author

hbons commented Apr 14, 2016

I got it working. Not sure how. :)

I'll post proper webkit2-sharp bindings soon.
Thanks so much @shana, @stsundermann, really appreciate the help! :)

@hbons hbons closed this as completed Apr 14, 2016
@shana
Copy link
Owner

shana commented Apr 14, 2016

Yay!

ldconfig reloads library information so if you ran that or rebooted or something similar that would trigger it, it picked up the library that was installed so it started magically working (just a guess) 😄

@colonelpanic8
Copy link

@shana I'm seeing this same issue with sparkleshare, and running ldconfig does not seem to be helping. Any other ideas about how to approach this?

@colonelpanic8
Copy link

I guess I will try a reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants