Created attachment 913073 [details] emerge --info When doing ldd /lib/libwebrtc_audio_processing.so.1 I have this output: ldd (0x734bb0afa000) /usr/local/lib/libhardened_malloc.so => /usr/local/lib/libhardened_malloc.so (0x734bb09fb000) libc++.so.1 => /lib/libc++.so.1 (0x734bb08ee000) libc++abi.so.1 => /lib/libc++abi.so.1 (0x734bb08aa000) libc.so => ldd (0x734bb0afa000) libunwind.so.1 => /lib/libunwind.so.1 (0x734bb089d000) Error relocating /lib/libwebrtc_audio_processing.so.1: __mulsc3: symbol not found Error relocating /lib/libwebrtc_audio_processing.so.1: __divsc3: symbol not found I am on a musl system and I heard from someone that these symbols are gcc specific? I don't have gcc on my system and so far I am not experiencing any issues on applications other than net-im/dino(+rtp), which won't launch with this issue being present.
__mulsc3 and __divsc3 are builtins. They should be provided by libgcc or by compiler-rt. Please share the build log from webrtc-processing.
Created attachment 913227 [details] media-libs/webrtc-audio-processing-1.3-r3 build.log Here is the build.log
> LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,-z,defs -Wl,-z,now -Wl,-z,relro" Please don't do -Wl,-z,defs willy-nilly. Ditto -ftrapv. Almost all the rest are defaults on hardened profiles anyway. -fcf-protection is also pointless on musl where it does no enforcement. Anyway, I suggest building webrtc-audio-processing manually from a git clone, then inspecting with `nm` to see where the first references to __mulsc3 and __divsc3 appear. Given the current state of your system as discussed earlier, I don't think this makes sense as a bug at this point.
I don't think that log corresponds to your ldd output either (different SONAME). Anyway, you really need to figure out why __divsc3 and friends are left unresolved. compiler-rt should have them (check with `nm`). If it does, why isn't it being linked? I also bet if you try to reproduce this in a clean chroot, you won't be able to, which will tell us it's something else about your system. Please try that.
Thanks I will remove -fcf-protection=full and -Wl,-z,defs from my flags. I set the other ones since I am not on a hardened profile just musl-llvm. There was an error with the version of webrtc-audio-processing its actually 0.3.1-r1 that owns /lib/libwebrtc_audio_processing.so.1 and not 1.3-r3 (which has no issues whatsoever). I have taken the source files and compiled them manually to check with nm.
(In reply to aryan from comment #5) > Thanks I will remove -fcf-protection=full and -Wl,-z,defs from my flags. I > set the other ones since I am not on a hardened profile just musl-llvm. > Most of those are still on by default as of 23.0: https://wiki.gentoo.org/wiki/Hardened/Toolchain#Changes. > There was an error with the version of webrtc-audio-processing its actually > 0.3.1-r1 that owns /lib/libwebrtc_audio_processing.so.1 and not 1.3-r3 > (which has no issues whatsoever). I have taken the source files and compiled > them manually to check with nm. Please share the right log. But really, do that chroot experiment (and record the steps you take so I can reproduce).
I have now created a new system using this stage3 https://distfiles.gentoo.org/releases/arm64/autobuilds/current-stage3-arm64-musl-llvm/stage3-arm64-musl-llvm-20241201T233522Z.tar.xz I have then edited make.conf to add my make.conf flags etc then emerged world just like the installation steps have told me to. Then I did emerge -1 \=media-libs/webrtc-audio-processing-0.3.1-r1 then have done ldd /lib/libwebrtc_audio_processing.so to obtain this output: ldd (0x7b7dd19c2000) /usr/local/lib/libhardened_malloc.so => /usr/local/lib/libhardened_malloc.so (0x7b7dd18c3000) libc++.so.1 => /lib/libc++.so.1 (0x7b7dd17b6000) libc++abi.so.1 => /lib/libc++abi.so.1 (0x7b7dd1772000) libc.so => ldd (0x7b7dd19c2000) libunwind.so.1 => /lib/libunwind.so.1 (0x7b7dd1765000) Error relocating /lib/libwebrtc_audio_processing.so: __mulsc3: symbol not found Error relocating /lib/libwebrtc_audio_processing.so: __divsc3: symbol not found I will post the new emerge --info as well as the build.log
Created attachment 913294 [details] fresh emerge --info
Please also then repeat the steps to refine it and minimise the CFLAGS etc needed.
(In reply to Sam James from comment #9) > Please also then repeat the steps to refine it and minimise the CFLAGS etc > needed. Thank you I am now recompiling world with: # Compilation ## Options MAKEOPTS="--jobs 4" ## Flags ### Compiler Flags CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" ### CPU Flags CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" # Portage ## Flags ACCEPT_KEYWORDS="~amd64" ## Options BINPKG_COMPRESS="zstd" BINPKG_FORMAT="gpkg" CHOST="x86_64-pc-linux-musl" LC_MESSAGES=C.utf8 NOCOLOR="false" GENTOO_MIRRORS="https://mirror.init7.net/gentoo/" DISTDIR="/var/cache/distfiles/" PKGDIR="/var/cache/binpkgs/" PORTDIR="/var/db/repos/gentoo/" PORTAGE_TMPDIR="/var/tmp/" UNINSTALL_IGNORE="${UNINSTALL_IGNORE} /bin/ /lib/ /sbin/ /usr/sbin/" UNINSTALL_IGNORE="${UNINSTALL_IGNORE} /usr/lib/modules/*" # Logging PORTAGE_ELOG_CLASSES="warn error log" PORTAGE_ELOG_SYSTEM="save"
Created attachment 913302 [details] media-libs/webrtc-audio-processing-0.3.1-r1 build.log Here is the updated build log.
ldd /lib/libwebrtc_audio_processing.so ldd (0x7b27e61f3000) libc++.so.1 => /lib/libc++.so.1 (0x7b27e6023000) libc++abi.so.1 => /lib/libc++abi.so.1 (0x7b27e5fe5000) libc.so => ldd (0x7b27e61f3000) libunwind.so.1 => /lib/libunwind.so.1 (0x7b27e5fd9000) Error relocating /lib/libwebrtc_audio_processing.so: __mulsc3: symbol not found Error relocating /lib/libwebrtc_audio_processing.so: __divsc3: symbol not found This is the output of ldd.
(In reply to aryan from comment #7) > I have now created a new system using this stage3 > https://distfiles.gentoo.org/releases/arm64/autobuilds/current-stage3-arm64- > musl-llvm/stage3-arm64-musl-llvm-20241201T233522Z.tar.xz This stage tarball is for arm64, but your other comments look like an amd64 config. Did you provide the wrong link?
(In reply to Mike Gilbert from comment #13) > (In reply to aryan from comment #7) > > I have now created a new system using this stage3 > > https://distfiles.gentoo.org/releases/arm64/autobuilds/current-stage3-arm64- > > musl-llvm/stage3-arm64-musl-llvm-20241201T233522Z.tar.xz > > This stage tarball is for arm64, but your other comments look like an amd64 > config. Did you provide the wrong link? Yes silly me I meant amd64 https://gentoo.osuosl.org/releases/amd64/autobuilds/current-stage3-amd64-musl-llvm/stage3-amd64-musl-llvm-20241201T164824Z.tar.xz
However, I also believe if anyone has a musl/llvm system without needing to change any configurations and compiling media-libs/webrtc-audio-process-0.3.1-r1, this would be reproducible if gcc is not installed and the binutils-plugin is not enabled for llvm.
I can confirm that the symbols are present in compiler-rt $ nm /usr/lib/clang/19/lib/linux/libclang_rt.builtins-x86_64.a | grep -E '(__mulsc3|__divsc3)' 0000000000000000 T __divsc3 0000000000000000 T __mulsc3 It seems like an issue with how media-libs/webrtc-audio-processing:0 is being built. I am aware that they changed that process in media-libs/webrtc-audio-processing:1 as the issue is not present there but I believe in this version it could be that glibc manages to handle the issue and resolve the symbols itself whereas with musl it does not (suggested by parona).