Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942770 - net-im/telegram-desktop-5.7.1 build failure with ffmpeg-4.x
Summary: net-im/telegram-desktop-5.7.1 build failure with ffmpeg-4.x
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: 2024-11-02 17:11 UTC by Ștefan Talpalaru
Modified: 2025-02-24 05:51 UTC (History)
12 users (show)

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


Attachments
build log (build.log.gz,36.50 KB, application/gzip)
2024-11-04 19:09 UTC, Nowa Ammerlaan
Details
emerge.info (emerge.info,20.52 KB, text/plain)
2024-11-09 16:12 UTC, Frank Noack
Details
Patch to fix compilation for older ffmpeg versions (fix-old-ffmpeg-compilation.patch,1.73 KB, patch)
2025-02-23 18:40 UTC, jovaska
Details | Diff
Modified patch that doesn't break build with newer ffmpeg versions (fix-old-ffmpeg-compilation.patch,2.92 KB, patch)
2025-02-24 05:50 UTC, jovaska
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ștefan Talpalaru 2024-11-02 17:11:56 UTC
/var/tmp/portage/net-im/telegram-desktop-5.7.1/work/tdesktop-5.7.1-full/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp: In function ‘FFmpeg::SwresamplePointer FFmpeg::MakeSwresamplePointer(uint64_t, AVSampleForma
t, int, uint64_t, AVSampleFormat, int, SwresamplePointer*)’:
/var/tmp/portage/net-im/telegram-desktop-5.7.1/work/tdesktop-5.7.1-full/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp:567:37: error: request for member ‘get’ in ‘existing’, which is of pointer type ‘FFmpeg::Swre
samplePointer*’ {aka ‘std::unique_ptr<SwrContext, FFmpeg::SwresampleDeleter>*’} (maybe you meant to use ‘->’ ?)
  567 |                 existing ? existing.get() : nullptr,
      |                                     ^~~
/var/tmp/portage/net-im/telegram-desktop-5.7.1/work/tdesktop-5.7.1-full/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp:581:9: error: ‘error’ was not declared in this scope; did you mean ‘perror’?
  581 |         error = AvErrorWrap(swr_init(result));
      |         ^~~~~
      |         perror


Reproducible: Always
Comment 1 Nowa Ammerlaan gentoo-dev 2024-11-04 19:09:37 UTC
Created attachment 907859 [details]
build log
Comment 2 Frank Noack 2024-11-09 16:00:44 UTC
The same error here with version 5.7.2.
Comment 3 Frank Noack 2024-11-09 16:12:51 UTC
Created attachment 908334 [details]
emerge.info
Comment 4 Yixun Lan archtester gentoo-dev 2024-11-11 12:19:00 UTC
really, should report this to telegram upstream, and fix it there..

btw, any problem to upgrade to ffmpeg-6? as it got stabilized already
Comment 5 Denis Lisov 2024-11-11 13:33:49 UTC
(In reply to Yixun Lan from comment #4)
> btw, any problem to upgrade to ffmpeg-6? as it got stabilized already

Bug 864721 (media-video/vlc[vaapi] requires <ffmpeg-5)
Comment 6 Frank Noack 2024-11-13 18:48:14 UTC
In my case it was my fault. I have masked ffmpeg in the past and had installed version 4.4.5-r1. After the update to ffmpeg 6.1.1-r8 it compiled.
Comment 7 Blacktea Hamburger 2024-11-16 14:39:19 UTC
Upstream: https://github.com/telegramdesktop/tdesktop/issues/28660
Comment 8 Esteve Varela Colominas 2024-11-19 07:38:41 UTC
I don't think there's any intention to support older ffmpeg versions for anything more than a transitional period - it never gets tested and even if merged upstream it'd rot quickly. I'd prevent telegram-desktop from being built with ffmpeg4
Comment 9 Larry the Git Cow gentoo-dev 2025-01-03 01:17:12 UTC
The bug has been referenced in the following commit(s):

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

commit 1d481f62a3049f1aeb410bb861baf8d63149ca12
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2025-01-02 22:29:48 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2025-01-03 01:16:15 +0000

    net-im/telegram-desktop: Fix a few minor bugs
    
    - Require FFMPEG 6
    - Add gobject-introspection to BDEPEND
    - Upgrade tg_owt
    
    Bug: https://bugs.gentoo.org/942770
    Bug: https://bugs.gentoo.org/943388
    Closes: https://github.com/gentoo/gentoo/pull/39956
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 ...egram-desktop-5.9.0.ebuild => telegram-desktop-5.9.0-r1.ebuild} | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Comment 10 Larry the Git Cow gentoo-dev 2025-01-06 02:05:31 UTC
The bug has been closed via the following commit(s):

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

commit b6dab9ad240fc6a8484460fa6617777335337118
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2025-01-05 21:37:19 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2025-01-06 02:03:31 +0000

    net-im/telegram-desktop: Drop old
    
    Closes: https://bugs.gentoo.org/942770
    Closes: https://bugs.gentoo.org/940230
    Closes: https://bugs.gentoo.org/943388
    Closes: https://bugs.gentoo.org/946911
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 net-im/telegram-desktop/Manifest                   |   2 -
 .../files/tdesktop-5.8.3-webkit-no-wayland.patch   |  16 --
 net-im/telegram-desktop/metadata.xml               |   1 -
 .../telegram-desktop/telegram-desktop-5.5.5.ebuild | 261 ---------------------
 .../telegram-desktop-5.8.3-r1.ebuild               | 243 -------------------
 5 files changed, 523 deletions(-)
Comment 11 jovaska 2025-02-23 18:40:23 UTC
Created attachment 919761 [details, diff]
Patch to fix compilation for older ffmpeg versions

Making telegram-desktop depend on >=ffmpeg-6 causes more problems than it solves because there are a lot of packages which depend on ffmpeg:0/56.58.58 (ffmpeg-4.x). I have attached a patch that makes fixes this compilation error for older ffmpeg versions and suggest that this change is undone.
Comment 12 jovaska 2025-02-24 05:50:51 UTC
Created attachment 919795 [details, diff]
Modified patch that doesn't break build with newer ffmpeg versions

I verified that this builds against =ffmpeg-4.4.5-r1 and =ffmpeg-6.1.2 and also made a PR upstream: https://github.com/telegramdesktop/tdesktop/pull/28999
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-24 05:51:26 UTC
(In reply to jovaska from comment #11)
> Created attachment 919761 [details, diff] [details, diff]
> Patch to fix compilation for older ffmpeg versions
> 
> Making telegram-desktop depend on >=ffmpeg-6 causes more problems than it
> solves because there are a lot of packages which depend on ffmpeg:0/56.58.58
> (ffmpeg-4.x). I have attached a patch that makes fixes this compilation
> error for older ffmpeg versions and suggest that this change is undone.

There certainly aren't a lot of such packages anymore.
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-24 05:51:51 UTC
Anyway, please consider filing a new bug with that request.