Tdesktop: 1.4.5 build failure

Created on 8 Nov 2018  路  19Comments  路  Source: telegramdesktop/tdesktop

Steps to reproduce

  1. Build latest dev branch.


    1. 3.

Expected behaviour

Successfull build.

Actual behaviour

Build failure:

/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:157:2: error: 'alGenAuxiliaryEffectSlots' was not declared in this scope
  alGenAuxiliaryEffectSlots(1, &_playbackSpeedData.uiEffectSlot);
  ^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:158:2: error: 'alGenEffects' was not declared in this scope
  alGenEffects(1, &_playbackSpeedData.uiEffect);
  ^~~~~~~~~~~~
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:158:2: note: suggested alternative: 'alGenBuffers'
  alGenEffects(1, &_playbackSpeedData.uiEffect);
  ^~~~~~~~~~~~
  alGenBuffers
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:160:2: error: 'alEffecti' was not declared in this scope
  alEffecti(_playbackSpeedData.uiEffect, AL_EFFECT_TYPE, AL_EFFECT_PITCH_SHIFTER);
  ^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:160:2: note: suggested alternative: 'alBuffer3i'
  alEffecti(_playbackSpeedData.uiEffect, AL_EFFECT_TYPE, AL_EFFECT_PITCH_SHIFTER);
  ^~~~~~~~~
  alBuffer3i
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:164:2: error: 'alAuxiliaryEffectSloti' was not declared in this scope
  alAuxiliaryEffectSloti(_playbackSpeedData.uiEffectSlot, AL_EFFECTSLOT_EFFECT, _playbackSpeedData.uiEffect);
  ^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:166:2: error: 'alGenFilters' was not declared in this scope
  alGenFilters(1, &_playbackSpeedData.uiFilter);
  ^~~~~~~~~~~~
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:166:2: note: suggested alternative: 'alGenBuffers'
  alGenFilters(1, &_playbackSpeedData.uiFilter);
  ^~~~~~~~~~~~
  alGenBuffers
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:167:2: error: 'alFilteri' was not declared in this scope
  alFilteri(_playbackSpeedData.uiFilter, AL_FILTER_TYPE, AL_FILTER_LOWPASS);
  ^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:167:2: note: suggested alternative: 'alBufferi'
  alFilteri(_playbackSpeedData.uiFilter, AL_FILTER_TYPE, AL_FILTER_LOWPASS);
  ^~~~~~~~~
  alBufferi
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:169:2: error: 'alFilterf' was not declared in this scope
  alFilterf(_playbackSpeedData.uiFilter, AL_LOWPASS_GAIN, 0.f);
  ^~~~~~~~~
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:169:2: note: suggested alternative: 'alBufferf'
  alFilterf(_playbackSpeedData.uiFilter, AL_LOWPASS_GAIN, 0.f);
  ^~~~~~~~~
  alBufferf
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp: In function 'void Media::Audio::{anonymous}::ClosePlaybackDevice()':
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:185:2: error: 'alDeleteFilters' was not declared in this scope
  alDeleteFilters(1, &_playbackSpeedData.uiFilter);
  ^~~~~~~~~~~~~~~
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:185:2: note: suggested alternative: 'alDeleteBuffers'
  alDeleteFilters(1, &_playbackSpeedData.uiFilter);
  ^~~~~~~~~~~~~~~
  alDeleteBuffers
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:186:2: error: 'alDeleteEffects' was not declared in this scope
  alDeleteEffects(1, &_playbackSpeedData.uiEffect);
  ^~~~~~~~~~~~~~~
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:186:2: note: suggested alternative: 'alDeleteBuffers'
  alDeleteEffects(1, &_playbackSpeedData.uiEffect);
  ^~~~~~~~~~~~~~~
  alDeleteBuffers
/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.cpp:187:2: error: 'alDeleteAuxiliaryEffectSlots' was not declared in this scope
  alDeleteAuxiliaryEffectSlots(1, &_playbackSpeedData.uiEffectSlot);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/Telegram.dir/build.make:3498: CMakeFiles/Telegram.dir/builddir/build/BUILD/tdesktop-1.4.5/Telegram/SourceFiles/media/media_audio.o] Error 1

Configuration

Operating system: Fedora 29

Version of Telegram Desktop: latest dev branch

Used theme: n/a

Logs:
Insert log.txt here (if necessary)

Most helpful comment

Latest Telegram will not build, if you do not update this library

Very, very, very bad. Time to say "goodbye" to all packaged versions of Telegram Desktop in GNU/Linux repositories.

