Page 1 of 1

Building VLC 0.8.6f on Windows Vista x64

Posted: 09 May 2008 16:30
by LewisPringle
Folks:
Though I had only modest difficulties in getting the current trunk of VLC to build using cygwin, I had far greater difficulties getting the latest stable version of VLC – 0.8.6f – to compile.

There are plenty of documents on the web explaining how to build VLC on Windows (e.g. the INSTALL.win32 from the source distribution, http://wiki.videolan.org/Win32CompileCygwin, as well as http://wiki.videolan.org/Win32CompileCygwinNew). However, these contradict one another, and are generally applicable to a variety of different versions of VLC.

Since I had to go through all the trouble to work all this out, I decided to carefully document a clear set of steps to get VLC 0.8.6f to build on cygwin as a small ‘thank you’ for all the hard work others before me have put into developing this great software.

I’ve tested these steps on Vista (x64) SP1.

Despite assertions to the contrary I’ve seen – it was not necessary for me to perform any of these build steps running as administrator – even on Vista. However, I did find that the default cygwin on vista produced rather funny file modes (permissions – chmod), and that this didn’t seem to work well with gdb. I found that setting the CYGWIN=nontsec in my build scripts alleviated this problem.

• Install cygwin tools
o http://www.cygwin.com/setup.exe
o Install at these components/versions (based on list from http://wiki.videolan.org/Win32CompileCygwin)

Code: Select all

Archive 5.52-2 unzip (recommended: goes hand in hand with zip utility) 2.23-2 zip (required: to make self contained zip packages) Devel 2.1 automake (at least 1.5 is required) 20060817-1 binutils (autoselected) 1.11.22-1 cvs (required for autopoint) 3.4.4-3 gcc-core (autoselected) 3.4.4-3 gcc-g++ 20040810-1 gcc-mingw 20050522-1 gcc-mingw-core (autoselected) 20050522-1 gcc-mingw-g++ (autoselected) 6.8-2 gdb (optional: for debugging purposes) 0.15-1 gettext (autoselected) 0.15-1 gettext-devel 1.5.27a-1 libtool 3.81-2 make 3.13-1 mingw-runtime (autoselected) 2.02-1 nasm (optional: for compiling x264 encoder) 0.2.31-1 patchutils (optional: for patching source files with .diff files) 0.23a-1 pkgconfig (recommended: otherwise ./configure will complain about accuracy) Lib 1.4.0-1 libgcrypt
o Be sure to use mingw-runtime 3.13-1, and not the default mingw-runtime 3.14-1 (http://wiki.videolan.org/Win32CompileCygwin warns of this but – imho – not clearly enough). You get subtle compile etc errors otherwise. Note also, the thread viewtopic.php?f=2&t=43367 concludes that you should use mingw-runtime 3.11-1, which also works, but since as of the writing of this note - 3.13.1 can be installed directly from the cygwin installer tool, that is at least easier.
o Get contrib-0.8.6e-gcc-3.4.5-only.tar.bz2 and

Code: Select all

tar xjvf contrib-0.8.6e-gcc-3.4.5-only.tar.bz2 -C /
(note – this only places files under /usr/win32-branch – not under /usr/win32)
NOTE – if you get errors about missing libiconv during the my_do_configure.sh step below, it could be because you forgot to do this step.
You can download this from http://mirrors.optralan.com/videolan/te ... ly.tar.bz2

To build VLC:
• Extract (vlc-0.8.6f.tar.bz2)
from http://sourceforge.net/project/showfile ... _id=187240 as a directory.
Be sure there are no space (‘ ‘) characters in the path, or you will get build errors.
• Cmd
Run a windows command shell with cygwin stuff in your path.
• cd vlc-0.8.6f
From the unzipped sources above
• Copy the my_*.sh files to ‘.’ (see below)
• sh my_do_bootstrap.sh
This should take around 5 minutes
• sh my_do_configure.sh
This should take around 20 minutes
• sh my_do_make.sh
This should take around 35 minutes

Scripts referenced above:
• my_do_bootstrap.sh

Code: Select all

#!/bin/sh #Creates better file permissions under vista, and gdb works better CYGWIN=nontsec #avoid the win32 FIND command PATH=.:/bin:/usr/bin:$PATH Bootstrap
• my_do_configure.sh

Code: Select all

#!/bin/sh #Creates better file permissions under vista, and gdb works better CYGWIN=nontsec #avoid the win32 FIND command PATH=.:/bin:/usr/bin:$PATH #Parameterize USE_WIN32_DIR, so we can develop with multiple VLC versions at the same time (they # have different referenced component requirements) USE_WIN32_DIR=/usr/win32-branch PKG_CONFIG_PATH=${USE_WIN32_DIR}/lib/pkgconfig CPPFLAGS="-I${USE_WIN32_DIR}/include -I${USE_WIN32_DIR}/include/ebml" \ LDFLAGS=-L${USE_WIN32_DIR}/lib \ CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \ ./configure \ --disable-gtk \ --enable-nls \ --enable-sdl --with-sdl-config-path=${USE_WIN32_DIR}/bin \ --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \ --with-ffmpeg-zlib \ --enable-faad \ --enable-flac \ --enable-theora \ --with-wx-config-path=${USE_WIN32_DIR}/bin \ --with-freetype-config-path=${USE_WIN32_DIR}/bin \ --with-fribidi-config-path=${USE_WIN32_DIR}/bin \ --enable-live555 --with-live555-tree=${USE_WIN32_DIR}/live.com \ --enable-caca --with-caca-config-path=${USE_WIN32_DIR}/bin \ --with-xml2-config-path=${USE_WIN32_DIR}/bin \ --with-dvdnav-config-path=${USE_WIN32_DIR}/bin \ --disable-cddax \ --disable-vcdx \ --enable-goom \ --enable-twolame \ --enable-dvdread \ --enable-debug
• my_do_make.sh

Code: Select all

#!/bin/sh #Creates better file permissions under vista, and gdb works better CYGWIN=nontsec make
Some Errors I saw during the build process, and what the ended up meaning:
• During ‘sh bootstrap’

Code: Select all

FIND: Parameter format not correct FIND: Parameter format not correct autopoint: *** infrastructure files for version 0.11.5 not found; this is autopoint >from GNU gettext-tools 0.15 autopoint: *** Stop.
Fix was to put /bin in path before rest of $PATH – my_do_bootstrap.sh script.

• During the ‘sh configure ….’

Code: Select all

configure: error: libiconv is needed for VLC to work properly
This means that the auto-configure process couldn’t find libiconv.a – which if you followed the above instructions – would have been found in /usr/win32-branch/lib. This either means you failed to extract the contrib-0.8.6e-gcc-3.4.5-only.tar.bz2 in the right place, or changed the arguments to configure so that its not looking in /usr/win32-branch

Re: Building VLC 0.8.6f on Windows Vista x64

Posted: 09 May 2008 18:38
by VLC_help
If you have time, create a new wiki page and paste same information there.

Re: Building VLC 0.8.6f on Windows Vista x64

Posted: 09 May 2008 22:04
by LewisPringle
I'd be happy to, if I could figure out how.

I've signed up to be part of the wiki, but that just appears to give me the right to edit a few pages. It doesn't appear to give me the right to create a new page (or I haven't yet figured out how). Nor do I know the appropriate place to link this into the Wiki.

Re: Building VLC 0.8.6f on Windows Vista x64

Posted: 10 May 2008 02:39
by Jean-Baptiste Kempf
Well, most people that build VLC are working on the trunk, 09.0 and the cygwinNEw page does work for them.

Re: Building VLC 0.8.6f on Windows Vista x64

Posted: 22 May 2008 09:46
by Panzer
Lewis,

Thanks very much for this post.
I only want to fix a specific thing on a release version, and the trunk adds too many unknowns. It would be good if you added it to the wiki for the 0.8.x series.
The other documentation mostly worked, except I got tripped up by the /usr/win32 vs. /usr/win32-branch from the script in the wiki. That is how I found this page :D
I built this on XP as an administrator.

Also, to run the program I had to do the following:
$ chmod 755 vlc.exe.manifest

Panzer