Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions Topic is solved

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
thewxwguy
In need of some credit
In need of some credit
Posts: 3
Joined: Sun Jun 28, 2020 3:45 am

Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by thewxwguy » Sun Jun 28, 2020 2:12 pm

Webviews are working fine visually, but I get this popup every time I display one, and also these console errors:

Code: Select all

(process:277754): GLib-GObject-WARNING **: 15:05:36.856: ../../../gobject/gsignal.c:2617: signal 'changed::' is invalid for instance '0x55d4f8711430' of type 'GSettings'

(process:277754): GLib-GObject-WARNING **: 15:05:36.856: ../../../gobject/gsignal.c:2617: signal 'changed::' is invalid for instance '0x55d4f8711c30' of type 'GSettings'

(process:277754): GLib-GObject-WARNING **: 15:05:36.856: ../../../gobject/gsignal.c:2617: signal 'changed::' is invalid for instance '0x55d4f8711570' of type 'GSettings'

(process:277754): GLib-GObject-WARNING **: 15:05:36.856: ../../../gobject/gsignal.c:2617: signal 'changed::' is invalid for instance '0x55d4f8711700' of type 'GSettings'

(process:277754): GLib-GObject-WARNING **: 15:05:36.857: ../../../gobject/gsignal.c:2617: signal 'changed::' is invalid for instance '0x55d4f8711e10' of type 'GSettings'

(WebKitWebProcess:277724): Atk-CRITICAL **: 15:05:38.881: atk_state_set_contains_state: assertion 'ATK_IS_STATE_SET (set)' failed

(WebKitWebProcess:277724): GLib-GObject-CRITICAL **: 15:05:38.881: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(WebKitWebProcess:277724): Atk-CRITICAL **: 15:05:38.881: atk_state_set_contains_state: assertion 'ATK_IS_STATE_SET (set)' failed

(WebKitWebProcess:277724): GLib-GObject-CRITICAL **: 15:05:38.881: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
I configured wxWidgets like so:

Code: Select all

./configure --with-opengl --disable-shared --enable-monolithic --enable-webview --enable-webviewwebkit --enable-mediactrl --with-gtk=3
I have libwebkit2gtk-4.0-37 & libwebkit2gtk-4.0-dev installed. I don't see any webextension plugin in the build folder and google searches have proved fruitless. Can someone please advise on how to get/build the required web extensions?

Thank you

thewxwguy
In need of some credit
In need of some credit
Posts: 3
Joined: Sun Jun 28, 2020 3:45 am

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by thewxwguy » Sun Jun 28, 2020 2:34 pm

Ok, I found that there was a webkit2_extu-3.1.3.so extension built in the wxwidgets source folder. Moving that to /usr/local/lib/wx/3.1.3/web-extensions/ fixed the extension missing popup.

Is there any way to include this statically though? I don't want to have to install extra files along with my program.
Thanks!

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

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by DavidHart » Sun Jun 28, 2020 4:14 pm

Hi,

This is Linux, where static-linking is unusual and monolithic rare. I wouldn't be at all surprised if you were the first to try configuring with the particular combination of --with-opengl --disable-shared --enable-monolithic --enable-webview --enable-webviewwebkit --enable-mediactrl --with-gtk=3.

I suggest you consider using a default shared, non-monolithic build instead.

Regards,

David

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4258
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by ONEEYEMAN » Sun Jun 28, 2020 4:15 pm

Hi,
This is not extra file - it is required for the web application.

Thank you.

thewxwguy
In need of some credit
In need of some credit
Posts: 3
Joined: Sun Jun 28, 2020 3:45 am

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by thewxwguy » Sun Jun 28, 2020 4:37 pm

DavidHart wrote:
Sun Jun 28, 2020 4:14 pm
Hi,

This is Linux, where static-linking is unusual and monolithic rare. I wouldn't be at all surprised if you were the first to try configuring with the particular combination of --with-opengl --disable-shared --enable-monolithic --enable-webview --enable-webviewwebkit --enable-mediactrl --with-gtk=3.

I suggest you consider using a default shared, non-monolithic build instead.

Regards,

David
Thanks for the info David. I'm admittedly new to the Linux developer world, after spending the majority of my time on Windows & Mac systems.

I'll try shifting to the default shared system instead.
Thank you :)

User avatar
saifcoder
Experienced Solver
Experienced Solver
Posts: 74
Joined: Thu Nov 16, 2017 9:32 pm

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by saifcoder » Wed Aug 12, 2020 12:17 am

I realy need to understand why a static linking will cause this problem?
https://trac.wxwidgets.org/ticket/18883
Debian 9 - GCC 6 - wxWidgets 3.1 U
Win 7 - GCC 5 - wxWidgets 3.1 U
Mac OS X 10.6 - GCC 4 - wxWidgets 3.1 U
i am in love with WX. Yes.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4258
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by ONEEYEMAN » Wed Aug 12, 2020 12:36 am

Hi,
This is usually frowned upon, because it might conflict with already installed libraries.
So, while it is supported, its not ideal to do that in production.

All those libraries that you statically link, might already be installed on the end-user system.
Because of the nature of the OS (Linux), the dynamic linker will try to look into the library name that is installed first.

Also, not everything can allow static linking according to the license agreement.

You need to be very careful and do a lot of testing by making sure that every single combination (your statically linking software and every version of every library you lik) will not conflict and will still perform as expected and that there will be no crashes when you run.

