siproxd and gcc-10: multiple definition of `configuration' error
Status: Beta
Brought to you by:
tries
Hi all,
OpenWrt added gcc-10 recently (not default yet). With gcc 10 siproxd build errors out:
OpenWrt-libtool: link: ccache_cc -D_GNU_SOURCE -DBUILDSTR=\"7997\" -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/siproxd-0.8.2=siproxd-0.8.2 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z -Wl,now -Wl,-z -Wl,relro -Wall -D_POSIX_THREAD_SAFE_FUNCTIONS -znow -zrelro -o siproxd siproxd.o proxy.o register.o sock.o utils.o sip_utils.o sip_layer.o log.o readconf.o rtpproxy.o rtpproxy_relay.o accessctl.o route_processing.o security.o auth.o fwapi.o resolve.o dejitter.o plugins.o redirect_cache.o .libs/siproxdS.o -Wl,--export-dynamic -L/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/lib -L/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/lib -L/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-10.1.0_musl/usr/lib -L/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-10.1.0_musl/lib -lresolv -losipparser2 -losip2 -lltdl
/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-10.1.0_musl/lib/gcc/mips-openwrt-linux-musl/10.1.0/../../../../mips-openwrt-linux-musl/bin/ld: accessctl.o:(.bss+0x0): multiple definition of `configuration'; siproxd.o:(.bss+0x4): first defined here
collect2: error: ld returned 1 exit status
OpenWrt-libtool: link: rm -f ".libs/siproxdS.o"
make[5]: *** [Makefile:761: siproxd] Error 1
This is because gcc 10 changes the default from "-fcommon" to "-fno-common", see gcc bugzilla. A patch for siproxd was proposed here. With it siproxd does compile for me.
Could you please check and confirm the patch is OK?
Thanks!
Seb
Hello Seb,
Thank you for bringing this to my attention. Yes, the proposed patch is OK. This will be fixed in the next released version of siproxd.
Best regards,
/Thomas