Changes between Version 50 and Version 51 of CompilationGuide/Centos


Ignore:
Timestamp:
Nov 15, 2016, 10:38:34 PM (2 years ago)
Author:
llogan
Comment:

removed note about release tags. no need for export. removed make distclean prophylaxis in compile section as its "errors" were confusing some users. swtiched to FFmpeg snapshot. added sacrificial echo.

Legend:

Unmodified
Added
Removed
Modified
  • CompilationGuide/Centos

    v50 v51  
    1111{{{
    1212#!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;"
    13 '''Note:''' The `#` indicates that the command should be executed as superuser or root.
    14 }}}
    15 
    16 Get the dependencies. These are required compiling, but you can remove them when you are done if you prefer (except `make`; it should be installed by default and many things depend on it).
    17 {{{
    18 # yum install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
     13'''Note:''' The `#` indicates that the command should be executed as superuser or root and is only required in this guide for the `yum` command.
     14}}}
     15
     16Get the dependencies. These are required for compiling, but you can remove them when you are done if you prefer (except `make`; it should be installed by default and many things depend on it).
     17{{{
     18# yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
    1919}}}
    2020
     
    3232'''Note:''' If you do not require certain encoders you may skip the relevant section and then remove the appropriate `./configure` option in FFmpeg. For example, if libvorbis is not needed, then skip that section and then remove `--enable-libvorbis` from the [#FFmpeg Install FFmpeg] section.
    3333}}}
    34 
    35 If a particular library doesn't compile, this may be due to a new bug recently introduced. You can either skip that library or try compiling an older version. This is especially true for libraries obtained via Git. A simple way to look for the last good "release" is the following:
    36 
    37 {{{
    38 $ git clone <URL>
    39 (note that the "--depth 1" option is absent)
    40 $ git tag -l
    41 (look for the most recent release tag.)
    42 $ git checkout tags/<tag name>
    43 }}}
    44 
    45 Then continue the process as normal.
    4634
    4735=== Yasm ===
     
    5745make
    5846make install
    59 make distclean
    60 }}}
     47echo
     48}}}
     49
     50
     51{{{
     52#!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;"
     53'''Note:''' The `echo` at the end is just a sacrificial command because some users are forgetting to manually execute the last command when copying and pasting each code block.
     54}}}
     55
    6156
    6257=== libx264 ===
     
    7065git clone --depth 1 git://git.videolan.org/x264
    7166cd x264
    72 export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
    73 ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
    74 make
    75 make install
    76 make distclean
     67PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
     68make
     69make install
     70echo
    7771}}}
    7872
     
    9084make
    9185make install
     86echo
    9287}}}
    9388
     
    106101make
    107102make install
    108 make distclean
     103echo
    109104}}}
    110105
     
    123118make
    124119make install
    125 make distclean
     120echo
    126121}}}
    127122
     
    137132cd opus
    138133autoreconf -fiv
    139 export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
    140 ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
    141 make
    142 make install
    143 make distclean
     134PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
     135make
     136make install
     137echo
    144138}}}
    145139
     
    156150make
    157151make install
    158 make distclean
     152echo
    159153}}}
    160154
     
    170164tar xzvf libvorbis-1.3.4.tar.gz
    171165cd libvorbis-1.3.4
    172 LDFLAGS="-L$HOME/ffmeg_build/lib"
    173 CPPFLAGS="-I$HOME/ffmpeg_build/include"
    174166./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared
    175167make
    176168make install
    177 make distclean
     169echo
    178170}}}
    179171
     
    191183make
    192184make install
    193 make clean
     185echo
    194186}}}
    195187
     
    198190{{{
    199191cd ~/ffmpeg_sources
    200 git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
     192curl -O http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
     193tar xjvf ffmpeg-snapshot.tar.bz2
    201194cd ffmpeg
    202 PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
    203 ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib -ldl" --bindir="$HOME/bin" --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
    204 make
    205 make install
    206 make distclean
     195PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib -ldl" --bindir="$HOME/bin" --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
     196make
     197make install
    207198hash -r
    208199}}}
     
    223214{{{
    224215rm -rf ~/ffmpeg_build ~/bin/{ffmpeg,ffprobe,ffserver,lame,vsyasm,x264,x265,yasm,ytasm}
    225 # yum install autoconf automake cmake gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
    226 }}}
    227 
     216# yum install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
     217}}}
    228218
    229219=== Update Yasm ===
     
    263253{{{
    264254cd ~/ffmpeg_sources/libvpx
    265 make clean
     255make distclean
    266256git pull
    267257}}}
     
    270260=== Update FFmpeg ===
    271261{{{
    272 cd ~/ffmpeg_sources/ffmpeg
    273 make distclean
    274 git pull
    275 }}}
    276 Then run `./configure`, `make`, and `make install` as shown in the [#FFmpeg Install FFmpeg] section.
     262rm -rf ~/ffmpeg_sources/ffmpeg
     263}}}
     264Then re-run the [#FFmpeg Install FFmpeg] section.
    277265
    278266----
     
    282270{{{
    283271rm -rf ~/ffmpeg_build ~/ffmpeg_sources ~/bin/{ffmpeg,ffprobe,ffserver,lame,vsyasm,x264,yasm,ytasm}
    284 # yum erase autoconf automake cmake gcc gcc-c++ git libtool mercurial nasm pkgconfig zlib-devel
     272# yum erase autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool mercurial nasm pkgconfig zlib-devel
    285273hash -r
    286274}}}