Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 858191 - www-client/google-chrome: doesn't need wayland dependency
Summary: www-client/google-chrome: doesn't need wayland dependency
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-15 11:21 UTC by Paweł Różański
Modified: 2022-09-11 21:04 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Różański 2022-07-15 11:21:18 UTC
It's my second exact the same report (some months ago  chrome was 'waylanded' without need as well)

Works flawlessly right now.

--- /var/db/repos/gentoo/www-client/google-chrome/google-chrome-103.0.5060.114.ebuild	2022-07-15 05:10:38.000000000 +0200
+++ /root/portage/www-client/google-chrome/google-chrome-103.0.5060.114-r999.ebuild	2022-07-15 13:04:32.007000000 +0200
@@ -38,7 +38,6 @@
 	dev-libs/glib:2
 	dev-libs/nspr
 	>=dev-libs/nss-3.26
-	dev-libs/wayland
 	media-fonts/liberation-fonts
 	media-libs/alsa-lib
 	media-libs/mesa[gbm(+)]
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-15 11:24:15 UTC
And yet bug 854882 (so not flawlessly).

I don't think we can make everybody happy here.
Comment 2 Paweł Różański 2022-07-15 12:37:42 UTC
I confirm that WebGL doesn't work on my system - it was working some time ago. Hard for me to say if lack of wayland is culprit. It is not 'flawlessly'

The case is that I really don't care :) about pam, pulseaudio, systemd , webgl ... these are on the same page for me "optional by USE flag".

There will be *any* flag for this - i'll gladly will use it for this particular package. Can live with my custom overlay as well. So don't bother much about me.

But still, hard dependency for something which is not needed per se - distorts my concept of aesthetics. Chrome doesn't need wayland - it can be used but it's not hard dependency. Maybe dependency could be based on https://packages.gentoo.org/useflags/wayland - or on some gl flag.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-15 12:44:20 UTC
(In reply to Paweł Różański from comment #2)
> I confirm that WebGL doesn't work on my system - it was working some time
> ago. Hard for me to say if lack of wayland is culprit. It is not 'flawlessly'
> 
> The case is that I really don't care :) about pam, pulseaudio, systemd ,
> webgl ... these are on the same page for me "optional by USE flag".
> 
> There will be *any* flag for this - i'll gladly will use it for this
> particular package. Can live with my custom overlay as well. So don't bother
> much about me.
> 
> But still, hard dependency for something which is not needed per se -
> distorts my concept of aesthetics. Chrome doesn't need wayland - it can be
> used but it's not hard dependency. Maybe dependency could be based on
> https://packages.gentoo.org/useflags/wayland - or on some gl flag.

The problem is it's a binary so we can't control it properly. I'm not the real Chromium maintainer so I'll defer to them.

(It's a lot like cups and OpenJDK.)

Binaries like this are cheap to "rebuild" so in theory a USE flag, while a bit naughty, would be permissible here if they want to go with it.

But I understand your feelings. We'll see what chromium@ says. Just know I didn't add it for no reason :)
Comment 4 Paweł Różański 2022-07-15 12:50:56 UTC
Haha I even started to write my custom cups library (with empty calls) - because some packages *really* need printer support :). So I'm glad that we are on the same page.

Thanks for your understanding and describing "why?" - it will be easier for me to live with my custom overlay in 'worst case scenario'.
Comment 5 Hypoon 2022-07-15 17:48:31 UTC
I'm also in favor of removing the dependency. Even if it loses hardware acceleration, Chrome still functions without it. Optional features should have optional dependencies.
Comment 6 Hypoon 2022-07-15 19:18:32 UTC
After some discussion on IRC and after reviewing the previous ticket which justified adding the dependency, I need to amend my comment.

Without installing Wayland, passing the "--use-gl=desktop" command-line option also reactivates hardware-accelerated rendering. My statement that "Chrome still functions without it" is partially undermined by the fact that I was already passing this command-line option for an unrelated reason.

When I can, I'll test whether I still have hardware-acceleration in Chrome without the command-line option (and without Wayland).

Regardless, I think we need to establish why a command-line option can restore functionality that otherwise seems to require extra software. These types of investigations are inherently hindered by distributing the software as binaries, but perhaps we can use Chromium to understand it.

To be clear: I don't think the command-line option is necessarily an appropriate solution, either. It just illustrates that there's more than we understand.
Comment 7 Paweł Różański 2022-07-15 22:39:47 UTC
I confirm that "google-chrome-stable --use-gl=desktop" enables WebGL on my non wayland system (quite bare-bone intel/mesa configuration).

