<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jmstacey</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jmstacey"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Jmstacey/"/>
	<updated>2026-11-04T16:27:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=22188</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=22188"/>
		<updated>2012-03-04T09:00:34Z</updated>

		<summary type="html">&lt;p&gt;Jmstacey: /* Apple Software */ Added temporary note about Xcode 4.3 build system changes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an &#039;&#039;&#039;howto&#039;&#039;&#039; to compile {{VLC}} on &#039;&#039;Mac OS X&#039;&#039;, focused on &#039;&#039;&#039;VLC 2.0&#039;&#039;&#039; and newer. &lt;br /&gt;
&lt;br /&gt;
= Pre-requisites  =&lt;br /&gt;
&lt;br /&gt;
=== Apple Software ===&lt;br /&gt;
&lt;br /&gt;
*You need at least MacOSX 10.5. &#039;&#039;&#039;10.6&#039;&#039;&#039;, &#039;&#039;&#039;Snow Leopard&#039;&#039;&#039; or later is strongly recommended, though. &lt;br /&gt;
*&#039;&#039;&#039;Developer Tools from Apple&#039;&#039;&#039; from http://developer.apple.com/technology/xcode.html&amp;lt;br&amp;gt; Both &#039;&#039;Xcode3&#039;&#039; and &#039;&#039;Xcode4&#039;&#039; should be fine. &amp;lt;br /&amp;gt;Note: If using [https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html Xcode 4.3] or later, the command line tools must be installed manually through preferences. Additionally, [https://trac.videolan.org/vlc/ticket/6305 Xcode 4.3 will require changes to VLC&#039;s build system] which are currently pending and may require patching until resolved.&lt;br /&gt;
&lt;br /&gt;
=== GCC 4.2 on Xcode 4.2  ===&lt;br /&gt;
&lt;br /&gt;
If you are on Xcode 4.2 with no previous Xcode installation, you probably &#039;&#039;&#039;NEED&#039;&#039;&#039; gcc-4.2 that isn&#039;t installed anymore. &lt;br /&gt;
&lt;br /&gt;
Please install it from [https://github.com/kennethreitz/osx-gcc-installer/downloads OSX-GCC installer]. &lt;br /&gt;
&lt;br /&gt;
 $ gcc-4.2 --version&lt;br /&gt;
&lt;br /&gt;
=== Git  ===&lt;br /&gt;
&lt;br /&gt;
If you have XCode 4, Git is already installed&lt;br /&gt;
You just need to point your Terminal to it:&lt;br /&gt;
&lt;br /&gt;
 $ export PATH=/Developer/usr/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
If you have Xcode 3, [http://git-scm.com/ get Git from their website].&lt;br /&gt;
&lt;br /&gt;
= [[GetTheSource|Get the source code]]  =&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
= Build VLC with a single command  =&lt;br /&gt;
&lt;br /&gt;
Setup a build folder:&lt;br /&gt;
  $ cd vlc &amp;amp;&amp;amp; mkdir build &amp;amp;&amp;amp; cd build&lt;br /&gt;
&lt;br /&gt;
And run the build:&lt;br /&gt;
  $ ../extras/package/macosx/build.sh&lt;br /&gt;
&lt;br /&gt;
Wait and you are finished&lt;br /&gt;
&lt;br /&gt;
You can see more options for this build (change arch or sdk):&lt;br /&gt;
  $ ../extras/package/macosx/build.sh -h&lt;br /&gt;
&lt;br /&gt;
= Build steps =&lt;br /&gt;
Now, if you prefer, you can read the following detailed information on how the build internally works:&lt;br /&gt;
&lt;br /&gt;
== Additional development tools  ==&lt;br /&gt;
&lt;br /&gt;
You need development tools, notably all the autotools, to build VLC correctly.&lt;br /&gt;
 &lt;br /&gt;
Here is how:&lt;br /&gt;
 $ cd vlc/extras/tools&lt;br /&gt;
 $ ./bootstrap &amp;amp;&amp;amp; make&lt;br /&gt;
 $ cd ../..&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: set the new PATH.&lt;br /&gt;
 $ export PATH=$PWD/extras/tools/build/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
== SDK selection and 32/64 bits  ==&lt;br /&gt;
&lt;br /&gt;
=== SDK selection ===&lt;br /&gt;
&lt;br /&gt;
If you want to use the 10.6 SDK (your VLC will only run on 10.6 and more recent computers): &lt;br /&gt;
&lt;br /&gt;
 $ export OSX_VERSION=10.6&lt;br /&gt;
&lt;br /&gt;
You can do the same for &#039;&#039;&#039;10.5&#039;&#039;&#039;, but please check that you have &#039;&#039;MacOSX10.5.sdk&#039;&#039; installed in &#039;&#039;/Developer/SDKs/&#039;&#039; . If you are using Xcode 4.2, you can [http://stackoverflow.com/a/6293605 install the 10.5 sdk] with the .dmg from Xcode3. &lt;br /&gt;
&lt;br /&gt;
=== 32/64bits selection  ===&lt;br /&gt;
&lt;br /&gt;
The instructions below will build a 64 bits binary using 10.6 (Snow Leopard) SDK. This is reflected by using host and build variables &#039;&#039;&#039;x86_64-apple-darwin10&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
This &amp;quot;triplet&amp;quot; is ARCHITECTURE-apple-SYSTEM. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ARCHITECTURE&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;x86_64&amp;lt;/code&amp;gt; represents Intel 64bits. &lt;br /&gt;
*&amp;lt;code&amp;gt;i686&amp;lt;/code&amp;gt; represents Intel 32bits. &lt;br /&gt;
*&amp;lt;code&amp;gt;powerpc&amp;lt;/code&amp;gt; represents PowerPC 32bits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SDK SYSTEM&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;darwin9&amp;lt;/code&amp;gt; represents MacOSX 10.5. &lt;br /&gt;
*&amp;lt;code&amp;gt;darwin10&amp;lt;/code&amp;gt; represents MacOSX 10.6.&lt;br /&gt;
&lt;br /&gt;
So to make a PowerPC build, you would use &#039;&#039;&#039;powerpc-apple-darwin9&#039;&#039;&#039;. So to make a intel32 build for 10.5+, you would use &#039;&#039;&#039;i686-apple-darwin9&#039;&#039;&#039;. So to make a intel64 build for 10.6+, you would use &#039;&#039;&#039;x86_64-apple-darwin10&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Prepare [[Contrib Status|3rd party libraries]]  ==&lt;br /&gt;
&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&lt;br /&gt;
  $ cd contrib&lt;br /&gt;
  $ mkdir -p osx &amp;amp;amp;&amp;amp;amp; cd osx&lt;br /&gt;
  $ ../bootstrap --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin10&lt;br /&gt;
&lt;br /&gt;
=== Prebuilt libraries (recommended) ===&lt;br /&gt;
&lt;br /&gt;
If you want to download a prebuilt package of all the needed libraries. &lt;br /&gt;
&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
And then skip to [[OSXCompile#Bootstrap_VLC|bootstrap section of this page]].&lt;br /&gt;
&lt;br /&gt;
=== Build your own libraries (not for the faint-hearted) ===&lt;br /&gt;
&lt;br /&gt;
If you want to build from source a package in the contribs: &lt;br /&gt;
&lt;br /&gt;
  $ make -j4 .gettext&lt;br /&gt;
  $ export PATH=$PWD/../x86_64-apple-darwin10/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
Then: &lt;br /&gt;
&lt;br /&gt;
  $ make -j4&lt;br /&gt;
&lt;br /&gt;
If you had no errors, the 3rd party libraries (contrib) are built correctly and you can proceed to the next step.&lt;br /&gt;
&lt;br /&gt;
=== Go Back  ===&lt;br /&gt;
&lt;br /&gt;
Go back to the VLC source directory: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
&lt;br /&gt;
== Bootstrap VLC  ==&lt;br /&gt;
&lt;br /&gt;
This will create the configure script: &lt;br /&gt;
&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure the VLC build  ==&lt;br /&gt;
&lt;br /&gt;
Create a build folder: &lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p build &amp;amp;amp;&amp;amp;amp; cd build&lt;br /&gt;
&lt;br /&gt;
To list the different options of configure: &lt;br /&gt;
&lt;br /&gt;
  $ ../extras/package/macosx/configure.sh --help&lt;br /&gt;
&lt;br /&gt;
To build a 64 bits binary: &lt;br /&gt;
&lt;br /&gt;
  $ ../extras/package/macosx/configure.sh --enable-debug --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin10&lt;br /&gt;
&lt;br /&gt;
== Build VLC  ==&lt;br /&gt;
&lt;br /&gt;
Just do:&lt;br /&gt;
  $ make -j4&lt;br /&gt;
&lt;br /&gt;
and wait...&lt;br /&gt;
&lt;br /&gt;
== Package VLC Application for Mac  ==&lt;br /&gt;
&lt;br /&gt;
If you want to share the application with another user or another computer: &lt;br /&gt;
&lt;br /&gt;
  $ make VLC.app&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image: &lt;br /&gt;
&lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
&lt;br /&gt;
Respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin.&lt;br /&gt;
&lt;br /&gt;
= What&#039;s wrong: troubleshooting  =&lt;br /&gt;
&lt;br /&gt;
=== Xcode path  ===&lt;br /&gt;
&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Xcode version  ===&lt;br /&gt;
&lt;br /&gt;
Please make sure that you are using the latest Xcode3 or the latest version of Xcode4 to compile VLC &lt;br /&gt;
&lt;br /&gt;
=== 3rd party packagers and PATH  ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pay careful attention to remove any reference to 3rd party package managersfrom your environment.&#039;&#039;&#039; This is important to avoid conflicts between your package manager (homebrew, fink, macports...) and the contrib package manager we use to build our contrib. &lt;br /&gt;
&lt;br /&gt;
It shouldn&#039;t be necessary, but it can happen. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;git must still be accessible though!&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
 $ unset PKG_CONFIG_PATH&lt;br /&gt;
 $ unset PKG_CONFIG_LIBDIR&lt;br /&gt;
 $ export PATH=$PWD/build/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin&lt;br /&gt;
&lt;br /&gt;
=== QTsound compilation on X.5  ===&lt;br /&gt;
&lt;br /&gt;
MacOS X.5.SDK is broken - 2 options exist:&lt;br /&gt;
&lt;br /&gt;
Option 1:&lt;br /&gt;
&lt;br /&gt;
*Download the MacOS10.6.sdk and get QTCaptureDecompressedAudioOutput.h from &#039;&#039;/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/QTKit.framework/Headers/&#039;&#039; and move it to &#039;&#039;/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QTKit.framework/Headers/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Edit &#039;&#039;/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QTKit.framework/Headers/QTKit.h&#039;&#039; and add the&lt;br /&gt;
&lt;br /&gt;
 #import &amp;amp;lt;QTKit/QTCaptureDecompressedAudioOutput.h&amp;amp;gt; where needed.&lt;br /&gt;
&lt;br /&gt;
Option 2:&lt;br /&gt;
&lt;br /&gt;
*Configure the VLC build to explicitly use the MacOS10.6.sdk by adding the following flag:&lt;br /&gt;
 --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk&lt;br /&gt;
&lt;br /&gt;
=== Cross-Compilation to PPC from X.6 intel ===&lt;br /&gt;
If you want to compile VLC for PPC, based on a X.6 intel, you need to tweak a few things since Apple broke it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is VERY advanced stuff!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Pre-requisites ====&lt;br /&gt;
Be sure to:&lt;br /&gt;
* have X.6.8&lt;br /&gt;
* Xcode 4.2 installed in the normal &#039;&#039;/Developers&#039;&#039; location&lt;br /&gt;
* Xcode 3 installed in &#039;&#039;/Xcode3&#039;&#039; location&lt;br /&gt;
* MacOS X.6 and X.5 SDK installed in &#039;&#039;/Developers/SDKs/&#039;&#039; , as explained above (SDK selection).&lt;br /&gt;
&lt;br /&gt;
==== GNU AS ====&lt;br /&gt;
Using this out of the box will not work because &#039;&#039;&#039;AS&#039;&#039;&#039; for ppc is broken on the default setup. Here is how to fix it:&lt;br /&gt;
 cd /usr/libexec/as&lt;br /&gt;
 sudo mkdir ppc&lt;br /&gt;
 cd ppc&lt;br /&gt;
 sudo ln -sf /Xcode3/usr/bin/as as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]] [[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Jmstacey</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=22187</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=22187"/>
		<updated>2012-03-04T08:56:47Z</updated>

		<summary type="html">&lt;p&gt;Jmstacey: /* Apple Software */ Added note about command line tools and Xcode 4.3.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an &#039;&#039;&#039;howto&#039;&#039;&#039; to compile {{VLC}} on &#039;&#039;Mac OS X&#039;&#039;, focused on &#039;&#039;&#039;VLC 2.0&#039;&#039;&#039; and newer. &lt;br /&gt;
&lt;br /&gt;
= Pre-requisites  =&lt;br /&gt;
&lt;br /&gt;
=== Apple Software ===&lt;br /&gt;
&lt;br /&gt;
*You need at least MacOSX 10.5. &#039;&#039;&#039;10.6&#039;&#039;&#039;, &#039;&#039;&#039;Snow Leopard&#039;&#039;&#039; or later is strongly recommended, though. &lt;br /&gt;
*&#039;&#039;&#039;Developer Tools from Apple&#039;&#039;&#039; from http://developer.apple.com/technology/xcode.html&amp;lt;br&amp;gt; Both &#039;&#039;Xcode3&#039;&#039; and &#039;&#039;Xcode4&#039;&#039; should be fine. &amp;lt;br /&amp;gt;Note: If using [https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html Xcode 4.3] or later, the command line tools must be installed manually through preferences.&lt;br /&gt;
&lt;br /&gt;
=== GCC 4.2 on Xcode 4.2  ===&lt;br /&gt;
&lt;br /&gt;
If you are on Xcode 4.2 with no previous Xcode installation, you probably &#039;&#039;&#039;NEED&#039;&#039;&#039; gcc-4.2 that isn&#039;t installed anymore. &lt;br /&gt;
&lt;br /&gt;
Please install it from [https://github.com/kennethreitz/osx-gcc-installer/downloads OSX-GCC installer]. &lt;br /&gt;
&lt;br /&gt;
 $ gcc-4.2 --version&lt;br /&gt;
&lt;br /&gt;
=== Git  ===&lt;br /&gt;
&lt;br /&gt;
If you have XCode 4, Git is already installed&lt;br /&gt;
You just need to point your Terminal to it:&lt;br /&gt;
&lt;br /&gt;
 $ export PATH=/Developer/usr/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
If you have Xcode 3, [http://git-scm.com/ get Git from their website].&lt;br /&gt;
&lt;br /&gt;
= [[GetTheSource|Get the source code]]  =&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
= Build VLC with a single command  =&lt;br /&gt;
&lt;br /&gt;
Setup a build folder:&lt;br /&gt;
  $ cd vlc &amp;amp;&amp;amp; mkdir build &amp;amp;&amp;amp; cd build&lt;br /&gt;
&lt;br /&gt;
And run the build:&lt;br /&gt;
  $ ../extras/package/macosx/build.sh&lt;br /&gt;
&lt;br /&gt;
Wait and you are finished&lt;br /&gt;
&lt;br /&gt;
You can see more options for this build (change arch or sdk):&lt;br /&gt;
  $ ../extras/package/macosx/build.sh -h&lt;br /&gt;
&lt;br /&gt;
= Build steps =&lt;br /&gt;
Now, if you prefer, you can read the following detailed information on how the build internally works:&lt;br /&gt;
&lt;br /&gt;
== Additional development tools  ==&lt;br /&gt;
&lt;br /&gt;
You need development tools, notably all the autotools, to build VLC correctly.&lt;br /&gt;
 &lt;br /&gt;
Here is how:&lt;br /&gt;
 $ cd vlc/extras/tools&lt;br /&gt;
 $ ./bootstrap &amp;amp;&amp;amp; make&lt;br /&gt;
 $ cd ../..&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: set the new PATH.&lt;br /&gt;
 $ export PATH=$PWD/extras/tools/build/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
== SDK selection and 32/64 bits  ==&lt;br /&gt;
&lt;br /&gt;
=== SDK selection ===&lt;br /&gt;
&lt;br /&gt;
If you want to use the 10.6 SDK (your VLC will only run on 10.6 and more recent computers): &lt;br /&gt;
&lt;br /&gt;
 $ export OSX_VERSION=10.6&lt;br /&gt;
&lt;br /&gt;
You can do the same for &#039;&#039;&#039;10.5&#039;&#039;&#039;, but please check that you have &#039;&#039;MacOSX10.5.sdk&#039;&#039; installed in &#039;&#039;/Developer/SDKs/&#039;&#039; . If you are using Xcode 4.2, you can [http://stackoverflow.com/a/6293605 install the 10.5 sdk] with the .dmg from Xcode3. &lt;br /&gt;
&lt;br /&gt;
=== 32/64bits selection  ===&lt;br /&gt;
&lt;br /&gt;
The instructions below will build a 64 bits binary using 10.6 (Snow Leopard) SDK. This is reflected by using host and build variables &#039;&#039;&#039;x86_64-apple-darwin10&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
This &amp;quot;triplet&amp;quot; is ARCHITECTURE-apple-SYSTEM. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ARCHITECTURE&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;x86_64&amp;lt;/code&amp;gt; represents Intel 64bits. &lt;br /&gt;
*&amp;lt;code&amp;gt;i686&amp;lt;/code&amp;gt; represents Intel 32bits. &lt;br /&gt;
*&amp;lt;code&amp;gt;powerpc&amp;lt;/code&amp;gt; represents PowerPC 32bits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SDK SYSTEM&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;darwin9&amp;lt;/code&amp;gt; represents MacOSX 10.5. &lt;br /&gt;
*&amp;lt;code&amp;gt;darwin10&amp;lt;/code&amp;gt; represents MacOSX 10.6.&lt;br /&gt;
&lt;br /&gt;
So to make a PowerPC build, you would use &#039;&#039;&#039;powerpc-apple-darwin9&#039;&#039;&#039;. So to make a intel32 build for 10.5+, you would use &#039;&#039;&#039;i686-apple-darwin9&#039;&#039;&#039;. So to make a intel64 build for 10.6+, you would use &#039;&#039;&#039;x86_64-apple-darwin10&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Prepare [[Contrib Status|3rd party libraries]]  ==&lt;br /&gt;
&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&lt;br /&gt;
  $ cd contrib&lt;br /&gt;
  $ mkdir -p osx &amp;amp;amp;&amp;amp;amp; cd osx&lt;br /&gt;
  $ ../bootstrap --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin10&lt;br /&gt;
&lt;br /&gt;
=== Prebuilt libraries (recommended) ===&lt;br /&gt;
&lt;br /&gt;
If you want to download a prebuilt package of all the needed libraries. &lt;br /&gt;
&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
And then skip to [[OSXCompile#Bootstrap_VLC|bootstrap section of this page]].&lt;br /&gt;
&lt;br /&gt;
=== Build your own libraries (not for the faint-hearted) ===&lt;br /&gt;
&lt;br /&gt;
If you want to build from source a package in the contribs: &lt;br /&gt;
&lt;br /&gt;
  $ make -j4 .gettext&lt;br /&gt;
  $ export PATH=$PWD/../x86_64-apple-darwin10/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
Then: &lt;br /&gt;
&lt;br /&gt;
  $ make -j4&lt;br /&gt;
&lt;br /&gt;
If you had no errors, the 3rd party libraries (contrib) are built correctly and you can proceed to the next step.&lt;br /&gt;
&lt;br /&gt;
=== Go Back  ===&lt;br /&gt;
&lt;br /&gt;
Go back to the VLC source directory: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
&lt;br /&gt;
== Bootstrap VLC  ==&lt;br /&gt;
&lt;br /&gt;
This will create the configure script: &lt;br /&gt;
&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure the VLC build  ==&lt;br /&gt;
&lt;br /&gt;
Create a build folder: &lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p build &amp;amp;amp;&amp;amp;amp; cd build&lt;br /&gt;
&lt;br /&gt;
To list the different options of configure: &lt;br /&gt;
&lt;br /&gt;
  $ ../extras/package/macosx/configure.sh --help&lt;br /&gt;
&lt;br /&gt;
To build a 64 bits binary: &lt;br /&gt;
&lt;br /&gt;
  $ ../extras/package/macosx/configure.sh --enable-debug --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin10&lt;br /&gt;
&lt;br /&gt;
== Build VLC  ==&lt;br /&gt;
&lt;br /&gt;
Just do:&lt;br /&gt;
  $ make -j4&lt;br /&gt;
&lt;br /&gt;
and wait...&lt;br /&gt;
&lt;br /&gt;
== Package VLC Application for Mac  ==&lt;br /&gt;
&lt;br /&gt;
If you want to share the application with another user or another computer: &lt;br /&gt;
&lt;br /&gt;
  $ make VLC.app&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image: &lt;br /&gt;
&lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
&lt;br /&gt;
Respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin.&lt;br /&gt;
&lt;br /&gt;
= What&#039;s wrong: troubleshooting  =&lt;br /&gt;
&lt;br /&gt;
=== Xcode path  ===&lt;br /&gt;
&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Xcode version  ===&lt;br /&gt;
&lt;br /&gt;
Please make sure that you are using the latest Xcode3 or the latest version of Xcode4 to compile VLC &lt;br /&gt;
&lt;br /&gt;
=== 3rd party packagers and PATH  ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pay careful attention to remove any reference to 3rd party package managersfrom your environment.&#039;&#039;&#039; This is important to avoid conflicts between your package manager (homebrew, fink, macports...) and the contrib package manager we use to build our contrib. &lt;br /&gt;
&lt;br /&gt;
It shouldn&#039;t be necessary, but it can happen. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;git must still be accessible though!&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
 $ unset PKG_CONFIG_PATH&lt;br /&gt;
 $ unset PKG_CONFIG_LIBDIR&lt;br /&gt;
 $ export PATH=$PWD/build/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin&lt;br /&gt;
&lt;br /&gt;
=== QTsound compilation on X.5  ===&lt;br /&gt;
&lt;br /&gt;
MacOS X.5.SDK is broken - 2 options exist:&lt;br /&gt;
&lt;br /&gt;
Option 1:&lt;br /&gt;
&lt;br /&gt;
*Download the MacOS10.6.sdk and get QTCaptureDecompressedAudioOutput.h from &#039;&#039;/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/QTKit.framework/Headers/&#039;&#039; and move it to &#039;&#039;/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QTKit.framework/Headers/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Edit &#039;&#039;/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QTKit.framework/Headers/QTKit.h&#039;&#039; and add the&lt;br /&gt;
&lt;br /&gt;
 #import &amp;amp;lt;QTKit/QTCaptureDecompressedAudioOutput.h&amp;amp;gt; where needed.&lt;br /&gt;
&lt;br /&gt;
Option 2:&lt;br /&gt;
&lt;br /&gt;
*Configure the VLC build to explicitly use the MacOS10.6.sdk by adding the following flag:&lt;br /&gt;
 --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk&lt;br /&gt;
&lt;br /&gt;
=== Cross-Compilation to PPC from X.6 intel ===&lt;br /&gt;
If you want to compile VLC for PPC, based on a X.6 intel, you need to tweak a few things since Apple broke it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is VERY advanced stuff!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Pre-requisites ====&lt;br /&gt;
Be sure to:&lt;br /&gt;
* have X.6.8&lt;br /&gt;
* Xcode 4.2 installed in the normal &#039;&#039;/Developers&#039;&#039; location&lt;br /&gt;
* Xcode 3 installed in &#039;&#039;/Xcode3&#039;&#039; location&lt;br /&gt;
* MacOS X.6 and X.5 SDK installed in &#039;&#039;/Developers/SDKs/&#039;&#039; , as explained above (SDK selection).&lt;br /&gt;
&lt;br /&gt;
==== GNU AS ====&lt;br /&gt;
Using this out of the box will not work because &#039;&#039;&#039;AS&#039;&#039;&#039; for ppc is broken on the default setup. Here is how to fix it:&lt;br /&gt;
 cd /usr/libexec/as&lt;br /&gt;
 sudo mkdir ppc&lt;br /&gt;
 cd ppc&lt;br /&gt;
 sudo ln -sf /Xcode3/usr/bin/as as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]] [[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Jmstacey</name></author>
	</entry>
</feed>