Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 729034 - net-im/telegram-desktop /usr/lib64/libtgvoip.so: undefined reference to `tgvoip::audio::AudioInputPulse::EnumerateDevices(std::vector<tgvoip::AudioInputDevice, std::allocator<tgvoip::AudioInputDevice> >&)'
Summary: net-im/telegram-desktop /usr/lib64/libtgvoip.so: undefined reference to `tgvo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Georgy Yakovlev
URL: https://github.com/telegramdesktop/li...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-21 17:30 UTC by Lee Watson
Modified: 2020-07-17 17:58 UTC (History)
2 users (show)

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


Attachments
emerge --info (info.txt,15.84 KB, text/plain)
2020-06-21 17:31 UTC, Lee Watson
Details
build log (build.log.bz2,28.15 KB, application/x-bzip)
2020-06-21 17:33 UTC, Lee Watson
Details
emerge --info pulseaudio (info-pulse.txt,16.97 KB, text/plain)
2020-06-22 11:07 UTC, Lee Watson
Details
tgvoip build log (media-libs:libtgvoip-2.4.4_p20200701:20200704-225731.log,36.93 KB, text/x-log)
2020-07-04 23:02 UTC, Lee Watson
Details
tgvoip.so (libtgvoip.tar.gz,611.24 KB, application/gzip)
2020-07-04 23:03 UTC, Lee Watson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lee Watson 2020-06-21 17:30:55 UTC
Fails to build due to a missing reference to libtgvoip.

Reproducible: Always
Comment 1 Lee Watson 2020-06-21 17:31:26 UTC
Created attachment 645542 [details]
emerge --info
Comment 2 Lee Watson 2020-06-21 17:33:23 UTC
Created attachment 645544 [details]
build log
Comment 3 Georgy Yakovlev archtester gentoo-dev 2020-06-22 06:19:37 UTC
can you provide 'emerge --info pulseaudio' output, please?
Comment 4 Lee Watson 2020-06-22 11:07:30 UTC
Created attachment 645730 [details]
emerge --info pulseaudio
Comment 5 Dmitry Grigoriev 2020-07-01 03:56:35 UTC
On my system telegram-desktop-2.1.14 fails during configure (2.1.13 was ok):

-- Checking for module 'tgvoip'
--   Package 'libpulse', required by 'tgvoip', not found

I have no pulseaudio on my system, so USE=-pulseaudio is in effect for both telegram-desktop and libtgvoip (the latter was already installed).
Comment 6 Georgy Yakovlev archtester gentoo-dev 2020-07-01 04:28:23 UTC
there were some related changes upstream I already discussed, they said it should not be required, guess cmake is wrong indeed.
I'll check it.
Comment 7 Georgy Yakovlev archtester gentoo-dev 2020-07-01 05:57:59 UTC
ok found it.

it's a bug in tgvoip package

in file

/usr/lib64/pkgconfig/tgvoip.pc

it defines

> Requires.private: libcrypto opus alsa libpulse

if you remove libpulse from there, telegram will build fine.

I'll do a revbump shortly. meanwhile you can workaround easily.

> Requires.private: libcrypto opus alsa libpulse

should be 

> Requires.private: libcrypto opus alsa

if you don't want pulse.
Comment 8 Larry the Git Cow gentoo-dev 2020-07-01 06:06:05 UTC
The bug has been referenced in the following commit(s):

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

commit f100c11f216cf63794164d1eba94a5a9f85aecbd
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-07-01 06:05:20 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-07-01 06:05:39 +0000

    media-libs/libtgvoip: revbump, fix build without pulse
    
    Bug: https://bugs.gentoo.org/729034
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 ...tgvoip-2.4.4_p20200627.ebuild => libtgvoip-2.4.4_p20200627-r1.ebuild} | 1 +
 1 file changed, 1 insertion(+)
Comment 9 Georgy Yakovlev archtester gentoo-dev 2020-07-01 06:07:01 UTC
try now with libtgvoip-2.4.4_p20200627-r1

should be fine.
Comment 10 Dmitry Grigoriev 2020-07-01 07:20:04 UTC
(In reply to Georgy Yakovlev from comment #9)
> try now with libtgvoip-2.4.4_p20200627-r1
> 
> should be fine.

It is indeed, 2.1.14 is ok, thank you. :)
Comment 11 Larry the Git Cow gentoo-dev 2020-07-01 17:02:23 UTC
The bug has been closed via the following commit(s):

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

commit 7b51d0c7fa7b11eab0da6bd8e99cd9939f30e28a
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-07-01 16:52:37 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-07-01 17:02:00 +0000

    media-libs/libtgvoip: drop p20200627-r1
    
    Closes: https://bugs.gentoo.org/729034
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 media-libs/libtgvoip/Manifest                      |  1 -
 .../libtgvoip/libtgvoip-2.4.4_p20200627-r1.ebuild  | 54 ----------------------
 2 files changed, 55 deletions(-)
