GTK 2 required - Breaks build on Ubuntu 20.04
Categories
(Firefox Build System :: Bootstrap Configuration, defect)
Tracking
(Not tracked)
People
(Reporter: BenB, Unassigned)
Details
Environment:
- Ubuntu 20.04
Reproduction:
./mach bootstrap(see bug 162098)./mach build
Actual result:
- Configure fails, because it insists on GTK 2 development libraries. But GTK 2 is no longer available and installable on Ubuntu 20.04.
- I see no way to override it.
0:11.53 DEBUG: configure:8909: checking for gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 gio-unix-2.0
0:11.53 DEBUG: configure:8916: checking MOZ_GTK3_CFLAGS
0:11.53 DEBUG: configure:8921: checking MOZ_GTK3_LIBS
0:11.53 DEBUG: configure:8992: checking for gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-2.0 gio-unix-2.0 gdk-x11-2.0
0:11.53 DEBUG: configure: error: Library requirements (gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-2.0 gio-unix-2.0 gdk-x11-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
0:11.53 ERROR: old-configure failed
Expected result:
- configure notices that GTK 2 is not available, but GTK 3 is available, so it automatically disables GTK 2 support and builds with GTK 3 only.
- In release build mode, it issues a warning in this case.
- No override by developer (mozconfig etc.) should be necessary. This is the reason why configure exists, to adapt to the system configuration.
| Reporter | ||
Comment 1•6 years ago
|
||
I tried .../configure --enable-default-toolkit=cairo-gtk3, to no avail. It fails with the same error messages.
Comment 2•6 years ago
|
||
Not a blocker, as 20.04 isn't released yet and our infra won't use it for a while
| Reporter | ||
Comment 3•6 years ago
|
||
Seems like I was wrong and package libgtk2.0-dev is still available. This was clouded by bug 162098. So, demoting to Severity: Normal.
However, I still consider it a bug in configure to error in this case that GTK2 is not there and GTK3 is there. The purpose of configure is to adapt to the system configuration.
As much as I love GTK2 and hate GTK3, the sad fact is that GTK 2 is deprecated and even Mate stopped using it years ago. It shouldn't be an error when GTK2 is not there.
Comment 4•6 years ago
|
||
Configure does not silently disable features. GTK2 is required for a reason: NPAPI plugins. Silently disabling them when GTK2 is not found is not desirable.
| Reporter | ||
Comment 5•6 years ago
•
|
||
Sorry, but I have to disagree here. GTK2 and NPAPI are optional features.
a) configure does silently disable optional features, depending on system configuration and situation. https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Optional-Features.html Please note comment 0: "In release build mode, it issues a warning in this case."
b) NPAPI is dead since Firefox 52 that is since 3 years, and Flash is dead. And GTK2 is dead since years, too.
c) Worst: I cannot even manually disable GTK 2. I am required to install GTK 2, even if I my system doesn't have it and I don't want NPAPI.
Comment 6•6 years ago
|
||
(In reply to Ben Bucksch (:BenB) from comment #5)
Sorry, but I have to disagree here. GTK2 and NPAPI are optional features.
a) configure does silently disable optional features, depending on system configuration and situation. https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Optional-Features.html Please note comment 0: "In release build mode, it issues a warning in this case."
autoconf 2.65 documentation is irrelevant. Firefox is not using it.
b) NPAPI is dead since Firefox 52, and Flash is dead. And GTK2 is dead, too.
Flash is not dead until later this year. See bug 1455897.
c) Worst: I cannot even manually disable GTK 2. I am required to install GTK 2, even if I my system doesn't have it and I don't want NPAPI.
I think there's a bug about this but I can't find it in the dependencies of bug 1455897.
| Reporter | ||
Comment 7•6 years ago
•
|
||
autoconf 2.65 documentation is irrelevant.
The concept of optional features has been in autoconf since the beginning. The whole idea of autoconf is that I won't use GTK on a KDE system, nor KDE on a GTK system, and the build system works for both and automatically adapts. It's been doing that since year 2000 and before.
Comment 8•6 years ago
|
||
The concept of optional features has been in autoconf since the beginning.
And that is irrelevant because Firefox doesn't use autoconf (apart from some historic parts that are not relevant to this discussion, although this is getting too OT for this bug). Not every open source project uses autoconf.
Auto-disabling of features has also bitten us more than once in the past, which is why we don't auto-disable features. We do have explicit flags to disable some things, but NPAPI plugins is not one of them at the moment.
| Reporter | ||
Comment 9•6 years ago
|
||
Auto-disabling of features has also bitten us more than once in the past
I understand that. Which is why I specifically distinguished release builds from developer builds.
GTK 2 is dead since over 9 years. It's time to stop insisting on its existence, no matter the reason.
Firefox doesn't use autoconf
If that's true, there's yet another bug, because bootstrap installs autoconf213, specifically for compiling Firefox desktop.
Comment 10•6 years ago
|
||
(In reply to Ben Bucksch (:BenB) from comment #9)
Auto-disabling of features has also bitten us more than once in the past
I understand that. Which is why I specifically distinguished release builds from developer builds.
GTK 2 is dead since over 9 years. It's time to stop insisting on its existence, no matter the reason.
It might be dead, but it's still installable. Even on Ubuntu 20.04 by your admission. You can understand that that makes allowing to build without Gtk+2 rather low priority, especially considering it will happen "automatically" when Flash support is removed in a few months.
Firefox doesn't use autoconf
If that's true, there's yet another bug, because bootstrap installs
autoconf213, specifically for compiling Firefox desktop.
See the parenthesis that follows what you quoted.
Comment 11•6 years ago
|
||
Found the older bug!
Description
•