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

‘SOUND_PCM_WRITE_CHANNELS_is_obsolete_use_SNDCTL_DSP_CHANNELS_instead’ #1150

Closed
eyalroz opened this issue Sep 8, 2022 · 1 comment · Fixed by #1154
Closed

‘SOUND_PCM_WRITE_CHANNELS_is_obsolete_use_SNDCTL_DSP_CHANNELS_instead’ #1150

eyalroz opened this issue Sep 8, 2022 · 1 comment · Fixed by #1154
Labels

Comments

@eyalroz
Copy link

eyalroz commented Sep 8, 2022

FluidSynth version

2.2.9 release

Describe the bug

Can't build. During build on a Devuan GNU/Linux daedalus machine, I get:

[ 14%] Building C object src/CMakeFiles/libfluidsynth-OBJ.dir/drivers/fluid_oss.c.o
In file included from /usr/include/x86_64-linux-gnu/sys/soundcard.h:1,
                 from /usr/local/src/fluidsynth-2.2.9/src/drivers/fluid_oss.c:36:
/usr/local/src/fluidsynth-2.2.9/src/drivers/fluid_oss.c: In function ‘new_fluid_oss_audio_driver’:
/usr/local/src/fluidsynth-2.2.9/src/drivers/fluid_oss.c:233:26: error: ‘SOUND_PCM_WRITE_CHANNELS_is_obsolete_use_SNDCTL_DSP_CHANNELS_instead’ undeclared (first use in this function)
  233 |     if(ioctl(dev->dspfd, SOUND_PCM_WRITE_CHANNELS, &channels) < 0)
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/src/fluidsynth-2.2.9/src/drivers/fluid_oss.c:233:26: note: each undeclared identifier is reported only once for each function it appears in
/usr/local/src/fluidsynth-2.2.9/src/drivers/fluid_oss.c: In function ‘new_fluid_oss_audio_driver2’:
/usr/local/src/fluidsynth-2.2.9/src/drivers/fluid_oss.c:379:26: error: ‘SOUND_PCM_WRITE_CHANNELS_is_obsolete_use_SNDCTL_DSP_CHANNELS_instead’ undeclared (first use in this function)
  379 |     if(ioctl(dev->dspfd, SOUND_PCM_WRITE_CHANNELS, &channels) < 0)
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [src/CMakeFiles/libfluidsynth-OBJ.dir/build.make:132: src/CMakeFiles/libfluidsynth-OBJ.dir/drivers/fluid_oss.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:241: src/CMakeFiles/libfluidsynth-OBJ.dir/all] Error 2
gmake: *** [Makefile:166: all] Error 2

Will provide additional info on request.

Expected behavior

Build should conclude successfully

Additional context

I wanted to use the Debian version of the package, but that seems to depend on systemd for some strange reason :-(

@derselbst
Copy link
Member

Thanks for the report. The problem is that SOUND_PCM_WRITE_CHANNELS is defined in your case. It would work if it wasn't defined. Anyway, I've committed a potential fix on branch fix-oss-build. Since none of our CI builds caught that error, pls. confirm whether this fixes the build for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants