Do not build NPAPI on Linux platform
Categories
(Core Graveyard :: Plug-ins, enhancement)
Tracking
(Not tracked)
People
(Reporter: okias, Unassigned)
References
()
Details
Attachments
(1 obsolete file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Steps to reproduce:
Placeholder for patches to drop flash support - NPAPI for Linux platform.
Goal of these patches is remove dependency on old GTK2 libraries required to build Firefox.
Reporter | ||
Comment 1•4 years ago
|
||
from some weird reason this patch fails at:
0:18.06 In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/stl_algobase.h:60,
0:18.07 from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/specfun.h:45,
0:18.07 from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/cmath:1927,
0:18.08 from /var/tmp/notmpfs/portage/www-client/firefox-80.0.1-r1/work/firefox-80.0.1/ff/dist/system_wrappers/cmath:3,
0:18.08 from /var/tmp/notmpfs/portage/www-client/firefox-80.0.1-r1/work/firefox-80.0.1/ff/dist/stl_wrappers/cmath:52,
0:18.08 from /var/tmp/notmpfs/portage/www-client/firefox-80.0.1-r1/work/firefox-80.0.1/ff/dist/include/mozilla/MathAlgorithms.h:14,
0:18.09 from /var/tmp/notmpfs/portage/www-client/firefox-80.0.1-r1/work/firefox-80.0.1/gfx/gl/GLContextProviderGLX.cpp:17:
0:18.09 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/functexcept.h:48:3: error: conflicting declaration of 'void std::__throw_bad_exception()' with 'C++' linkage
0:18.09 48 | __throw_bad_exception(void) __attribute__((__noreturn__));
0:18.09 | ^~~~~~~~~~~~~~~~~~~~~
but hopefully I'll solve it soon.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 2•4 years ago
|
||
This patch is just mashup to measure if it's worth to not build NPAPI for Linux. If it gives improvement in loading time or build-size, I'd go for temporarily adding build option or just maintain patch until NPAPI gets dropped.
Comment 3•4 years ago
|
||
Hi,
I will move this over to a component so developers can take a look over it. If is not the correct component please feel free to change it to an appropriate one.
Thanks for the enhancement suggestion.
Best regards, Clara.
Updated•4 years ago
|
Comment 4•4 years ago
|
||
Using David's patch as a base I have succeeded in building Firefox without GTK+2 present. My additional changes are a little sloppy in places (breaks support for macOS likely, among other things) but I'll be cleaning it up over the net week or so. My goal was to get this working first.
The patch has been redone to target Firefox 81.0bX and works fine under Wayland but is untested with X11. To fix the aforementioned error above I had to (most likely) break support for X11 by removing some if blocks (see gfx/gl/GLContextProviderWayland.cpp) and a few includes of gdk/gdk.h. Again, I'll be cleaning this up. This seems to have been required to remove the conflicting declarations, any insight is appreciated.
If the change is desirable upstream, I'm happy to submit this through proper channels. If David would like to continue working on this I'm also happy to end things with this comment and hope that at the very least my modifications save you some time. My overall goal is a system based on Wayland but without any X11 present. This is more or less a step in this direction.
Comment 5•4 years ago
|
||
Did some more testing and can confirm that the above patch (in its current state) works just fine in an environment with only X11 (no Wayland at all). It builds and runs without issue.
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 6•4 years ago
|
||
(In reply to dylan.araps from comment #4)
Using David's patch as a base I have succeeded in building Firefox without GTK+2 present. My additional changes are a little sloppy in places (breaks support for macOS likely, among other things) but I'll be cleaning it up over the net week or so. My goal was to get this working first.
The patch has been redone to target Firefox 81.0bX and works fine under Wayland but is untested with X11. To fix the aforementioned error above I had to (most likely) break support for X11 by removing some if blocks (see gfx/gl/GLContextProviderWayland.cpp) and a few includes of gdk/gdk.h. Again, I'll be cleaning this up. This seems to have been required to remove the conflicting declarations, any insight is appreciated.
If the change is desirable upstream, I'm happy to submit this through proper channels. If David would like to continue working on this I'm also happy to end things with this comment and hope that at the very least my modifications save you some time. My overall goal is a system based on Wayland but without any X11 present. This is more or less a step in this direction.
Wow, thank you for feedback. I gave up (since my coding skills are very limited), but if you plan to work on this further, I'm really happy!
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 7•4 years ago
|
||
Also here are some other patches which being slowly upstreamed into Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1661450
Comment 8•4 years ago
|
||
(In reply to David Heidelberg [:okias] from comment #2)
This patch is just mashup to measure if it's worth to not build NPAPI for Linux. If it gives improvement in loading time or build-size, I'd go for temporarily adding build option or just maintain patch until NPAPI gets dropped.
Is this still relevant? Isn't NPAPI only depending on Flash which will no longer be supported on firefox version > 84?
https://blog.mozilla.org/futurereleases/2020/11/17/ending-firefox-support-for-flash/
Reporter | ||
Comment 9•4 years ago
|
||
The underlying codebase will currently quickly changes, because plugins got disabled and some parts being removed. Nonetheless reviewing and sending patches which will #ifdef or remove unused stuff will be hopefully appreciated (also in small chunks, so this patch will likely not possible to merge).
I recommend to watch meta [1] for plugin removal and if possible to contribute :)
Reporter | ||
Comment 10•4 years ago
|
||
This series of patches seems to do work of this giant patch step by step, I recommend to follow this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1682030
Comment 11•4 years ago
|
||
Was trying to contribute but 1682030 really covers most of this bug AFAICT. Then it's just the disable gtk2 in mozgtk which is already in the patch above. After that, I guess we could kill mozgtk?
Comment 12•4 years ago
|
||
I suppose this can be closed, especially after bug 1682030 landed?
Reporter | ||
Comment 13•4 years ago
|
||
I assume it can! Thanks to everyone involved.
Updated•2 years ago
|
Description
•