sipwise / rtpengine

The Sipwise media proxy for Kamailio
GNU General Public License v3.0
797 stars 372 forks source link

compiling issues on Oracle Linux 8.10 with mr11+ #1846

Closed jrahno-fuze closed 3 months ago

jrahno-fuze commented 3 months ago

rtpengine version the issue has been seen with

mr11.5.1 & mr12.5

Used distribution and its version

Oracle Linux 8.10

Linux kernel version used

5.4.17-2136.333.5.1.el8uek.x86_64

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

x86_64

Expected behaviour you didn't see

No response

Unexpected behaviour you saw

cc    -c -o mix_in_x64_sse2.o mix_in_x64_sse2.S
cc -rdynamic -g -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes -Werror=return-type -Wshadow -pthread -fno-strict-aliasing -std=c11 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include    -pthread  -DPCRE2_CODE_UNIT_WIDTH=8     -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread    -DWITH_IPTABLES_OPTION -I. -I../kernel-module/ -I../lib/ -I../include/ -D_GNU_SOURCE -I/usr/include/ffmpeg  -I/usr/include/ffmpeg  -I/usr/include/ffmpeg  -I/usr/include/ffmpeg  -I/usr/include/ffmpeg   -I/usr/include/opus  -DWITH_TRANSCODING -I/usr/include/mysql -m64  -DHAVE_BCG729  -DRTPENGINE_VERSION="\"git-mr11.5.1-23cbce92\"" -o rtpengine main.o kernel.o helpers.o control_tcp.o call.o control_udp.o redis.o bencode.o cookie_cache.o udp_listener.o control_ng.strhash.o sdp.strhash.o stun.o rtcp.o crypto.o rtp.o call_interfaces.strhash.o dtls.o log.o cli.o graphite.o ice.o media_socket.o homer.o recording.o statistics.o cdr.o ssrc.o iptables.o tcp_listener.o codec.o load.o dtmf.o timerthread.o media_player.o jitter_buffer.o t38.o websocket.o mqtt.o janus.strhash.o audio_player.o loglib.o auxlib.o rtplib.o str.o socket.o streambuf.o ssllib.o dtmflib.o mix_buffer.o poller.o codeclib.strhash.o resample.o mvr2s_x64_avx2.o mvr2s_x64_avx512.o mix_in_x64_avx2.o mix_in_x64_avx512bw.o mix_in_x64_sse2.o -lm -ldl -lglib-2.0  -lgthread-2.0 -pthread -lglib-2.0  -lz  -lpcre2-8  -lcrypto  -lssl -lcrypto  -levent_pthreads -levent  -lpcap -lxmlrpc_client  -lxmlrpc  -lxmlrpc_util  -lhiredis -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0  -lwebsockets  -lip4tc -lip6tc  -lavcodec  -lavformat  -lavutil  -lswresample  -lavfilter  -lspandsp  -lopus  -L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lcoredumper -lssl -lcrypto -ldl -lbcg729 
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
make[2]: *** [../lib/common.Makefile:7: rtpengine] Error 1
rm sdp.strhash.c control_ng.strhash.c call_interfaces.strhash.c janus.strhash.c
make[2]: Leaving directory '/usr/src/rtpengine_mr11.5.1/daemon'
make[1]: *** [../lib/common.Makefile:4: all] Error 2
make[1]: Leaving directory '/usr/src/rtpengine_mr11.5.1/daemon'
make: *** [Makefile:22: all] Error 2

Steps to reproduce the problem

cd rtpengine/daemon
make with_transcoding=yes with-kernel=yes

Additional program output to the terminal or logs illustrating the issue

No response

Anything else?

Also tried to compile mr12.5 on the same system and it stops at the same step but with a more detailed traceback

cc -rdynamic -flto=auto -g -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes -Werror=return-type -Wshadow -pthread -fno-strict-aliasing -std=c11 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include    -pthread  -DPCRE2_CODE_UNIT_WIDTH=8     -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread      -DWITH_IPTABLES_OPTION -I. -I../kernel-module/ -I../lib/ -I../include/ -D_GNU_SOURCE -I/usr/include/ffmpeg  -I/usr/include/ffmpeg  -I/usr/include/ffmpeg  -I/usr/include/ffmpeg  -I/usr/include/ffmpeg   -I/usr/include/opus  -DWITH_TRANSCODING -I/usr/include/mysql -m64  -DHAVE_BCG729  -DRTPENGINE_VERSION="\"git-mr12.5-e767972b\"" -O3 -flto=auto -ffat-lto-objects -o rtpengine main.o kernel.o helpers.o control_tcp.o call.o control_udp.o redis.o bencode.o cookie_cache.o udp_listener.o control_ng_flags_parser.o control_ng.strhash.o sdp.strhash.o stun.o rtcp.o crypto.o rtp.o call_interfaces.strhash.o dtls.o log.o cli.o graphite.o ice.o media_socket.o homer.o recording.o statistics.o cdr.o ssrc.o iptables.o tcp_listener.o codec.o load.o dtmf.o timerthread.o media_player.o jitter_buffer.o t38.o websocket.o mqtt.o janus.strhash.o audio_player.o nftables.o loglib.o auxlib.o rtplib.o str.o socket.o streambuf.o ssllib.o dtmflib.o mix_buffer.o poller.o bufferpool.o codeclib.strhash.o resample.o uring.o mvr2s_x64_avx2.o mvr2s_x64_avx512.o mix_in_x64_avx2.o mix_in_x64_avx512bw.o mix_in_x64_sse2.o -lm -ldl -lglib-2.0  -lgthread-2.0 -pthread -lglib-2.0  -lz  -lpcre2-8  -lcrypto  -lssl -lcrypto  -levent_pthreads -levent  -lpcap -lxmlrpc_client  -lxmlrpc  -lxmlrpc_util  -lhiredis -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0  -lwebsockets  -lnftnl  -lmnl  -lip4tc -lip6tc  -lavcodec  -lavformat  -lavutil  -lswresample  -lavfilter  -lspandsp  -lopus  -L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lcoredumper -lssl -lcrypto -ldl -lbcg729 
/bin/ld: dynamic STT_GNU_IFUNC symbol `s16_mix_in.lto_priv.234' with pointer equality in `/tmp/ccDfEly2.ltrans2.ltrans.o' can not be used when making an executable; recompile with -fPIE and relink with -pie
collect2: error: ld returned 1 exit status
make[2]: *** [../lib/common.Makefile:7: rtpengine] Error 1
make[2]: Leaving directory '/usr/src/rtpengine_mr12.5/daemon'
make[1]: *** [../lib/common.Makefile:4: all] Error 2
make[1]: Leaving directory '/usr/src/rtpengine_mr12.5/daemon'
make: *** [Makefile:22: all] Error 2

NOTE:

I am able to compile 10.5.7 on the same system without error

rfuchs commented 3 months ago

ld crashing with a segfault is not a problem with the code. You should report this to your distro's maintainer.

As for the second one, try compiling with CFLAGS=-fPIE LDFLAGS=-pie make and see if that makes a difference.

jrahno-fuze commented 3 months ago

Thank you. That worked on both mr11.5.1 and mr12.5. I am also able to compile kernel-module with the extra flags

I think the segfault on mr11.5.1 is the same problem as mr12.5 without the traceback to the actual error

rfuchs commented 3 months ago

Neither compiler nor linker really should segfault even if the compiler/linker options given were lacking.