Monday, July 23, 2012

Life on Mac Is (Still) Hard

Following up my previous post, which I should have followed up immediately but didn't.

Installing on Mac OS X Lion continues to have some fun problems. I've already mentioned the problem with Vorbis; Flac, too, has problems with its configure script which can be fixed with a switch statement. To get the Flac developer libraries to install correctly, the following must be done.

./configure --disable-asm-optimizations

Thanks goes to Stack Overflow for that. Last and not least, SDL_Mixer's install also has problems. Even with Ogg Vorbis installed and functioning ( you can test that with some of the example c files it comes with ), SDL_Mixer's configure script won't recognize them. In this case, I couldn't find any command line switches to force it to work. I instead went in, and simply bypassed the configure file's test for checking if Vorbis was installed and working. I'm trying to learn more about scripting so I can see how exactly the configure script is doing its test, and then I'll go back into all -three- configure scripts, update them, and see if I can get the changes back to the guys who make this stuff.

For right now, if you find yourself having troubles, post a message, and I'll send you the modified configure script for SDL_Mixer. The reason why I'm not just flat out putting a link to it right now is because even though it's fixed, it's not fixed -correctly-, and I don't like that.

Sunday, July 8, 2012

Life On Mac is Hard

Posting this for posterity, for Mac developers. If you're not a Mac developer who treats it like a glorified Unix machine ( instead of using XCode for everything ), this might not make much sense. Move along. I'll post a recipe or something later.

This post applies to libogg 1.3.0, libvorbis 1.3.3, and was done on Mac OS X 10.7 running on a MacBook Pro. After you get done installing libogg 1.3.0, attempting to run libvorbis 1.3.3's configure script will result in the following error spew:


*** Could not run Ogg test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means Ogg was incorrectly installed
*** or that you have moved Ogg since it was installed.
configure: error: must have Ogg installed!

Which is, of course, complete nonsense, assuming you did install libogg 1.3.0 first, using proper permissions and everything. You can test that libogg 1.3.0 installed correctly using a C/C++ program if you like; I leave that as an exercise for the reader. The problem is that the configure script for libvorbis tries to build to i386 instead of x86_64. To correct this, you have to force the build script to build for x86_64 instead. Run ./configure --build=x86_64.

I freely admit I wasn't smart enough to figure out anything past 'libogg is trying to build to x86_64, while libvorbis is trying to build to i386, what's up with that?'. This forum post gave me the rest of the pieces necessary to make the whole thing work ( scroll to the bottom to find the relevant post ).

For my next trick, I might fix the configure scripts and see if I can't get the fix back to the Xiph guys, but... probably not. Still not smart enough. Working on that.