Build vlc under a fresh sid

4 October 2007

Introduction

So we are going to build the latest VLC possible.

I already did it for ubuntu feisty and it had a huge success. I am going to do the same for debian/sid, which is the distro I use in normal time.

However, some steps did changed, and I compile more options here, because I can :D

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


# apt-get build-dep vlc
# apt-get install build-essential subversion tofrodos
# apt-get install portaudio-dev

Checkout it


% svn co svn://jb@svn.videolan.org/vlc/trunk vlc-trunk
% cd vlc-trunk;

Bootstrap it


% ./bootstrap

It has to finish with: Successfully bootstrapped

Build external libraries

x264

x264 is a library to encode movies in H.264.


% cd extras/
%
% svn co svn://svn.videolan.org/x264/trunk x264
% cd x264
% make
% cd ..

faac

faac is a library to encode audio in AAC/MP4A


% wget http://surfnet.dl.sourceforge.net/sourceforge/faac/faac-1.25.tar.gz
% tar xvf faac-1.25.tar.gz
% cd faac
% dos2unix *
% ./bootstrap
% ./configure
% make
# make install
% cd..

Lame

Lame is a library to encode MP3


% wget http://garr.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
% tar xvf lame-3.97.tar.gz
% cd lame-3.97
% ./configure;
% make
# make install
% cd..

ffmpeg

ffmpeg is a multi-codec library


% svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
% cd ffmpeg
% ./configure --enable-gpl --enable-pp \ 
               --enable-pthreads --enable-libmp3lame  \ 
               --enable-libfaac
% make
% cd ../..

live

Live is a streaming library. you’ll need it to read some streams.


% wget http://live555.com/liveMedia/public/live555-latest.tar.gz
% tar xvf live555-latest.tar.gz
% cd live555
% ./genMakefiles linux
% make
% cd..

VLC

configure


% mkdir linux;
% cd linux
% ../configure --prefix=/usr --enable-snapshot \
--enable-debug --enable-dbus-control \
--enable-musicbrainz --enable-shared \
--enable-mozilla --enable-lirc \
--with-x509-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
--with-live555-tree=../extras/live \
--with-ffmpeg-tree=../extras/ffmpeg \
--enable-shout --enable-taglib --enable-v4l \
--enable-cddax --enable-dvb --enable-vcdx \
--enable-realrtsp --enable-svg --enable-dvdread \
--enable-dv --enable-theora --enable-faad \
--enable-twolame --enable-real --enable-flac \
--enable-tremor --with-ffmpeg-mp3lame \
--with-ffmpeg-faac --enable-skins2 --enable-qt4 \
--enable-ncurses --enable-aa --enable-caca \
--enable-esd --enable-portaudio --enable-jack \
--enable-xosd --enable-galaktos --enable-goom \
--enable-ggi --disable-cddax --disable-vcdx \
--disable-dirac --enable-x264 \
--with-x264-tree=../extras/x264 \
--disable-xvmc --enable-wxwidgets \
--enable-lua --enable-pvr --enable-loader \
--enable-python-bindings --enable-audioscrobbler \
--enable-libcddb --enable-libcdio --enable-opencv  \
--enable-nls

build it


% make

Jean-Baptiste Kempf