This patch need to be reverted.

All 19 comments

Are you doing a clean build?

Please do note, that the OpenAL dependency requirement has changed and version 1.19 is needed now:
https://github.com/telegramdesktop/tdesktop/blob/dev/docs/building-cmake.md
Latest Telegram will not build, if you do not update this library

Latest Telegram will not build, if you do not update this library

Very, very, very bad. Time to say "goodbye" to all packaged versions of Telegram Desktop in GNU/Linux repositories.

This patch need to be reverted.

This certainly is not bad. We do not need to say goodbye to packaged versions in any way (Even though Telegram Desktop does support the static bundled build only anyway).

In the case of rolling release distros everything is working fine anyway, see e.g. the Arch Linux build that already bundles the system OpenAL version 1.19 perfectly fine for some time now https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/telegram-desktop

And in the case of "stable" distros, that pretend like it is a good idea to ship outdated library versions, you can simply build like in the linked documentation: Bundle OpenAL in the build by simply git cloning it.

I agree that dynamically linking is the most sane way to bundle libraries, but so is updating your distro's libraries regularly. If you think, that this is the only project that requires recent versions of libraries, you are mistaken.
Besides, it is not like OpenAL is that huge anyway, so linking to it statically can't be that big of a deal.

And in the case of "stable" distros, that pretend like it is a good idea to ship outdated library versions, you can simply build like in the linked documentation: Bundle OpenAL in the build by simply git cloning it.

No. Most of major GNU/Linux distributions strictly forbid bundling of any libraries (Fedora, Debian for example).

@magnus-gross with your patch only one way is available to distribute telegram-desktop for most major Linux-based distros (sorry - at least for me Arch is not major Linux-based distro) - flatpak.

@magnus-gross Can you fix your pull request by adding OpenAL version check? Disable this feature if OpenAL < 1.19.1.

@xvitaly Can you please link me to the Fedora PKGBUILD equivalent. Arch Linux does also forbid bundling of libs, yet small things like crl and GSL are still statically linked. I can almost guarantee you that the same is the case for Fedora as well.

Can you please link me to the Fedora PKGBUILD equivalent

I'm Fedora maintainer for Telegram Desktop and I cannot ship package with bundled version of openal.

small things like crl

Part of tdesktop.

GSL and all others

Unbundled.

I certainly understand your problem, but you must agree that distros cannot come up and complain to every project, that implements new features, just because they ship outdated libraries themselfes. I am very certain, that I will find other things in the repos that bundle small things, otherwise Fedora wouldn't be able to ship many open source projects.

@magnus-gross Say it to Debian, openSUSE and all other major distributions.

Of course, it would be possible to add checks for the OpenAL version and disable features accordingly, but I will leave that decision to @john-preston, because this will also unnecessarily make the code more complicated.

@magnus-gross You must think about users of stable distributions when you submit such breaking changes. And if so, you must provide fallback to previous behavior.

I am willing to add that fallback, a simple define for disabling this feature and an #ifndef around the affected code should do the trick, but I am leaving that decision to @john-preston .

I must say though, that I find the way of these stable distros interesting: You deny upgrading your own library versions, but expect that every single open source project implements fallbacks for your outdated libraries...

@magnus-gross you can find it interesting but we should live with it (also there are some advantages with this policy). If we don't want to rely on such policies in different distros - we should use any of package type, which allow using static libraries bundling: flatpak, snap, appimage. I suggest to use flatpak. E.g. here you can find flatpak package for Telegram Desktop: https://flathub.org/apps/details/org.telegram.desktop

Is it Telegram for users or users are for Telegram?
In Linux, the dynamic linkage is a traditional style for distrous. We have LTS, stable, testing versions of distro. So in the most stable version, we have not the latest versions of depends.
Why should we use the newest versions of any libs? Security? Or new "features"?
I understand that you can say, "Use the old release of Telegram". But where is compromise? Really, openal 1.19.1 is a very new version.
For example, in 2.y.z it is suitable, but versions 1.y.z whould be develop as more stable.
Now, we have very much releases in micro versions, but they are not compatible. How so?

Builds and works fine on Gentoo ~amd64.

Fixed with 2d05281ba9dbf917eba96c8af7d4f98d6e24f586.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeonTheOriginal picture LeonTheOriginal  路  3Comments

beppe9000 picture beppe9000  路  3Comments

Justinzobel picture Justinzobel  路  3Comments

TotalKrill picture TotalKrill  路  3Comments

Mindstormer619 picture Mindstormer619  路  3Comments