Error when building static libraries on Linux

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
fishnet37222
Knows some wx things
Knows some wx things
Posts: 38
Joined: Sat May 06, 2017 1:40 pm

Error when building static libraries on Linux

Post by fishnet37222 » Wed Aug 22, 2018 12:03 am

I am trying to build the static libraries for wxWidgets 3.1 on Linux Mint 19. I keep getting the error below every time I try to build them.

Code: Select all

../src/gtk/webview_webkit2.cpp: In function ‘void wxgtk_initialize_web_extensions(WebKitWebContext*, GDBusServer*)’:
../src/gtk/webview_webkit2.cpp:414:9: error: ‘WX_WEB_EXTENSIONS_DIRECTORY’ was not declared in this scope
         WX_WEB_EXTENSIONS_DIRECTORY,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/gtk/webview_webkit2.cpp:414:9: note: suggested alternative: ‘G_IO_ERROR_IS_DIRECTORY’
         WX_WEB_EXTENSIONS_DIRECTORY,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         G_IO_ERROR_IS_DIRECTORY
Makefile:36428: recipe for target 'webviewlib_webview_webkit2.o' failed
make: *** [webviewlib_webview_webkit2.o] Error 1
When I build the shared libraries, everything works fine. I've tried with the latest version from the GitHub repository with the same results. I'm using GCC 7.3.0. The version of libwebkit2gtk-4.0-dev installed is 2.20.5-0ubuntu0.18.04.1.

DavidHart
Site Admin
Site Admin
Posts: 3808
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Error when building static libraries on Linux

Post by DavidHart » Wed Aug 22, 2018 10:47 am

Hi,

With wxWidgets-3.1.0 on a Mint 19 virtualbox guest, a static build compiles for me. I first did:

Code: Select all

apt install libgtk2.0-dev zlib1g-dev libjpeg-dev libpng-dev libtiff5-dev libsm-dev libgl1-mesa-dev  libglu1-mesa-dev  autotools-dev libexpat1-dev libxt-dev libgstreamer-plugins-base1.0-dev libgconf2-dev libwebkitgtk-dev libnotify-dev
then used the configure line:

Code: Select all

../configure --enable-debug --enable-cxx11 --enable-webview --disable-shared
I have installed both libwebkitgtk-1.0 and libwebkitgtk-3.0, as well as libwebkit2gtk-4.0-37. However only libwebkitgtk-dev was installed, not libwebkit2gtk-4.0-dev.

I tried again after replacing libwebkitgtk-dev with libwebkit2gtk-4.0-dev. This time configure failed with 'webkitgtk not found...'

Must you use libwebkit2gtk? If so, I suggest you test the latest version again in a clean subdir, and look hard at the configure output. If it failed, config.log might explain why. If it's not something missing locally, you should then report this on wxtrac.

Regards,

David

fishnet37222
Knows some wx things
Knows some wx things
Posts: 38
Joined: Sat May 06, 2017 1:40 pm

Re: Error when building static libraries on Linux

Post by fishnet37222 » Wed Aug 22, 2018 1:15 pm

Using libwbkitgtk-dev won't work for me since I'm building the library against GTK3. Here is my configure command:

Code: Select all

../configure --disable-shared --enable-graphics_ctx --with-cxx=14 --with-gtk=3 --disable-debug
I was able to get it to work by installing libwebkitgtk-3.0-dev.

Post Reply