Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953283 - net-im/telegram-desktop-5.12.3-r3 depends on media-video/ffmpeg[amrenc lame twolame] (needs reverting!)
Summary: net-im/telegram-desktop-5.12.3-r3 depends on media-video/ffmpeg[amrenc lame t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2025-04-06 06:56 UTC by dE
Modified: 2025-04-09 16:19 UTC (History)
6 users (show)

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


Attachments
failed net-im/telegram-desktop-5.12.3-r3 build logs with PORTAGE_CONFIGROOT=... ROOT=... (telegram_failed_build.log.xz,58.15 KB, application/x-xz)
2025-04-06 06:56 UTC, dE
Details
This also requires ffmpeg[lame twolame] (telegram_failed_build.log.xz,59.32 KB, application/x-xz)
2025-04-06 11:00 UTC, dE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dE 2025-04-06 06:56:56 UTC
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.
Comment 1 dE 2025-04-06 11:00:25 UTC
Created attachment 923607 [details]
This also requires ffmpeg[lame twolame]
Comment 2 Esteve Varela Colominas 2025-04-08 08:46:32 UTC
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.
Comment 3 Larry the Git Cow gentoo-dev 2025-04-08 13:37:52 UTC
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(-)
Comment 4 Tomasz Golinski 2025-04-09 07:35:33 UTC
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.
Comment 5 Esteve Varela Colominas 2025-04-09 08:26:08 UTC
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.
Comment 6 Esteve Varela Colominas 2025-04-09 08:44:56 UTC
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.
Comment 7 Larry the Git Cow gentoo-dev 2025-04-09 11:40:05 UTC
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(-)
Comment 8 dE 2025-04-09 14:59:20 UTC
(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!
Comment 9 Esteve Varela Colominas 2025-04-09 16:19:22 UTC
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.