It suggests that fix should be done upstream. This way ebuild without dependency would just work.
Comment 8 Hypoon 2022-07-18 17:32:27 UTC
I notice that chrome is run via a wrapper script which uses LD_LIBRARY_PATH to prioritize some libraries that Google ships. I wonder if this is necessary... perhaps we can avoid the Wayland dependency by using the system libraries instead. I'm going to test it when I get the opportunity.
Comment 9 Petr Šabata 2022-08-06 19:12:56 UTC
I see the dependency was removed again in 426b5a001bb75452d99e7e17de85c6a8fa563a9b, letting 'emerge --depclean' purge Wayland from my system.

However, Chrome is now reported as needing a rebuild and always gets pulled into the @preserved-rebuild set.  If you get bitten by this, remove the leftover files manually.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-07 05:02:35 UTC
(In reply to Petr Šabata from comment #9)
> I see the dependency was removed again in
> 426b5a001bb75452d99e7e17de85c6a8fa563a9b, letting 'emerge --depclean' purge
> Wayland from my system.
> 
> However, Chrome is now reported as needing a rebuild and always gets pulled
> into the @preserved-rebuild set.  If you get bitten by this, remove the
> leftover files manually.

That was actually an error, I'm afraid.
Comment 11 Larry the Git Cow gentoo-dev 2022-08-07 05:05:39 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c5bd48fde46ec511e402858a736b9567a981f00

commit 8c5bd48fde46ec511e402858a736b9567a981f00
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-07 05:04:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-07 05:05:18 +0000

    www-client/google-chrome-unstable: restore wayland dep
    
    Accidentally dropped in d25674f30fde206e9c20051e635b8d4836b3c94d
    
    Bug: https://bugs.gentoo.org/858191
    Bug: https://bugs.gentoo.org/854882
    Signed-off-by: Sam James <sam@gentoo.org>

 ...5.0.5195.19.ebuild => google-chrome-unstable-105.0.5195.19-r1.ebuild} | 1 +
 1 file changed, 1 insertion(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=076e61641e78707b249c24424fe705bf242562ab

commit 076e61641e78707b249c24424fe705bf242562ab
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-07 05:04:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-07 05:05:17 +0000

    www-client/google-chrome-beta: restore wayland dep
    
    Accidentally dropped in d25674f30fde206e9c20051e635b8d4836b3c94d
    
    Bug: https://bugs.gentoo.org/858191
    Bug: https://bugs.gentoo.org/854882
    Signed-off-by: Sam James <sam@gentoo.org>

 ...a-105.0.5195.19.ebuild => google-chrome-beta-105.0.5195.19-r1.ebuild} | 1 +
 1 file changed, 1 insertion(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=999213ba4b19e0a0b90b3ba788e1083bcb334782

commit 999213ba4b19e0a0b90b3ba788e1083bcb334782
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-07 05:03:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-07 05:05:17 +0000

    www-client/google-chrome: restore wayland dep
    
    Accidentally dropped in d25674f30fde206e9c20051e635b8d4836b3c94d
    
    Bug: https://bugs.gentoo.org/858191
    Bug: https://bugs.gentoo.org/854882
    Signed-off-by: Sam James <sam@gentoo.org>

 ...chrome-104.0.5112.79.ebuild => google-chrome-104.0.5112.79-r1.ebuild} | 1 +
 1 file changed, 1 insertion(+)
Comment 12 Hypoon 2022-08-10 14:41:10 UTC
I still intend to do the tests I described. I'm wrapping up a couple of projects at work, so in a few more days I'll be able to poke around and see what I can find.

My workaround,

emerge -avDNu @world --exclude="www-client/google-chrome" && emerge -avu --nodeps www-client/google-chrome

does not make depclean happy.
Comment 13 Mike Gilbert gentoo-dev 2022-08-10 22:34:31 UTC
wayland is a fairly lightweight dependency, and it is needed by libGLESv2.so. I don't see any compelling reason to make it optional.
Comment 14 Hypoon 2022-08-10 22:48:06 UTC
I disagree. libGLESv2.so may require wayland, but libGLESv2.so itself may not be required. Chrome works very well for me and for others, despite the missing wayland library. I suspect it is because Chrome does not require libGLESv2.so, it simply uses it by default.
Comment 15 Paweł Różański 2022-09-11 21:01:31 UTC
... and installing protocol for only one application which doesn't use it anyway seems like "let's install random small non used package because it is small".
It is the very reason I use gentoo - to not do this.

Anyway I found solution for other frustrated ones.

$ cat /etc/portage/profile/package.provided 
dev-libs/wayland-1.999.0

Of course it will be pita when i will want to install it. On this particular system it will never happen - so I predict that I forget this line in 4 weeks :)
Comment 16 Paweł Różański 2022-09-11 21:04:03 UTC
This is not INVALID - chrome works without wayland and with opengl.