xiph / xiph/opus

Undefined reference to opus_select_arch

Open
#327 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.3k
Forks
808
PR merge metrics
No merged PRs in 30d

Description

Hey guys,

Recently in OpenWrt master branch @krant updated opus to the latest version and wanted to use Meson in commit https://github.com/openwrt/packages/commit/6c3db5d603c3a9ed94ce4e15b556b6a0d1daf15f.

However, after some time and properly being tested, he found out that there are some issues with Meson for some targets in OpenWrt:

[135/168] Linking target src/libopus.so.0.10.0
FAILED: src/libopus.so.0.10.0 
arm-openwrt-linux-muslgnueabi-gcc  -o src/libopus.so.0.10.0 src/libopus.so.0.10.0.p/opus.c.o src/libopus.so.0.10.0.p/opus_decoder.c.o src/libopus.so.0.10.0.p/opus_encoder.c.o src/libopus.so.0.10.0.p/extensions.c.o src/libopus.so.0.10.0.p/opus_multistream.c.o src/libopus.so.0.10.0.p/opus_multistream_encoder.c.o src/libopus.so.0.10.0.p/opus_multistream_decoder.c.o src/libopus.so.0.10.0.p/repacketizer.c.o src/libopus.so.0.10.0.p/opus_projection_encoder.c.o src/libopus.so.0.10.0.p/opus_projection_decoder.c.o src/libopus.so.0.10.0.p/mapping_matrix.c.o src/libopus.so.0.10.0.p/analysis.c.o src/libopus.so.0.10.0.p/mlp.c.o src/libopus.so.0.10.0.p/mlp_data.c.o -L/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/usr/lib -L/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/lib -Wl,--as-needed -Wl,--no-undefined -fuse-ld=bfd -shared -fPIC -Wl,--start-group -Wl,-soname,libopus.so.0 -Wl,--whole-archive celt/libopus-celt.a silk/libopus-silk.a -Wl,--no-whole-archive -fuse-ld=bfd -znow -zrelro -lm -Wl,--end-group
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: src/libopus.so.0.10.0.p/opus_decoder.c.o: in function `opus_decoder_init':
opus_decoder.c:(.text+0x11c8): undefined reference to `opus_select_arch'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: src/libopus.so.0.10.0.p/opus_decoder.c.o: in function `opus_dred_decoder_init':
opus_decoder.c:(.text+0x1ee0): undefined reference to `opus_select_arch'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: src/libopus.so.0.10.0.p/opus_encoder.c.o: in function `opus_encoder_init':
opus_encoder.c:(.text+0x2174): undefined reference to `opus_select_arch'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: src/libopus.so.0.10.0.p/opus_multistream_encoder.c.o: in function `opus_multistream_encoder_init_impl':
opus_multistream_encoder.c:(.text+0x224): undefined reference to `opus_select_arch'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: src/libopus.so.0.10.0.p/analysis.c.o: in function `tonality_analysis_init':
analysis.c:(.text+0x236c): undefined reference to `opus_select_arch'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: celt/libopus-celt.a.p/celt_decoder.c.o:celt_decoder.c:(.text+0x2db8): more undefined references to `opus_select_arch' follow
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: celt/libopus-celt.a.p/pitch.c.o: in function `pitch_search':
pitch.c:(.text+0xd60): undefined reference to `CELT_PITCH_XCORR_IMPL'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: celt/libopus-celt.a.p/celt_lpc.c.o: in function `_celt_autocorr':
celt_lpc.c:(.text+0xea0): undefined reference to `CELT_PITCH_XCORR_IMPL'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: silk/libopus-silk.a.p/init_decoder.c.o: in function `silk_reset_decoder':
init_decoder.c:(.text+0x24): undefined reference to `opus_select_arch'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: silk/libopus-silk.a.p/fixed_burg_modified_FIX.c.o: in function `silk_burg_modified_c':
burg_modified_FIX.c:(.text+0xc64): undefined reference to `CELT_PITCH_XCORR_IMPL'
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9_gcc-12.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/12.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld.bfd: silk/libopus-silk.a.p/fixed_pitch_analysis_core_FIX.c.o: in function `silk_pitch_analysis_core':
pitch_analysis_core_FIX.c:(.text+0xfc0): undefined reference to `CELT_PITCH_XCORR_IMPL'
collect2: error: ld returned 1 exit status

I am not sure why he could not reach you and discuss his issue with you guys, but maybe he is just shy, or he does not like me at all. Haha! 😆 😆 We could keep this in our repository, but I am afraid that you would not like it.

Could you please look at the issue we are dealing with? Otherwise, we will get back to using autotools as he proposed in https://github.com/openwrt/packages/pull/23727

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Meson build for an ARM OpenWrt target using the configuration from commit 6c3db5d603c3a9ed94ce4e15b556b6a0d1daf15f. Compare its linked objects and generated build inputs with the autotools build proposed in OpenWrt pull request 23727, focusing on the missing opus_select_arch and CELT_PITCH_XCORR_IMPL symbols. Done means the affected targets link successfully with Meson.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.