Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920819 - >=net-im/telegram-desktop-4.12.2 fails to compile with: ERROR could not find GIR for Gio-2.0
Summary: >=net-im/telegram-desktop-4.12.2 fails to compile with: ERROR could not find ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-12-27 18:34 UTC by tt_1
Modified: 2024-01-02 12:03 UTC (History)
3 users (show)

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


Attachments
full build log (build.log,33.03 KB, text/x-log)
2023-12-27 18:35 UTC, tt_1
Details
output from emerge --info (emerge--info,6.05 KB, text/plain)
2023-12-27 18:35 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2023-12-27 18:34:13 UTC
trying to emerge telegram-desktop, via

emerge -pv telegram-desktop:

Dependency resolution took 1.93 s (backtrack: 0/20).

[ebuild  N    ~] net-im/telegram-desktop-4.12.2::gentoo  USE="X dbus fonts -enchant -qt6 -qt6-imageformats -screencast -wayland -webkit" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB


the results is: 

[1/1334] cd /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full_build/cmake/external/glib && /usr/bin/cppgir --debug 1 --class --class-full --expected --optional --ignore /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir.ignore:/var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir_unix.ignore --output /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full_build/gen Gio-2.0 && echo 1> /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full_build/gen/external_glib_cppgir.timestamp
FAILED: gen/external_glib_cppgir.timestamp /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full_build/gen/external_glib_cppgir.timestamp 
cd /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full_build/cmake/external/glib && /usr/bin/cppgir --debug 1 --class --class-full --expected --optional --ignore /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir.ignore:/var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir_unix.ignore --output /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full_build/gen Gio-2.0 && echo 1> /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full_build/gen/external_glib_cppgir.timestamp
ERROR could not find GIR for Gio-2.0
Comment 1 tt_1 2023-12-27 18:35:11 UTC
Created attachment 880745 [details]
full build log
Comment 2 tt_1 2023-12-27 18:35:49 UTC
Created attachment 880746 [details]
output from emerge --info
Comment 3 tt_1 2023-12-27 18:40:22 UTC
I'm not an expert on GIR issues, but it seems as if the file is present: /usr/share/gir-1.0/Gio-2.0.gir

There were similar bugs with a lack of introspection support somewhere down in the system, if anyone can have an educated guess which package it may be, I may try to enable it.
Comment 4 tt_1 2023-12-27 20:30:29 UTC
alright, so dev-cpp/cppgir needs xdg-utils at runtime to find the correct path for gir as it uses: XDG_DATA_DIRS=/usr/local/share:/usr/share
Comment 5 Esteve Varela Colominas 2023-12-31 00:35:38 UTC
I'm not sure this is entirely true, the default path is already set to /usr/share:/usr/local/share when XDG_DATA_DIRS is missing.

Do you have anything else that modifies your XDG_DATA_DIRS variable when xdg-utils is missing?
Comment 6 tt_1 2023-12-31 08:27:42 UTC
my verdict is def correct, XDG_DATA_DIR was set to the value 

XDG_DATA_DIRS=/etc/eselect/wine/share

whic is done by eselect-wine

see also the strace: 

LANG=C strace -e file /usr/bin/cppgir --debug 1 --class --class-full --expected --optional --ignore /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir.ignore:/var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir_unix.ignore --output /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full_build/gen Gio-2.0 && echo 1> /var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full_build/gen/external_glib_cppgir.timestamp
execve("/usr/bin/cppgir", ["/usr/bin/cppgir", "--debug", "1", "--class", "--class-full", "--expected", "--optional", "--ignore", "/var/tmp/portage/net-im/telegram"..., "--output", "/var/tmp/portage/net-im/telegram"..., "Gio-2.0"], 0x7ffdacaf6608 /* 37 vars */) = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=74874, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/lib64/libboost_program_options.so.1.83.0", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=322888, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/lib64/libfmt.so.9", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=133656, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-pc-linux-gnu/12/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2210440, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-pc-linux-gnu/12/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=125176, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1892440, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=899016, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir.ignore", {st_mode=S_IFREG|0644, st_size=3727, ...}, 0) = 0
newfstatat(AT_FDCWD, "/var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir_unix.ignore", {st_mode=S_IFREG|0644, st_size=54, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/cppgir/cppgir.ignore", {st_mode=S_IFREG|0644, st_size=3869, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/cppgir/cppgir_unix.ignore", {st_mode=S_IFREG|0644, st_size=54, ...}, 0) = 0
openat(AT_FDCWD, "/var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir.ignore", O_RDONLY) = 3
openat(AT_FDCWD, "/var/tmp/portage/net-im/telegram-desktop-4.12.2/work/tdesktop-4.12.2-full/cmake/external/glib/cppgir/data/cppgir_unix.ignore", O_RDONLY) = 3
openat(AT_FDCWD, "/usr/share/cppgir/cppgir.ignore", O_RDONLY) = 3
openat(AT_FDCWD, "/usr/share/cppgir/cppgir_unix.ignore", O_RDONLY) = 3
newfstatat(AT_FDCWD, "Gio-2.0", 0x7ffc6fd19cc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/etc/eselect/wine/share/gir-1.0", 0x7ffc6fd19b50, 0) = -1 ENOENT (No such file or directory)
ERROR could not find GIR for Gio-2.0
+++ exited with 1 +++



correct values are: 

env | grep XDG

XDG_CONFIG_DIRS=/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/local/share:/usr/share:/etc/eselect/wine/share

they are only set after xdg is emerged
Comment 7 Esteve Varela Colominas 2023-12-31 12:10:38 UTC
Ah, I see. I didn't realize that any program setting XDG_DATA_DIRS would override the default path. Since I don't want misc paths sneaking into the build environment, and I think depending on x11-misc/xdg-utils is a bit overkill to just set a variable, I'll just do it like that for now.

Thanks for the report!
Comment 8 tt_1 2023-12-31 12:13:17 UTC
so you will be setting XDG_DATA_DIR env via the telegram-desktop ebuild?
Comment 9 tt_1 2023-12-31 12:24:58 UTC
seems reasonable to me, I will test it again to see if it is now possible to compile -r1 without xdg-utils emerged. 

would you care to remove my gentoo bugzilla email from the github pullrequest header? it is my private email, I don't really need to have it overly exposed to the whole internet. thanks.
Comment 10 Larry the Git Cow gentoo-dev 2024-01-02 12:03:00 UTC
The bug has been closed via the following commit(s):

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

commit aab45ee33f081fc6df88b8afac7d22cd18b9f9bf
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2023-12-31 12:16:08 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2024-01-02 11:47:10 +0000

    net-im/telegram-desktop: Hardcode XDG_DATA_DIRS variable
    
    Closes: https://bugs.gentoo.org/920819
    Closes: https://github.com/gentoo/gentoo/pull/34576
    Thanks-to: tt_1
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 net-im/telegram-desktop/telegram-desktop-4.12.2.ebuild | 6 ++++++
 net-im/telegram-desktop/telegram-desktop-4.13.1.ebuild | 6 ++++++
 2 files changed, 12 insertions(+)