https://bugs.archlinux.org/task/47398
My builds still link against gtk+:2 via libgtk-x11-2.0.so.0 , I'm not convinced that dropping the dep is a good idea since that'll just convert it to a magic-dep... I'll try to run this down for the v61 release and see if it can be mitigated or skipped.
it is dlopened when flash is loaded
also automagic dependencies generally refer to the case where a program requires different packages at runtime depending on what was installed at compile time, and this is not controlled by USE flags. this is not an automagic dependency, it is an optional dependency. with modern firefox, you literally just need to move the dependency from the one variable to the other (and ensure that flash depends on gtk2).
I agree with Ian: Latest Firefox (62.0.2) still builds and installs /usr/lib64/firefox/gtk2/libmozgtk.so which links against libgtk-x11-2.0.so.0: > $ equery belongs /usr/lib64/libgtk-x11-2.0.so.0 > * Searching for /usr/lib64/libgtk-x11-2.0.so.0 ... > x11-libs/gtk+-2.24.32-r1 (/usr/lib64/libgtk-x11-2.0.so.0.2400.32) > x11-libs/gtk+-2.24.32-r1 (/usr/lib64/libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.2400.32) So we will need it in DEPEND and RDEPEND. It is currently in CDEPEND helper variable which is in DEPEND and RDEPEND so I see nothing left we can do here. I also see no option to disable mozgtk2. I tend to close this as invalid.
well, then you might as well throw out the whole idea of "plugins" and "optional dependencies" if you don't believe in dlopen
I am not sure if you understand the problem: The problem is that firefox will pick up and link against libgtk-x11-2.0.so library, at least when available, during build (I haven't tested if firefox will fail to build at all when this library is absent). I am not aware of any parameter in firefox's build system to control the usage ob libgtk-x11-2. If this library isn't really used (and maybe not even listed in upstream's own requirement list -- haven't check that), it would be a 'automagic dependency', see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies tl;dr As long as firefox will link against libgtk-x11-2 during build when this library is available, we must keep that library in DEPEND. Feel free to provide a patch which will fix firefox build system so that firefox won't link against that library anymore even when available.
then I guess you should make pulseaudio a forced dependency, because dlopen doesn't exist.
I'm quite confused why Hello71 thinks that gtk:2 is a built-time dependency. Firefox installs libmozgtk.so, which links against gtk:2 (not dlopen!). ET_DYN libpthread.so.0,libgtk-x11-2.0.so.0,libgdk-x11-2.0.so.0 /usr/lib64/firefox/gtk2/libmozgtk.so Whether /usr/bin/firefox dlopens libmozgtk.so doesn't seem material to the point.
If /usr/lib64/firefox/gtk2/libmozgtk.so was using dlopen() for libgtk-x11-2.0.so.0 and was not linked against libgtk-x11-2.0.so.0, then not including x11-libs/gtk+:2 in RDEPEND might be acceptable. In current situation (where linking against libgtk-x11-2.0.so.0 is present), not including x11-libs/gtk+:2 in RDEPEND could result in warnings from package managers and other tools. If any change was to be made, acceptable solution might be: IUSE="... gtk2" (or IUSE="... +gtk2") DEPEND="... gtk2? ( >=x11-libs/gtk+-2.18:2 )" RDEPEND="... gtk2? ( >=x11-libs/gtk+-2.18:2 )" ... src_install() { ... if ! gtk2 && [[ -f ${ED}${MOZILLA_FIVE_HOME}/gtk2/libmozgtk.so ]]; then rm "${ED}${MOZILLA_FIVE_HOME}/gtk2/libmozgtk.so" || die fi
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #9) > If /usr/lib64/firefox/gtk2/libmozgtk.so was using dlopen() for > libgtk-x11-2.0.so.0 and was not linked against libgtk-x11-2.0.so.0, then not > including x11-libs/gtk+:2 in RDEPEND might be acceptable. > > In current situation (where linking against libgtk-x11-2.0.so.0 is present), > not including x11-libs/gtk+:2 in RDEPEND could result in warnings from > package managers and other tools. > > If any change was to be made, acceptable solution might be: > > IUSE="... gtk2" (or IUSE="... +gtk2") > DEPEND="... gtk2? ( >=x11-libs/gtk+-2.18:2 )" > RDEPEND="... gtk2? ( >=x11-libs/gtk+-2.18:2 )" > ... > src_install() { > ... > if ! gtk2 && [[ -f ${ED}${MOZILLA_FIVE_HOME}/gtk2/libmozgtk.so ]]; then > rm "${ED}${MOZILLA_FIVE_HOME}/gtk2/libmozgtk.so" || die > fi yeah, preserved-libs is upset about it, and I couldn't find any easy way to exclude it.
(In reply to Alex Xu (Hello71) from comment #10) > yeah, preserved-libs is upset about it, and I couldn't find any easy way to > exclude it. This is one of reasons why you should not try to exclude dependency of installed file from RDEPEND. Only not installing of given file (preferably preceded by not building it, but maybe not achievable in this case) would be acceptable.