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

1.2.10: control.h missing definitions for snd_ump_endpoint_info_t and snd_ump_block_info_t #348

Closed
ajakk opened this issue Sep 2, 2023 · 1 comment

Comments

@ajakk
Copy link

ajakk commented Sep 2, 2023

When configured with raw MIDI support, control.h declares:

int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t *info);
int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info);

However, it doesn't seem that the snd_ump* types are defined here, and this results in build failures in applications compiling against alsa-lib-1.2.10. For example (build log):

[77/90] /usr/bin/x86_64-pc-linux-gnu-g++  -I/var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3/include -I/var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3_build/generated-sources -isystem /usr/include/cairo -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/pixman-1 -isystem /var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3/lib/xpp/include -isystem /var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3_build/lib/xpp/generated-sources/include  -O2 -pipe -march=native -fno-diagnostics-color -std=c++14 -fno-diagnostics-color -Wall -Wextra -Wpedantic -Wsuggest-override -MD -MT bin/CMakeFiles/poly.dir/adapters/alsa/control.cpp.o -MF bin/CMakeFiles/poly.dir/adapters/alsa/control.cpp.o.d -o bin/CMakeFiles/poly.dir/adapters/alsa/control.cpp.o -c /var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3/src/adapters/alsa/control.cpp
FAILED: bin/CMakeFiles/poly.dir/adapters/alsa/control.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++  -I/var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3/include -I/var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3_build/generated-sources -isystem /usr/include/cairo -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/pixman-1 -isystem /var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3/lib/xpp/include -isystem /var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3_build/lib/xpp/generated-sources/include  -O2 -pipe -march=native -fno-diagnostics-color -std=c++14 -fno-diagnostics-color -Wall -Wextra -Wpedantic -Wsuggest-override -MD -MT bin/CMakeFiles/poly.dir/adapters/alsa/control.cpp.o -MF bin/CMakeFiles/poly.dir/adapters/alsa/control.cpp.o.d -o bin/CMakeFiles/poly.dir/adapters/alsa/control.cpp.o -c /var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3/src/adapters/alsa/control.cpp
In file included from /var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3/include/adapters/alsa/generic.hpp:37,
                 from /var/tmp/portage/x11-misc/polybar-3.6.3-r3/work/polybar-3.6.3/src/adapters/alsa/control.cpp:2:
/usr/include/alsa/control.h:417:47: error: ‘snd_ump_endpoint_info_t’ has not been declared
  417 | int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t *info);
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/alsa/control.h:418:44: error: ‘snd_ump_block_info_t’ has not been declared
  418 | int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info);
      |                                            ^~~~~~~~~~~~~~~~~~~~
@perexg perexg closed this as completed in fcce13a Sep 4, 2023
@perexg
Copy link
Member

perexg commented Sep 4, 2023

Thanks. Fixed in fcce13a.

patrick96 added a commit to patrick96/polybar that referenced this issue Sep 28, 2023
In alsa 1.2.10, the `alsa/control.h` header cannot be included on its
own because it does not include all symbols it uses.

We are basically duplicating asoundlib.h anyway and there is even a
macro variable to switch to it.

Ref: polybar#3009
Ref: alsa-project/alsa-lib#348
patrick96 added a commit to polybar/polybar that referenced this issue Sep 28, 2023
In alsa 1.2.10, the `alsa/control.h` header cannot be included on its
own because it does not include all symbols it uses.

We are basically duplicating asoundlib.h anyway and there is even a
macro variable to switch to it.

Ref: #3009
Ref: alsa-project/alsa-lib#348
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

No branches or pull requests

2 participants