Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922194 - net-libs/accounts-qml-0.7_p20231028: error: XDG_RUNTIME_DIR is invalid or not set in the environment
Summary: net-libs/accounts-qml-0.7_p20231028: error: XDG_RUNTIME_DIR is invalid or not...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-01-16 03:53 UTC by Peter Levine
Modified: 2024-01-18 14:27 UTC (History)
3 users (show)

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


Attachments
accounts-qml-0.7_p20231028:20240116-033605.log (net-libs:accounts-qml-0.7_p20231028:20240116-033605.log,74.71 KB, text/x-log)
2024-01-16 03:53 UTC, Peter Levine
Details
emerge-info.txt (emerge-info.txt,26.93 KB, text/plain)
2024-01-16 03:54 UTC, Peter Levine
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Levine 2024-01-16 03:53:43 UTC
Created attachment 882373 [details]
accounts-qml-0.7_p20231028:20240116-033605.log

The install script ends up executing

> env LD_PRELOAD=SSO/OnlineAccounts/libAccounts.so /usr/lib64/qt5/bin/qmlplugindump -notrelocatable SSO.OnlineAccounts 0.1 . > /var/tmp/portage/net-libs/accounts-qml-0.7_p20231028/image/usr/lib64/qt5/qml/SSO/OnlineAccounts/plugin.qmltypes

which requires a compositor running with proper environment set (eg, XDG_RUNTIME_DIR) and otherwise, fails with:

> error: XDG_RUNTIME_DIR is invalid or not set in the environment.
> Failed to create wl_display (No such file or directory)
> Could not load the Qt platform plugin "wayland" in "" even though it was found.
> could not connect to display 
> Could not load the Qt platform plugin "xcb" in "" even though it was found.
> This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
> 
> Available platform plugins are: minimal, offscreen, wayland-egl, wayland, xcb.
> 
> make[1]: *** [Makefile:1088: install_qmltypes_gen] Error 134
Comment 1 Peter Levine 2024-01-16 03:54:46 UTC
Created attachment 882374 [details]
emerge-info.txt
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-16 04:02:13 UTC
Does inheriting xdg-utils and calling xdg_environment_reset in src_prepare or so help?
Comment 3 Peter Levine 2024-01-16 07:47:20 UTC
(In reply to Sam James from comment #2)
> Does inheriting xdg-utils and calling xdg_environment_reset in src_prepare
> or so help?

Alone, it still fails the same way.  Using that with with virtwl(), as shown in the PR, the build is successful.  I included the X/virtualx parts for completion but have only had a chance to test it with wayland, i.e., "USE=-X".
Comment 4 Andreas Sturmlechner gentoo-dev 2024-01-16 10:20:48 UTC
Maybe it works with QT_QPA_PLATFORM=offscreen instead (check out ecm.eclass e.g.).
Comment 5 Peter Levine 2024-01-16 11:41:51 UTC
(In reply to Andreas Sturmlechner from comment #4)
> Maybe it works with QT_QPA_PLATFORM=offscreen instead (check out ecm.eclass
> e.g.).

That works.  It doesn't even need xdg_environment_reset.
Comment 6 Larry the Git Cow gentoo-dev 2024-01-18 14:27:35 UTC
The bug has been closed via the following commit(s):

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

commit e704047812b509079fdb48b1de98d1509d8b323e
Author:     Peter Levine <plevine457@gmail.com>
AuthorDate: 2024-01-16 04:13:27 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2024-01-18 14:27:20 +0000

    net-libs/accounts-qml: fix bug# 922194
    
    Add "local QT_QPA_PLATFORM=offscreen" to fix breakage.
    
    Closes: https://bugs.gentoo.org/922194
    Closes: https://github.com/gentoo/gentoo/pull/34832
    Signed-off-by: Peter Levine <plevine457@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/34832
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 net-libs/accounts-qml/accounts-qml-0.7_p20231028.ebuild | 1 +
 1 file changed, 1 insertion(+)