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

FindPortMidi: Link ALSA in static builds on Linux #12292

Merged
merged 2 commits into from
Nov 12, 2023

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Nov 12, 2023

Another follow-up to #12291, the never ending story of linker errors in getting Mixxx to compile statically on Linux. PortMidi was apparently missing an ALSA link dependency too, which resulted in similar errors (see this build):

/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux/lib/libportmidi.a(pmlinuxalsa.c.o): in function `alsa_poll':
pmlinuxalsa.c:(.text+0x9d): undefined reference to `snd_seq_event_input_pending'
/usr/bin/ld: pmlinuxalsa.c:(.text+0xba): undefined reference to `snd_seq_event_input_pending'
/usr/bin/ld: pmlinuxalsa.c:(.text+0xcd): undefined reference to `snd_seq_event_input'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux/lib/libportmidi.a(pmlinuxalsa.c.o): in function `alsa_write_byte':
pmlinuxalsa.c:(.text+0x510): undefined reference to `snd_midi_event_encode_byte'
/usr/bin/ld: pmlinuxalsa.c:(.text+0x5c5): undefined reference to `snd_seq_event_output'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux/lib/libportmidi.a(pmlinuxalsa.c.o): in function `alsa_create_virtual':
pmlinuxalsa.c:(.text+0x6c5): undefined reference to `snd_seq_port_info_sizeof'
/usr/bin/ld: pmlinuxalsa.c:(.text+0x70d): undefined reference to `snd_seq_port_info_sizeof'
/usr/bin/ld: pmlinuxalsa.c:(.text+0x730): undefined reference to `snd_seq_port_info_set_capability'
/usr/bin/ld: pmlinuxalsa.c:(.text+0x73d): undefined reference to `snd_seq_port_info_set_type'
...

@fwcd fwcd force-pushed the linux-static-portmidi-alsa branch from fde1627 to 3234af0 Compare November 12, 2023 15:22
Without this, the static library check unfortunately doesn't work.
Fortunately, this logic is pretty similar to FindPortAudio and other
libraries.
@fwcd fwcd force-pushed the linux-static-portmidi-alsa branch from ce37de3 to 2d1be48 Compare November 12, 2023 15:41
@fwcd fwcd marked this pull request as ready for review November 12, 2023 16:35
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.

Still all green, LGTM.

@daschuer daschuer merged commit 8a5855c into mixxxdj:main Nov 12, 2023
@fwcd fwcd deleted the linux-static-portmidi-alsa branch November 12, 2023 21:53
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