Comment 12 Lee Watson 2020-07-02 23:19:51 UTC
This is most definitely not fixed. I'm still having this exact same build failure with telegram-desktop-2.1.16 and libtgvoip-2.4.4_p20200701.
Comment 13 Georgy Yakovlev archtester gentoo-dev 2020-07-03 02:18:14 UTC
I can't reproduce.

can you try enabling alsa useflag for telegram and tgvoip and check if it helps?

generally, disabling alsa is not recommended.
Comment 14 Lee Watson 2020-07-04 20:48:45 UTC
Same result with alsa and pulseaudio enabled in libtgvoip + telegram-desktop.
Comment 15 Georgy Yakovlev archtester gentoo-dev 2020-07-04 22:52:57 UTC
I have no idea what's happening here honestly.

can you also upload tgvoip build log?
and /usr/lib64/libtgvoip.so* files (compressed) so I can check them for missing symbols?

seems it's something weird going on on your system.
Comment 16 Lee Watson 2020-07-04 23:02:43 UTC
Created attachment 647612 [details]
tgvoip build log
Comment 17 Lee Watson 2020-07-04 23:03:09 UTC
Created attachment 647614 [details]
tgvoip.so
Comment 18 Georgy Yakovlev archtester gentoo-dev 2020-07-04 23:54:03 UTC
ok looks like you are using fish?
from emerge --info:
SHELL="/bin/fish"
SUDO_COMMAND="/bin/fish"

from tgvoip configure:

./configure: 17913: test: xyes: unexpected operator
./configure: 17921: test: x: unexpected operator
./configure: 17929: test: x: unexpected operator
Detected OS: linux-gnu
./configure: 17946: test: x: unexpected operator
./configure: 17962: test: xno: unexpected operator
checking for dlopen in -ldl... yes
./configure: 18036: test: xyes: unexpected operator
checking for libpulse... yes
checking for alsa... yes
./configure: 18251: test: xyes: unexpected operator
./configure: 18259: test: xyes: unexpected operator
./configure: 18275: test: xyes: unexpected operator
checking for size_t... yes


it's affecting the scripts and linking commands.

please don't set fish as login shell, just use this local trick described on

https://wiki.gentoo.org/wiki/Fish
.bashrc safety net part. it'll be pretty seamless and everything will work fine.


and never, never change shell for root.




can you change shell back to bash (for user and root if changed), re-build libtgvoip and re-try building telegram?
Comment 19 Georgy Yakovlev archtester gentoo-dev 2020-07-05 00:06:30 UTC
the real bug reason is that tgvoip uses non-posix syntax to check conditions

AS_ECHO("Detected CPU: $host_cpu")
AM_CONDITIONAL(TARGET_CPU_X86, test "x$cpu_x86" == xyes)
AM_CONDITIONAL(TARGET_CPU_ARM, test "x$cpu_arm" == xyes)
AM_CONDITIONAL(TARGET_CPU_ARMV7, test "x$cpu_armv7" == xyes)
AS_ECHO("Detected OS: $host_os")


not the double ==

it should use single =


so you end up with tgvoip build without alsa or pulseaudio because of that bug, that's why telegram can't find symbols in the library at the linking time.

I'll open a PR upstream to fix it, it should also fix building on shells like dash.


but my warnings about fish still stand. use the .bashrc trick and don't set it as shell, there are more hard to find bugs waiting for you if you continue doing so =)
Comment 20 Larry the Git Cow gentoo-dev 2020-07-05 00:19:25 UTC
The bug has been referenced in the following commit(s):

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

commit 4ee03110149ff0a37f5d0481a0e4a310d7a9838c
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-07-05 00:15:23 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-07-05 00:18:53 +0000

    media-libs/libtgvoip: fix non-posix configure test
    
    Bug: https://bugs.gentoo.org/729034
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 .../libtgvoip/files/configure-bashisms.patch       | 83 ++++++++++++++++++++++
 ....ebuild => libtgvoip-2.4.4_p20200701-r1.ebuild} |  2 +
 2 files changed, 85 insertions(+)
Comment 21 Lee Watson 2020-07-05 07:07:45 UTC
The patch did the trick for now. I'll have to look into my shell startup at some point when I have time as well. :)
Comment 22 Georgy Yakovlev archtester gentoo-dev 2020-07-08 21:50:01 UTC
upstream merged the commit, so all good.
going to backport it to stable versions and close the bug later.
Comment 23 Larry the Git Cow gentoo-dev 2020-07-17 17:58:42 UTC
The bug has been closed via the following commit(s):

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

commit 2719a1c2db7499e10895739210d13510a07ae3a5
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-07-17 17:58:14 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-07-17 17:58:14 +0000

    media-libs/libtgvoip: drop old
    
    Closes: https://bugs.gentoo.org/729034
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 media-libs/libtgvoip/Manifest                      |  2 -
 .../libtgvoip/libtgvoip-2.4.4_p20200430.ebuild     | 52 ---------------------
 .../libtgvoip/libtgvoip-2.4.4_p20200525.ebuild     | 53 ----------------------
 3 files changed, 107 deletions(-)