Skip to content

Fix libid3tag not being found in SYSTEM mode - #56

Open
Knyllahsyhn wants to merge 1 commit into
musescore:mainfrom
Knyllahsyhn:fix/libid3tag-system-libs
Open

Knyllahsyhn wants to merge 1 commit into
musescore:mainfrom
Knyllahsyhn:fix/libid3tag-system-libs

Conversation

@Knyllahsyhn

Copy link
Copy Markdown

Ran into this while building the Audacity 4 AUR package (audacity-git) on Arch (and also mentioned by others),
which builds with EXTDEPS_OVERRIDE_ALL=SYSTEM. Configure fails on libid3tag even with
the distro package installed:

[libid3tag] system lib 'libid3tag' not found (USE_SYSTEM)

The recipe has DEP_LIBS libid3tag, so in SYSTEM mode find_library ends up looking
for liblibid3tag.so, while distros ship libid3tag.so. I couldn't just change it to
id3tag though, because Audacity's fork really does build liblibid3tag.a (its CMake
target is called libid3tag), so the bundled path would break.

So this adds a small DEP_SYSTEM_LIBS override for SYSTEM mode, analogous to
DEP_LIBS_WINDOWS. If not set, DEP_LIBS is used as before, so no other recipe
is affected. I also updated the README to reflect that.

If you'd rather stick to the "no lib prefix" convention in DEP_LIBS, another option
would be patching the fork to OUTPUT_NAME id3tag. Happy to rework the PR that way
if you prefer.

Tested on Arch (CMake 4.4.5, libid3tag 0.16.4): configure picks up
/usr/lib/libid3tag.so and the full Audacity build goes through.
validate.cmake passes too.

(Distro libid3tag doesn't have the ID3v2.3 option from the fork, but Audacity already
#ifdefs that, so exports just fall back to ID3v2.4.)

The libid3tag recipe sets DEP_LIBS to "libid3tag" because Audacity's fork
names its CMake target that way, so the bundled build produces
liblibid3tag.a. In SYSTEM mode the same name is passed to find_library,
which then looks for liblibid3tag.so and never finds the distro library
(libid3tag.so).

Add DEP_SYSTEM_LIBS to override the library names used in SYSTEM mode,
analogous to DEP_LIBS_WINDOWS, and set it to "id3tag" for libid3tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant