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

Build failure with SFIZZ_USE_SNDFILE=ON #1090

Closed
iv-m opened this issue Jun 30, 2022 · 1 comment · Fixed by #1112
Closed

Build failure with SFIZZ_USE_SNDFILE=ON #1090

iv-m opened this issue Jun 30, 2022 · 1 comment · Fixed by #1112
Labels
bug Something isn't working

Comments

@iv-m
Copy link
Contributor

iv-m commented Jun 30, 2022

I'm trying to build sfizz from the current develop branch (commit 77fbfa5) with -DSFIZZ_USE_SNDFILE=ON, and the build fails.

I see two problems. First, AudioReader.cpp fails to compile:

[path to]/sfizz/src/sfizz/AudioReader.cpp: In member function ‘virtual bool sfz::BasicSndfileReader::getInstrumentInfo(sfz::InstrumentInfo&)’:
[path to]/sfizz/src/sfizz/AudioReader.cpp:73:28: error: cannot convert ‘sfz::InstrumentInfo’ to ‘SF_INSTRUMENT*’ in initialization
   73 |     SF_INSTRUMENT* sfins = instrument;
      |                            ^~~~~~~~~~
      |                            |
      |                            sfz::InstrumentInfo
gmake[2]: *** [src/CMakeFiles/sfizz_internal.dir/build.make:132: src/CMakeFiles/sfizz_internal.dir/sfizz/AudioReader.cpp.o] Error 1

This can be trivially fixed by adding & to take the address of instrument, which is reference, not pointer in this context.

Second, I get the linker errors like this:

ld: in function `sfz::Synth::Impl::handleSampleOpcodes(std::vector<sfz::Opcode, std::allocator<sfz::Opcode> > const&)':
[path to]/sfizz/external/st_audiofile/src/st_audiofile.hpp:103: undefined reference to `st_open_memory'

Indeed, the only implementation of st_open_memory is in st_audiofile.c, and is compiled only

#if !defined(ST_AUDIO_FILE_USE_SNDFILE)
@paulfd paulfd added the bug Something isn't working label Jul 1, 2022
@paulfd
Copy link
Member

paulfd commented Jul 1, 2022

Thanks, I'll look into that.

vt-alt pushed a commit to altlinux/specs that referenced this issue Jul 1, 2022
- 1.2.0
- build from the develop branch snapshot
  + voice-stealing fix
  + doap:name for sfizz-multi fix
- disable (broken) sndfile integration
  (sfztools/sfizz#1090)
- fix building tests with recent glibc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants