Created attachment 923604 [details] failed net-im/telegram-desktop-5.12.3-r3 build logs with PORTAGE_CONFIGROOT=... ROOT=... Otherwise it fails to link with -- /usr/libexec/gcc/x86_64-mypl-linux-gnu/ld: /usr/lib64/libavcodec.so: undefined reference to `E_IF_init' /usr/libexec/gcc/x86_64-mypl-linux-gnu/ld: /usr/lib64/libavcodec.so: undefined reference to `E_IF_exit' /usr/libexec/gcc/x86_64-mypl-linux-gnu/ld: /usr/lib64/libavcodec.so: undefined reference to `E_IF_encode' The attached build logs are cross-compiled with PORTAGE_CONFIGROOT=... ROOT=... emerge --quiet --getbinpkg net-im/telegram-desktop. Regardless it shouldn't matter. media-video/ffmpeg[amrenc] was required to be installed on the ROOT.
Created attachment 923607 [details] This also requires ffmpeg[lame twolame]
Interesting! Thanks for your report, I'll make sure to add it to the ebuild soon. Just out of curiosity, are you perhaps cross-compiling from amd64 to amd64? I've always wondered how good gentoo's cross-compilation support is when building a whole system like that.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc3e0512307afa241e6d9d836956fa535be7fa5c commit bc3e0512307afa241e6d9d836956fa535be7fa5c Author: Esteve Varela Colominas <esteve.varela@gmail.com> AuthorDate: 2025-04-08 08:58:38 +0000 Commit: Yixun Lan <dlan@gentoo.org> CommitDate: 2025-04-08 13:36:14 +0000 net-im/telegram-desktop: Add additional USE requirements for ffmpeg Closes: https://bugs.gentoo.org/953283 Closes: https://github.com/gentoo/gentoo/pull/41497 Thanks-to: dE <de.techno@gmail.com> Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Signed-off-by: Yixun Lan <dlan@gentoo.org> ...egram-desktop-5.12.3-r3.ebuild => telegram-desktop-5.12.3-r4.ebuild} | 2 +- ...telegram-desktop-5.13.1.ebuild => telegram-desktop-5.13.1-r1.ebuild} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Sorry, but are you sure that it is a correct approach? I have successfully built net-im/telegram-desktop-5.12.3-r3 together with media-video/ffmpeg-6.1.2-r1 without setting those USE flags. Has anyone really verified that telegram does need these USE flags? Since symbols like E_IF_init are not defined in ffmpeg, but in media-libs/vo-amrwbenc, I suspect that in this case simply ffmpeg built was broken or cross-compilation was selecting a wrong library. That has nothing to do with telegram itself.
Hold on -- yeah you're right, I have telegram-desktop currently installed without any of these flags, and ffmpeg[lame] isn't even available in stable. Reverting this asap, really sorry for this inconvenience. I usually check this sort of thing before blindly applying the change, it sounded like common flags when they really aren't. Thanks a lot for pointing it out. I'm sure the cross-compilation host's ffmpeg was compiled with these USE flags, but the target's ffmpeg wasn't, and it's picking up libavcodec from the host (/usr) yet not finding the dependent libraries there. Reopening.
Small correction: ffmpeg[lame] is indeed available in stable, just not on the machine I was checking it on, which is out of date. Explains why the CI bot didn't complain about it. Amending commit message.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a2be1eabaedfbdc1ce76bd4a91e5fa1ddbe3bfd commit 5a2be1eabaedfbdc1ce76bd4a91e5fa1ddbe3bfd Author: Esteve Varela Colominas <esteve.varela@gmail.com> AuthorDate: 2025-04-09 08:29:07 +0000 Commit: Yixun Lan <dlan@gentoo.org> CommitDate: 2025-04-09 11:38:38 +0000 net-im/telegram-desktop: Revert misguided changes Really really sorry for the unnecessary rebuilds. None of these flags have been required to build telegam-desktop in any of my tests. The issues regarding cross-compilation should be investigated separately, though I'm not sure they're issues within telegram-desktop. Closes: https://bugs.gentoo.org/953283 Closes: https://github.com/gentoo/gentoo/pull/41507 Thanks-to: Tomasz Golinski <tomaszg@math.uwb.edu.pl> Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Signed-off-by: Yixun Lan <dlan@gentoo.org> ...egram-desktop-5.12.3-r4.ebuild => telegram-desktop-5.12.3-r5.ebuild} | 2 +- ...egram-desktop-5.13.1-r1.ebuild => telegram-desktop-5.13.1-r2.ebuild} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
(In reply to Esteve Varela Colominas from comment #2) > Interesting! Thanks for your report, I'll make sure to add it to the ebuild > soon. > Just out of curiosity, are you perhaps cross-compiling from amd64 to amd64? > I've always wondered how good gentoo's cross-compilation support is when > building a whole system like that. Yes, amd64 on amd64 (building for a laptop). No, cross compiling support is not good. You've to apply manual workarounds here and there. I've around 50 bug reports of failed builds which I'm holding back. I would suggest distcc. Yes, those USE flags where build on the build host but on the TARGET (because I don't needed encoding support there). I compiled using ROOT and PORTAGE_CONFIGROOT only because it does not compile with crossdev. Thanks for the fix!
Consider using crossdev, anyway. You can't properly cross compile unless you set SYSROOT and configure the compiler with the target sysroot. Setting ROOT only, only works when the compiler configuration in both host and target are the same.