Successfully compiling VLC on OSX 10.6
Posted: 03 Jun 2011 11:38
Hi, I just thought I'd write a quick post describing my successful compile of VLC on OSX 10.6 in order to help others that may be having some problems and because the http://wiki.videolan.org/OSXCompile page is locked for edits.
First and foremost, you should read the OSXCompile page thoroughly (really read it, don't just skim through it).
Follow the instructions on the OSXCompile page except for the git repository download, don't bother with using git to download from the repository, as this page says
First and foremost, you should read the OSXCompile page thoroughly (really read it, don't just skim through it).
Follow the instructions on the OSXCompile page except for the git repository download, don't bother with using git to download from the repository, as this page says
Then comes the tricky bit. On OSX 10.6, VLC defaults to a 64bit compile. While I'm sure it's possible to successfully compile a 64bit version on OSX 10.6, I had a lot of problems. The obvious answer would be to compile as a 32bit application, but when using the example on the http://wiki.videolan.org/OSXCompile page, I ran into a weird error - "configure: error: C++ preprocessor "/lib/cpp" fails sanity check". Which I'm guessing meant it couldn't find the C++ compiler. I think if you set it to 32bit, it may default to the 10.5 Xcode SDK. So what you need to do (or what worked for me) is to set it to 32bit and then manually set the SDK that you want to use."Please note that this will download the entire git repository. If you are only interested in the latest development build then use the link under Latest source packages."
Code: Select all
./configure --enable-debug CFLAGS="-arch i386" CXXFLAGS="-arch i386" LDFLAGS="-arch i386" OBJCFLAGS="-arch i386" --build=i386-apple-darwin10 --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --enable-macosx