Build VLC media player under Ubuntu Hardy (8.04)
By JBK on Friday, March 28 2008, 12:49 - VideoLAN - Permalink
I found an ubuntu hardy installation, and needed to test something on the trunk of VLC so I needed to compile a VLC for it. Here is a complete HOWTO to do the same !
This post is an update of the popular howto for Build VLC with feisty.
Introduction
So we are going to build the latest VLC possible.
Everything will be done in a console/terminal and should be straight-forward. Every question should be asked on the forum, or in the comments here.
Conventions
Every line beginning with a #
should be done as root, or using the sudo
command.
Every line beginning witha %
is a normal line.
Building VLC
Prepare your environment
We need a few package starting from a fresh hardy:
# apt-get install vlc # apt-get build-dep vlc # apt-get install cvs build-essential subversion git git-core automake1.9 libtool # apt-get install libgcrypt-dev # apt-get install libfaad-dev libtwolame-dev libqt4-dev libjack-dev # apt-get install libxpm-dev libcddb2-dev liblua5.1-0-dev libzvbi-dev libshout-dev
Checkout VLC trunk and bootstrap the tree
% git clone git://git.videolan.org/vlc.git % cd vlc % ./bootstrap
Build x264
x264
x264 is a library to encode movies in H.264.
% cd extras/ % % git clone git://git.videolan.org/x264.git % cd x264 % make % sudo make install % cd ../..
Configure VLC
Configure
% mkdir build; cd build;
%../configure --prefix=/usr \
--enable-snapshot --enable-debug \
--enable-dbus-control --enable-musicbrainz \
--enable-shared-libvlc --enable-mozilla \
--enable-lirc \
--with-ffmpeg-tree=../extras/ffmpeg \
--enable-x264 --with-x264-tree=../extras/x264 \
--enable-shout --enable-taglib \
--enable-v4l \
--enable-dvb \
--enable-realrtsp --disable-xvmc \
--enable-svg --enable-dvdread \
--enable-dc1394 --enable-dv \
--enable-theora --enable-faad \
--enable-twolame --enable-real \
--enable-flac --enable-tremor \
--enable-skins2 --enable-qt4 \
--enable-ncurses \
--enable-aa --enable-caca \
--enable-esd --disable-portaudio \
--enable-jack --enable-xosd \
--enable-galaktos --enable-goom \
--enable-ggi \
--disable-cddax --disable-vcdx \
--disable-quicktime --enable-lua
Finish
% make
You just have to wait a bit :D
Comments
I get the following errors even though I configured ffmpeg to build shared libs:
/usr/share/svn/vlc/extras/ffmpeg/libavutil/mem.h:45:27: warning: "__GNU__" is not defined
/usr/share/svn/vlc/extras/ffmpeg/libavutil/mem.h:45:42: warning: "__GNU__" is not defined
/usr/share/svn/vlc/extras/ffmpeg/libavutil/mem.h:51:27: warning: "__GNU__" is not defined
/usr/share/svn/vlc/extras/ffmpeg/libavutil/mem.h:51:42: warning: "__GNU__" is not defined
/bin/sh ../../../libtool --tag=CC --mode=link gcc -std=gnu99 -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -rpath '/usr/lib/vlc/codec' -avoid-version -module -no-undefined -shrext .so -export-dynamic -o libffmpeg_plugin.la -rpath '/usr/lib/vlc/codec' -avoid-version -module -no-undefined -shrext .so -export-dynamic `top_builddir="../../.." ../../../vlc-config --ldflags plugin ffmpeg` libffmpeg_plugin_la-ffmpeg.lo libffmpeg_plugin_la-video.lo libffmpeg_plugin_la-audio.lo libffmpeg_plugin_la-video_filter.lo libffmpeg_plugin_la-deinterlace.lo libffmpeg_plugin_la-chroma.lo libffmpeg_plugin_la-encoder.lo libffmpeg_plugin_la-postprocess.lo libffmpeg_plugin_la-demux.lo libffmpeg_plugin_la-mux.lo libffmpeg_plugin_la-scale.lo ../../../src/libvlc.la `top_builddir="../../.." ../../../vlc-config -libs plugin ffmpeg`
*** Warning: Linking the shared library libffmpeg_plugin.la against the
*** static library /usr/share/svn/vlc/extras/ffmpeg/libavformat/libavformat.a is not portable!
*** Warning: Linking the shared library libffmpeg_plugin.la against the
*** static library /usr/share/svn/vlc/extras/ffmpeg/libavcodec/libavcodec.a is not portable!
*** Warning: Linking the shared library libffmpeg_plugin.la against the
*** static library /usr/share/svn/vlc/extras/ffmpeg/libavutil/libavutil.a is not portable!
*** Warning: Linking the shared library libffmpeg_plugin.la against the
*** static library /usr/share/svn/vlc/extras/ffmpeg/libpostproc/libpostproc.a is not portable!
gcc -std=gnu99 -shared .libs/libffmpeg_plugin_la-ffmpeg.o .libs/libffmpeg_plugin_la-video.o .libs/libffmpeg_plugin_la-audio.o .libs/libffmpeg_plugin_la-video_filter.o .libs/libffmpeg_plugin_la-deinterlace.o .libs/libffmpeg_plugin_la-chroma.o .libs/libffmpeg_plugin_la-encoder.o .libs/libffmpeg_plugin_la-postprocess.o .libs/libffmpeg_plugin_la-demux.o .libs/libffmpeg_plugin_la-mux.o .libs/libffmpeg_plugin_la-scale.o -Wl,--rpath -Wl,/usr/share/svn/vlc/build/src/.libs ../../../src/.libs/libvlc.so -lpthread /usr/share/svn/vlc/extras/ffmpeg/libavformat/libavformat.a /usr/share/svn/vlc/extras/ffmpeg/libavcodec/libavcodec.a /usr/share/svn/vlc/extras/ffmpeg/libavutil/libavutil.a -lz -ldl -L/usr/share/svn/vlc/extras/ffmpeg/libpostproc /usr/share/svn/vlc/extras/ffmpeg/libpostproc/libpostproc.a -lm -Wl,-z -Wl,defs -Wl,-soname -Wl,libffmpeg_plugin.so -o .libs/libffmpeg_plugin.so
.libs/libffmpeg_plugin_la-scale.o: In function `CloseScaler__0_9_0j':
scale.c:(.text+0x1f): undefined reference to `sws_freeFilter'
.libs/libffmpeg_plugin_la-scale.o: In function `OpenScaler__0_9_0j':
scale.c:(.text+0x698): undefined reference to `sws_getDefaultFilter'
scale.c:(.text+0x9f1): undefined reference to `sws_freeFilter'
/usr/bin/ld: /usr/share/svn/vlc/extras/ffmpeg/libavcodec/libavcodec.a(dsputil_mmx.o): relocation R_X86_64_PC32 against `ff_pw_20' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[6]: *** [libffmpeg_plugin.la] Error 1
make[6]: Leaving directory `/usr/share/svn/vlc/build/modules/codec/ffmpeg'
make[5]: *** [all-modules] Error 1
make[5]: Leaving directory `/usr/share/svn/vlc/build/modules/codec/ffmpeg'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/share/svn/vlc/build/modules/codec'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/share/svn/vlc/build/modules/codec'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/share/svn/vlc/build/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/share/svn/vlc/build'
make: *** [all] Error 2
ffmpeg configure:
./configure --enable-shared --enable-postproc --enable-gpl --extra-cflags='-fPIC -DPIC'
vlc configure:
../configure --prefix=/usr --enable-snapshot --enable-debug --enable-dbus-control --enable-musicbrainz --enable-shared-libvlc --enable-mozilla --enable-lirc --with-ffmpeg-tree=../extras/ffmpeg --enable-shout --enable-taglib --enable-v4l --enable-dvb --enable-realrtsp --disable-xvmc --enable-svg --enable-dvdread --enable-dc1394 --enable-dv --enable-theora --enable-faad --enable-twolame --enable-real --enable-flac --enable-tremor --enable-skins2 --disable-qt4 --enable-ncurses --enable-aa --enable-caca --enable-esd --disable-portaudio --enable-jack --enable-xosd --enable-galaktos --enable-goom --enable-ggi --disable-cddax --disable-vcdx --disable-quicktime
x264 is moved to git seems
so replace the svn checkout with this
git clone git://git.videolan.org/x264.git
i have the same problem with compiling on hardy
dget -x http://nightlies.videolan.org/build...
then doing the
debuild -i
sorry for the above post
ok now is fixed i compiled on hardy and all went ok
http://mapopa.blogspot.com/2008/04/...
Yes, x264 and VLC moved to Git.
The HowTo should be good.
I can't thank you enough for this post. Before following these instructions every time i went to play anything over my network including dvr.ms f iles it was choppy to the point of being unwatchable. The only thing that did not work for me was the final % make command. but everything seems to working despite that.
p.s. would you consider posting this on the ubuntu forums? I looked for a long time and was never successful at getting a working install before this. It certainly does not work over the network when you just use the synaptic to install
this did not work for me followed the steps all the way to the end.when I ran the make command said no make file stop any ideas what went wrong
ffmpeg is not being seen and I can mot cinfigure it in the eXtras folder a how to for ffmpeg is a MUSTit was in your fist post on 7.04 followed it but it will not config
Give me MORE details if you want help.
Thank you, seemed to have worked just fine.
In order to compile it without errors I had to take out the tree- specifiction for instance:
--with-ffmpeg-tree=../extras/ffmpeg
../configure --prefix=/usr --enable-snapshot --enable-debug --enable-dbus-control --enable-musicbrainz --enable-shared-libvlc --enable-mozilla --enable-lirc --enable-x264 --with-x264-tree=../extras/x264 --enable-shout --enable-taglib --enable-v4l --enable-dvb --enable-realrtsp --disable-xvmc --enable-svg --enable-dvdread --enable-dc1394 --enable-dv --enable-theora --enable-faad --enable-twolame --enable-real --enable-flac --enable-tremor --enable-skins2 --enable-qt4 --enable-ncurses --enable-aa --enable-caca --enable-esd --disable-portaudio --enable-jack --enable-xosd --enable-galaktos --enable-goom --enable-ggi --disable-cddax --disable-vcdx --disable-quicktime --enable-lua
And then it went ok, is it normal?
Hi Jean-Baptiste,
i have compiled it. But when i start the playlist vlc abortet. Over the terminal this comes:
ASSERT: "logicalIndex >= 0" in file itemviews/qheaderview.cpp, line 1215
Aborted
Greets from Hamburg
Sasch
I am interesting in how to reproduce that bug. Please share it!