Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to `vtable for dcsctp::TextPcapPacketObserver' #75

Open
svenstaro opened this issue Dec 9, 2021 · 6 comments
Open

Comments

@svenstaro
Copy link

svenstaro commented Dec 9, 2021

Hey, I'm the Arch Linux maintainer for Telegram and I'm trying to compile Telegram Desktop 3.3.0 for it. I'm using tg_owt d5c3d43 as a base. This is how I build tg_owt and this is how I build Telegram Desktop.

Everything seems fine until link time where I get:

/usr/bin/ld: /usr/lib/libtg_owt.so.0.0.0: undefined reference to `dcsctp::TaskQueueTimeoutFactory::TaskQueueTimeout::TaskQueueTimeout(dcsctp::TaskQueueTimeoutFactory&)'
/usr/bin/ld: /usr/lib/libtg_owt.so.0.0.0: undefined reference to `dcsctp::DcSctpSocketFactory::Create(std::basic_string_view<char, std::char_traits<char> >, dcsctp::DcSctpSocketCallbacks&, std::unique_ptr<dcsctp::PacketObserver, std::default_delete<dcsctp::PacketObserver> >, dcsctp::DcSctpOptions const&)'
/usr/bin/ld: /usr/lib/libtg_owt.so.0.0.0: undefined reference to `vtable for dcsctp::TextPcapPacketObserver'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I'm posting this here and not on the tdesktop repository as I believe there's something wrong with tg_owt.

Full tdesktop log
Full tg_owt log
Built via gcc 11.1.0.

Any hints? I believe I'm building everything correctly and tg_owt doesn't bark any missing dependencies or such.

@svenstaro
Copy link
Author

I suppose I could do that but it doesn't seem like a proper fix.

@ilya-fedin
Copy link
Contributor

Building as shared library is community supported and is not guaranteed to work. You can PR a fix or wait until someone else interested PR a fix.

@mikhailnov
Copy link

Have a look at https://abf.io/import/telegram-desktop/tree/rosa2021.1 , where tg_owt is built inside tdesktop and then tdesktop is linked to it statically as officially supported. A separate package with tg_owt does not make sense for now. But you can convert it from a shared library to a static one and it will become abuildtime only dependency of tdesktop, not runtime one.

@mikhailnov
Copy link

Of course it would be better to build tg_owt as a shred library but will anyone want to deal with it in that strange upstream...

@perestoronin
Copy link

@svenstaro
Copy link
Author

Perhaps that should be upstreamed @perestoronin

klemensn added a commit to klemensn/tg_owt that referenced this issue Feb 26, 2022
`cmake/libwebrtcbuild.cmake` does not define `WEBRTC_HAVE_DCSCTP`.

On at least OpenBSD, dynamically linking against tg_owt containing the
`dcsctp_transport` module and starting telegram-desktop yields this
immediately on startup:
```
telegram-desktop:/usr/local/lib/libtg_owt.so.0.0: undefined symbol '_ZTVN6dcsctp22TextPcapPacketObserverE'
```

Looking around shows Gentoo applying the same fix as OpenBSD, reporting
similar failure but at link-time instead:
"Fix undefined references to dcsctp when linking this library"
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/tg_owt/files/tg_owt-0_pre20211207-fix-dcsctp-references.patch

Fixes desktop-app#75.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants