Building VLC 0.8.6f on Windows Vista x64
Posted: 09 May 2008 16:30
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)
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
(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
• my_do_configure.sh
• my_do_make.sh
Some Errors I saw during the build process, and what the ended up meaning:
• During ‘sh bootstrap’Fix was to put /bin in path before rest of $PATH – my_do_bootstrap.sh script.
• During the ‘sh configure ….’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
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 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 – 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
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
Code: Select all
#!/bin/sh
#Creates better file permissions under vista, and gdb works better
CYGWIN=nontsec
make
• 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.
• During the ‘sh configure ….’
Code: Select all
configure: error: libiconv is needed for VLC to work properly