<?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=John+F</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=John+F"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/John_F/"/>
	<updated>2026-11-04T16:41:00Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Git&amp;diff=22288</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Git&amp;diff=22288"/>
		<updated>2012-03-21T11:10:01Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Submitting patches to the vlc-devel or x264-devel */  adding address&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://git-scm.com/ Git] is a free and open source [[wikipedia:Revision_control|version control system]]. It is used by programmers to keep track of the different versions of the files composing a software.&lt;br /&gt;
&lt;br /&gt;
= Basic Git usage =&lt;br /&gt;
&lt;br /&gt;
If you are using &#039;&#039;&#039;Windows&#039;&#039;&#039;, please read the [[Git_Windows]] page.&lt;br /&gt;
&lt;br /&gt;
== Getting VLC or x264 source code via Git ==&lt;br /&gt;
 &lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
Voilà! The full VLC history should be on your hard disk in vlc/.&lt;br /&gt;
&lt;br /&gt;
 $ git clone git://git.videolan.org/x264.git&lt;br /&gt;
Voilà! The full x264 history should be on your hard disk in x264/.&lt;br /&gt;
&lt;br /&gt;
If you want only the last 3 VLC revisions:&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git --depth 3&lt;br /&gt;
&lt;br /&gt;
Clones without the full revision set (--depth) can&#039;t be used for backporting (or to make sure that you&#039;re including at least commits up to the common fork point).&lt;br /&gt;
&lt;br /&gt;
You can also clone using http via our repo.or.cz mirror.&lt;br /&gt;
 $ git clone http://repo.or.cz/r/vlc.git&lt;br /&gt;
&lt;br /&gt;
See http://repo.or.cz/w/vlc.git (it&#039;s a mirror)&lt;br /&gt;
&lt;br /&gt;
=== After cloning ===&lt;br /&gt;
&lt;br /&gt;
 $ git log&lt;br /&gt;
to see the full log of the trunk.&lt;br /&gt;
 $ gitk&lt;br /&gt;
