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

compile rtpengine failed on ubuntu 22.04 with error "undefined reference to `av_channel_layout_default'" #1815

Closed
Helloworld1668 opened this issue Apr 11, 2024 · 4 comments
Labels

Comments

@Helloworld1668
Copy link

rtpengine version the issue has been seen with

mr12.0

Used distribution and its version

Ubuntu 22.04.2 LTS

Linux kernel version used

5.15.0-101-generic

CPU architecture issue was seen on (see uname -m)

x86_64

Expected behaviour you didn't see

build rtpengine successfully

Unexpected behaviour you saw

No response

Steps to reproduce the problem

1、install dev
sudo apt-get install debhelper-compat=13 default-libmysqlclient-dev dh-sequence-dkms gperf libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbcg729-dev libbencode-perl libcrypt-openssl-rsa-perl libcrypt-rijndael-perl libcurl4-openssl-dev libdigest-crc-perl libdigest-hmac-perl libevent-dev libhiredis-dev libio-multiplex-perl libio-socket-inet6-perl libiptc-dev libjson-glib-dev libjson-perl libmnl-dev libmosquitto-dev libnet-interface-perl libnftnl-dev libopus-dev libpcap0.8-dev libsocket6-perl libspandsp-dev libswresample-dev libsystemd-dev libtest2-suite-perl libwebsockets-dev libxmlrpc-core-c3-dev libxtables-dev markdown pandoc python3-websockets
2、edit Makefile
with_transcoding ?= no
3、install ffmpeg
sder@sder:/data/rtpengine/rtpengine$ ffmpeg -version
ffmpeg version N-111488-gb6305a7873 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04.1)
configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb
libavutil 58. 14.100 / 58. 14.100
libavcodec 60. 22.100 / 60. 22.100
libavformat 60. 10.100 / 60. 10.100
libavdevice 60. 2.101 / 60. 2.101
libavfilter 9. 8.102 / 9. 8.102
libswscale 7. 3.100 / 7. 3.100
libswresample 4. 11.100 / 4. 11.100
4、sudo dpkg-buildpcakge

Additional program output to the terminal or logs illustrating the issue

/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function `bcg729_decoder_input':
./../lib/codeclib.c:3245: undefined reference to `av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function `avc_decoder_init':
./../lib/codeclib.c:794: undefined reference to `av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function `avc_encoder_init':
./../lib/codeclib.c:1620: undefined reference to `av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function `encoder_config_fmtp':
./../lib/codeclib.c:1709: undefined reference to `av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function `libopus_decoder_input':
./../lib/codeclib.c:2058: undefined reference to `av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o:./../lib/codeclib.c:3163: more undefined references to `av_channel_layout_default' follow
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function `resample_frame':
./resample.c:31: undefined reference to `av_channel_layout_compare'
/usr/bin/ld: ./resample.c:39: undefined reference to `swr_alloc_set_opts2'
collect2: error: ld returned 1 exit status
make[3]: *** [../lib/common.Makefile:7: rtpengine] Error 1
rm control_ng.strhash.c sdp.strhash.c janus.strhash.c call_interfaces.strhash.c
make[3]: Leaving directory '/data/rtpengine/rtpengine/daemon'
make[2]: *** [../lib/common.Makefile:4: all] Error 2
make[2]: Leaving directory '/data/rtpengine/rtpengine/daemon'
make[1]: *** [Makefile:23: all] Error 2
make[1]: Leaving directory '/data/rtpengine/rtpengine'
dh_auto_build: error: make -j16 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:27: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Anything else?

No response

@rfuchs
Copy link
Member

rfuchs commented Apr 11, 2024

Do you want to build with or without transcoding support?

@Helloworld1668
Copy link
Author

Hi rfychs !
First ,I want to build without transcoding !
I also want to know how to build with transcoding!
Thanks !!

@rfuchs
Copy link
Member

rfuchs commented Apr 12, 2024

The .deb build system doesn't support non-transcoding builds, so just changing the makefile and then trying to create a build won't work. Also you need to apply the backports from pkg/deb/ appropriate for your distro.

Not a problem with the code, closing.

@rfuchs rfuchs closed this as completed Apr 12, 2024
@Helloworld1668
Copy link
Author

Hi Hi rfychs !
I checked that backports do support Ubuntu 22.04;
then in the rtpengine/daemon directory, I modified the Makefile file with the statement: with_transcoding ?= no, and then running make, it can compile the rtpengine binary;
In the rtpengine/kernel-module, running make also generates the xt_RTPENGINE.ko file;

I now want to compile with the transcoding module, I have already installed the g729 deb package, and the ffmpeg deb package is also the latest, but it still reports errors.

/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function bcg729_decoder_input': ./../lib/codeclib.c:3245: undefined reference to av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function avc_decoder_init': ./../lib/codeclib.c:794: undefined reference to av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function avc_encoder_init': ./../lib/codeclib.c:1620: undefined reference to av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function encoder_config_fmtp': ./../lib/codeclib.c:1709: undefined reference to av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function libopus_decoder_input': ./../lib/codeclib.c:2058: undefined reference to av_channel_layout_default'
/usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o:./../lib/codeclib.c:3163: more undefined references to av_channel_layout_default' follow /usr/bin/ld: /tmp/ccytNpKp.ltrans18.ltrans.o: in function resample_frame':
./resample.c:31: undefined reference to av_channel_layout_compare' /usr/bin/ld: ./resample.c:39: undefined reference to swr_alloc_set_opts2'
collect2: error: ld returned 1 exit status
make[3]: *** [../lib/common.Makefile:7: rtpengine] Error 1
rm control_ng.strhash.c sdp.strhash.c janus.strhash.c call_interfaces.strhash.c
make[3]: Leaving directory '/data/rtpengine/rtpengine/daemon'
make[2]: *** [../lib/common.Makefile:4: all] Error 2
make[2]: Leaving directory '/data/rtpengine/rtpengine/daemon'
make[1]: *** [Makefile:23: all] Error 2
make[1]: Leaving directory '/data/rtpengine/rtpengine'
dh_auto_build: error: make -j16 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:27: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants