autotools static -lmp3lame test fails because it depends on static -lmpg123

Open Beginner friendly
#1,165 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c, cmake
Domain
build-system

Research direction

Start by locating the Autotools configure checks for libmpg123 and libmp3lame, then inspect how their linker flags are tested. Reproduce the static cross-compile failure with the reported setup if available. Done when the lame check accounts for its libmpg123 dependency and static MP3 support is detected.

Written by the indexing model from the issue text.

Description

Dear libsndfile maintainers,

My situtation:

  1. I am cross-compiling for Windows (various architectures) from Debian Trixie
  2. I want static libraries for everything
  3. I built and installed static libmpg123 and static libmp3lame into my prefix
  4. libsndfile ./configure test for -lmp3lame fails with missing symbols from libmpg123, which is not passed on the linker command line
  5. sndfile builds without MP3 support

Proposed solution:

  • move libmpg123 configure tests before libmp3lame configure tests, and
  • pass -lmpg123 (from its configure test) to -lmp3lame configure test too

Ideally:

  • the configure test for lame could try using pkg-config, but I checked and lame.pc does not have a static libs section so this would fail in a similar way (I may file a bug with lame)

Workarounds:

  • is there any flag or environment variable I can set to get this to work?
  • would I have better luck with the cmake build system?

Thanks for your work on libsndfile!

Dominant language
C
Stars
1.7k
Forks
476
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from libsndfile/libsndfile

All issues in libsndfile/libsndfile

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.