Opus module fail to load (Ubuntu 20.04)

Bug #1879387 reported by Johan Foolson
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
asterisk-opus (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After clean install and installation of packages asterisk and asterisk-opus the opus module for asterisk fail to load.

[May 18 21:55:40] ERROR[72682] loader.c: Error loading module 'codec_opus_open_source.so': /usr/lib/asterisk/modules/codec_opus_open_source.so: undefined symbol: opus_encode
[May 18 21:55:40] ERROR[72682] loader.c: Error loading module 'format_ogg_opus_open_source.so': /usr/lib/asterisk/modules/format_ogg_opus_open_source.so: undefined symbol: op_pcm_tell

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: asterisk-opus 13.7+20171009-2
ProcVersionSignature: Ubuntu 5.4.0-29.33-generic 5.4.30
Uname: Linux 5.4.0-29-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
Date: Mon May 18 21:51:28 2020
SourcePackage: asterisk-opus
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Johan Foolson (johan.foolson) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in asterisk-opus (Ubuntu):
status: New → Confirmed
tags: added: 20.04 asterisk-opus vocoder
Revision history for this message
Johan Foolson (johan.foolson) wrote :

Seems to be a downstream issue.

I downloaded the same package version but from the repos for Debian Sid and it works.

http://ftp.debian.org/debian/pool/main/a/asterisk-opus/asterisk-opus_13.7+20171009-2_amd64.deb

Revision history for this message
Andrei (gurux13) wrote :

Looks like the codec doesn't reference/load libopus0 properly.
My *workaround* for codec_opus_open_source (as root):

service asterisk stop
OPUS_LIB_LOC=$(dpkg-query -L libopus0 | grep '.so.0$') # to support multiarch
mv /usr/sbin/asterisk{,_orig}
echo -e '#!/bin/bash\nLD_PRELOAD='$OPUS_LIB_LOC' exec /usr/sbin/asterisk_orig "$@"' > /usr/sbin/asterisk
chmod +x /usr/sbin/asterisk
service asterisk start

Revision history for this message
Corny (digineo) wrote :

My workaround is to create an override for asterisk service unit:

# /etc/systemd/system/asterisk.service.d/override.conf
[Service]
Environment=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libopus.so.0

Revision history for this message
Dmitriy Rodin (p1p) wrote :

This is an ubuntu-specific issue. I fixed it as described here: https://lists.ubuntu.com/archives/ubuntu-devel/2010-November/031991.html

Revision history for this message
Dmitriy Rodin (p1p) wrote (last edit ):

Previous patch does not work because pbuilder redefines LDFLAGS. Fixed.

Connected to Asterisk 16.2.1~dfsg-2ubuntu1 currently running on AE4130 (pid = 31546)
AE4130*CLI> module show like opus
Module Description Use Count Status Support Level
codec_opus_open_source.so Opus Coder/Decoder 0 Running unknown
format_ogg_opus_open_source.so OGG/Opus audio 0 Running core
res_format_attr_opus.so Opus Format Attribute Module 1 Running core
3 modules loaded
AE4130*CLI>

$ ldd /usr/lib/asterisk/modules/codec_opus_open_source.so
 linux-vdso.so.1 (0x00007fff841ea000)
 libopus.so.0 => /usr/lib/x86_64-linux-gnu/libopus.so.0 (0x00007f962196d000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f962157c000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f96211de000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f9621bb7000)

$ ldd /usr/lib/asterisk/modules/format_ogg_opus_open_source.so
 linux-vdso.so.1 (0x00007ffc437a1000)
 libopus.so.0 => /usr/lib/x86_64-linux-gnu/libopus.so.0 (0x00007fefc32c5000)
 libopusfile.so.0 => /usr/lib/libopusfile.so.0 (0x00007fefc30b9000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fefc2cc8000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fefc292a000)
 libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007fefc2721000)
 /lib64/ld-linux-x86-64.so.2 (0x00007fefc350f000)

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "1005_make_explicit_libs.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.