You should also need the guarantee from every single library you link statically (GTK, GDK, Cairo, GLib, ATK, etc) that you are allowed to do so.

Are you ready to do so? To invest thousands of man-hours just to test every possible combination of the libraries you link statically and their dependencies to guarantee there will be no crash?

It is completely different story on Windows - where there are different ways for dynamic linker to search for the DLL and to load an appropriate library. That's why most software on Windows uses static linking, while Linux/Unix/Mac use dynamic linking.

Because if at least one dependency of the library you link statically has a license restrictions - you are opening a huge lawsuit.

And for the conflict - all you need is to have a library already installed on the system that have API incompatibility. Then the crash is guaranteed.

Are you ready to do those testing and then continuously try to fix the internal bug inside the library just for the sake of not following de-facto standard of the OS?

Thank you.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4258
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by ONEEYEMAN » Wed Aug 12, 2020 12:37 am

Besides even if you get an approval from every single library - there is no guarantee that the licese will stay the same.
A good example is Qt - up until recently they prohibit static linking. And recently they started dual-licensing the library.

Thank you.
Last edited by ONEEYEMAN on Wed Aug 12, 2020 7:38 pm, edited 1 time in total.

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

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by DavidHart » Wed Aug 12, 2020 9:49 am

I really need to understand why a static linking will cause this problem?
No you don't ;) (though I agree it's a wx bug and it would be nice if it were fixed).

Trying to make a program work on 'Linux' by statically-linking it to wx will not be a success. That's because 'Linux' isn't a single 'thing'. Windows 10 is (afaik; my last Microsoft OS was Windows 98) so you can reasonably expect the same library dependencies to be available, and in the same locations, on all target boxes. But 'Linux' is different: it is really hundreds of different set-ups, and the only thing they can all be guaranteed to share is the Linux kernel (and the kernel may be a different version, though that seldom causes a user-space problem). In the same way that Windows is based on MSDOS, a Linux distro is based on the Linux kernel, but has large numbers of utilities and (usually) a gui, which will mostly be dynamically linked to multiple system libraries; and there is no guarantee that those libraries will all be present, with binary-compatible versions, in the same dirs, in all your target distro/versions. In fact the opposite is almost true: only the very simplest statically-linked wx program will be guaranteed to work.

You have an XY problem. Instead of static linking, use a solution that's designed for portability e.g. AppImage.

User avatar
saifcoder
Experienced Solver
Experienced Solver
Posts: 74
Joined: Thu Nov 16, 2017 9:32 pm

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by saifcoder » Wed Aug 12, 2020 7:37 pm

Thank you so much sir, I read every word you write attentively, I understand the nature of Linux as a shared lib philosophy, I work as desktop app developer right now, all old project are shared, except this one it's need to be portable as maximum possible (Linux). Yes the company already know about license law's, however I'm sorry if I didn't correctly explained in #18883 only WX is going to be static, GTK / WebKit will still shared.

Can you please answer me here?

Cheers.
Debian 9 - GCC 6 - wxWidgets 3.1 U
Win 7 - GCC 5 - wxWidgets 3.1 U
Mac OS X 10.6 - GCC 4 - wxWidgets 3.1 U
i am in love with WX. Yes.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4258
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by ONEEYEMAN » Wed Aug 12, 2020 7:48 pm

Hi,
saifcoder wrote:
Wed Aug 12, 2020 7:37 pm
Thank you so much sir, I read every word you write attentively, I understand the nature of Linux as a shared lib philosophy, I work as desktop app developer right now, all old project are shared, except this one it's need to be portable as maximum possible (Linux). Yes the company already know about license law's, however I'm sorry if I didn't correctly explained in #18883 only WX is going to be static, GTK / WebKit will still shared.
Do you understand the difference between dynamic and static linking? Let me give you a good free lesson.

When you build the library statically, and this library depends on another library, the dependency will also be linked statically. And if that library is also dependent on the 3rd library - this 3rd library will also be linked statically.

This is how every single linker works across the univeerse (be it Windows, Linux, OSX, Solaris, HP-UX, etc). NO EXCEPTIONS!!!

Therefore you can't possibly make a program where half of the dependencies are static, while the other half is dynamic. Period.
Its not possible. It doesn't work like this. It is hardcoded inside every single linker (MSVC, ldd, etc).

So, now explain to me - why do you want to build statically and be very careful - wxWidgets is a PORTABLE LIBRARY!!! Which means you have one code base and you can compile it on many different platforms, with confirming to the platforms both de-jure and de-facto standards.

And finally - based on your last expressiion I quoted above - I think you should go back to school to understand how the development process works. ;-)

Thank you.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4258
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Ubuntu 20 - Web extension not found in "/usr/local/lib/wx/3.1.3/web-extensions

Post by ONEEYEMAN » Wed Aug 12, 2020 7:52 pm

David,
DavidHart wrote:
Sun Jun 28, 2020 4:14 pm
Hi,

This is Linux, where static-linking is unusual and monolithic rare. I wouldn't be at all surprised if you were the first to try configuring with the particular combination of --with-opengl --disable-shared --enable-monolithic --enable-webview --enable-webviewwebkit --enable-mediactrl --with-gtk=3.

I suggest you consider using a default shared, non-monolithic build instead.

Regards,

David
All this monolithic crap comes from some stupid Internet/YouTube web site that someone produced in 1990-ties.

It is old, it is outdated and its crap.

Thank you.

Post Reply