2

I'm compiling a project that uses SDL_mixer to play .ogg files. However, Mix_Init(MIX_INIT_OGG) fails, and Mix_GetError() returns "Mixer not built with Ogg Vorbis support". The version of SDL_mixer I'm using is 1.2.12, downloaded via Homebrew.

So I downloaded the sources for SDL_mixer (same version, 1.2.12), and tried building it with Ogg support, i.e. ./configure --enable-music-ogg, but configure is unable to find the Vorbis header files. This is the output it's giving:

checking vorbis/vorbisfile.h usability... no
checking vorbis/vorbisfile.h presence... no
checking for vorbis/vorbisfile.h... no
checking for ov_open_callbacks in -lvorbisfile... no
configure: WARNING: *** Unable to find Ogg Vorbis library (http://www.xiph.org/)
configure: WARNING: Ogg Vorbis support disabled

I even tried passing --includedir=/usr/local/include to configure, without success. I have both the Vorbis and Ogg header files in /usr/local/include, so e.g. the path to vorbisfile.h is /usr/local/include/vorbis/vorbisfile.h. I also tried building both libogg and libvorbis from scratch, but I still get the same errors. I'm using OS X 10.11.1 beta.

What am I doing wrong?


Edit

Output of brew ls sdl_mixer:

/usr/local/Cellar/sdl_mixer/1.2.12/include/SDL/SDL_mixer.h
/usr/local/Cellar/sdl_mixer/1.2.12/lib/libSDL_mixer-1.2.0.dylib
/usr/local/Cellar/sdl_mixer/1.2.12/lib/pkgconfig/SDL_mixer.pc
/usr/local/Cellar/sdl_mixer/1.2.12/lib/ (2 other files)
Emil Laine
  • 41,598
  • 9
  • 101
  • 157
  • 1
    Not sure what command you used to install `SDL_mixer`, let's say it was `brew install sdl_mixer`, that being the case, you could try `brew options sdl_mixer` to see if there is an *"ogg option"*. – Mark Setchell Oct 04 '15 at 21:29
  • @MarkSetchell I did it with `brew install sdl_mixer` yes. I just checked and there is a `--with-libvorbis` option, but it doesn't seem to work for some reason, SDL still says that "Mixer not built with Ogg Vorbis support". – Emil Laine Oct 04 '15 at 22:27
  • So, I presume you have now done `brew install sdl_mixer --with-libvorbis`? If you then do `brew ls sdl_mixer` it should show you what it has installed and where. – Mark Setchell Oct 05 '15 at 08:27
  • @MarkSetchell Yes that's what I did. Edited the output of `brew ls` into the question. – Emil Laine Oct 05 '15 at 08:47
  • 1
    I am having the same problem. The libraries are all installed, but building SDL_mixer from source does not work. I also tried building ogg and vorbis from source. No joy. – Timothy Wright Nov 10 '15 at 02:09

1 Answers1

1

You can run now

brew install sdl2_mixer --with-libvorbis