to see the log graphically.&lt;br /&gt;
&lt;br /&gt;
You can also browse the sources via [http://git.videolan.org/ gitweb].&lt;br /&gt;
&lt;br /&gt;
== Configure your global git config ==&lt;br /&gt;
May need to use &lt;br /&gt;
$ git repo-config {various options} &lt;br /&gt;
1.4.4.2 Requires the repo-config command rather than just config&lt;br /&gt;
&lt;br /&gt;
=== Personal Information ===&lt;br /&gt;
Tell git your name. (use mostly by git-commit)&lt;br /&gt;
 $ git config --global user.name &amp;quot;Your Name&amp;quot;&lt;br /&gt;
 $ git config --global user.email &amp;quot;me@example.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Mail Information ===&lt;br /&gt;
To send patches you&#039;ll need a working mail / sendmail configuration. You can use [http://msmtp.sourceforge.net/ msmtp] to achieve this. Install it with tls and ssl activated and place the following config file (.msmtprc) in your home directory&lt;br /&gt;
 # msmtp configuration file&lt;br /&gt;
 &lt;br /&gt;
 # Set default values for all following accounts.&lt;br /&gt;
 defaults&lt;br /&gt;
 tls on&lt;br /&gt;
 tls_starttls on&lt;br /&gt;
 tls_trust_file /certificates/EquifaxSecureCertificateAuthority.crt&lt;br /&gt;
 logfile /log/.msmtp.log&lt;br /&gt;
 &lt;br /&gt;
 # GMAIL&lt;br /&gt;
 account gmail&lt;br /&gt;
 host smtp.gmail.com&lt;br /&gt;
 port 587&lt;br /&gt;
 protocol smtp&lt;br /&gt;
 from user.name@gmail.com&lt;br /&gt;
 auth on&lt;br /&gt;
 user user.name@gmail.com&lt;br /&gt;
 &lt;br /&gt;
 # Set a default account&lt;br /&gt;
 account default : gmail&lt;br /&gt;
Then configure git to use msmtp. The password will be aske for upon sending mail.&lt;br /&gt;
 $ git config --global sendemail.smtpserver /usr/local/bin/msmtp&lt;br /&gt;
The certificate for gmail can be found here: [http://www.geotrust.com/resources/extended-validation-ssl/certs/Equifax%20Secure%20Certificate%20Authority.crt EquifaxSecureCertificateAuthority.crt]&lt;br /&gt;
&lt;br /&gt;
=== Using git with color (Tip) ===&lt;br /&gt;
If you want to use git with colored output use:&lt;br /&gt;
 $ git config --global color.ui true&lt;br /&gt;
&lt;br /&gt;
If you are using an old git version (prior to 1.5.5) and previous command didn&#039;t work, use:&lt;br /&gt;
 $ git config --global color.diff auto&lt;br /&gt;
 $ git config --global color.status auto&lt;br /&gt;
 $ git config --global color.branch auto&lt;br /&gt;
&lt;br /&gt;
=== Setting up &amp;quot;git up&amp;quot; (Tip) ===&lt;br /&gt;
If you want to be able to just keep in sync using &amp;quot;git up&amp;quot; use:&lt;br /&gt;
 $ git config --global alias.up &amp;quot;pull --rebase&amp;quot;&lt;br /&gt;
And if you like your tree to be messy and don&#039;t want git to complain (like in svn) use:&lt;br /&gt;
 $ git config --global alias.up &#039;!sh -c &amp;quot;git commit -a -m &amp;quot;Before rebase&amp;quot; &amp;amp;&amp;amp; git pull --rebase &amp;amp;&amp;amp; git reset head^&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up &amp;quot;git wu&amp;quot; (Git What&#039;s Up) (Tip) ===&lt;br /&gt;
If you want to see what you are about to &amp;quot;git push&amp;quot;:&lt;br /&gt;
 $ git config --global alias.wu &amp;quot;log --stat origin..@{0}&amp;quot;&lt;br /&gt;
Now use:&lt;br /&gt;
 $ git wu&lt;br /&gt;
Note that this only works for the master branch.&lt;br /&gt;
&lt;br /&gt;
=== Setting up &amp;quot;git wup&amp;quot; (Git What&#039;s Up - with patch) (Tip) ===&lt;br /&gt;
If you want to see what you are about to &amp;quot;git push&amp;quot;, along with the diff:&lt;br /&gt;
 $ git config --global alias.wup &amp;quot;log -p origin..@{0}&amp;quot;&lt;br /&gt;
Now use:&lt;br /&gt;
 $ git wup&lt;br /&gt;
&lt;br /&gt;
== General GIT Workflow ==&lt;br /&gt;
1.  Make your file edits in your local repository.&lt;br /&gt;
&lt;br /&gt;
2.  &amp;quot;git commit&amp;quot;      the changes in your local repository&lt;br /&gt;
&lt;br /&gt;
3.  &amp;quot;git pull --rebase&amp;quot;  or &amp;quot;git up&amp;quot; (if you did &#039;&#039;git config --global alias.up &amp;quot;pull --rebase&amp;quot;&#039;&#039;) to bring the rest of your local repository up to date&lt;br /&gt;
&lt;br /&gt;
4.  &amp;quot;git log origin..master&amp;quot;    to check what you are going to commit&lt;br /&gt;
&lt;br /&gt;
4.  &amp;quot;git push&amp;quot;    to move your changes up to the master&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git stash&amp;quot;    if you want to &amp;quot;hide&amp;quot; your changes.  Do this if you think there may be other commits against the same things you are working on and want to refresh your local checkout (using a git pull --rebase) from the master. Use &amp;quot;git stash apply&amp;quot; to get your stash back. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;git checkout -f master&amp;quot;     if you think your tree is pretty hopeless, need a kill-and-fill to bring the master into your local repository.&lt;br /&gt;
&lt;br /&gt;
== List the local branch ==&lt;br /&gt;
You can now list your local branch by doing&lt;br /&gt;
 $ git branch&lt;br /&gt;
which should ouput&lt;br /&gt;
 $ git branch&lt;br /&gt;
 * master&lt;br /&gt;
&lt;br /&gt;
== List your local non committed changes ==&lt;br /&gt;
 $ git status | less&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
Now you can start to work on your tree. As soon as you feel you have reached a step in developement where you can commit your work &#039;&#039;&#039;locally&#039;&#039;&#039;, use&lt;br /&gt;
 $ git commit -a&lt;br /&gt;
or&lt;br /&gt;
 $ git commit &amp;lt;specific files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to give credit to someone else&#039;s work (e.g. you are applying a third party patch):&lt;br /&gt;
 $ git commit &amp;lt;specific files&amp;gt; --author &amp;quot;Name Surname &amp;lt;user@domain.com&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== List your commits ==&lt;br /&gt;
 $ git log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keeping your local working branch in sync ==&lt;br /&gt;
 $ git pull --rebase&lt;br /&gt;
&lt;br /&gt;
To shorten up that command type&lt;br /&gt;
 $ git config --global alias.up &amp;quot;pull --rebase&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now you can just type:&lt;br /&gt;
 $ git up&lt;br /&gt;
&lt;br /&gt;
== Use a graphical interface ==&lt;br /&gt;
 $ gitk          # Tree Browser&lt;br /&gt;
 $ qgit          # Tree Browser&lt;br /&gt;
 $ git-gui       # Commit/push/... editor&lt;br /&gt;
&lt;br /&gt;
== Submitting patches to the vlc-devel or x264-devel ==&lt;br /&gt;
&lt;br /&gt;
First make sure you have &#039;&#039;&#039;read&#039;&#039;&#039; our [[Sending Patches]] page. And that you&#039;ve &#039;&#039;&#039;read&#039;&#039;&#039; the [[Sending Patches#Check_List| Check List]].&lt;br /&gt;
&lt;br /&gt;
If you have been developing on vlc locally and (still) don&#039;t have write access, you can submit all your commits in one shot using:&lt;br /&gt;
 $ rm -Rf patches&lt;br /&gt;
 $ git format-patch -o patches origin&lt;br /&gt;
 $ git send-email --to vlc-devel@videolan.org patches&lt;br /&gt;
If you want to create a cover letter for multiple patches use:&lt;br /&gt;
 $ git format-patch -o patches origin -n --cover-letter&lt;br /&gt;
 $ git send-email --annotate --cover-letter --to vlc-devel@videolan.org patches&lt;br /&gt;
If you have multiple patch consider using:&lt;br /&gt;
 $ git send-email --compose --no-chain-reply-to --to vlc-devel@videolan.org patches&lt;br /&gt;
This will produce the patches for each local commit in the directory &amp;quot;patches&amp;quot; and send them.&lt;br /&gt;
Use --no-chain-reply-to make sure it doesn&#039;t reply.&lt;br /&gt;
&lt;br /&gt;
For x264, do the same with x264-devel@videolan.org&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- what does the following mean? --&amp;gt;&lt;br /&gt;
Don&#039;t do:&lt;br /&gt;
* [PATCH 0/m]&lt;br /&gt;
** [PATCH 1/m]&lt;br /&gt;
*** [PATCH 2/m]&lt;br /&gt;
**** ...&lt;br /&gt;
But do:&lt;br /&gt;
* [PATCH 0/m]&lt;br /&gt;
** [PATCH 1/m]&lt;br /&gt;
** [PATCH 2/m]&lt;br /&gt;
** ..&lt;br /&gt;
&lt;br /&gt;
= Advanced usage =&lt;br /&gt;
== Creating a secondary local branch ==&lt;br /&gt;
If you want to work on a specific project that could require a branch of the trunk, create a local branch of the current branch by doing:&lt;br /&gt;
 $ git branch mywork&lt;br /&gt;
and to actually use it do:&lt;br /&gt;
 $ git checkout mywork&lt;br /&gt;
Which could be summarized by:&lt;br /&gt;
 $ git checkout -b mywork&lt;br /&gt;
&lt;br /&gt;
Then do some commit on it... And you can go back to your original master branch by doing:&lt;br /&gt;
 $ git checkout master&lt;br /&gt;
&lt;br /&gt;
== Fetching a remote branch ==&lt;br /&gt;
To see the remote branch use:&lt;br /&gt;
 $ git branch -r&lt;br /&gt;
If the remote branch is named 0.8.6-bugfix&lt;br /&gt;
 $ git branch 0.8.6-bugfix origin/0.8.6-bugfix &lt;br /&gt;
 Branch 0.8.6-bugfix set up to track remote branch refs/remotes/origin/0.8.6-bugfix.&lt;br /&gt;
 $ git branch&lt;br /&gt;
  0.8.6-bugfix&lt;br /&gt;
  * master&lt;br /&gt;
To checkout that branch use:&lt;br /&gt;
 $ git checkout 0.8.6-bugfix&lt;br /&gt;
To stay up-to-date a simple&lt;br /&gt;
 $ git pull --rebase&lt;br /&gt;
Should be enough.&lt;br /&gt;
&lt;br /&gt;
If warnings appear that files still need updating:&lt;br /&gt;
 $ include/libvlc_internal.h: needs update&lt;br /&gt;
   include/mediacontrol_internal.h: needs update&lt;br /&gt;
   include/vlc/libvlc.h: needs update&lt;br /&gt;
   include/vlc_update.h: needs update&lt;br /&gt;
   modules/access/mms/mms.c: needs update&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
Then do a checkout -f to revert non committed local changes&lt;br /&gt;
 $ git checkout -f&lt;br /&gt;
&lt;br /&gt;
To stay up-to-date another&lt;br /&gt;
 $ git pull --rebase&lt;br /&gt;
Should give no more warnings.&lt;br /&gt;
&lt;br /&gt;
To push to the remote branch, use:&lt;br /&gt;
 $git push origin 0.8.6-bugfix:0.8.6-bugfix&lt;br /&gt;
&lt;br /&gt;
== Creating a remote branch ==&lt;br /&gt;
If the new remote branch is named 0.9.0-bugfix, and is based on the local master branch.&lt;br /&gt;
First make sure everything go as planned with the --dry-run option:&lt;br /&gt;
 $ git push --dry-run origin master:refs/heads/0.9.0-stable&lt;br /&gt;
 To git@git.videolan.org:vlc.git&lt;br /&gt;
 * [new branch]      master -&amp;gt; 0.9.0-stable&lt;br /&gt;
&lt;br /&gt;
Then push it:&lt;br /&gt;
 $ git push origin master:refs/heads/0.9.0-stable&lt;br /&gt;
 To git@git.videolan.org:vlc.git&lt;br /&gt;
 * [new branch]      master -&amp;gt; 0.9.0-stable&lt;br /&gt;
 $ git branch -r&lt;br /&gt;
  origin/0.9.0-stable&lt;br /&gt;
  origin/master&lt;br /&gt;
&lt;br /&gt;
To checkout that branch now see &#039;&#039;Fetching a remote branch&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Backporting commits ==&lt;br /&gt;
It is possible to &amp;quot;backport&amp;quot; commit between the master branch and a -bugfix branch. However since VDD&#039;09, the bugfix branches have been splitted to their own git repositories. This leaves us with 2 cases.&lt;br /&gt;
&lt;br /&gt;
=== Normal simple case ===&lt;br /&gt;
&lt;br /&gt;
Go to your -bugfix branch:&lt;br /&gt;
 $ git checkout 1.0-bugfix&lt;br /&gt;
&lt;br /&gt;
Backport the commit: &lt;br /&gt;
 $ git cherry-pick -x -s &amp;lt;sha-id of commit&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If git fails to do the backport by itself, you&#039;ll be presnted with the usual options in case of a failed merge or patching. Use &amp;quot;git status&amp;quot;, your favorite editor or &amp;quot;git mergetool&amp;quot; to resolve the situation. Then use &amp;quot;git add&amp;quot; and &amp;quot;git commit -c &amp;lt;sha-id of backported commit&amp;gt;&amp;quot;.&lt;br /&gt;
Then push your commit as usual.&lt;br /&gt;
&lt;br /&gt;
=== Case of VLC bugfix branches ===&lt;br /&gt;
Due to the number of commits in vlc.git and the amount of divergence between the master and 1.0-bugfix branches, they have been separated into two different git repositories. But that doesn&#039;t block you from backporting.&lt;br /&gt;
&lt;br /&gt;
Get the -bugfix git:&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc/vlc-1.0.git vlc-bugfix&lt;br /&gt;
Add vlc.git as an additional remote:&lt;br /&gt;
 $ git remote add vlc-master git://git.videolan.org/vlc.git&lt;br /&gt;
Update the information from vlc-master&lt;br /&gt;
 $ git fetch vlc-master&lt;br /&gt;
Backport as normal&lt;br /&gt;
 $ git cherry-pick -x -s &amp;lt;sha-id of commit&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Publishing your own fork ==&lt;br /&gt;
Go to [http://repo.or.cz/w/vlc.git http://repo.or.cz/w/vlc.git] and click [http://repo.or.cz/regproj.cgi?fork=vlc.git fork]. You will be able to publish your work there.&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to send a mail to the &#039;&#039;vlc-devel&#039;&#039; mailing list as soon as you create your fork.&lt;br /&gt;
&lt;br /&gt;
== Revert your non-committed local changes ==&lt;br /&gt;
 $ git checkout -f&lt;br /&gt;
&lt;br /&gt;
==Edit or undo not yet pushed commits ==&lt;br /&gt;
This will undo the last commit&lt;br /&gt;
 $ git reset HEAD^&lt;br /&gt;
which is the same as&lt;br /&gt;
 $ git reset master^&lt;br /&gt;
(if your checked-out copy of your tree is master)&lt;br /&gt;
And also the same as&lt;br /&gt;
 $ git reset a44a594 # note that there is no need to use the full sha id&lt;br /&gt;
&lt;br /&gt;
If you have a stack of patch that you have not yet committed you can delete one patch from the list using git rebase --interactive&lt;br /&gt;
 $ git rebase --interactive origin&lt;br /&gt;
  pick eacf185 test&lt;br /&gt;
  pick 56322eb VLMA owner is vlma prod.&lt;br /&gt;
 &lt;br /&gt;
  # Rebase 826757e..56322eb onto 826757e&lt;br /&gt;
  #&lt;br /&gt;
  # Commands:&lt;br /&gt;
  #  pick = use commit&lt;br /&gt;
  #  edit = use commit, but stop for amending&lt;br /&gt;
  #  squash = use commit, but meld into previous commit&lt;br /&gt;
&lt;br /&gt;
== Diff-ing ==&lt;br /&gt;
* You can diff between two branches using&lt;br /&gt;
 $ git diff branch1 branch2&lt;br /&gt;
* You can diff between the previous 10th commit and current using&lt;br /&gt;
 $ git diff HEAD~10 HEAD&lt;br /&gt;
* You can diff between the previous 10th commit and current of the branch &amp;quot;mywork&amp;quot; using&lt;br /&gt;
 $ git diff mywork~10 mywork&lt;br /&gt;
* Imagine that git log is like&lt;br /&gt;
 $ git log&lt;br /&gt;
 commit e0394f269305edd09843257e7c1d1a66aaf48ab3&lt;br /&gt;
 Author: jb &amp;lt;jb&amp;gt;&lt;br /&gt;
 Date:   Fri Apr 13 07:14:48 2007 +0000&lt;br /&gt;
    qt4 - Mousewheel (2)&lt;br /&gt;
 commit e80b339081aa6755f67c9bd8e2aacf93a9a79d95&lt;br /&gt;
 [..]&lt;br /&gt;
 commit ff7004b70fd239e4120deb160e2991bd5237b8df&lt;br /&gt;
 [..]&lt;br /&gt;
 commit a44a594898f981a145cfcace5f16f8973f9eb46f&lt;br /&gt;
 [..]&lt;br /&gt;
 commit 690df705c963cf6bf6f5746d54bc97a85ff91919&lt;br /&gt;
 [..]&lt;br /&gt;
 commit 679f8b1c3e0baa469efa970588b95a625c595d64&lt;br /&gt;
 [..]&lt;br /&gt;
&lt;br /&gt;
 $ git diff a44a594898f981a145cfcace5f16f8973f9eb46f~2 e80b339081aa6755f67c9bd8e2aacf93a9a79d95&lt;br /&gt;
Will be equivalent to:&lt;br /&gt;
 $ git diff ff7004b70fd239e4120deb160e2991bd5237b8df e80b339081aa6755f67c9bd8e2aacf93a9a79d95&lt;br /&gt;
And to:&lt;br /&gt;
 $ git diff HEAD~4 HEAD^&lt;br /&gt;
&lt;br /&gt;
* Remember that to produce a patch you should rather use git-format-patch than git-diff most of the time.&lt;br /&gt;
&lt;br /&gt;
== Patch-ing ==&lt;br /&gt;
* You can apply patches using&lt;br /&gt;
 $ git apply &amp;lt;patch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tracking regression ==&lt;br /&gt;
git has a great tool called [http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html git-bisect] to help you to track a faulty commit. Imagine you are tracking a bug that is known to appear after 0.8.6 (assuming 0.8.6 is tagged):&lt;br /&gt;
 $ git bisect start&lt;br /&gt;
 $ git bisect bad # tell git current version has the bug you are tracking&lt;br /&gt;
 $ git bisect good 0.8.6 # tell git 0.8.6 didn&#039;t have the bug&lt;br /&gt;
And then git will checkout a certain revision, and ask you to test it. And you simply say whether this version has the bug.&lt;br /&gt;
If it has the bug:&lt;br /&gt;
 $ git bisect bad&lt;br /&gt;
if the bug is not present:&lt;br /&gt;
 $ git bisect good&lt;br /&gt;
And so on by bisection... At the end git will indicate the faulty commit. Most of the time this tool is really efficient to track regression.&lt;br /&gt;
&lt;br /&gt;
If you can provide a script that test the presence of the bug &lt;br /&gt;
 $ git bisect run &amp;lt;script_name&amp;gt;&lt;br /&gt;
will be able to track down the regression by itself. See [http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html git-bisect Documentation].&lt;br /&gt;
&lt;br /&gt;
= Using Git to push to VideoLAN git =&lt;br /&gt;
== Initial requirements ==&lt;br /&gt;
* You must have credentials to push commits into the repository. For other contributors, please read upper [[Git#Submitting_patches_to_the_vlc-devel_or_x264-devel|Submitting patches to the vlc-devel or x264-devel]] paragraph.&lt;br /&gt;
* Make sure you&#039;ve set your name and email in your commits&lt;br /&gt;
 $ git config --global user.name &amp;quot;Your Name&amp;quot;&lt;br /&gt;
 $ git config --global user.email &amp;quot;me@example.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Convert your tree to use your ssh push commit access ==&lt;br /&gt;
 $ vi vlc/.git/config&lt;br /&gt;
And replace&lt;br /&gt;
 git://git.videolan.org/vlc.git&lt;br /&gt;
With&lt;br /&gt;
 git@git.videolan.org:vlc.git&lt;br /&gt;
&lt;br /&gt;
== Staying up to date ==&lt;br /&gt;
  $ git pull --rebase&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to have to type --rebase everytime you pull do:&lt;br /&gt;
 $ git config branch.master.rebase true&lt;br /&gt;
&lt;br /&gt;
This one creates a merge object which is not how SVN worked, so let&#039;s use the first version...&lt;br /&gt;
  $ git pull&lt;br /&gt;
&lt;br /&gt;
== Pushing your work ==&lt;br /&gt;
  $ git log origin..master     # Check what you are going to push&lt;br /&gt;
  $ git push&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- GSoC 2007&lt;br /&gt;
= Using Git to publish your work (for SoC student?) =&lt;br /&gt;
First get the official VLC &#039;&#039;&#039;Soc&#039;&#039;&#039; trunk&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc-soc.git&lt;br /&gt;
 $ cd vlc-soc&lt;br /&gt;
Ask for write access to a branch (called your_name_branch). Now we will make git know that you want to publish on this branch&lt;br /&gt;
 $ git config remote.my_soc_public_branch.url ssh://your_name@altair.videolan.org/home/videolan/gitroot/vlc-soc.git&lt;br /&gt;
Now tell git that you want to automatically push the local master branch to the public your_name_branch:&lt;br /&gt;
 $ git config remote.my_soc_public_branch.push +master:your_name_branch # the &amp;quot;+&amp;quot; will tell git to force update ignoring conflicts&lt;br /&gt;
&lt;br /&gt;
Do some work and commit it to your master branch.&lt;br /&gt;
 $ git commit -a&lt;br /&gt;
You can also sync with the trunk (origin) as needed&lt;br /&gt;
 $ git pull --rebase origin&lt;br /&gt;
And don&#039;t forget to publish your changes:&lt;br /&gt;
 $ git push my_soc_public_branch&lt;br /&gt;
Now you should be able to see your latest changes in your branch via [http://git.videolan.org/ gitweb].&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Documentation about git =&lt;br /&gt;
* [http://git.or.cz/ Official Git Website]&lt;br /&gt;
* [http://www.kernel.org/pub/software/scm/git/docs/tutorial.html Git Tutorial]&lt;br /&gt;
* [http://git.or.cz/course/svn.html Switching from SVN to git using cogito]&lt;br /&gt;
* [http://wiki.sourcemage.org/Git_Guide Very good Git guide]&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22287</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22287"/>
		<updated>2012-03-21T09:31:42Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Configure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion \&lt;br /&gt;
dos2unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd vlc-*&lt;br /&gt;
export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries.&lt;br /&gt;
&lt;br /&gt;
First, set an environment variable for your current &amp;quot;host&amp;quot; system for cross-compiling. This is because the contributed libraries are always maintained under the directory &amp;lt;code&amp;gt;i586-mingw32msvc&amp;lt;/code&amp;gt;, while Fedora typically is looking for them as &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/${FEDORA_HOST}/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, download the &amp;quot;prebuilt&amp;quot; contributions and create a symbolic link.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p contrib/win32&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
make prebuilt&lt;br /&gt;
cd ..  &lt;br /&gt;
ln -s i586-mingw32msvc ${FEDORA_HOST}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install compat-readline5.i686 &lt;br /&gt;
yumdownloader lua.i686&lt;br /&gt;
sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install cpio&lt;br /&gt;
rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
rm -rf usr&lt;br /&gt;
rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install qt-devel&lt;br /&gt;
sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs. Here&#039;s how to see what you&#039;ve got:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; ${VLCROOT}/contrib/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ${VLCROOT}/contrib/win32&lt;br /&gt;
wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -f ${VLCROOT}/contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add these lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/${FEDORA_HOST}/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $VLCROOT&lt;br /&gt;
./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MINGWDLLPATH=`${FEDORA_HOST}-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1`&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libgcc_s_sjlj-1.dll $MINGWDLLPATH&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libstdc++-6.dll $MINGWDLLPATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
../extras/package/win32/configure.sh --enable-dvbpsi --host=${FEDORA_HOST}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
../configure --enable-dvbpsi --host=${FEDORA_HOST} \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22286</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22286"/>
		<updated>2012-03-21T09:30:56Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Set the environment variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion \&lt;br /&gt;
dos2unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd vlc-*&lt;br /&gt;
export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries.&lt;br /&gt;
&lt;br /&gt;
First, set an environment variable for your current &amp;quot;host&amp;quot; system for cross-compiling. This is because the contributed libraries are always maintained under the directory &amp;lt;code&amp;gt;i586-mingw32msvc&amp;lt;/code&amp;gt;, while Fedora typically is looking for them as &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/${FEDORA_HOST}/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, download the &amp;quot;prebuilt&amp;quot; contributions and create a symbolic link.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p contrib/win32&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
make prebuilt&lt;br /&gt;
cd ..  &lt;br /&gt;
ln -s i586-mingw32msvc ${FEDORA_HOST}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install compat-readline5.i686 &lt;br /&gt;
yumdownloader lua.i686&lt;br /&gt;
sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install cpio&lt;br /&gt;
rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
rm -rf usr&lt;br /&gt;
rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install qt-devel&lt;br /&gt;
sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs. Here&#039;s how to see what you&#039;ve got:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; ${VLCROOT}/contrib/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ${VLCROOT}/contrib/win32&lt;br /&gt;
wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -f ${VLCROOT}/contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add these lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/${FEDORA_HOST}/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $VLCROOT&lt;br /&gt;
./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MINGWDLLPATH=`${FEDORA_HOST}-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1`&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libgcc_s_sjlj-1.dll $MINGWDLLPATH&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libstdc++-6.dll $MINGWDLLPATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22285</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22285"/>
		<updated>2012-03-21T09:30:13Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Prepare 3rd party libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion \&lt;br /&gt;
dos2unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd vlc-*&lt;br /&gt;
export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries.&lt;br /&gt;
&lt;br /&gt;
First, set an environment variable for your current &amp;quot;host&amp;quot; system for cross-compiling. This is because the contributed libraries are always maintained under the directory &amp;lt;code&amp;gt;i586-mingw32msvc&amp;lt;/code&amp;gt;, while Fedora typically is looking for them as &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/${FEDORA_HOST}/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, download the &amp;quot;prebuilt&amp;quot; contributions and create a symbolic link.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p contrib/win32&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
make prebuilt&lt;br /&gt;
cd ..  &lt;br /&gt;
ln -s i586-mingw32msvc ${FEDORA_HOST}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install compat-readline5.i686 &lt;br /&gt;
yumdownloader lua.i686&lt;br /&gt;
sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install cpio&lt;br /&gt;
rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
rm -rf usr&lt;br /&gt;
rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install qt-devel&lt;br /&gt;
sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs. Here&#039;s how to see what you&#039;ve got:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; ${VLCROOT}/contrib/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ${VLCROOT}/contrib/win32&lt;br /&gt;
wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -f ${VLCROOT}/contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add these lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $VLCROOT&lt;br /&gt;
./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MINGWDLLPATH=`${FEDORA_HOST}-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1`&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libgcc_s_sjlj-1.dll $MINGWDLLPATH&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libstdc++-6.dll $MINGWDLLPATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22284</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22284"/>
		<updated>2012-03-21T09:22:52Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Install Qt and correct any version mismatch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion \&lt;br /&gt;
dos2unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd vlc-*&lt;br /&gt;
export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries.&lt;br /&gt;
&lt;br /&gt;
First, set an environment variable for your current &amp;quot;host&amp;quot; system for cross-compiling. This is because the contributed libraries are always maintained under the directory &amp;lt;code&amp;gt;i586-mingw32msvc&amp;lt;/code&amp;gt;, while Fedora typically is looking for them as &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, download the &amp;quot;prebuilt&amp;quot; contributions and create a symbolic link.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p contrib/win32&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
make prebuilt&lt;br /&gt;
cd ..  &lt;br /&gt;
ln -s i586-mingw32msvc ${FEDORA_HOST}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install compat-readline5.i686 &lt;br /&gt;
yumdownloader lua.i686&lt;br /&gt;
sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install cpio&lt;br /&gt;
rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
rm -rf usr&lt;br /&gt;
rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install qt-devel&lt;br /&gt;
sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs. Here&#039;s how to see what you&#039;ve got:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; ${VLCROOT}/contrib/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ${VLCROOT}/contrib/win32&lt;br /&gt;
wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -f ${VLCROOT}/contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add these lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $VLCROOT&lt;br /&gt;
./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MINGWDLLPATH=`${FEDORA_HOST}-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1`&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libgcc_s_sjlj-1.dll $MINGWDLLPATH&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libstdc++-6.dll $MINGWDLLPATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22283</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22283"/>
		<updated>2012-03-21T09:21:26Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Install Qt and correct any version mismatch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion \&lt;br /&gt;
dos2unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd vlc-*&lt;br /&gt;
export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries.&lt;br /&gt;
&lt;br /&gt;
First, set an environment variable for your current &amp;quot;host&amp;quot; system for cross-compiling. This is because the contributed libraries are always maintained under the directory &amp;lt;code&amp;gt;i586-mingw32msvc&amp;lt;/code&amp;gt;, while Fedora typically is looking for them as &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, download the &amp;quot;prebuilt&amp;quot; contributions and create a symbolic link.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p contrib/win32&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
make prebuilt&lt;br /&gt;
cd ..  &lt;br /&gt;
ln -s i586-mingw32msvc ${FEDORA_HOST}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install compat-readline5.i686 &lt;br /&gt;
yumdownloader lua.i686&lt;br /&gt;
sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install cpio&lt;br /&gt;
rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
rm -rf usr&lt;br /&gt;
rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install qt-devel&lt;br /&gt;
sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs. Here&#039;s how to see what you&#039;ve got:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; ${VLCROOT}/contrib/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ${VLCROOT}/contrib/win32&lt;br /&gt;
wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add these lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $VLCROOT&lt;br /&gt;
./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MINGWDLLPATH=`${FEDORA_HOST}-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1`&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libgcc_s_sjlj-1.dll $MINGWDLLPATH&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libstdc++-6.dll $MINGWDLLPATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22282</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22282"/>
		<updated>2012-03-21T09:20:14Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Install Qt and correct any version mismatch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion \&lt;br /&gt;
dos2unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd vlc-*&lt;br /&gt;
export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries.&lt;br /&gt;
&lt;br /&gt;
First, set an environment variable for your current &amp;quot;host&amp;quot; system for cross-compiling. This is because the contributed libraries are always maintained under the directory &amp;lt;code&amp;gt;i586-mingw32msvc&amp;lt;/code&amp;gt;, while Fedora typically is looking for them as &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, download the &amp;quot;prebuilt&amp;quot; contributions and create a symbolic link.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p contrib/win32&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
make prebuilt&lt;br /&gt;
cd ..  &lt;br /&gt;
ln -s i586-mingw32msvc ${FEDORA_HOST}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install compat-readline5.i686 &lt;br /&gt;
yumdownloader lua.i686&lt;br /&gt;
sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install cpio&lt;br /&gt;
rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
rm -rf usr&lt;br /&gt;
rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install qt-devel&lt;br /&gt;
sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs. Here&#039;s how to see what you&#039;ve got:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; ${VLCROOT}/contrib/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add these lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $VLCROOT&lt;br /&gt;
./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MINGWDLLPATH=`${FEDORA_HOST}-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1`&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libgcc_s_sjlj-1.dll $MINGWDLLPATH&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libstdc++-6.dll $MINGWDLLPATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22281</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22281"/>
		<updated>2012-03-21T08:44:18Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Set the environment variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion \&lt;br /&gt;
dos2unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd vlc-*&lt;br /&gt;
export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries.&lt;br /&gt;
&lt;br /&gt;
First, set an environment variable for your current &amp;quot;host&amp;quot; system for cross-compiling. This is because the contributed libraries are always maintained under the directory &amp;lt;code&amp;gt;i586-mingw32msvc&amp;lt;/code&amp;gt;, while Fedora typically is looking for them as &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, download the &amp;quot;prebuilt&amp;quot; contributions and create a symbolic link.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p contrib/win32&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
make prebuilt&lt;br /&gt;
cd ..  &lt;br /&gt;
ln -s i586-mingw32msvc ${FEDORA_HOST}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install compat-readline5.i686 &lt;br /&gt;
yumdownloader lua.i686&lt;br /&gt;
sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install cpio&lt;br /&gt;
rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
rm -rf usr&lt;br /&gt;
rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install qt-devel&lt;br /&gt;
sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs. Here&#039;s how to see what you&#039;ve got:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add these lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $VLCROOT&lt;br /&gt;
./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MINGWDLLPATH=`${FEDORA_HOST}-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1`&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libgcc_s_sjlj-1.dll $MINGWDLLPATH&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libstdc++-6.dll $MINGWDLLPATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22280</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22280"/>
		<updated>2012-03-21T08:41:04Z</updated>

		<summary type="html">&lt;p&gt;John F: remove $ indicators to make cut/paste easier; add some environment vars&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion \&lt;br /&gt;
dos2unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd vlc-*&lt;br /&gt;
export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries.&lt;br /&gt;
&lt;br /&gt;
First, set an environment variable for your current &amp;quot;host&amp;quot; system for cross-compiling. This is because the contributed libraries are always maintained under the directory &amp;lt;code&amp;gt;i586-mingw32msvc&amp;lt;/code&amp;gt;, while Fedora typically is looking for them as &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, download the &amp;quot;prebuilt&amp;quot; contributions and create a symbolic link.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p contrib/win32&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
make prebuilt&lt;br /&gt;
cd ..  &lt;br /&gt;
ln -s i586-mingw32msvc ${FEDORA_HOST}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install compat-readline5.i686 &lt;br /&gt;
yumdownloader lua.i686&lt;br /&gt;
sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install cpio&lt;br /&gt;
rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
rm -rf usr&lt;br /&gt;
rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install qt-devel&lt;br /&gt;
sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs. Here&#039;s how to see what you&#039;ve got:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contrib/win32&lt;br /&gt;
wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
export FEDORA_HOST=`rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $VLCROOT&lt;br /&gt;
./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MINGWDLLPATH=`${FEDORA_HOST}-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1`&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libgcc_s_sjlj-1.dll $MINGWDLLPATH&lt;br /&gt;
sudo ln -s /usr/${FEDORA_HOST}/sys-root/mingw/bin/libstdc++-6.dll $MINGWDLLPATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=UnixCompile&amp;diff=22279</id>
		<title>UnixCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=UnixCompile&amp;diff=22279"/>
		<updated>2012-03-21T08:06:18Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Get the third-party libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prepare your environment  ==&lt;br /&gt;
&lt;br /&gt;
VLC requires a C compiler, development headers and a toolchain. gcc will do but you could also use LLVM or proprietary C99/C++ compilers such as Intel&#039;s.&lt;br /&gt;
&lt;br /&gt;
If you build from the [[Git]] repositories, you will also need the GNU build system, a.k.a. the &amp;quot;autotools&amp;quot; (autoconf, automake, libtool and gettext) to setup the Makefiles. Make sure they are up-to-date and usable for your system.&lt;br /&gt;
&lt;br /&gt;
On Fedora:&lt;br /&gt;
&lt;br /&gt;
 % sudo yum install git libtool&lt;br /&gt;
&lt;br /&gt;
On Debian or Ubuntu:&lt;br /&gt;
&lt;br /&gt;
 % sudo apt-get install git libtool&lt;br /&gt;
&lt;br /&gt;
== Get the source  ==&lt;br /&gt;
Start by [[GetTheSource|getting the source]], using FTP for official releases, or using [[Git]] to track VLC development. &lt;br /&gt;
&lt;br /&gt;
If your are using an official release, download source code, extract the archive and go into the resulting VLC directory, e.g.:&lt;br /&gt;
 % wget ftp://ftp.videolan.org/pub/videolan/vlc/1.1.11/vlc-1.1.11.tar.bz2&lt;br /&gt;
 % tar xvjf vlc-1.1.11.tar.bz2&lt;br /&gt;
 % cd vlc-1.1.11&lt;br /&gt;
&lt;br /&gt;
If you are using the [[Git]] development version, start by bootstrapping the source tree:&lt;br /&gt;
 % cd vlc&lt;br /&gt;
 % ./bootstrap&lt;br /&gt;
Bootstrapping will fail if the autotools are missing or out-of-date.&lt;br /&gt;
&lt;br /&gt;
== Get the third-party libraries  ==&lt;br /&gt;
Now you could configure the VLC build. But first, you need to make sure that all the required dependencies are in place. Take a look at &amp;lt;tt&amp;gt;./configure --help&amp;lt;/tt&amp;gt;. Take a good look at that enormous list of options.&lt;br /&gt;
&lt;br /&gt;
It is very important that you do install and enable all the 3rd party libraries that you need. Yes, there are going to be a lot of them if you want a complete or even mostly functional VLC build. If you fail to install a required library, you will end up with a VLC application that well..... essentially does not do anything useful. See [[Contrib Status|here]] for a complete list.&lt;br /&gt;
 &lt;br /&gt;
There are some very important dependencies: gettext (NLS) for international support (required), libdvbpsi for MPEG-TS files and streams support, libmad for MP3 audio decoding, libmpeg2 for MPEG1 and MPEG2 video support, FFmpeg or libav (libavcodec, libavformat, libpostproc, libswscale and optionally libavio) for MPEG4 and most other audio and video codecs, and many file formats, liba52 for Dolby (AC3) sound, dvdread and dvdnav for DVD playback, live555 for RTSP stream playback, etc.&lt;br /&gt;
&lt;br /&gt;
For audio output, you will need probably alsa-lib (on [[Linux]]) and/or libpulse (for [[PulseAudio]]).&lt;br /&gt;
For video output, you will normally need XCB/XVideo and/or OpenGL/GLX.&lt;br /&gt;
And Qt4 is required to get the GUI support.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that you need to install the development packages (development header files and import libraries) to compile VLC, not just the run-time. On Debian/Ubuntu, the correct package names end with -dev. On RPM distributions, they usually end in -devel.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be careful!&#039;&#039;&#039; If the libraries are not provided by your distribution, you may be better off linking VLC with them statically. Otherwise, you may encounter version problems if another multimedia application updates the libraries later. This is especially true of FFmpeg or libav, and live555.&lt;br /&gt;
&lt;br /&gt;
There are a several ways to get those libraries. You should use only one method at a time: &lt;br /&gt;
 &lt;br /&gt;
=== The preferred method ===&lt;br /&gt;
Use your distribution packaging or portage system, in order to get all the needed libs.&lt;br /&gt;
For example on Debian or Ubuntu: &lt;br /&gt;
 $ sudo apt-get build-dep vlc&lt;br /&gt;
&lt;br /&gt;
openSUSE users might have a look at the source-install (si) command in the zypper manpage:&lt;br /&gt;
 $ sudo zypper si -d vlc&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; To get the libraries, you must first add the VLC repositories to your system repositories. &lt;br /&gt;
For example in openSUSE:&lt;br /&gt;
 $ sudo zypper ar http://download.videolan.org/pub/vlc/SuSE/&amp;lt;openSUSEversion&amp;gt; VLC&lt;br /&gt;
You should replace &amp;lt;openSUSEversion&amp;gt; with the version of your system (12.1, 11.4, 11.3, 11.2 or 11.1)&lt;br /&gt;
&lt;br /&gt;
=== The method for badly-behaved distributions ===&lt;br /&gt;
If your distribution does not provide the needed libraries,&lt;br /&gt;
or you really want to link VLC statically, use the VLC contribs system. It is included in the VLC source.&lt;br /&gt;
&lt;br /&gt;
First, you need to install the GNU autotools (if you have not already done so), CMake, subversion, Git and a recent GNU/tar utility or equivalent. Then you can run:&lt;br /&gt;
 % cd contrib&lt;br /&gt;
 % mkdir native&lt;br /&gt;
 % cd native&lt;br /&gt;
 % ../bootstrap&lt;br /&gt;
 % make&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; the commands above are for VLC 2.0 or later. Details differ slightly for older versions:&lt;br /&gt;
 % cd extras/contrib&lt;br /&gt;
 % ./bootstrap&lt;br /&gt;
 % make&lt;br /&gt;
&lt;br /&gt;
That should download and build a lot of those libraries for you.  Unfortunately, given the large number of libraries and the variety of the platforms people build VLC for, it is not unlikely that you will hit an error while contribs are compiling. Thus, this approach is only recommended for experienced Unix compilers.&lt;br /&gt;
&lt;br /&gt;
=== The method for people with too much time to waste ===&lt;br /&gt;
Read the [[Contrib Status|list]], download them and build them by hand.&lt;br /&gt;
&lt;br /&gt;
=== Regardless of the method ===&lt;br /&gt;
In any case, some basic OS support libraries are not included and must really be installed through the packaging system in any case, notably [[ALSA]], [[PulseAudio]] and [[OpenGL]].&lt;br /&gt;
&lt;br /&gt;
== Configuration  ==&lt;br /&gt;
&amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt; is used to check whether your system is able to compile VLC. Also you can choose the features in your build. As a reminder, this command will show the various options:&lt;br /&gt;
 % ./configure --help&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;VLC 2.0 and later&#039;&#039;&#039;: For most users, &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt; does not require any command-line options.&lt;br /&gt;
&lt;br /&gt;
By default, features to be compiled are chosen automatically depending on what libraries are detected as available. If the contribs have been compiled first, the resulting VLC will be reasonably functional.&lt;br /&gt;
&lt;br /&gt;
Note that libraries that are not in the default prefix, and not in vlc contribs, must be known to pkg-config in order for &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt; to find them.&lt;br /&gt;
&lt;br /&gt;
There are some features that are disabled (not compiled) by default. If you want them, they must be forced on by using configure flags. You can find a list of these features by searching for &amp;quot;disabled&amp;quot; in &amp;lt;tt&amp;gt;./configure --help&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;Beginner&#039;s guide&#039;&#039;: enter the command&lt;br /&gt;
 % ./configure --help | less&lt;br /&gt;
and hit enter. Type a slash &#039;/&#039;, type &amp;quot;disabled&amp;quot; (without quotes), hit enter. Pressing &#039;&#039;&#039;n&#039;&#039;&#039; goes to the next match, &#039;&#039;&#039;N&#039;&#039;&#039; goes to previous match, &#039;&#039;&#039;q&#039;&#039;&#039; returns to the command line. Use the up/down arrow keys to scroll. All matches except the &#039;&#039;--cache-file&#039;&#039; option (which belongs to &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; itself) are VLC features that must be forced on if desired.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;VLC 1.1 and earlier&#039;&#039;&#039;: You probably need to tweak the &amp;quot;configure&amp;quot; line. &lt;br /&gt;
 &lt;br /&gt;
=== Special libs  ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;VLC 2.0 and later&#039;&#039;&#039;: there are no special libraries. If live555 exists in the &amp;lt;tt&amp;gt;contrib/&amp;lt;/tt&amp;gt; subdirectory, it is detected automatically. &#039;&#039;Any&#039;&#039; libraries that are not in the default prefix, and not in vlc contribs, must be known to pkg-config in order for &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt; to find them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;VLC 1.1 and earlier&#039;&#039;&#039;: Use &amp;lt;tt&amp;gt;--with-live555-path=path/to/livemedia/source/tree&amp;lt;/tt&amp;gt; in connection with &amp;lt;tt&amp;gt;--enable-live555&amp;lt;/tt&amp;gt;. For FFmpeg or libav, pkg-config is the only reliable way for VLC&#039;s configure to find the libraries. So you need to set PKG_CONFIG_PATH correctly if your FFmpeg/libav libraries are not installed at the default prefix (meaning /usr) or you want to use static linking.&lt;br /&gt;
&lt;br /&gt;
=== Final configuration  ===&lt;br /&gt;
If you want to install VLC into another directory, run &lt;br /&gt;
 &lt;br /&gt;
 % ./configure --prefix=/path/to/install/folder/&lt;br /&gt;
&lt;br /&gt;
This is an example of a typical VLC configure line: &lt;br /&gt;
 &lt;br /&gt;
 % ./configure --enable-x11 --enable-xvideo --enable-sdl --enable-avcodec --enable-avformat \&lt;br /&gt;
  --enable-swscale --enable-mad --enable-libdvbpsi --enable-a52 --enable-libmpeg2 --enable-dvdnav \&lt;br /&gt;
  --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-mkv --enable-freetype \&lt;br /&gt;
  --enable-fribidi --enable-speex --enable-flac --enable-live555 --with-live555-tree=/usr/lib/live \&lt;br /&gt;
  --enable-caca --enable-skins --enable-skins2 --enable-alsa --enable-qt4 --enable-ncurses&lt;br /&gt;
 &lt;br /&gt;
[[User:J-b#VLC_configure_line|Here]] is another.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
&lt;br /&gt;
If you get continuous errors while ./configure then consider reinstalling the corresponding libraries. This will set the paths and other information correctly. Check the $PKG_CONFIG_PATH(environment variable) whether it is set to a path where the libraries like libavcodec.pc are available. Otherwise create the environment variable, export it and then update the ldconfig.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Compile VLC: &lt;br /&gt;
 % make&lt;br /&gt;
&lt;br /&gt;
You do not need to install VLC to use it. You can also simply run it from the build directory:&lt;br /&gt;
 # ./vlc&lt;br /&gt;
&lt;br /&gt;
If you really want to install VLC to the system, run this as root:&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
You can uninstall later with this, but you need to keep the build tree untouched until then:&lt;br /&gt;
 # make uninstall&lt;br /&gt;
&lt;br /&gt;
To remove files created during the compile (optional) type:&lt;br /&gt;
 % make clean&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Cygwin ===&lt;br /&gt;
&lt;br /&gt;
Compiling on [[Win32CompileCygwin|Cygwin]] may be broken from time to time as Cygwin packages change.&lt;br /&gt;
We recommend [[Win32Compile|cross-compiling from Linux to Windows]] instead. &#039;&#039;&#039;Consider yourself warned.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Debian/Ubuntu ===&lt;br /&gt;
Debian users who want to compile VLC should install the packages below:&lt;br /&gt;
*[http://packages.debian.org/unstable/libdevel/libavcodec-dev libavcodec-dev] &lt;br /&gt;
*[http://packages.debian.org/unstable/libdevel/libpostproc-dev libpostproc-dev] &lt;br /&gt;
*[http://packages.debian.org/unstable/libdevel/libmpeg2-4-dev libmpeg2-4-dev]&lt;br /&gt;
&lt;br /&gt;
If you just want to &#039;&#039;use&#039;&#039; VLC media player then simply install the package vlc (&amp;lt;tt&amp;gt;sudo apt-get install vlc&amp;lt;/tt&amp;gt;) - the unstable version is fairly up-to-date most of the time, while the stable is, err, stable and very old&amp;amp;nbsp;;-)&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting / common problems ==&lt;br /&gt;
&lt;br /&gt;
=== Lua ===&lt;br /&gt;
You may need to install Lua if you get &amp;quot;LUA byte compiler missing.&amp;quot; message. You namely need to install &amp;quot;luac&amp;quot;, the Lua byte compiler.&lt;br /&gt;
&lt;br /&gt;
On Debian/Ubuntu:&lt;br /&gt;
 % sudo apt-get install lua5.1&lt;br /&gt;
&lt;br /&gt;
On Fedora:&lt;br /&gt;
 % sudo yum install lua&lt;br /&gt;
&lt;br /&gt;
=== XCB ===&lt;br /&gt;
&lt;br /&gt;
VLC 1.1 and later requires XCB libraries to deal with X11 displays. Do not disable XCB or you will not get any video support!&lt;br /&gt;
&lt;br /&gt;
To install these libraries run the following commands (Debian/Ubuntu):&lt;br /&gt;
 % sudo apt-get install libxcb-shm0-dev libxcb-xv0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-composite0-dev&lt;br /&gt;
&lt;br /&gt;
Under Fedora:&lt;br /&gt;
 % sudo yum install libxcb-devel xcb-util-devel&lt;br /&gt;
&lt;br /&gt;
For OpenGL (Debian/Ubuntu only), you will additionally need XLib with XCB:&lt;br /&gt;
 % sudo apt-get install libx11-xcb-dev&lt;br /&gt;
&lt;br /&gt;
If your distribution provides a version of XLib without XCB, then this later package will not be available. So you will not be able to use OpenGL. Use XVideo instead.&lt;br /&gt;
&lt;br /&gt;
=== Compile fails after git pull ===&lt;br /&gt;
&lt;br /&gt;
It is likely that the sources in the repository have changed significantly since they were last pulled, and a build system cache has gone out of date. Try the troubleshooting methods described in the [[Hacker_Guide/How_To_Write_a_Module#Module_load_troubleshooting|hacker guide for modules]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22176</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=22176"/>
		<updated>2012-03-01T09:02:32Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Get the basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion \&lt;br /&gt;
dos2unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21876</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21876"/>
		<updated>2012-02-13T11:58:03Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Package VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file. (Needs &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file. (Needs &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package. (Needs &amp;lt;code&amp;gt;mingw32-nsiswrapper&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mingw32-nsis&amp;lt;/code&amp;gt;.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=21737</id>
		<title>Win32Compile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=21737"/>
		<updated>2012-02-07T22:19:53Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Obtaining the toolchain */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to compile {{VLC}} for [[Windows]].&lt;br /&gt;
&lt;br /&gt;
== Building Methods&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
If you want to build VLC from source, you have several choices: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw on Linux&#039;&#039;&#039; &lt;br /&gt;
| This page &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method (uses cross compilation). On Windows, you should do it in a virtual machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileMSYSNew]] &lt;br /&gt;
| &#039;&#039;&#039;Native&#039;&#039;&#039; compilation method. MSYS is a minimal build environment to compile Unixish projects under Microsoft Windows.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;cygwin&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileCygwinNew]] &lt;br /&gt;
| Build using cygwin as your compile environment. &#039;&#039;&#039;Error&#039;&#039;&#039; prone, and &#039;&#039;&#039;slow&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Obtaining the toolchain  ==&lt;br /&gt;
&lt;br /&gt;
Each build method requires its own toolchain: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039; users can &amp;lt;code&amp;gt;apt-get install gcc-mingw32 mingw32-binutils&amp;lt;/code&amp;gt;.&amp;amp;nbsp;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Gentoo&#039;&#039;&#039; users can &amp;lt;code&amp;gt;emerge crossdev &amp;amp;amp;&amp;amp;amp; crossdev mingw32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ArchLinux&#039;&#039;&#039; users can &amp;lt;code&amp;gt;pacman -S mingw32-gcc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Fedora&#039;&#039;&#039; users should read [[Win32Compile Under Fedora]]&lt;br /&gt;
* Other &#039;&#039;&#039;Linux&#039;&#039;&#039; systems may attempt http://www.mingw.org/wiki/LinuxCrossMinGW&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039;, should read the [[Win32CompileMSYSNew|documentation]]&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.cygwin.com Cygwin]&#039;&#039;&#039;, should read the [[Win32CompileCygwinNew|documentation]]&lt;br /&gt;
&lt;br /&gt;
=== tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua5.1&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* zip [for creating .zip package], p7zip [for .7z package], nsis [for .exe auto-installer].&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git&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;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
or, if you want to compile the contribs yourself and are feeling adventurous and have lots of time to burn,&lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make fetch&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
=== Linux 64-bit ===&lt;br /&gt;
&lt;br /&gt;
If you are on Linux &#039;&#039;&#039;64-bit&#039;&#039;&#039;, you &#039;&#039;&#039;MUST&#039;&#039;&#039; remove some files:&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i586-mingw32msvc/bin/moc ../i586-mingw32msvc/bin/uic ../i586-mingw32msvc/bin/rcc&lt;br /&gt;
&lt;br /&gt;
In addition, install the &#039;&#039;qt4-tools&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i586-mingw32msvc&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&lt;br /&gt;
  $ ln -sf ../i586-mingw32msvc ../i486-mingw32&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;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i586-mingw32msvc&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; Xcompiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i586-mingw32msvc&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages with the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21730</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21730"/>
		<updated>2012-02-07T21:54:34Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Building Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br /&amp;gt;using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21729</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21729"/>
		<updated>2012-02-07T21:51:33Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Building Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine\\&lt;br /&gt;
using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21728</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21728"/>
		<updated>2012-02-07T21:49:53Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Create and attach the disk drives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br&amp;gt;&lt;br /&gt;
using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Change Base Memory Size to 1024MB (for better performance). &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot.&lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21727</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21727"/>
		<updated>2012-02-07T21:48:56Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Using a virtual machine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br&amp;gt;&lt;br /&gt;
using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21724</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21724"/>
		<updated>2012-02-07T21:40:55Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Using a virtual machine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br&amp;gt;&lt;br /&gt;
using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{hidden|Title text here|Body text line 1&amp;lt;br/&amp;gt;Body text line 2}}&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21723</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21723"/>
		<updated>2012-02-07T21:39:13Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br&amp;gt;&lt;br /&gt;
using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21721</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21721"/>
		<updated>2012-02-07T21:33:32Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br&amp;gt;&lt;br /&gt;
using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{hidden|== Using a virtual machine  ==|Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21720</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21720"/>
		<updated>2012-02-07T21:32:31Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Using a virtual machine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br&amp;gt;&lt;br /&gt;
using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{hidden|== Using a virtual machine  ==&lt;br /&gt;
|Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21719</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21719"/>
		<updated>2012-02-07T21:28:21Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine&amp;lt;br&amp;gt;&lt;br /&gt;
using 32-bit Ubuntu. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21718</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21718"/>
		<updated>2012-02-07T21:23:45Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Building Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21717</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21717"/>
		<updated>2012-02-07T21:23:02Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Bootstrap */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
$ sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21716</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21716"/>
		<updated>2012-02-07T21:22:38Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Set the environment variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21715</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21715"/>
		<updated>2012-02-07T21:21:42Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Package VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;8&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21714</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21714"/>
		<updated>2012-02-07T21:19:51Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Package VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=white-space:nowrap| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21713</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21713"/>
		<updated>2012-02-07T21:11:41Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Install Qt and correct any version mismatch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21712</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21712"/>
		<updated>2012-02-07T21:08:57Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also need several other packages for the build process.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21711</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21711"/>
		<updated>2012-02-07T21:04:36Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Package VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;$ make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21710</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21710"/>
		<updated>2012-02-07T21:02:45Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Package VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21709</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21709"/>
		<updated>2012-02-07T21:01:51Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Package VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
Depending on what type of package you want, you may also need the &#039;&#039;zip&#039;&#039;, &#039;&#039;7zip&#039;&#039;, or &#039;&#039;nsis&#039;&#039; tools. All three sets are needed for the &amp;lt;code&amp;gt;make package-win&amp;lt;/code&amp;gt; target.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Create all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21708</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21708"/>
		<updated>2012-02-07T20:58:44Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Package VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-xpi&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates the web plugin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Create all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21707</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21707"/>
		<updated>2012-02-07T20:54:08Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Package VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Create all of the above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-debug&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt; but the binaries are usable with a debugger.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21688</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21688"/>
		<updated>2012-02-07T09:03:26Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \&lt;br /&gt;
mingw32-nsiswrapper mingw32-nsis &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-exe&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Create all of the above.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21686</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21686"/>
		<updated>2012-02-07T01:07:30Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the [http://git.videolan.org/?p=vlc.git;a=forks forks] link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21685</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21685"/>
		<updated>2012-02-07T00:31:25Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Using a virtual machine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. Other virtual machines might work as well, but are untested.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21684</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21684"/>
		<updated>2012-02-07T00:29:09Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Bootstrap */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build needs two extra DLLs that Fedora keeps in places it doesn&#039;t expect. So create symlinks to solve that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
sudo ln -s /usr/i686-pc-mingw32/sys-root/mingw/bin/libstdc++-6.dll /usr/lib64/gcc/i686-pc-mingw32/4.6.1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify the destination directory with this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ i686-pc-mingw32-g++ -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21683</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21683"/>
		<updated>2012-02-07T00:22:34Z</updated>

		<summary type="html">&lt;p&gt;John F: /* Configure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --enable-dvbpsi --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21682</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21682"/>
		<updated>2012-02-07T00:16:10Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build VLC  ===&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package VLC ===&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21681</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21681"/>
		<updated>2012-02-07T00:13:37Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
You can add the four environment variables mentioned above to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21680</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21680"/>
		<updated>2012-02-07T00:10:48Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo yum install &amp;lt;/code&amp;gt;&amp;lt;i&amp;gt;package-name1 package-name2 ...&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Remove the virtual CD and reboot ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtain the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to set two environment variables for &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;. This is because the current Fedora MinGW &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; is broken, and you need to tell the native one where to find the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
$ export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install 32-bit Lua ===&lt;br /&gt;
To get the 32-bit compiled Lua files needed by 32-bit VLC, you need the 32-bit Lua byte compiler. (The 64-bit version produces 64-bit files and does not currently have an option to produce 32-bit files.) &lt;br /&gt;
&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, Yum will install the 32-bit binary libraries, but it will NOT install the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Qt and correct any version mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Set the environment variables ===&lt;br /&gt;
If you want, you can add the four environment variables to your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file. This will set them every time you start up a terminal. However, you might not want to override your normal variables. In that case, the following method will work.&lt;br /&gt;
&lt;br /&gt;
* Copy your &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt; file to one called &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;~/.mingw_profile&amp;lt;/code&amp;gt; to add four lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig &lt;br /&gt;
export PKG_CONFIG=/usr/bin/pkg-config&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to set those variables after you start a terminal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exec bash --rcfile ~/.mingw_profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
Prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; &lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21677</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21677"/>
		<updated>2012-02-06T23:46:00Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install &#039;&#039;package-name1 package-name2 ...&#039;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Removing the CD and rebooting ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
If you are using Fedora 13, you might want to visit the [[Win32CompileFedora13]] page.&lt;br /&gt;
&lt;br /&gt;
This page has been tested for compiling {{VLC}} for [[Windows]] under 64-bit Fedora 16. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the basics ===&lt;br /&gt;
&lt;br /&gt;
sudo yum install \&lt;br /&gt;
libtool \&lt;br /&gt;
automake \&lt;br /&gt;
autoconf \&lt;br /&gt;
autopoint \&lt;br /&gt;
make \&lt;br /&gt;
gettext \&lt;br /&gt;
pkg-config \&lt;br /&gt;
git \&lt;br /&gt;
subversion&lt;br /&gt;
&lt;br /&gt;
Next, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at the [http://git.videolan.org VLC Git repository]. Scroll down to the &amp;lt;code&amp;gt;vlc.git&amp;lt;/code&amp;gt; line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed &amp;lt;code&amp;gt;vlc-x.x&amp;lt;/code&amp;gt; directory. We will refer to this as the &amp;lt;code&amp;gt;$VLCROOT&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtaining the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing 32-bit Lua ===&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, you may install the 32-bit binary libraries, but the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) will NOT install over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing Qt and Correcting Version Mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well. You also need to delete the executables supplied by the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
$ rm -f contrib/i586-mingw32msvc/bin/moc contrib/i586-mingw32msvc/bin/uic contrib/i586-mingw32msvc/bin/rcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
$ tar xjvf moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2 -C ../&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $VLCROOT&lt;br /&gt;
$ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. You will probably want to add the &amp;lt;code&amp;gt;--enable-dvbpsi&amp;lt;/code&amp;gt; option in addition to the standard ones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
$ ../extras/package/win32/configure.sh --enable-dvbpsi --host=i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually. There are a large number of options. See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
$ ../configure --host=i686-pc-mingw32 \&lt;br /&gt;
      --enable-update-check \&lt;br /&gt;
      --enable-lua \&lt;br /&gt;
      --enable-faad \&lt;br /&gt;
      --enable-flac \&lt;br /&gt;
      --enable-theora \&lt;br /&gt;
      --enable-twolame \&lt;br /&gt;
      --enable-quicktime \&lt;br /&gt;
      --enable-avcodec --enable-merge-ffmpeg \&lt;br /&gt;
      --enable-dca \&lt;br /&gt;
      --enable-mpc \&lt;br /&gt;
      --enable-libass \&lt;br /&gt;
      --enable-x264 \&lt;br /&gt;
      --enable-schroedinger \&lt;br /&gt;
      --enable-realrtsp \&lt;br /&gt;
      --enable-live555 \&lt;br /&gt;
      --enable-dvdread \&lt;br /&gt;
      --enable-shout \&lt;br /&gt;
      --enable-goom \&lt;br /&gt;
      --enable-caca \&lt;br /&gt;
      --disable-portaudio \&lt;br /&gt;
      --disable-sdl \&lt;br /&gt;
      --enable-qt4 \&lt;br /&gt;
      --enable-skins2 \&lt;br /&gt;
      --enable-sse --enable-mmx \&lt;br /&gt;
      --enable-libcddb \&lt;br /&gt;
      --enable-zvbi --disable-telx \&lt;br /&gt;
      --enable-sqlite \&lt;br /&gt;
      --disable-dirac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the &amp;lt;code&amp;gt;ndis&amp;lt;/code&amp;gt; tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21671</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21671"/>
		<updated>2012-02-06T23:12:57Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
How to compile {{VLC}} for [[Windows]] under Fedora.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install &#039;&#039;package-name1 package-name2 ...&#039;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create and attach the disk drives ===&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
&lt;br /&gt;
=== Removing the CD and rebooting ===&lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Using Fedora ==&lt;br /&gt;
It is possible to compile the Windows 32-bit version under 64-bit Fedora. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
=== Get the source code ===&lt;br /&gt;
First, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at http://git.videolan.org. Scroll down to the vlc.git line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed vlc-x.x directory. We will refer to this as the $VLCROOT directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtaining the toolchain ===&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prepare [[Contrib Status|3rd party libraries]] ===&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing 32-bit Lua ===&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, you may install the 32-bit binary libraries, but the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) will NOT install over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing Qt and Correcting Version Mismatch ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua5.1&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* zip [for creating .zip package], p7zip [for .7z package], nsis [for .exe auto-installer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Linux 64-bit ===&lt;br /&gt;
&lt;br /&gt;
If you are on Linux &#039;&#039;&#039;64-bit&#039;&#039;&#039;, you &#039;&#039;&#039;MUST&#039;&#039;&#039; remove some files:&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i586-mingw32msvc/bin/moc ../i586-mingw32msvc/bin/uic ../i586-mingw32msvc/bin/rcc&lt;br /&gt;
&lt;br /&gt;
In addition, install the &#039;&#039;qt4-tools&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i586-mingw32msvc&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&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;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i586-mingw32msvc&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; Xcompiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i586-mingw32msvc&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the ndis tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum --verbose --noplugins install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \ &lt;br /&gt;
lua&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21670</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21670"/>
		<updated>2012-02-06T23:07:54Z</updated>

		<summary type="html">&lt;p&gt;John F: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS PAGE IS UNDER CONSTRUCTION. CHECK BACK LATER THIS WEEK.&lt;br /&gt;
&lt;br /&gt;
How to compile {{VLC}} for [[Windows]] under Fedora.&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
From a Fedora 64-bit install, you have two basic approaches if you want to build VLC from source. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method that works &amp;quot;out of the box&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
| Produces some anomalies and requires some workarounds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install &#039;&#039;package-name1 package-name2 ...&#039;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main [[Win32Compile]] page.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Using Fedora ===&lt;br /&gt;
It is possible to compile the Windows 32-bit version under 64-bit Fedora. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
First, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at http://git.videolan.org. Scroll down to the vlc.git line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed vlc-x.x directory. We will refer to this as the $VLCROOT directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd vlc-*&lt;br /&gt;
$ export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the toolchain  ==&lt;br /&gt;
&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p contrib/win32&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
$ make prebuilt&lt;br /&gt;
$ cd ..  &lt;br /&gt;
$ ln -s i586-mingw32msvc i686-pc-mingw32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;i686-pc-mingw32&amp;lt;/code&amp;gt; is the current name of the &amp;quot;host&amp;quot; system for cross-compiling. You can verify that by:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rpm -ql mingw32-filesystem|grep -m1 lib|cut -d/ -f3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing 32-bit Lua ==&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the Yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, you may install the 32-bit binary libraries, but the 32-bit binary executables (&amp;lt;code&amp;gt;lua&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac&amp;lt;/code&amp;gt;) will NOT install over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install compat-readline5.i686 &lt;br /&gt;
$ yumdownloader lua.i686&lt;br /&gt;
$ sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install cpio&lt;br /&gt;
$ rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why Yum refused to install them in the first place. So manually install them with the names &amp;lt;code&amp;gt;lua32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;luac32&amp;lt;/code&amp;gt; and get rid of your detritus.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
$ sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
$ rm -rf usr&lt;br /&gt;
$ rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tell the build system where to find the 32-bit versions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export LUA=/usr/bin/lua32&lt;br /&gt;
$ export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing Qt and Correcting Version Mismatch ==&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;code&amp;gt;qt-devel&amp;lt;/code&amp;gt; package, which gives you &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt; for both Qt3 and Qt4. The executables for Qt4 are named &amp;lt;code&amp;gt;moc-qt4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uic-qt4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rcc&amp;lt;/code&amp;gt;, so these need fixing as well.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo yum install qt-devel&lt;br /&gt;
$ sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc&lt;br /&gt;
$ sudo ln -s /usr/bin/uic-qt4 /usr/local/bin/uic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your version of &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; needs to match the version used in the contribs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ moc -v&lt;br /&gt;
Qt Meta Object Compiler version 63 (Qt 4.8.0)&lt;br /&gt;
$ grep &amp;quot;define Q_MOC&amp;quot; contrib/win32/i586-mingw32msvc/include/qt4/src/corelib/kernel/qobjectdefs.h&lt;br /&gt;
#define Q_MOC_OUTPUT_REVISION 62&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the installed &amp;lt;code&amp;gt;moc&amp;lt;/code&amp;gt; has a version of 63 (from Qt 4.8), but the contribs were built with version 62 (from Qt 4.7). To fix this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd contrib/win32&lt;br /&gt;
$ wget http://johnfreed.com/vlc/contrib/moc-`moc -v 2&amp;gt;&amp;amp;1|cut -d&#039; &#039; -f6`.tar.bz2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua5.1&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* zip [for creating .zip package], p7zip [for .7z package], nsis [for .exe auto-installer].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Linux 64-bit ===&lt;br /&gt;
&lt;br /&gt;
If you are on Linux &#039;&#039;&#039;64-bit&#039;&#039;&#039;, you &#039;&#039;&#039;MUST&#039;&#039;&#039; remove some files:&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i586-mingw32msvc/bin/moc ../i586-mingw32msvc/bin/uic ../i586-mingw32msvc/bin/rcc&lt;br /&gt;
&lt;br /&gt;
In addition, install the &#039;&#039;qt4-tools&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i586-mingw32msvc&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&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;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i586-mingw32msvc&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; Xcompiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i586-mingw32msvc&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the ndis tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum --verbose --noplugins install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \ &lt;br /&gt;
lua&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21667</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21667"/>
		<updated>2012-02-06T22:17:41Z</updated>

		<summary type="html">&lt;p&gt;John F: preliminary first edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to compile {{VLC}} for [[Windows]].&lt;br /&gt;
&lt;br /&gt;
== Building Methods&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
If you want to build VLC from source under Fedora, you have several choices: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; in a virtual machine. &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw&#039;&#039;&#039; under Fedora. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Yum is the basic installation tool for Fedora. Install packages (as root):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install &#039;&#039;package-name1 package-name2 ...&#039;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using a virtual machine  ==&lt;br /&gt;
Virtual Box is known to work for this approach. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install VirtualBox-OSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic Win32Compile is optimized for Ubuntu. It is simpler if you install the 32-bit version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.ubuntu.com/start-download?distro=desktop&amp;amp;bits=32&amp;amp;release=latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the VirtualBox Manager GUI. &lt;br /&gt;
* Click on Machine / New... The &amp;quot;New Virtual Machine Wizard&amp;quot; will open. &lt;br /&gt;
* Click Next. Enter Ubuntu32 in the Name box. &lt;br /&gt;
* Set Base Memory Size to 1024MB. (Recommended.) &lt;br /&gt;
* Leave Start-up Disk box checked. Leave Create new hard disk radio button active. &lt;br /&gt;
* Choose VDI file type.&lt;br /&gt;
* Choose Dynamically allocated &lt;br /&gt;
* Choose Location Ubuntu32 and Size 8.00 GB&lt;br /&gt;
* Click &amp;quot;Create&amp;quot;. This will exit the Wizard.&lt;br /&gt;
* Click &amp;quot;Create&amp;quot; again. This will create the virtual machine.&lt;br /&gt;
* Click Settings / Storage. The SATA Controller should show that Ubuntu32.vdi (your 8GB disk) is attached. The IDE Controller should show an empty attachment. Click on the Empty line. The Attributes label in the last column should read &amp;quot;CD/DVD Drive:&amp;quot; with a dropdown reading &amp;quot;IDE Secondary&amp;quot;. To the right of that is a CD symbol. Click on that.&lt;br /&gt;
* Click on &amp;quot;Choose a virtual CD/DVD disk file...&amp;quot; &lt;br /&gt;
* Navigate to the Ubuntu server you just downloaded. Click Open. Your CD should now be attached to the IDE Controller. Click OK.&lt;br /&gt;
* Click on Start. &lt;br /&gt;
&lt;br /&gt;
At this point, the virtual machine should boot and take you through the Ubuntu installation process. When it is complete, it will ask you to remove the CD and reboot. &lt;br /&gt;
* Click on Machine / Close ... &lt;br /&gt;
* Choose Power off the machine and click OK.&lt;br /&gt;
* Click on Settings / Storage&lt;br /&gt;
* Click on the Ubuntu CD attached to the IDE Controller&lt;br /&gt;
* Click on the CD symbol at the extreme right of the Attributes section.&lt;br /&gt;
* Choose Remove disk from virtual drive. Click OK&lt;br /&gt;
* Click on Start.&lt;br /&gt;
&lt;br /&gt;
Now Ubuntu should start. From here you can follow the instructions on the main Win32Compile page.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Using Fedora ===&lt;br /&gt;
It is possible to compile the Windows 32-bit version under 64-bit Fedora. There are a few complications, as noted below.&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
First, change to a directory you will use for building. You must have write access to this directory. Then use git to get the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the VLC trunk. Alternative branches (technically forks) are listed at http://git.videolan.org. Scroll down to the vlc.git line and click on the &amp;quot;forks&amp;quot; link at the extreme right. This will give you a list of alternatives, which are in the vlc directory. So, for example, to choose the 2.0 fork, the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.videolan.org/vlc/vlc-2.0.git&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Next, change into the newly installed vlc-x.x directory. We will refer to this as the $VLCROOT directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export VLCROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the toolchain  ==&lt;br /&gt;
&lt;br /&gt;
The mingw32 cross-compile tools are available in the default repository. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install \&lt;br /&gt;
mingw32-gcc-c++ \&lt;br /&gt;
mingw32-gcc \&lt;br /&gt;
mingw32-pthreads \&lt;br /&gt;
mingw32-w32api \&lt;br /&gt;
mingw32-binutils \&lt;br /&gt;
mingw32-runtime \&lt;br /&gt;
mingw32-filesystem \&lt;br /&gt;
mingw32-cpp \&lt;br /&gt;
mingw32-dlfcn-static&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing 32-bit Lua ==&lt;br /&gt;
By default, you will already have 64-bit Lua installed, because the yum/RPM packaging system depends on it. As a result, you will not be able to remove the 64-bit version. Furthermore, you may install the 32-bit binary libraries, but the 32-bit binary executables (lua and luac) will NOT install over the 64-bit ones. Here is how to work around that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install compat-readline5.i686 &lt;br /&gt;
yumdownloader lua.i686&lt;br /&gt;
sudo yum localinstall ./lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This installs the 32-bit libraries but not the executables. You have to manually extract and install the 32-bit versions&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install cpio&lt;br /&gt;
rpm2cpio lua*.rpm | cpio -idmv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you will have the files from the RPM package as a tree in your local directory. They have the same names and (relative) locations as the 64-bit versions, which is why yum refused to install them in the first place. So manually install them with the names lua32 and luac32:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mv usr/bin/lua /usr/bin/lua32&lt;br /&gt;
sudo mv usr/bin/luac /usr/bin/luac32&lt;br /&gt;
rm -rf usr&lt;br /&gt;
rm -f lua*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell the build system where to find the 32-bit versions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export LUA=/usr/bin/lua32&lt;br /&gt;
export LUAC=/usr/bin/luac32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing Qt and Correcting Version Mismatch ==&lt;br /&gt;
&lt;br /&gt;
Install the qt-devel package, which gives you moc, uic and rcc for both Qt3 and Qt4. The executables for Qt4 are named moc-qt4, uic-qt4 and rcc.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum install qt-devel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your version of moc needs to match the version used in the VLC sources.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moc -v&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: pre-built Windows Qt is 4.6.0 but the yum installed version for Linux is actually 4.6.3...&lt;br /&gt;
&#039;&#039;If it is problematic&#039;&#039; try to downgrade the qt installed versions:&lt;br /&gt;
&lt;br /&gt;
=== tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua5.1&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* zip [for creating .zip package], p7zip [for .7z package], nsis [for .exe auto-installer].&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git&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;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
or, if you want to compile the contribs yourself and are feeling adventurous and have lots of time to burn,&lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make fetch&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
=== Linux 64-bit ===&lt;br /&gt;
&lt;br /&gt;
If you are on Linux &#039;&#039;&#039;64-bit&#039;&#039;&#039;, you &#039;&#039;&#039;MUST&#039;&#039;&#039; remove some files:&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i586-mingw32msvc/bin/moc ../i586-mingw32msvc/bin/uic ../i586-mingw32msvc/bin/rcc&lt;br /&gt;
&lt;br /&gt;
In addition, install the &#039;&#039;qt4-tools&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i586-mingw32msvc&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&lt;br /&gt;
  $ ln -sf ../i586-mingw32msvc ../i486-mingw32&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;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i586-mingw32msvc&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; Xcompiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i586-mingw32msvc&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages.&lt;br /&gt;
&lt;br /&gt;
You may also add the ndis tools and everything needed by the &amp;lt;code&amp;gt;make package-win32*&amp;lt;/code&amp;gt; targets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo yum --verbose --noplugins install \&lt;br /&gt;
mingw32-nsiswrapper \&lt;br /&gt;
mingw32-nsis \&lt;br /&gt;
zip \&lt;br /&gt;
p7zip \ &lt;br /&gt;
lua&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21663</id>
		<title>Win32Compile Under Fedora</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile_Under_Fedora&amp;diff=21663"/>
		<updated>2012-02-06T21:23:33Z</updated>

		<summary type="html">&lt;p&gt;John F: Creating page based on Win32Compile&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to compile {{VLC}} for [[Windows]].&lt;br /&gt;
&lt;br /&gt;
== Building Methods&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
If you want to build VLC from source, you have several choices: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw on Linux&#039;&#039;&#039; &lt;br /&gt;
| This page &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method (uses cross compilation). On Windows, you should do it in a virtual machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileMSYSNew]] &lt;br /&gt;
| &#039;&#039;&#039;Native&#039;&#039;&#039; compilation method. MSYS is a minimal build environment to compile Unixish projects under Microsoft Windows.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;cygwin&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileCygwinNew]] &lt;br /&gt;
| Build using cygwin as your compile environment. &#039;&#039;&#039;Error&#039;&#039;&#039; prone, and &#039;&#039;&#039;slow&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Obtaining the toolchain  ==&lt;br /&gt;
&lt;br /&gt;
Each build method requires its own toolchain: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039; users can &amp;lt;code&amp;gt;apt-get install gcc-mingw32 mingw32-binutils&amp;lt;/code&amp;gt;.&amp;amp;nbsp;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Gentoo&#039;&#039;&#039; users can &amp;lt;code&amp;gt;emerge crossdev &amp;amp;amp;&amp;amp;amp; crossdev mingw32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ArchLinux&#039;&#039;&#039; users can &amp;lt;code&amp;gt;pacman -S mingw32-gcc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Fedora&#039;&#039;&#039; users should read [[Win32CompileFedora13]]&lt;br /&gt;
* Other &#039;&#039;&#039;Linux&#039;&#039;&#039; systems may attempt http://www.mingw.org/wiki/LinuxCrossMinGW&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039;, should read the [[Win32CompileMSYSNew|documentation]]&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.cygwin.com Cygwin]&#039;&#039;&#039;, should read the [[Win32CompileCygwinNew|documentation]]&lt;br /&gt;
&lt;br /&gt;
=== tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua5.1&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* zip [for creating .zip package], p7zip [for .7z package], nsis [for .exe auto-installer].&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git&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;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
or, if you want to compile the contribs yourself and are feeling adventurous and have lots of time to burn,&lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make fetch&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
=== Linux 64-bit ===&lt;br /&gt;
&lt;br /&gt;
If you are on Linux &#039;&#039;&#039;64-bit&#039;&#039;&#039;, you &#039;&#039;&#039;MUST&#039;&#039;&#039; remove some files:&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i586-mingw32msvc/bin/moc ../i586-mingw32msvc/bin/uic ../i586-mingw32msvc/bin/rcc&lt;br /&gt;
&lt;br /&gt;
In addition, install the &#039;&#039;qt4-tools&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i586-mingw32msvc&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&lt;br /&gt;
  $ ln -sf ../i586-mingw32msvc ../i486-mingw32&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;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i586-mingw32msvc&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; Xcompiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i586-mingw32msvc&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages with the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=21595</id>
		<title>Win32Compile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=21595"/>
		<updated>2012-02-05T21:01:37Z</updated>

		<summary type="html">&lt;p&gt;John F: /* tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to compile {{VLC}} for [[Windows]].&lt;br /&gt;
&lt;br /&gt;
== Building Methods&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
If you want to build VLC from source, you have several choices: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw on Linux&#039;&#039;&#039; &lt;br /&gt;
| This page &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method (uses cross compilation). On Windows, you should do it in a virtual machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileMSYSNew]] &lt;br /&gt;
| &#039;&#039;&#039;Native&#039;&#039;&#039; compilation method. MSYS is a minimal build environment to compile Unixish projects under Microsoft Windows.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;cygwin&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileCygwinNew]] &lt;br /&gt;
| Build using cygwin as your compile environment. &#039;&#039;&#039;Error&#039;&#039;&#039; prone, and &#039;&#039;&#039;slow&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Obtaining the toolchain  ==&lt;br /&gt;
&lt;br /&gt;
Each build method requires its own toolchain: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039; users can &amp;lt;code&amp;gt;apt-get install gcc-mingw32 mingw32-binutils&amp;lt;/code&amp;gt;.&amp;amp;nbsp;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Gentoo&#039;&#039;&#039; users can &amp;lt;code&amp;gt;emerge crossdev &amp;amp;amp;&amp;amp;amp; crossdev mingw32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ArchLinux&#039;&#039;&#039; users can &amp;lt;code&amp;gt;pacman -S mingw32-gcc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Fedora&#039;&#039;&#039; users should read [[Win32CompileFedora13]]&lt;br /&gt;
* Other &#039;&#039;&#039;Linux&#039;&#039;&#039; systems may attempt http://www.mingw.org/wiki/LinuxCrossMinGW&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039;, should read the [[Win32CompileMSYSNew|documentation]]&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.cygwin.com Cygwin]&#039;&#039;&#039;, should read the [[Win32CompileCygwinNew|documentation]]&lt;br /&gt;
&lt;br /&gt;
=== tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua5.1&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* zip [for creating .zip package], p7zip [for .7z package], nsis [for .exe auto-installer].&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git&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;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
or, if you want to compile the contribs yourself and are feeling adventurous and have lots of time to burn,&lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make fetch&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
=== Linux 64bits ===&lt;br /&gt;
&lt;br /&gt;
If you are on linux &#039;&#039;&#039;64bits&#039;&#039;&#039;, you &#039;&#039;&#039;MUST&#039;&#039;&#039; remove some files:&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i586-mingw32msvc/bin/moc ../i586-mingw32msvc/bin/uic ../i586-mingw32msvc/bin/rcc&lt;br /&gt;
&lt;br /&gt;
And install your &#039;&#039;qt4-tools&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i586-mingw32msvc&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&lt;br /&gt;
  $ ln -sf ../i586-mingw32msvc ../i486-mingw32&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;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i586-mingw32msvc&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; Xcompiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i586-mingw32msvc&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages with the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=21594</id>
		<title>Win32Compile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=21594"/>
		<updated>2012-02-05T21:00:59Z</updated>

		<summary type="html">&lt;p&gt;John F: /* tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to compile {{VLC}} for [[Windows]].&lt;br /&gt;
&lt;br /&gt;
== Building Methods&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
If you want to build VLC from source, you have several choices: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw on Linux&#039;&#039;&#039; &lt;br /&gt;
| This page &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method (uses cross compilation). On Windows, you should do it in a virtual machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileMSYSNew]] &lt;br /&gt;
| &#039;&#039;&#039;Native&#039;&#039;&#039; compilation method. MSYS is a minimal build environment to compile Unixish projects under Microsoft Windows.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;cygwin&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileCygwinNew]] &lt;br /&gt;
| Build using cygwin as your compile environment. &#039;&#039;&#039;Error&#039;&#039;&#039; prone, and &#039;&#039;&#039;slow&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Obtaining the toolchain  ==&lt;br /&gt;
&lt;br /&gt;
Each build method requires its own toolchain: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039; users can &amp;lt;code&amp;gt;apt-get install gcc-mingw32 mingw32-binutils&amp;lt;/code&amp;gt;.&amp;amp;nbsp;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Gentoo&#039;&#039;&#039; users can &amp;lt;code&amp;gt;emerge crossdev &amp;amp;amp;&amp;amp;amp; crossdev mingw32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ArchLinux&#039;&#039;&#039; users can &amp;lt;code&amp;gt;pacman -S mingw32-gcc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Fedora&#039;&#039;&#039; users should read [[Win32CompileFedora13]]&lt;br /&gt;
* Other &#039;&#039;&#039;Linux&#039;&#039;&#039; systems may attempt http://www.mingw.org/wiki/LinuxCrossMinGW&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039;, should read the [[Win32CompileMSYSNew|documentation]]&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.cygwin.com Cygwin]&#039;&#039;&#039;, should read the [[Win32CompileCygwinNew|documentation]]&lt;br /&gt;
&lt;br /&gt;
=== tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua5.1&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* zip [for creating a .zip package], p7zip [for a .7z package], nsis [for a .exe auto-installer].&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git&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;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
or, if you want to compile the contribs yourself and are feeling adventurous and have lots of time to burn,&lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make fetch&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
=== Linux 64bits ===&lt;br /&gt;
&lt;br /&gt;
If you are on linux &#039;&#039;&#039;64bits&#039;&#039;&#039;, you &#039;&#039;&#039;MUST&#039;&#039;&#039; remove some files:&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i586-mingw32msvc/bin/moc ../i586-mingw32msvc/bin/uic ../i586-mingw32msvc/bin/rcc&lt;br /&gt;
&lt;br /&gt;
And install your &#039;&#039;qt4-tools&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i586-mingw32msvc&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&lt;br /&gt;
  $ ln -sf ../i586-mingw32msvc ../i486-mingw32&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;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i586-mingw32msvc&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; Xcompiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i586-mingw32msvc&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages with the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=21593</id>
		<title>Win32Compile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=21593"/>
		<updated>2012-02-05T21:00:19Z</updated>

		<summary type="html">&lt;p&gt;John F: /* tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to compile {{VLC}} for [[Windows]].&lt;br /&gt;
&lt;br /&gt;
== Building Methods&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
If you want to build VLC from source, you have several choices: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw on Linux&#039;&#039;&#039; &lt;br /&gt;
| This page &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method (uses cross compilation). On Windows, you should do it in a virtual machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileMSYSNew]] &lt;br /&gt;
| &#039;&#039;&#039;Native&#039;&#039;&#039; compilation method. MSYS is a minimal build environment to compile Unixish projects under Microsoft Windows.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;cygwin&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileCygwinNew]] &lt;br /&gt;
| Build using cygwin as your compile environment. &#039;&#039;&#039;Error&#039;&#039;&#039; prone, and &#039;&#039;&#039;slow&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Obtaining the toolchain  ==&lt;br /&gt;
&lt;br /&gt;
Each build method requires its own toolchain: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039; users can &amp;lt;code&amp;gt;apt-get install gcc-mingw32 mingw32-binutils&amp;lt;/code&amp;gt;.&amp;amp;nbsp;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Gentoo&#039;&#039;&#039; users can &amp;lt;code&amp;gt;emerge crossdev &amp;amp;amp;&amp;amp;amp; crossdev mingw32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ArchLinux&#039;&#039;&#039; users can &amp;lt;code&amp;gt;pacman -S mingw32-gcc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Fedora&#039;&#039;&#039; users should read [[Win32CompileFedora13]]&lt;br /&gt;
* Other &#039;&#039;&#039;Linux&#039;&#039;&#039; systems may attempt http://www.mingw.org/wiki/LinuxCrossMinGW&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039;, should read the [[Win32CompileMSYSNew|documentation]]&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.cygwin.com Cygwin]&#039;&#039;&#039;, should read the [[Win32CompileCygwinNew|documentation]]&lt;br /&gt;
&lt;br /&gt;
=== tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua5.1&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* zip [for creating a .zip package], p7zip [for a .7z package], nsis [for a .exe installer].&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git&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;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
or, if you want to compile the contribs yourself and are feeling adventurous and have lots of time to burn,&lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make fetch&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
=== Linux 64bits ===&lt;br /&gt;
&lt;br /&gt;
If you are on linux &#039;&#039;&#039;64bits&#039;&#039;&#039;, you &#039;&#039;&#039;MUST&#039;&#039;&#039; remove some files:&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i586-mingw32msvc/bin/moc ../i586-mingw32msvc/bin/uic ../i586-mingw32msvc/bin/rcc&lt;br /&gt;
&lt;br /&gt;
And install your &#039;&#039;qt4-tools&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i586-mingw32msvc&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&lt;br /&gt;
  $ ln -sf ../i586-mingw32msvc ../i486-mingw32&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;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i586-mingw32msvc&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; Xcompiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i586-mingw32msvc&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages with the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>John F</name></author>
	</entry>
</feed>