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 »

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 »

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: 4254
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 »

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: 7481
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 »

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 »

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: 80
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 »

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.x U
Win 10 - GCC 8 - wxWidgets 3.x U
Mac OS X 10.x - Clang - wxWidgets 3.x U
i am in love with WX. Yes.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7481
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 »

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: 7481
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 »

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: 4254
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 »

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: 80
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 »

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.x U
Win 10 - GCC 8 - wxWidgets 3.x U
Mac OS X 10.x - Clang - wxWidgets 3.x U
i am in love with WX. Yes.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7481
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 »

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: 7481
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 »

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.
User avatar
saifcoder
Experienced Solver
Experienced Solver
Posts: 80
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 »

Thank you, Okay, first using "monolithic" was did by thewxwguy not me. second I know the difference between the static and dynamic linking, but did you know that wxWidgets support static linking natively ? the static option in configure exist for a reason, look here in your WiKi Linking With Gtk And Running On Any Linux.

What I'm trying to do is found a solution for a specific problem, the company have a complex internat private Cloud servers with multiples Linux nodes, one of them generate and destroyed on demand, they ask me to create a small beautiful tool with nice HTML5 UI (webview) that can run without installing any external lib.. I know GTK2 + GTK3 + WebKitGTK + WebKitGTK2 v4.0 is already shipped with this Debian distro, so I easily build a WX3-GTK2-WebKitGTK1 statically and it's run fine on the node in a portable way!. Just, I added this comment to say that my project broke after upgrading to GTK3 and WebKitGTK2!.

I'm sorry, but you are talking about static linking like it's "completely" a stupid wrong thing!, but it's just a 7mb app [bin + lib + lib + lib] + [system libs]..

Yesterday my boss ask me why you are using WX on this tool? he told me to think about just use GTK3+WebKitGTK2 !!
it's just I like WX and I used on small tool and big projects :)

Thank you.
Debian 9 - GCC 6 - wxWidgets 3.x U
Win 10 - GCC 8 - wxWidgets 3.x U
Mac OS X 10.x - Clang - wxWidgets 3.x U
i am in love with WX. Yes.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7481
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 »

Hi,
saifcoder wrote: Fri Aug 14, 2020 12:20 pm Thank you, Okay, first using "monolithic" was did by thewxwguy not me. second I know the difference between the static and dynamic linking, but did you know that wxWidgets support static linking natively ? the static option in configure exist for a reason, look here in your WiKi Linking With Gtk And Running On Any Linux.
I know about monolithic option - but it doesn't gain you anything.
In fact in the past there was many issues with it - just check the forums postings. Running the application resulted in random crashes and the cause was - building wxWidgets as monolithic.
Also - I think that the test builds wxWidgets team running on GitHub doesn't do monolithic.
It is still supported however.

The static linking is supported. However, building statically linked application on Linux/Max OS might result in a lot of issues as continuosly explained to you by me and David (license and possibility of random crashes).
Also, keep in mind that it is possible to build wxWidgets with configure on Windows (using MSYS{2}), or build cross-compiling for Windows on Linux. In those cases you want to do static linking as it is preferred method of the build on Windows. Even CRT.
Also - why do you think wxWidgets didn't do Qt until very recently, which is C++ library and worked with GTK which is C? License.
saifcoder wrote: Fri Aug 14, 2020 12:20 pm What I'm trying to do is found a solution for a specific problem, the company have a complex internat private Cloud servers with multiples Linux nodes, one of them generate and destroyed on demand, they ask me to create a small beautiful tool with nice HTML5 UI (webview) that can run without installing any external lib.. I know GTK2 + GTK3 + WebKitGTK + WebKitGTK2 v4.0 is already shipped with this Debian distro, so I easily build a WX3-GTK2-WebKitGTK1 statically and it's run fine on the node in a portable way!. Just, I added this comment to say that my project broke after upgrading to GTK3 and WebKitGTK2!.

I'm sorry, but you are talking about static linking like it's "completely" a stupid wrong thing!, but it's just a 7mb app [bin + lib + lib + lib] + [system libs]..

Yesterday my boss ask me why you are using WX on this tool? he told me to think about just use GTK3+WebKitGTK2 !!
it's just I like WX and I used on small tool and big projects :)

Thank you.
I understand all of this.
But if you company uses Debian only distro, why not build this dynamically?
Or even create a .deb installer and spread it out on all machines?

Besides as I understand correctly, all of them are already have GTK and its dependencies as well as WebKitGTK2?
You would save yourself a lot of time.

And yes - static linking on Linux/OSX is a bad thing - because of the OS nature.
But as said above - you can either cross-compile from Linux for Windows or build on Windows with configure.

Thank you.
User avatar
saifcoder
Experienced Solver
Experienced Solver
Posts: 80
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 »

I just decide to say goodby to static linking on Linux!!
Maybe you don't know, but your help, answers, info's, since two years ago has helped me to write some WX tools for this company and then I get a permanent job position, so Thank you so much Mr. OneEyeMan and David Hart :)

Thanks to all members Sun Jan 05, 2020.

:wink:
Debian 9 - GCC 6 - wxWidgets 3.x U
Win 10 - GCC 8 - wxWidgets 3.x U
Mac OS X 10.x - Clang - wxWidgets 3.x U
i am in love with WX. Yes.
Post Reply