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

Test fails on Ubuntu 18.04 #2

Open
ryanford opened this issue Nov 27, 2019 · 2 comments
Open

Test fails on Ubuntu 18.04 #2

ryanford opened this issue Nov 27, 2019 · 2 comments

Comments

@ryanford
Copy link

$ jpm test
running test/test.janet ...
error: could not load native build/webview.so: build/webview.so: undefined symbol: gtk_window_get_type
  in native
  in <anonymous> [boot.janet] on line 1942, column 26
  in require [boot.janet] on line 1963, column 16
  in import* [boot.janet] on line 1975, column 15
  in _thunk [test/test.janet] (tailcall) on line 3, column 1
@bakpakin
Copy link
Member

bakpakin commented Nov 27, 2019

You need GTK-2 installed, which is admittedly an older version of GTK. Try installing webkit2gtk

@felixr
Copy link
Contributor

felixr commented May 1, 2020

I had the same issue and it seems like the order in which compiler flags are passed to gcc is not right. Try compiling the .so manually via:
gcc -shared -o build/webview.so webview.c $(pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0) -fPIC -DWEBVIEW_GTK -I$(jpm show-paths | grep header|cut -d' ' -f2)

You can also check your webkit.so whether it was properly linked. If it was NOT properly linked the output of ldd build/webview.so will be very short; ie.:

        linux-vdso.so.1 (0x00007fffbcbde000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f75f97f4000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f75f99f2000)

If you use the correct order like above the .so will be linked to a dozen on GTK libs.

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

3 participants