Comments

  1. On 6 May 6060, 3:20 by Dros

    The option enable-pp is now unknown because it has been renamed, you must use enable-postproc

    just FYI

  2. On 10 May 10100, 8:20 by avisx

    please, remove the other message, and read this:

    http://forum.videolan.org/viewtopic…

    sorry and thanks :P

  3. On 10 May 10100, 6:47 by avisx

    hi!!

    i follow the howto step by step, but when i compile send this error:

    gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I../../src -DSYS_LINUX -I../../include -I../include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DLOCALEDIR="/usr/share/locale" -DPLUGIN_PATH="/usr/lib/vlc" -DDEBUG -D__LIBVLC__ -I../src/misc -g -O2 -ffast-math -funroll-loops -mtune=pentium2 -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -fvisibility=hidden -DDATA_PATH="/usr/share/vlc" -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -MT text/libvlc_la-iso_lang.lo -MD -MP -MF text/.deps/libvlc_la-iso_lang.Tpo -c ../../src/text/iso_lang.c -fPIC -DPIC -o text/.libs/libvlc_la-iso_lang.o
    In file included from ../../include/vlc_common.h:1062,
    from ../../include/vlc/vlc.h:155,
    from ../../src/text/iso_lang.c:34:
    ../../include/vlc_threads_funcs.h:550: error: expected specifier-qualifier-list before ‘pthread_spinlock_t’
    ../../include/vlc_threads_funcs.h: In function ‘vlc_spin_init’:
    ../../include/vlc_threads_funcs.h:558: warning: implicit declaration of function ‘pthread_spin_init’
    ../../include/vlc_threads_funcs.h:558: error: ‘vlc_spinlock_t’ has no member named ‘spin’
    ../../include/vlc_threads_funcs.h: In function ‘vlc_spin_lock’:
    ../../include/vlc_threads_funcs.h:566: warning: implicit declaration of function ‘pthread_spin_lock’
    ../../include/vlc_threads_funcs.h:566: error: ‘vlc_spinlock_t’ has no member named ‘spin’
    ../../include/vlc_threads_funcs.h: In function ‘vlc_spin_unlock’:
    ../../include/vlc_threads_funcs.h:575: warning: implicit declaration of function ‘pthread_spin_unlock’
    ../../include/vlc_threads_funcs.h:575: error: ‘vlc_spinlock_t’ has no member named ‘spin’
    ../../include/vlc_threads_funcs.h: In function ‘vlc_spin_destroy’:
    ../../include/vlc_threads_funcs.h:584: warning: implicit declaration of function ‘pthread_spin_destroy’
    ../../include/vlc_threads_funcs.h:584: error: ‘vlc_spinlock_t’ has no member named ‘spin’
    make[3]: *** [text/libvlc_la-iso_lang.lo] Error 1
    make[3]: se sale del directorio /usr/local/src/vlc-trunk/linux/src' make[2]: *** [all] Error 2 make[2]: se sale del directorio /usr/local/src/vlc-trunk/linux/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: se sale del directorio `/usr/local/src/vlc-trunk/linux’
    make: *** [all] Error 2

    please, help me!!

  4. On 26 May 26260, 9:30 by juju

    ce serait possible de nous indiquer comment combiler avec le support AMR stp ? j’aimerai streamer du 3GP ;) merci

  5. On 10 May 10100, 1:09 by meerab

    i like it

  6. On 30 May 30300, 2:36 by Juju

    Il faut aussi faire
    apt-get install automake libtool cvs
    pour ceux comme moi qui n’ont pas l’habitude de compiler.

    Merci en tous cas pour le résumé ca faisait un moment que je cherchais ;)

  7. On 30 May 30300, 10:21 by aLtgLasS

    Very good guide although I had to install further packages about which bootstrap complained.
    Under Ubuntu one must also not use libportaudio-dev but rather portaudio19-dev otherwise make fails on portaudio.c

  8. On 22 May 22220, 9:03 by rayabaa

    HI,
    I am sorry that I am asking question except nice comment.

    When I install VLC, I followed your tip.
    But , I could not install VLC with x264, …. have you any idea following case.


    1. I could not compile with x264 encoder. Without to include x264 tree, I can compile.
      I did configure with “enable-x264” and “–with-x264-tree” option.
      I compiled current version of x264 in the “extras” of vlc main folder.
      But I had following error messega:

    ==========
    ./configure –enable-snapshot –enable-debug –enable-dbus-control –enable-shared –enable-lirc –with-x509-ca-bundle=/etc/ssl/certs/ca-certificates.crt –with-live555-tree=/usr/lib/live –with-ffmpeg-tree=../extras/ffmpeg –enable-taglib –enable-v4l –enable-cddax –enable-dvb –enable-vcdx –enable-realrtsp –enable-svg –enable-dvdread –enable-dv –enable-theora –enable-faad –enable-twolame –enable-real –enable-flac –enable-tremor –with-ffmpeg-mp3lame –with-faac –enable-ncurses –enable-aa –enable-caca –enable-esd –enable-portaudio –enable-jack –enable-xosd –enable-galaktos –enable-goom –enable-ggi –disable-cddax –disable-vcdx –disable-dirac –disable-xvmc –enable-pvr –enable-loader –enable-python-bindings –enable-audioscrobbler –enable-libcddb –enable-libcdio –enable-opencv –enable-nls –disable-notify –with-libmpeg2-tree=../extras/mpeg2dec-0.4.1 –disable-speex –disable-lua –disable-fluidsynth –disable-gnutls –disable-avahi-client –enable-old-dbus –with-included-gettext –enable-skins2 –enable-wxwidgets –enable-x264 –with-x264-tree=../extras/x264/

    ……
    ……

    checking png.h presence… yes
    checking for png.h… yes
    checking for png_set_rows in -lpng… yes
    checking for x264.h in /usr/local/src/vlc-trunk/extras/x264… yes
    checking for x264_encoder_open in -lx264… no
    configure: error: the specified tree hasn’t been compiled

    I found follwoing error message from config.log :

    configure:58065: checking for x264.h in /usr/local/src/vlc-trunk/extras/x264
    configure:58069: result: yes
    configure:58084: checking for x264_encoder_open in -lx264
    configure:58114: gcc -std=gnu99 -o conftest -Wall -Wextra -Wno-unused-parameter -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -DSYS_LINUX -lpthread conftest.c -lx264 >&5
    conftest.c:40:1: warning: “_GNU_SOURCE” redefined
    conftest.c:10:1: warning: this is the location of the previous definition
    /usr/local/lib/libx264.a(encoder.o)(.text+0xd95): In function `x264_encoder_open':
    undefined reference to pow' /usr/local/lib/libx264.a(encoder.o)(.text+0xeda): In function x264_encoder_open':
    undefined reference to pow' /usr/local/lib/libx264.a(encoder.o)(.text+0xfb8): In function x264_encoder_open':
    undefined reference to pow' /usr/local/lib/libx264.a(encoder.o)(.text+0x1026): In function x264_encoder_open':
    undefined reference to pow' /usr/local/lib/libx264.a(ratecontrol.o)(.text+0x5e): In function qscale2bits':
    undefined reference to pow' /usr/local/lib/libx264.a(ratecontrol.o)(.text+0x14d): more undefined references to pow’ follow
    collect2: ld returned 1 exit status

    ==========

    1. I got warning message on “avahi-client”. I did “–disable-avahi-client”, but I got still warning message.
      What is the avahi-client ? how can I disable it in my confugure.

    =========
    checking for avahi-client >= 0.3… Package avahi-client was not found in the pkg-config search path.
    Perhaps you should add the directory containing `avahi-client.pc’
    to the PKG_CONFIG_PATH environment variable
    No package ‘avahi-client’ found
    configure: WARNING: avahi-client library not found

    http://forum.videolan.org/viewtopic…