Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 601326

Summary: www-client/firefox-50 should not depend on x11-libs/gtk+:2
Product: Gentoo Linux Reporter: fkater <fkater>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED OBSOLETE    
Severity: normal CC: alexander, bkohler, fturco, ostash, wkg
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=613524
Whiteboard:
Package list:
Runtime testing required: ---

Description fkater 2016-12-01 08:39:45 UTC
Situation: I've compiled firefox-50 on arm64 against gtk+:3. I don't even have
gtk+:2 on my system. Firefox works fine.

Problem: When resolving world package dependencies in depth, portage wants me
to install gtk+:2 for firefox.

Workaround for me (I am using paludis/cave):

* Open the two files /var/db/pkg/www-client/firefox-50.0.1/DEPEND and RDEPEND

* Change ">=x11-libs/gtk+-2.18:2" into ">=x11-libs/gtk+-2.18"

Remarks: I don't fully understand the firefox ebuild. But IMHO the firefox
installation somehow marks itself still dependent on gtk+:2.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-12-01 08:52:15 UTC
commit 00b1fa774f05e16d855dbf39e42d2eb6a7483ab7
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Thu Dec 1 09:49:51 2016

    mozconfig-v6.49.eclass: Make dependency on gtk+:2 optional (bug #601326).
Comment 2 fkater 2016-12-01 19:57:49 UTC
Thanks for the fast reply.

I just tried firefox-50.0.2 but got this. Not sure if this is related to
the above fix or something else, though.


checking for gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0 ... yes
checking MOZ_GTK3_CFLAGS... -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0/unix-print  -pthread
checking MOZ_GTK3_LIBS... -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
checking for gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-2.0 gdk-x11-2.0... Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH environment variable Package 'gtk+-2.0', required by 'world', not found Package 'gtk+-unix-print-2.0', required by 'world', not found Package 'gdk-x11-2.0', required by 'world', not found
configure: error: Library requirements (gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-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.
DEBUG: <truncated - see config.log for full output>
DEBUG: configure:13004: /usr/bin/x86_64-pc-linux-gnu-gcc -std=gnu99 -c -march=native -g0 -pipe  -fno-strict-aliasing -fno-math-errno -pthread  conftest.c 1>&5
DEBUG: configure:13051: checking for gzread in -lz
DEBUG: configure:13070: /usr/bin/x86_64-pc-linux-gnu-gcc -std=gnu99 -o conftest -march=native -g0 -pipe  -fno-strict-aliasing -fno-math-errno -pthread  -lpthread -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wl,-z,text conftest.c -lz  -ldl  1>&5
DEBUG: configure:13105: /usr/bin/x86_64-pc-linux-gnu-gcc -std=gnu99 -c -march=native -g0 -pipe  -fno-strict-aliasing -fno-math-errno -pthread  conftest.c 1>&5
DEBUG: configure:13153: checking for BZ2_bzread in -lbz2
DEBUG: configure:13172: /usr/bin/x86_64-pc-linux-gnu-gcc -std=gnu99 -o conftest -march=native -g0 -pipe  -fno-strict-aliasing -fno-math-errno -pthread  -lpthread -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wl,-z,text conftest.c -lbz2  -ldl  1>&5
DEBUG: configure:13221: checking for png_get_valid in -lpng
DEBUG: configure:13240: /usr/bin/x86_64-pc-linux-gnu-gcc -std=gnu99 -o conftest -march=native -g0 -pipe  -fno-strict-aliasing -fno-math-errno -pthread  -lpthread -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wl,-z,text conftest.c -lpng  -ldl  1>&5
DEBUG: configure:13262: checking for png_get_acTL in -lpng
DEBUG: configure:13281: /usr/bin/x86_64-pc-linux-gnu-gcc -std=gnu99 -o conftest -march=native -g0 -pipe  -fno-strict-aliasing -fno-math-errno -pthread  -lpthread -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,-z,relro,-z,now -Wl,-z,noexecstack -Wl,-z,text conftest.c -lpng  -ldl  1>&5
DEBUG: configure:13329: /usr/bin/x86_64-pc-linux-gnu-gcc -std=gnu99 -c -march=native -g0 -pipe  -fno-strict-aliasing -fno-math-errno -pthread  conftest.c 1>&5
DEBUG: configure:13457: checking for libffi >= 3.0.9
DEBUG: configure:13464: checking MOZ_FFI_CFLAGS
DEBUG: configure:13469: checking MOZ_FFI_LIBS
DEBUG: configure:13707: checking if app-specific confvars.sh exists
DEBUG: configure:14683: checking for gtk+-3.0 >= 3.4.0 gtk+-unix-print-3.0 glib-2.0 gobject-2.0
DEBUG: configure:14690: checking MOZ_GTK3_CFLAGS
DEBUG: configure:14695: checking MOZ_GTK3_LIBS
DEBUG: configure:14776: checking for gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-2.0 gdk-x11-2.0
DEBUG: configure: error: Library requirements (gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-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.
ERROR: old-configure failed
*** Fix above errors and then restart with\
"make -f client.mk build"
 client.mk:373: recipe for target 'configure' failed
 make: *** [configure] Error 1

 !!! ERROR in www-client/firefox-50.0.2::gentoo:
 !!! In /usr/libexec/paludis/utils/emake at line 30
 !!! emake returned error 2
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2016-12-02 17:10:12 UTC
(In reply to F. Kater from comment #2)
> Thanks for the fast reply.
> 
> I just tried firefox-50.0.2 but got this. Not sure if this is related to
> the above fix or something else, though.


So all Poly-C's patch did was remove the RDEPEND on gtk+:2 which allows you to install it if the build system didn't actually need it.  The problem is, I am still fairly certain that there are components within the firefox codebase that do still need gtk+:2.  This may change in firefox-53 and above, but for now, I believe that it is indeed still a requirement even when cairo-gtk3 is the toolkit requested.

I'm going to revert this commit until such time as gtk3-only builds can be ensured.
Comment 4 Jory A. Pratt gentoo-dev 2017-02-03 03:31:46 UTC
*** Bug 607982 has been marked as a duplicate of this bug. ***
Comment 5 Ben Kohler gentoo-dev 2017-03-14 16:39:17 UTC
What's the status on this? Why are current firefox ebuilds not depending on gtk+:2?  The dependencies should reflect what's actually required, not what you wish was required =)
Comment 6 Ian Stakenvicius (RETIRED) gentoo-dev 2017-03-22 15:09:52 UTC
*** Bug 613524 has been marked as a duplicate of this bug. ***
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2017-05-05 19:32:19 UTC
Dependencies have been added back.

So firefox etc will continue to depend on gtk+:2 until such time as flash support is dropped; although npapi plugins in general are banned, the functionality is still there to support flash and so the dep is still required.
Comment 8 Jory A. Pratt gentoo-dev 2017-08-26 17:55:28 UTC
If you feel I have closed your bug and it is still a current issue, please reopen and update it completely. We will not work bugs that have no ebuild in tree any longer or can not be reproduced with a current system.

Thank You for your support and understanding
The Mozilla Team