Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FindSndFile: Link mpg123 in static builds #13087

Merged
merged 4 commits into from
Apr 21, 2024

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Apr 10, 2024

Based on #13085

This fixes another linker error in static builds that link libsndfile (before vs. after):

/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux-release/lib/libsndfile.a(mpeg_decode.c.o): in function `mpeg_dec_byterate':
mpeg_decode.c:(.text+0x36): undefined reference to `mpg123_info2'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux-release/lib/libsndfile.a(mpeg_decode.c.o): in function `mpeg_dec_seek':
mpeg_decode.c:(.text+0xa6): undefined reference to `mpg123_seek'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux-release/lib/libsndfile.a(mpeg_decode.c.o): in function `mpeg_dec_read_f':
mpeg_decode.c:(.text+0x112): undefined reference to `mpg123_read'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux-release/lib/libsndfile.a(mpeg_decode.c.o): in function `mpeg_dec_close':
mpeg_decode.c:(.text+0x273): undefined reference to `mpg123_close'
/usr/bin/ld: mpeg_decode.c:(.text+0x27c): undefined reference to `mpg123_delete'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux-release/lib/libsndfile.a(mpeg_decode.c.o): in function `mpeg_dec_read_s':
mpeg_decode.c:(.text+0x3c0): undefined reference to `mpg123_read'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux-release/lib/libsndfile.a(mpeg_decode.c.o): in function `mpeg_dec_read_i':
mpeg_decode.c:(.text+0x500): undefined reference to `mpg123_read'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux-release/lib/libsndfile.a(mpeg_decode.c.o): in function `mpeg_dec_read_d':
mpeg_decode.c:(.text+0x64a): undefined reference to `mpg123_read'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux-release/lib/libsndfile.a(mpeg_decode.c.o): in function `mpeg_decoder_init':
mpeg_decode.c:(.text+0x7d9): undefined reference to `mpg123_init'

@fwcd fwcd marked this pull request as ready for review April 10, 2024 22:58
Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mpg123 dependency has been added from sndlfile 1.2. So we need to put here a version guard.

By the way, it could be interesting to check the offset compared to libmad regarding mp3 decoding.

@fwcd
Copy link
Member Author

fwcd commented Apr 12, 2024

The port's blame suggests that 1.1.0 was the first version to introduce this dependency, so that's what I used for the version check.

@fwcd fwcd requested a review from daschuer April 20, 2024 00:48
Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@daschuer daschuer merged commit 526e4de into mixxxdj:main Apr 21, 2024
13 checks passed
@fwcd fwcd deleted the link-mpg123-sndfile branch April 23, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants