Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Palemoon uses gtk2 libs with USE="gtk3"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Sun Jul 16, 2023 8:02 pm    Post subject: Palemoon uses gtk2 libs with USE="gtk3" Reply with quote

Palemoon has a build time dependency on gtk2, even with USE="gtk3"
It uses the gtk2 headers at some point in the build process and links some stuff against gtk2 libs.
I assume this is known to the maintainer, as USE="gtk2" is forced. However this is a bad workaround, as USE="gtk2" forces USE="-gtk3".
All gtk2 is used for is to build a library in /usr/lib64/palemoon/gtk2.
Palemoon doesn't need that library, as removing the gtk2 libs, that library, or both doesn't prevent palemoon from working.
I even added that path to my INSTALL_MASK and everything works.
If that library was used at all, starting palemoon would fail with a loading shared object error.
This tells me that the build-time dependency on gtk2 is probably a bug.

As a better workaround, I created this:
https://github.com/stefan11111/fake-gtk2

I don't thing I can optimize it more, as the source files are empty files, so any further optimization in that can only be achieved through compile flags.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2851

PostPosted: Sun Jul 16, 2023 8:31 pm    Post subject: Reply with quote

Does palemoon still support old npapi? aka to run flash or other similar plugins

Firefox truly dropped gtk2 after it got rid of npapi, given even though it used gtk3 that bit still needed gtk2, and it'd fail you tried to use plugins without gtk2 (but otherwise not).
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Sun Jul 16, 2023 8:37 pm    Post subject: Reply with quote

Ionen wrote:
Does palemoon still support old npapi? aka to run flash or other similar plugins

Firefox truly dropped gtk2 after it got rid of npapi, given even though it used gtk3 that bit still needed gtk2, and it'd fail you tried to use plugins without gtk2 (but otherwise not).

I doesn't seem like it does. I tried some adobe flash tests and they indicated that flash does not work.
But shouldn't palemoon not start it it actually tried to load those gtk2 libs?
Also, who uses flash?
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Mon Jul 17, 2023 2:38 pm    Post subject: Reply with quote

stefan11111 wrote:
Ionen wrote:
Does palemoon still support old npapi? aka to run flash or other similar plugins

Firefox truly dropped gtk2 after it got rid of npapi, given even though it used gtk3 that bit still needed gtk2, and it'd fail you tried to use plugins without gtk2 (but otherwise not).

I doesn't seem like it does. I tried some adobe flash tests and they indicated that flash does not work.
But shouldn't palemoon not start it it actually tried to load those gtk2 libs?
Also, who uses flash?

Seems like I was wrong:
Quote:
Will continue to support NPAPI plugins like Silverlight, Adobe Flash and Java

_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 439
Location: Naarm/Melbourne, Australia

PostPosted: Tue Jul 18, 2023 7:36 am    Post subject: Reply with quote

In terms of the continued use of Flash more generally, here's a quote from the relevant Wikipedia article:
Quote:
Internet Explorer 11, along with IE mode in Edge, will continue with ActiveX support, and by extension Flash Player support. Firefox forks that plan to continue NPAPI support, and by extension Flash Player support, include Waterfox, Basilisk, Pale Moon, and K-Meleon. Various Chromium-based Chinese browsers will also continue to support Flash Player in PPAPI and/or NPAPI form, including, but not limited to, 360 Secure Browser.
Back to top
View user's profile Send private message
rab0171610
Guru
Guru


Joined: 24 Dec 2022
Posts: 420

PostPosted: Tue Jul 18, 2023 8:10 am    Post subject: Reply with quote

The palemoon ebuild sets up the nsplugin (old Netscape plugins) directory:
Code:
src_prepare() {
   # Ensure that our plugins dir is enabled by default:
   sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
      "${S}/platform/xpcom/io/nsAppFileLocationProvider.cpp" \
      || die "sed failed to replace plugin path for 32bit!"
   sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
      "${S}/platform/xpcom/io/nsAppFileLocationProvider.cpp" \
      || die "sed failed to replace plugin path for 64bit!"

I doubt it is intended to be used for Adobe Flash or Silverlight, as both are now discontinued. Maybe there is still some java/js in use somewhere.
The only ebuild that still has an nsplugin use flag is lightspark which is an open source flash alternative that states it now only works in some alternative browsers.
My guess is that since Palemoon is a maintained fork of an older Firefox build that supported Netscape plugins, it likely is just legacy baggage that can't be removed without modifying a lot of code, even though it no longer provides much functionality.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2851

PostPosted: Tue Jul 18, 2023 4:47 pm    Post subject: Reply with quote

One problem with older firefox is that there was no switch to disable npapi and ripping out support wasn't entirely trivial, so you always needed gtk2 at build time regardless of if you want to use it or not (iirc you can remove the resulting library at runtime for a binary package though)

Haven't looked at what palemoon does, but if they have a old codebase and they haven't worked on that.. then odds are it's stuck with it for (at least) building.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 934
Location: Romania

PostPosted: Tue Jul 18, 2023 6:13 pm    Post subject: Reply with quote

Ionen wrote:
One problem with older firefox is that there was no switch to disable npapi and ripping out support wasn't entirely trivial, so you always needed gtk2 at build time regardless of if you want to use it or not (iirc you can remove the resulting library at runtime for a binary package though)

Haven't looked at what palemoon does, but if they have a old codebase and they haven't worked on that.. then odds are it's stuck with it for (at least) building.

That's what I did.
I added the gtk2 lib and it's gtk2 directory to my INSTALL_MASK, copied the headers from gtk2 and added empty files to be compiled as dummy shared libs.
I wrote a Makefile and ebuild to automate that.
Somehow, those empty shared libs are almost 9k each.
For now, this solution will have to do if the proper solution involves way more work.
Still, forcefully enabling USE="gtk2", which implies USE="-gtk3" really seems like the worst way to handle this.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22618

PostPosted: Tue Jul 18, 2023 6:55 pm    Post subject: Reply with quote

I can think of one worse way: not forcefully enabling USE=gtk2 (and making no other changes to the source), so that users can set USE='-gtk2 gtk3', then get a build failure when the upstream build tries to use gtk2 anyway and it is not installed. The current setup is not ideal, but it beats having users able to trigger a build failure with easily settable options. This is especially true now that most people probably have USE='-gtk2 gtk3' as their system defaults regarding gtk+.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum