<?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=Cagdas</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=Cagdas"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Cagdas/"/>
	<updated>2026-11-04T16:27:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=27757</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=27757"/>
		<updated>2015-01-21T12:44:16Z</updated>

		<summary type="html">&lt;p&gt;Cagdas: /* Prebuilt libraries (recommended) */&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 &#039;&#039;&#039;10.7&#039;&#039;&#039;, &#039;&#039;&#039;Lion&#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; You need at least &#039;&#039;Xcode4.3&#039;&#039;. &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], the command line tools must be installed manually through preferences.&lt;br /&gt;
&lt;br /&gt;
=== Xcode select on Xcode 4.3  ===&lt;br /&gt;
&lt;br /&gt;
If you are on Xcode 4.3 with no previous Xcode installation , you probably need to run xcode select to point to your xcode developer directory.&lt;br /&gt;
&lt;br /&gt;
 xcrun clang&lt;br /&gt;
&lt;br /&gt;
If this outputs &#039;Error: No developer directory...&#039;, then use xcode-select to select the developer directory within the Xcode package.&lt;br /&gt;
&lt;br /&gt;
something like:&lt;br /&gt;
&lt;br /&gt;
 sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer  &lt;br /&gt;
&lt;br /&gt;
=== Configure the environment ===&lt;br /&gt;
&lt;br /&gt;
On &#039;&#039;&#039;Mac OS X 10.7&#039;&#039;&#039; VLC needs to be compiled using Apple&#039;s clang compiler in its latest version. To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X): &lt;br /&gt;
&lt;br /&gt;
 export CC=&amp;quot;xcrun clang&amp;quot;&lt;br /&gt;
 export CXX=&amp;quot;xcrun clang++&amp;quot;&lt;br /&gt;
 export OBJC=&amp;quot;xcrun clang&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the setenv command of course.&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 ==&lt;br /&gt;
&lt;br /&gt;
Set the OSX_Version to your current OSX Version&lt;br /&gt;
&lt;br /&gt;
 export OSX_VERSION=10.7&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;
You need to download &amp;quot;x264-git.tar.gz&amp;quot; from &amp;quot;http://download.videolan.org/contrib/&amp;quot; and copy it to &amp;quot;vlc/contrib/tarballs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 make prebuilt&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
You need to little change on &amp;quot;x265.pc&amp;quot; file:&lt;br /&gt;
&lt;br /&gt;
 vim ../x86_64-apple-darwin10/lib/pkgconfig/x265.pc&lt;br /&gt;
 --Libs:  -L${libdir} -lx265  -lstdc++ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/&#039;&#039;&#039;4.2&#039;&#039;&#039;/lib/darwin/libclang_rt.osx.a&lt;br /&gt;
 ++Libs:  -L${libdir} -lx265  -lstdc++ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/&#039;&#039;&#039;[your version]&#039;&#039;&#039;/lib/darwin/libclang_rt.osx.a&lt;br /&gt;
&lt;br /&gt;
Important thing is &#039;&#039;&#039;[your version]&#039;&#039;&#039;. Go to &amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/&amp;quot; folder and find your version.&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 binary with the previously installed x86_64-apple-darwin10 contrib: &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;
if you want to avoid recompiling VLC.app every time during development use&lt;br /&gt;
&lt;br /&gt;
 make VLC-dev.app&lt;br /&gt;
&lt;br /&gt;
== Package VLC Application for Mac  ==&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;
== Sign VLC Application for Mac  ==&lt;br /&gt;
&lt;br /&gt;
If you want to sign your application with a certificate, for example for Gatekeeper, you need to run:&lt;br /&gt;
&lt;br /&gt;
 extras/package/macosx/codesign.sh -i &amp;quot;certificate name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= What&#039;s wrong: troubleshooting  =&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;
[[Category:Building]] [[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Cagdas</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=27756</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=27756"/>
		<updated>2015-01-21T12:28:48Z</updated>

		<summary type="html">&lt;p&gt;Cagdas: /* Prebuilt libraries (recommended), x265.pc file fixed */&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 &#039;&#039;&#039;10.7&#039;&#039;&#039;, &#039;&#039;&#039;Lion&#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; You need at least &#039;&#039;Xcode4.3&#039;&#039;. &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], the command line tools must be installed manually through preferences.&lt;br /&gt;
&lt;br /&gt;
=== Xcode select on Xcode 4.3  ===&lt;br /&gt;
&lt;br /&gt;
If you are on Xcode 4.3 with no previous Xcode installation , you probably need to run xcode select to point to your xcode developer directory.&lt;br /&gt;
&lt;br /&gt;
 xcrun clang&lt;br /&gt;
&lt;br /&gt;
If this outputs &#039;Error: No developer directory...&#039;, then use xcode-select to select the developer directory within the Xcode package.&lt;br /&gt;
&lt;br /&gt;
something like:&lt;br /&gt;
&lt;br /&gt;
 sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer  &lt;br /&gt;
&lt;br /&gt;
=== Configure the environment ===&lt;br /&gt;
&lt;br /&gt;
On &#039;&#039;&#039;Mac OS X 10.7&#039;&#039;&#039; VLC needs to be compiled using Apple&#039;s clang compiler in its latest version. To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X): &lt;br /&gt;
&lt;br /&gt;
 export CC=&amp;quot;xcrun clang&amp;quot;&lt;br /&gt;
 export CXX=&amp;quot;xcrun clang++&amp;quot;&lt;br /&gt;
 export OBJC=&amp;quot;xcrun clang&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the setenv command of course.&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 ==&lt;br /&gt;
&lt;br /&gt;
Set the OSX_Version to your current OSX Version&lt;br /&gt;
&lt;br /&gt;
 export OSX_VERSION=10.7&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;
You need to download &amp;quot;x264-git.tar.gz&amp;quot; from &amp;quot;http://download.videolan.org/contrib/&amp;quot; and copy it to &amp;quot;vlc/contrib/tarballs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 make prebuilt&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
You need to little change on &amp;quot;x265.pc&amp;quot; file:&lt;br /&gt;
&lt;br /&gt;
 vim vlc/contrib/x86_64-apple-darwin10/lib/pkgconfig/x265.pc&lt;br /&gt;
 --Libs:  -L${libdir} -lx265  -lstdc++ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/&#039;&#039;&#039;4.2&#039;&#039;&#039;/lib/darwin/libclang_rt.osx.a&lt;br /&gt;
 ++Libs:  -L${libdir} -lx265  -lstdc++ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/&#039;&#039;&#039;[your version]&#039;&#039;&#039;/lib/darwin/libclang_rt.osx.a&lt;br /&gt;
&lt;br /&gt;
Important thing is &#039;&#039;&#039;[your version]&#039;&#039;&#039;. Go to &amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/&amp;quot; folder and find your version.&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 binary with the previously installed x86_64-apple-darwin10 contrib: &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;
if you want to avoid recompiling VLC.app every time during development use&lt;br /&gt;
&lt;br /&gt;
 make VLC-dev.app&lt;br /&gt;
&lt;br /&gt;
== Package VLC Application for Mac  ==&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;
== Sign VLC Application for Mac  ==&lt;br /&gt;
&lt;br /&gt;
If you want to sign your application with a certificate, for example for Gatekeeper, you need to run:&lt;br /&gt;
&lt;br /&gt;
 extras/package/macosx/codesign.sh -i &amp;quot;certificate name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= What&#039;s wrong: troubleshooting  =&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;
[[Category:Building]] [[Category:Mac OS X]]&lt;/div&gt;</summary>
		<author><name>Cagdas</name></author>
	</entry>
</feed>