Giter Club home page Giter Club logo

ffmpeg-windows-build-helpers's Introduction

ffmpeg-windows-build-helpers

This helper script lets you cross compile a windows-based 32 or 64-bit version of ffmpeg.exe/mplayer/mp4box.exe, etc, including their dependencies and libraries that they use. Note that I do offer custom builds, price negotiable. Ping me at [email protected] and we can negotiate, I'll do the work for you :)

The script allows the user to build using a Linux host (which uses cross compiles to build windows binaries). Windows users can use wsl or virtualbox (which run linux). Building on native linux box might take less time overall. NB if you use WSL Ubuntu 20.04 you need to do an extra step: #452 or look in the "extra" directory for a script to do various builds on WSL.

Cross-compiling from a Linux environment:

Takes about 2 hours.

Deploy a Linux VM on the host of your choice (>= 20.04 for Ubuntu), or natively on an extra computer or a dual boot system, or via a hosting provider such as Digital Ocean. Cheapest way: install windows 10 wsl bash shell. Another option: linux on a virtualbox VM. Another option, typically fast: temporarily rent a box (ex: DigitalOcean or vultr).

Download the script by cloning this repository via git:

$ git clone https://github.com/rdp/ffmpeg-windows-build-helpers.git
$ cd ffmpeg-windows-build-helpers

Now run the script:

$ ./cross_compile_ffmpeg.sh

Answer the prompts. It should end up with a working, statically-built ffmpeg.exe binary within the "sandbox/*/ffmpeg_git" director(ies). You're done!

If you're on a "too old" version of linux (or a distro besides Ubuntu, which is the most supported) you may have luck with building it inside a "docker" see the docker directory.

Another option which might save time (but doesn't have as many options, just creates an ffmpeg/x264/fdk-aac) instead of running ./cross_compile_ffmpeg.sh is to run

$ quick_build/quick_cross_compile_ffmpeg_fdk_aac_and_x264_using_packaged_mingw64.sh

script. Note the "quick" part here which attempts to use the locally installed mingw-w64 package from your distribution for the cross compiler, thus skipping the time-intensive cross-compiler toolchain build step. It's not as well tested as running the normal one, however, which builds gcc from scratch.

For Mac OSX users, simply follow the instructions for Linux above and built it natively in OS X terminal.

To view additional arguments and options supported by the script, run:

./cross_compile_ffmpeg.sh -h 

to see all the various options available.

For long running builds, do run them overnight as they take a while. You can just let it go...

If you want to build a "shared" build (there's a command line option for that :) then link it into your MSVC project see https://stackoverflow.com/questions/11701635/use-ffmpeg-in-visual-studio/11701737

Also note that you can also "cross compile" mp4box, mplayer,mencoder and vlc binaries if you pass in the appropriate command line parameters. And a few others. Some of them are currently broken, send a PM if you'd want it fixed.

To enable Intel QuickSync encoders (supported on Windows vista and above), which is optional, pass the option --build-intel-qsv=y to the cross-compilation script above. There is also an LGPL command line option for those that want that.

If you want to customize your FFmpeg final executable even further ( to remove features you don't need, make a smaller build, or custom build, etc.) then edit the script.

  1. Add or remove the "--enable-xxx" settings in the build_ffmpeg function (under config_options) near the bottom of the script. This can enable or disable parts of FFmpeg to suit your requirements.

You may also add new dependencies and libraries to the project as shown:

  1. You can write custom functions for new features you want to integrate. Make sure to add them to the build_dependencies() functions and also include the corresponding "--enable-xxx" parameter switches to the build_ffmpeg() function under the config_options.
  2. There are some helper methods (quoted under do_XXX clauses. for checking out code, running make only once, etc. that may be useful.

Note that you can optionally create a machine-optimized build by passing additional arguments to the --cflags parameter, such as --cflags='-march=athlon64-sse2 -O3' , as inferred by mtune. Google mtune options for references to this. A good reference can be found on Gentoo's wiki. Take precautions not to use excessive flags without understanding their impact on performance.

One option you cannot use is --cflags=-march=native (the native flag doesn't work in cross compiler environments). To find an appropriate "native" flag for your local box, do as illustrated here:

On the target machine,run:

% gcc -march=native -Q --help=target | grep march
-march=                               core-avx-i

Then use the output shown (in this case, core-avx-i, corresponding to Intel's Sandy-bridge micro-architecture) on the build machine:

% gcc -march=core-avx-i ...

Benchmarks prove that modifying the CFLAGS this way (at least using libx264) doesn't end up helping much speed-wise (it might make a smaller executable?) since libx264 auto detects and auto uses your cpu capabilities anyway, so until further research is done, these options may not actually provide significant or any speedup, while making the executable "undistributable" since it can only be run on certain cpu's, but it's fun! Ping me if you get different results than this, as you may be wasting your time using the --cflags= parameter here.

Note that the build scripts fetch stable sources (not mainline) which may contain slightly older/out of date dependency versions, and as such, there may be implied security risks (see CVEs that may not be patched downstream), though FFmpeg itself will be built from git master by default.

Note that if you have wine installed (in linux) you may need to run this command first to disable it (if you are building for a different -march=XX than the building machine, especially), so that it doesn't auto run files like conftest.exe, etc. during the build (they may crash with an annoying popup prompt otherwise)

$ sudo update-binfmts --disable wine

See this reference on the issue highlighted above. Failure to apply the workaround will most likely result in hangs (especially during the configure stage) as highlighted in the reference above.

Feedback is welcome, send an email to [email protected]

Related projects (similar to this one...): https://github.com/jb-alvarado/media-autobuild_suite (native'ish windows using msys2) https://github.com/Warblefly/multimediaWin64 (native'ish windows using cygwin) there's also the "fast" option see above, within this project

Related projects (that do cross compiling with dependency libraries):

vlc has a "contribs" building (cross compiling) system for its dependencies: https://wiki.videolan.org/Win32Compile/ (NB this script has an option to compile VLC as well, though currently it makes huge .exe files :) mxe "m cross environment" https://github.com/mxe/mxe is a library for cross compiling many things, including FFmpeg I believe.

[1] if you use a 512MB RAM droplet, make sure to first add some extra swap space: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04 before starting.
Here's my vultr referral link in case you want it [you get $100 free credit] https://www.vultr.com/?ref=8518257-6G

ffmpeg-windows-build-helpers's People

Contributors

animmouse avatar asheimo avatar copyliu avatar deadsix27 avatar dezi avatar djbacklund avatar eugenesvk avatar freewing-jp avatar gcsx avatar higuri avatar hvindin avatar jan-e avatar jojje avatar krakow10 avatar mannyamorim avatar marcusrugger avatar matteosaitta avatar mavericktse avatar mister-xy avatar mkrufky avatar naabtog avatar nanake avatar peacefullydisturbed avatar rdp avatar reino17 avatar seriousm4x avatar slycordinator avatar taroxd avatar tsukumijima avatar xatabhk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeg-windows-build-helpers's Issues

liblibbluray_plugin.la linking fail

Hello,

I try to compile VLC with the latest version of your wonderfull script.
Everything is going fine until I get to VLC's liblibbluray_plugin.la plugin.
I'm running the script with a clean sandbox (sudo remove -R sandbox, before calling the script) on Ubuntu 13.10.

I call the script this way :
sudo ./cross_compile_ffmpeg.sh --disable-nonfree=n --build-vlc=y --build-choice=win64 --gcc-cpu-count=4 --sandbox-ok=y

The compilation stops with the following error :

CCLD liblibbluray_plugin.la
/home/gc/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o):ftgzip.c:(.text+0x314): undefined reference to inflateInit2_' /home/gc/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o):ftgzip.c:(.text+0x358): undefined reference toinflateEnd'
/home/gc/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o):ftgzip.c:(.text+0x421): undefined reference to inflateReset' /home/gc/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o):ftgzip.c:(.text+0x61c): undefined reference toinflate'
/home/gc/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o):ftgzip.c:(.text+0xc38): undefined reference to inflateInit2_' /home/gc/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o):ftgzip.c:(.text+0xc59): undefined reference toinflate'
/home/gc/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o):ftgzip.c:(.text+0xc6e): undefined reference to inflateEnd' /home/gc/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o):ftgzip.c:(.text+0xc92): undefined reference toinflateEnd'
/home/gc/sandbox/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld: /home/gc/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o): bad reloc address 0x0 in section `.pdata'
collect2: error: ld returned 1 exit status

ffmpeg script broken - unable to pass multiple parameters to generic_download_and_install and generic_configure_make_install

The way generic_download_and_install() is currently written, if I do this:
generic_download_and_install http://caca.zoy.org/files/libcaca/libcaca-0.99.beta18.tar.gz libcaca-0.99.beta18 "CPPFLAGS=-DCACA_STATIC --build=none --bindir=$cur_dir2/bin --libdir=$cur_dir2/lib --disable-cxx --disable-csharp --disable-java --disable-python --disable-ruby --disable-imlib2 --disable-doc"

It will not work, only CPPFLAGS will be passed upto do_configure and the rest will be dropped.

I believe there is a slight correction to the script required to make it work correctly:

  1. In generic_download_and_install(), the correct line is ($extra_configure_options should be in quotes)
    generic_configure_make_install "$extra_configure_options"
  2. In generic_configure_make_install() ($1 should be in quotes)
    generic_configure "$1"

With these 2 changes, it works GREAT.

I hope this was helpful and find it's way into the script for future use

ffmpeg build breaking - vidstab

When using the latest script to build ffmpeg, I get the following error:

this pull got no new upstream changes, not forcing re-configure...
configuring ffmpeg_git (/Software/ffmpeg/sandbox/win32/ffmpeg_git) as $ PATH=/Software/ffmpeg/sandbox/mingw-w64-i686/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games ./configure --arch=x86 --target-os=mingw32 --cross-prefix=/Software/ffmpeg/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libilbc --prefix=/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32 --enable-static --disable-shared --enable-libsoxr --enable-fontconfig --enable-libass --enable-libutvideo --enable-libbluray --enable-iconv --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug --enable-opencl --extra-libs=-lstdc++ --extra-libs=-lpng --enable-libvidstab --extra-cflags= --extra-cflags= --enable-nonfree --enable-libfdk-aac --enable-libfaac --enable-runtime-cpudetect
ERROR: vidstab not found

libvpx 1.3.0

libvpx 1.3.0 has released, please link to it.

binutils build fails on Ubuntu 13.10

Hello,

I'm trying to use a 100% fresh install of Ubuntu 13.10 hosted in VMware Workstation 10 on Windows 7 x64 to compile a x64 ffmpeg using your script but the compilation of binutils fails.

Here is the only informations I have :

gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.24.51/binutils -I. -I../../../source/binutils-2.24.51/binutils -I../bfd -I../../../source/binutils-2.24.51/binutils/../bfd -I../../../source/binutils-2.24.51/binutils/../include -DLOCALEDIR=""/home/gc/sandbox/mingw-w64-x86_64/share/locale"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bucomm.o -MD -MP -MF .deps/bucomm.Tpo -c -o bucomm.o ../../../source/binutils-2.24.51/binutils/bucomm.c
../../../source/binutils-2.24.51/binutils/bucomm.c:130:7: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜attributeโ€™ before โ€˜VPARAMSโ€™
fatal VPARAMS ((const char *format, ...))
^
../../../source/binutils-2.24.51/binutils/bucomm.c:141:11: error: expected โ€˜=โ€™, โ€˜,โ€™, โ€˜;โ€™, โ€˜asmโ€™ or โ€˜attributeโ€™ before โ€˜VPARAMSโ€™
non_fatal VPARAMS ((const char *format, ...))
^
There is no build-log.txt file anywhere.
The problem repeats after complete deletion of the sandbox.

Should I try another distrib? Which one did you used?

I'm downloading your precompiled toolchain. I'll update this as soon as I tried.

Extra blank in script breaks build.

Hi Roger,

in cross_compile_ffmpeg.sh line 325 You have put a erranous space into the download sequence which breaks the build.

Cheers
dezi

autoreconf: libtoolize failed with exit status: 1

Stopped at this line.

Here is some output.

this pull got no new upstream changes, not forcing re-configure...
already did make vid.stab
already configured libcaca-0.99.beta18
already did make libcaca-0.99.beta18
already configured libmodplug-0.8.8.5
already did make libmodplug-0.8.8.5
patch zvbi-win32.patch already applied
patch zvbi-ioctl.patch already applied
already configured zvbi-0.2.34
already did make src
already configured libvpx-v1.3.0
already did make libvpx-v1.3.0
already configured vo-aacenc-0.1.3
already did make vo-aacenc-0.1.3
Updating to latest libilbc_git version... 
Already up-to-date.
this pull got no new upstream changes, not forcing re-configure...
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
.ibtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with ACLOCAL_AMFLAGS=-I m4
autoreconf: libtoolize failed with exit status: 1

My OS is ubuntu 14.04. How to solve this problem?

Adding support for libcaca and libmodplug

Roger, not really an bug rather a feature request to add support for libcaca and libmodplug.

Here is what is working for me:

LIBCACA:
Using your ffmpeg windows build helpers script (and AFTER putting the patch to script here to fix a bug - #22)

Add the function

build_libcaca() {
local cur_dir2=$(pwd)/libcaca-0.99.beta18
download_and_unpack_file http://caca.zoy.org/files/libcaca/libcaca-0.99.beta18.tar.gz libcaca-0.99.beta18
cd libcaca-0.99.beta18
cd caca
sed -i 's/__declspec(dllexport)//g' *.h
sed -i 's/__declspec(dllimport)//g' *.h
cd ..
generic_configure_make_install "--libdir=$mingw_w64_x86_64_prefix/lib --disable-cxx --disable-csharp --disable-java --disable-python --disable-ruby --disable-imlib2 --disable-doc"
cd ..
}

In the ffmpeg configure options just add
--enable-libcaca

and add the function build_libcaca to the build_dependencies() function you're done

LIBMODPLUG:

Add the function:

build_libmodplug() {
generic_download_and_install http://sourceforge.net/projects/modplug-xmms/files/libmodplug/0.8.8.4/libmodplug-0.8.8.4.tar.gz/download libmodplug-0.8.8.4
}

to the ffmpeg configure options add:
--enable-libmodplug --extra-libs=-lstdc++

and add the function build_libmodplug to the build_dependencies() function you're done

gpac build procedure

Hallo Roger,

i have integrated a gpac build into Your script. This provides a tool named "MP4Box.exe" and works in 32/64 bits. After the build process, the binary is found in ./gpac/bin/gcc.

MP4Box is a tool often required after ffmpeg-encoding for hinting and fast-start optimizing mp4 content.

If You find it helpful, You are welcome to integrate it into Your cross-compile-script.


build_gpac() {
do_svn_checkout https://gpac.svn.sourceforge.net/svnroot/gpac/trunk/gpac gpac
cd gpac
sed -i "s/has_dvb4linux="yes"/has_dvb4linux="no"/g" configure
sed -i "s/uname -s/MINGW32/g" configure
generic_configure --static-mp4box --enable-static-bin --disable-all # dezi static
cd src
do_make "CC=$(echo $cross_prefix)gcc AR=$(echo $cross_prefix)ar PREFIX=$mingw_w64_x86_64_prefix RANLIB=$(echo $cross_prefix)ranlib STRIP=$(echo $cross-prefix)strip"
cd ..
cd applications/mp4box
do_make "CC=$(echo $cross_prefix)gcc AR=$(echo $cross_prefix)ar PREFIX=$mingw_w64_x86_64_prefix RANLIB=$(echo $cross_prefix)ranlib STRIP=$(echo $cross-prefix)strip"
cd ../..
cd ..
}


The script only builds the gpac_static lib plus MP4Box. Other tools inside this pack require socket i/o and therefore hard to implement, so i only do a partial make.

I inserted this after building all dependencies and just before ffmpeg.

Cheers
dezi

Stops at dlfcn-win32

I'm trying to run the script on Ubuntu 14.10/64bit but at some point I get the following error:

Ok, done building MinGW-w64 cross-compiler(s)...
Building 32-bit ffmpeg...
PKG_CONFIG_PATH=/home/dataman/sandbox/mingw-w64-i686/i686-w64-mingw32/lib/pkgconfig
Downloading (via git clone) dlfcn-win32 from https://github.com/dlfcn-win32/dlfcn-win32.git
Cloning into 'dlfcn-win32.tmp'...
remote: Counting objects: 156, done.
remote: Total 156 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (156/156), 48.53 KiB | 0 bytes/s, done.
Resolving deltas: 100% (92/92), done.
Checking connectivity... done.
done downloading dlfcn-win32
./configure: 157: ./configure: cannot create /tmp/test.c: Permission denied
testing compiler: /home/dataman/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -shared -o /tmp/test.dll /tmp/test.c
./configure: 163: ./configure: /home/dataman/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc: not found
/home/dataman/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc could not create shared file with Windows API functions.
Make sure your MinGW system is working properly.

making /home/dataman/sandbox/win32/dlfcn-win32 as $ PATH=/home/dataman/sandbox/mingw-w64-i686/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games make -j 1

Makefile:4: config.mak: No such file or directory
make: *** No rule to make target 'config.mak'. Stop.

CentOS downloading soxr

On CentOS while processing soxr:


--2013-02-07 13:04:43-- http://sourceforge.net/projects/soxr/files/soxr-0.1.0-Source.tar.xz/download
Auflรถsen des Hostnamen ยปsourceforge.netยซ.... 216.34.181.60
Verbindungsaufbau zu sourceforge.net|216.34.181.60|:80... verbunden.
HTTP Anforderung gesendet, warte auf Antwort... 302 Found
Platz: http://downloads.sourceforge.net/project/soxr/soxr-0.1.0-Source.tar.xz?r=&ts=1360235093&use_mirror=netcologne[folge]
--2013-02-07 13:04:44-- http://downloads.sourceforge.net/project/soxr/soxr-0.1.0-Source.tar.xz?r=&ts=1360235093&use_mirror=netcologne
Auflรถsen des Hostnamen ยปdownloads.sourceforge.netยซ.... 216.34.181.59
Verbindungsaufbau zu downloads.sourceforge.net|216.34.181.59|:80... verbunden.
HTTP Anforderung gesendet, warte auf Antwort... 302 Found
Platz: http://netcologne.dl.sourceforge.net/project/soxr/soxr-0.1.0-Source.tar.xz[folge]
--2013-02-07 13:04:44-- http://netcologne.dl.sourceforge.net/project/soxr/soxr-0.1.0-Source.tar.xz
Auflรถsen des Hostnamen ยปnetcologne.dl.sourceforge.netยซ.... 78.35.24.46, 2001:4dd0:1234:6::5f
Verbindungsaufbau zu netcologne.dl.sourceforge.net|78.35.24.46|:80... verbunden.
HTTP Anforderung gesendet, warte auf Antwort... 200 OK
Lรคnge: 78900 (77K) [application/x-tar]
In ยปยปdownloadยซยซ speichern.

100%[=============================================================================>] 78.900 259K/s in 0,3s

2013-02-07 13:04:45 (259 KB/s) - ยปยปdownloadยซยซ gespeichert [78900/78900]

tar: Das sieht nicht wie ein โ€žtarโ€œ-Archiv aus.
tar: Springe zum nรคchsten Kopfteil.
tar: Beende mit Fehlerstatus aufgrund vorheriger Fehler
Archive: download
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of download or
download.zip, and cannot find download.ZIP, period.


For some reason, this results in a file "download" which cannot be processed by tar.

The following change solved the problem (removing the extra /download from wget path):

build_libsoxr() {
#download_and_unpack_file http://sourceforge.net/projects/soxr/files/soxr-0.1.0-Source.tar.xz/download soxr-0.1.0-Source
download_and_unpack_file http://sourceforge.net/projects/soxr/files/soxr-0.1.0-Source.tar.xz soxr-0.1.0-Source
cd soxr-0.1.0-Source
cmake . -DENABLE_STATIC_RUNTIME=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RANLIB=${cross_prefix}ranlib -DCMAKE_C_COMPILER=${cross_prefix}gcc -DCMAKE_CXX_COMPILER=${cross_prefix}g++ -DCMAKE_RC_COMPILER=${cross_prefix}windres -DCMAKE_INSTALL_PREFIX=$mingw_w64_x86_64_prefix -DHAVE_WORDS_BIGENDIAN_EXITCODE=0 -DBUILD_SHARED_LIBS:bool=off || exit 1
# BUILD_TESTS:BOOL=ON instead of the below?
rm -rf tests # disable tests. Is there another way?
mkdir tests
touch tests/CMakeLists.txt
do_make_install
cd ..
}

Issue at GCC compilation step

Hello,
i just try your script, and i am facing an error at the GCC compilation step :

...
checking for version 0.10 of ISL... no
checking for version 0.11 of ISL... no
configure: error: Unable to find a usable ISL. See config.log for details.

I am using OpenSuse 13.1 64 bits. Any idea on how to fix it ?

How can I enable x265 support in VLC?

Hello,

I would like to build an x265 enabled VLC.
To do so, I removed the '--disable-x265' parameter in the script.

Everything goes right until VLC's reconfigure :
checking for X262... no
checking x265.h usability... yes
checking x265.h presence... yes
checking for x265.h... yes
checking for x265_encoder_open in -lx265... no
configure: error: x265 library not found

How comes VLC's configure can't find it when FFMPEG's one does?
Do I need to add something elsewhere to tell VLC where to find x265?

gmp and zlib package using local uname and breaking build [OS X]

The zlib-1.2.7 and gmp-5.0.5 packages take information regarding linking specs from local uname command and break the build on machines, where local linking is different from what the cross-compile environment would do. I created a "fake" uname script with sane settings and put it prio to local uname into PATH.


!/bin/bash

case $1 in
-a ) echo "Linux kappa-ux-vm1 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux";;
-v ) echo "#1 SMP Wed Dec 19 07:05:20 UTC 2012";;
-r ) echo "2.6.32-279.19.1.el6.x86_64";;
-m ) echo "x86_64";;
-s ) echo "Linux";;

  • ) echo "Linux";;
    esac

Patch Error

line 976 and 977 are

ed -s "$prefix/include/$file" <<< $'g/ __declspec (dllexport)/s///g\nw\nq'
ed -s "$prefix/include/$file" <<< $'g/ __declspec (dllimport)/s///g\nw\nq'

should they not be

sed -s "$prefix/include/$file" <<< $'g/ __declspec (dllexport)/s///g\nw\nq'
sed -s "$prefix/include/$file" <<< $'g/ __declspec (dllimport)/s///g\nw\nq'

this is in mingw-w64-build-3.5.0.local

Thx,

Karnith

Crashes when using multi-threaded VP8 encoding from MSVC++2010

The issue I am going to describe occurs both with the Zeranoe builds as well as with code compiled with this script in a Debian machine for Windows 32. I also described the problem in the Zeranoe FFMPEG forum. Since then, I investigated further

I am using libavcodec to encode a WebM file which works fine when using only a single thread for libvpx, but crashes when setting the thread_count of the encoder to a value higher than 1.

I modified doc/examples/muxing.c to reproduce the error (cleaned to compile with MSVC2010, hardcoding the webm destination and set encoder threads to 4): crash_example.cpp. The call to compile it is (from a Visual Studio command prompt)

cl -I"c:\ffmpeg\include" crash_example.cpp /link  /OPT:NOREF /OUT:crash_example.exe /LIBPATH:c:\ffmpeg\bin c:\ffmpeg\bin\avdevice.lib c:\ffmpeg\bin\avformat.lib c:\ffmpeg\bin\avutil.lib c:\ffmpeg\bin\avcodec.lib c:\ffmpeg\bin\avfilter.lib c:\ffmpeg\bin\swscale.lib c:\ffmpeg\bin\swresample.lib

However, f the same code file is compiled with mingw-w64 on Windows, it works:

g++ crash_example.cpp -I/c/ffmpeg/include -L/c/ffmpeg/bin -lavformat -lavcodec  -lavutil -lswscale -lswresample -o crash_example.exed

I added a lot of printf statements to ffmpeg and libvpx sourcecode and found the root of the crash to a race condition, crashing in the following loop (from libvpx-v1.3.0/vp8/encoder/encodeframes.c, lines 468 to 475)

while (mb_col > (*last_row_current_mb_col - nsync))
{
    x86_pause_hint();
    thread_sleep(0);
}

So it looks like the mingw-w64-built libraries that have pthreads statically compiled in clash with the MSVC compiler/linker/runtime. I do not know any way around this. What I have tried so far (unsuccessfully):

  • enabling winpthreads instead of wiwhen compiling mingw-w64 on Debian with the Zeranoe script (3.6.6-preview).
  • using the pthreads-win32 of the cross-compile-ffmpeg script
  • using the latest libvpx from the git repo instead of 1.3.0
  • recompiling my software with the define PTW32_STATIC_LIB

Cross Compile CentOS bzip2 fails.

When cross compiling on CentOS, i encountered a problem in compiling bzip2:

bzip2.c:131:25: fatal error: sys\stat.h: No such file or directory
compilation terminated.
make: *** [bzip2.o] Fehler 1

The problem is well known and due to the backslash.

Re-enabling the patch in ./cross_compile_ffmpeg.sh

build_bzlib2() {
download_and_unpack_file http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz bzip2-1.0.6
cd bzip2-1.0.6
apply_patch https://raw.github.com/rdp/ffmpeg-windows-build-helpers/master/patches/bzip2_cross_compile.diff
do_make "CC=$(echo $cross_prefix)gcc AR=$(echo $cross_prefix)ar PREFIX=$mingw_w64_x86_64_prefix RANLIB=$(echo $cross_prefix)ranlib libbz2.a bzip2 bzip2recover install"
cd ..
}

did not help, for some reason, the patch is never applied. Still fails.

I found out, that in apply_patch patch the wget fails w/o notice, because the https certificate of the source site was invalid.

Adding --no-check-certificate to wget solved the problem:

apply_patch() {
local url=$1
local patch_name=$(basename $url)
local patch_done_name="$patch_name.done"
if [[ ! -e $patch_done_name ]]; then
wget --no-check-certificate $url # might save redundantly to .1 or .2, but that's ok
patch -p0 < "$patch_name" #|| exit 1
touch $patch_done_name
else
echo "patch $patch_name already applied"
fi
}

Cheers
Dezi

Make on OSX Darwin parallel tasks.

When running this on OSX 10.8 Darwin, compiling gmp and gnutls, maybe also other packages are creating excessive parallel compile tasks which freezes the machine.

Addding "-j 1" to the make command solves the problem.

do_make() {
local extra_make_options="$1 -j $cpu_count"
local cur_dir2=$(pwd)
local touch_name=$(get_small_touchfile_name already_ran_make "$extra_make_options")

if [ ! -f $touch_name ]; then
echo "making $cur_dir2 as $ PATH=$PATH make $extra_make_options"
nice make $extra_make_options -j 1 || exit 1
touch $touch_name
else
echo "already did make $(basename "$cur_dir2")"
fi
}

Opus 1.1

Opus 1.1 has released quite long time ago, please link to it.

CentOS compiling ffmpeg / frei0r filter failing.

Which fails with numerous error compiling the filter in ffmpeg.

Reason, again not updated frei0r.h header because of wget certificate failure.


build_frei0r() {
#download_and_unpack_file http://www.piksel.no/frei0r/releases/frei0r-plugins-1.3.tar.gz frei0r-1.3
#cd frei0r-1.3
#do_configure " --build=mingw32 --host=$host_target --prefix=$mingw_w64_x86_64_prefix --disable-static --enable-shared" # see http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=5&t=312
#do_make_install
# we rely on external dll's for this one, so only need the header to enable it, for now
#cp include/frei0r.h $mingw_w64_x86_64_prefix/include
#cd ..
if [[ ! -f "$mingw_w64_x86_64_prefix/include/frei0r.h" ]]; then
#wget https://raw.github.com/rdp/frei0r/master/include/frei0r.h -O $mingw_w64_x86_64_prefix/include/frei0r.h
wget --no-check-certificate https://raw.github.com/rdp/frei0r/master/include/frei0r.h -O $mingw_w64_x86_64_prefix/include/frei0r.h
fi
}


Adding --no-check-certificate to wget solves the problem.

Roger, You should take a look at raw.github.com and check out what is wrong with their certificate. Or why wget on some systems fails to load this by default.

Cheers
dezi

co is not a git command

Your script uses 'git co ' to select a specific branch, but 'co' is not a git command. Sure, you can set an alias, and maybe on some systems there's such an alias, but on most linux systems that I checked there isn't.

What happens then - the script checks out the master branch (i guess) and unless something goes wrong you have no way of knowing that what you compiled is not what you meant to.

gnutls 3.3.9 breaks 64bit build (danetool with undefined reference to `mkstemp')

on Ubuntu 14.04.1 LTS whilst the 32bit build completes successfully all the way down to ffmpeg, during the 64bit build with the new gnutls v3.3.9 linking danetool.exe throws:
CCLD danetool.exe
danetool.o:danetool.c:(.text+0x1266): undefined reference to `mkstemp'
collect2: error: ld returned 1 exit status

previous gnutls 3.2.14 did not experience this error for 64bit build.

gnutls can't find autoopts/options.h with autogen installed

At first I thought it might be my Ubuntu install, so I spun up a brand new VM (Ubuntu 14.04 LTS, 64-bit), updated it and installed the script's dependencies. I get these errors from gnutls if autogen is installed. If I remove the autogen package, compilation completes.

In file included from srptool-args.c:43:0:
srptool-args.h:49:30: fatal error: autoopts/options.h: No such file or directory
 #include <autoopts/options.h>
                              ^
compilation terminated.
make[4]: *** [libcmd_srp_la-srptool-args.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from ocsptool-args.c:43:0:
ocsptool-args.h:49:30: fatal error: autoopts/options.h: No such file or directory
 #include <autoopts/options.h>
                              ^
compilation terminated.
In file included from psk-args.c:43:0:
psk-args.h:49:30: fatal error: autoopts/options.h: No such file or directory
 #include <autoopts/options.h>
                              ^
compilation terminated.
make[4]: *** [libcmd_ocsp_la-ocsptool-args.lo] Error 1
make[4]: *** [libcmd_psk_la-psk-args.lo] Error 1
In file included from serv-args.c:43:0:
serv-args.h:49:30: fatal error: autoopts/options.h: No such file or directory
 #include <autoopts/options.h>
                              ^

There are any plans to create a libav-build-script?

Hi,
I'm not sure if this is the correct place for my question...but I hope ;)

I realy love your script. With this and a little training, even my cat could build ffmpeg for windows.
But the linux distribution I use switched from ffmpeg to libav (like ubuntu) and so I use it on my linux pc. And so it would be nice - but not necessary - to use avconv on windows too.
So, If you have plans, a comment would be nice.

Thank You and sorry for my english. As you see, my teacher was not very successfully.

build failures due to libquvi

build_libquvi is commented out but --enable-libquvi is still present in local extra_configure_opts.

this leads to "ERROR: libquvi not found using pkg-config" when configuring ffmpeg.

binutils 2.23.2 doesn't build

The current MingGW-w64 Build Script used binutils 2.23.2 by default. This version doesn't build on my machine (Linux 3.2.0-4-amd64 SMP Debian 3.2.46-1 x86_64 GNU/Linux)

I Added --binutils-ver=cvs to the ./mingw-w64-build-3.2.0 parameters in cross_compile_ffmpeg.sh and it worked.

This issue may or may not be fixable by you, but I wanted you to know.

BUG Input Choice

when you press 4 to exit the installer it doesnt trigger anything it loop forever

Libfribidi

The patch is not contained in version 0.19.5. So this does not work. I had to switch back to 0.19.4 with extra patch.

FFMPEG build failing - missing Nettle

With the latest script after the mingw build succeeds, ffmpeg is failing. (it works fine with a slightly older script)

Anyone know why or how to fix this? I've tried installing Nettle and libnettle4.

libtool: link: i686-w64-mingw32-gcc -g -O2 iconv.o iconv.res -o iconv.exe  ../srclib/libicrt.a /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/lib/libiconv.a
/bin/bash ../libtool --mode=install /usr/bin/install -c iconv.exe /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/bin/iconv.exe
libtool: install: /usr/bin/install -c iconv.exe /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/bin/iconv.exe
make[1]: Leaving directory `/Software/ffmpeg/sandbox/win32/libiconv-1.14/src'
if [ ! -d /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include ] ; then /bin/sh ./build-aux/mkinstalldirs /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include ; fi
/usr/bin/install -c -m 644 include/iconv.h.inst /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/include/iconv.h
cd po && make install prefix='/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32' exec_prefix='/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32' datarootdir='/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share' datadir='/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share'
make[1]: Entering directory `/Software/ffmpeg/sandbox/win32/libiconv-1.14/po'
if test "libiconv" = "gettext-tools"; then \
      /bin/mkdir -p /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/gettext/po; \
      for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed [email protected] [email protected] insert-header.sin Rules-quot   Makevars.template; do \
        /usr/bin/install -c -m 644 ./$file \
                /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/gettext/po/$file; \
      done; \
      for file in Makevars; do \
        rm -f /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/gettext/po/$file; \
      done; \
    else \
      : ; \
    fi
make[1]: Leaving directory `/Software/ffmpeg/sandbox/win32/libiconv-1.14/po'
cd man && make install prefix='/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32' exec_prefix='/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32' datarootdir='/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share' datadir='/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share' mandir='/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man'
make[1]: Entering directory `/Software/ffmpeg/sandbox/win32/libiconv-1.14/man'
if [ ! -d /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man1 ] ; then /bin/sh ../build-aux/mkinstalldirs /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man1 ; fi
mkdir -p -- /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man1
builddir="`pwd`"; cd . && for f in *.1 ; do (cd "$builddir"; echo /usr/bin/install -c -m 644 ./$f /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man1/$f ; /usr/bin/install -c -m 644 ./$f /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man1/$f) ; done
/usr/bin/install -c -m 644 ./iconv.1 /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man1/iconv.1
if [ ! -d /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man3 ] ; then /bin/sh ../build-aux/mkinstalldirs /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man3 ; fi
builddir="`pwd`"; cd . && for f in *.3 ; do (cd "$builddir"; echo /usr/bin/install -c -m 644 ./$f /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man3/$f ; /usr/bin/install -c -m 644 ./$f /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man3/$f) ; done
/usr/bin/install -c -m 644 ./iconv.3 /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man3/iconv.3
/usr/bin/install -c -m 644 ./iconv_close.3 /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man3/iconv_close.3
/usr/bin/install -c -m 644 ./iconv_open.3 /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man3/iconv_open.3
/usr/bin/install -c -m 644 ./iconv_open_into.3 /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man3/iconv_open_into.3
/usr/bin/install -c -m 644 ./iconvctl.3 /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/man/man3/iconvctl.3
if [ ! -d /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv ] ; then /bin/sh ../build-aux/mkinstalldirs /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv ; fi
mkdir -p -- /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv
builddir="`pwd`"; cd . && for f in *.html ; do (cd "$builddir"; echo /usr/bin/install -c -m 644 ./$f /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv/$f ; /usr/bin/install -c -m 644 ./$f /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv/$f) ; done
/usr/bin/install -c -m 644 ./iconv.1.html /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv/iconv.1.html
/usr/bin/install -c -m 644 ./iconv.3.html /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv/iconv.3.html
/usr/bin/install -c -m 644 ./iconv_close.3.html /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv/iconv_close.3.html
/usr/bin/install -c -m 644 ./iconv_open.3.html /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv/iconv_open.3.html
/usr/bin/install -c -m 644 ./iconv_open_into.3.html /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv/iconv_open_into.3.html
/usr/bin/install -c -m 644 ./iconvctl.3.html /home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32/share/doc/libiconv/iconvctl.3.html
make[1]: Leaving directory `/Software/ffmpeg/sandbox/win32/libiconv-1.14/man'
downloading ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.14.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 5018k  100 5018k    0     0   775k      0  0:00:06  0:00:06 --:--:-- 1074k
make: -n: Command not found
make: *** No rule to make target `clean'.  Stop.
configuring gnutls-3.2.14 (/home/mcebuddy/Software/ffmpeg/sandbox/win32/gnutls-3.2.14) as $ PATH=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games ./configure --host=i686-w64-mingw32 --prefix=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32 --disable-shared --enable-static --disable-cxx --disable-doc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i686-w64-mingw32
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i686-w64-mingw32-strip... i686-w64-mingw32-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
***
*** Checking for compilation programs...

checking for i686-w64-mingw32-gcc... i686-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-w64-mingw32-gcc accepts -g... yes
checking for i686-w64-mingw32-gcc option to accept ISO C89... none needed
checking whether i686-w64-mingw32-gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of i686-w64-mingw32-gcc... gcc3
checking how to run the C preprocessor... i686-w64-mingw32-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for Minix Amsterdam compiler... no
checking for i686-w64-mingw32-ar... i686-w64-mingw32-ar
checking for i686-w64-mingw32-ranlib... i686-w64-mingw32-ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking dependency style of i686-w64-mingw32-gcc... gcc3
checking for i686-w64-mingw32-ar... (cached) i686-w64-mingw32-ar
checking the archiver (i686-w64-mingw32-ar) interface... ar
checking for i686-w64-mingw32-g++... i686-w64-mingw32-g++
checking whether we are using the GNU C++ compiler... yes
checking whether i686-w64-mingw32-g++ accepts -g... yes
checking dependency style of i686-w64-mingw32-g++... gcc3
checking for bison... bison -y
checking for autogen... /bin/true
configure: WARNING:
***
*** autogen not found. Will not link against libopts.
*** 
checking for inline... inline
checking for ANSI C header files... (cached) yes
checking cpuid.h usability... yes
checking cpuid.h presence... yes
checking for cpuid.h... yes
checking for i686-w64-mingw32-pkg-config... /usr/bin/i686-w64-mingw32-pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for NETTLE... no
configure: error: 
  ***
  *** Libnettle 2.7 was not found.

MinGW Build broken

I just upgraded from 12.04 to 14.04 and am trying a clean build using the latest script.
This time however mingw build is breaking. Anyone recently tried using the script? Any idea why it's broken?

g++   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE  -o build/gencondmd \
        build/gencondmd.o ../build-x86_64-unknown-linux-gnu/libiberty/libiberty.a
build/gencondmd > tmp-cond.md
/bin/bash ../../source/gcc-4.8.2/gcc/../move-if-change tmp-cond.md insn-conditions.md
echo timestamp > s-condmd
build/genflags ../../source/gcc-4.8.2/gcc/config/i386/i386.md \
      insn-conditions.md > tmp-flags.h
build/genattr ../../source/gcc-4.8.2/gcc/config/i386/i386.md \
      insn-conditions.md > tmp-attr.h
/bin/bash ../../source/gcc-4.8.2/gcc/../move-if-change tmp-flags.h insn-flags.h
/bin/bash ../../source/gcc-4.8.2/gcc/../move-if-change tmp-attr.h insn-attr.h
echo timestamp > s-flags
build/genattr-common ../../source/gcc-4.8.2/gcc/config/i386/i386.md \
      insn-conditions.md > tmp-attr-common.h
echo timestamp > s-attr
build/gencodes ../../source/gcc-4.8.2/gcc/config/i386/i386.md \
      insn-conditions.md > tmp-codes.h
/bin/bash ../../source/gcc-4.8.2/gcc/../move-if-change tmp-attr-common.h insn-attr-common.h
echo timestamp > s-attr-common
build/genconfig ../../source/gcc-4.8.2/gcc/config/i386/i386.md \
      insn-conditions.md > tmp-config.h
/bin/bash ../../source/gcc-4.8.2/gcc/../move-if-change tmp-codes.h insn-codes.h
echo timestamp > s-codes
build/genattrtab ../../source/gcc-4.8.2/gcc/config/i386/i386.md insn-conditions.md \
        -Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
/bin/bash ../../source/gcc-4.8.2/gcc/../move-if-change tmp-config.h insn-config.h
echo timestamp > s-config
build/genautomata ../../source/gcc-4.8.2/gcc/config/i386/i386.md \
      insn-conditions.md > tmp-automata.c
../../source/gcc-4.8.2/gcc/doc/passes.texi:7: warning: node next `Passes' in menu `GENERIC' and in sectioning `RTL' differ
../../source/gcc-4.8.2/gcc/doc/rtl.texi:5: warning: node next `RTL' in menu `Control Flow' and in sectioning `GENERIC' differ
../../source/gcc-4.8.2/gcc/doc/rtl.texi:5: warning: node prev `RTL' in menu `Tree SSA' and in sectioning `Passes' differ
../../source/gcc-4.8.2/gcc/doc/generic.texi:9: warning: node prev `GENERIC' in menu `Passes' and in sectioning `RTL' differ
../../source/gcc-4.8.2/gcc/doc/tree-ssa.texi:9: warning: node next `Tree SSA' in menu `RTL' and in sectioning `Loop Analysis and Representation' differ
../../source/gcc-4.8.2/gcc/doc/loop.texi:10: warning: node next `Loop Analysis and Representation' in menu `Machine Desc' and in sectioning `Control Flow' differ
../../source/gcc-4.8.2/gcc/doc/loop.texi:10: warning: node prev `Loop Analysis and Representation' in menu `Control Flow' and in sectioning `Tree SSA' differ
../../source/gcc-4.8.2/gcc/doc/cfg.texi:10: warning: node next `Control Flow' in menu `Loop Analysis and Representation' and in sectioning `Machine Desc' differ
../../source/gcc-4.8.2/gcc/doc/cfg.texi:10: warning: node prev `Control Flow' in menu `RTL' and in sectioning `Loop Analysis and Representation' differ
../../source/gcc-4.8.2/gcc/doc/md.texi:6: warning: node prev `Machine Desc' in menu `Loop Analysis and Representation' and in sectioning `Control Flow' differ
make[1]: *** [s-attrtab] Killed
make[1]: *** Waiting for unfinished jobs....
/bin/bash ../../source/gcc-4.8.2/gcc/../move-if-change tmp-automata.c insn-automata.c
echo timestamp > s-automata
rm gcc.pod
make[1]: Leaving directory `/Software/ffmpeg/sandbox/pkgs/gcc/build/gcc'
make: *** [all-gcc] Error 2

iLBC support & dependencies

Tried to send this as email feedback via roger-projects, but that address doesn't work anymore?

Anyhow, great work with putting this together. I needed to make a Windows
binary of ffmpeg that could handle the iLBC format. This format is
interesting to me because iPhone does support encoding of iLBC natively
but not AMR and needed a way to effeciently transfer voice messages off the phone.

Anyhow, using a Ubuntu 12.04 VM and the script with the following mods:

--enable-libilbc

build_libilbc() {
do_git_checkout https://github.com/dekkers/libilbc.git libilbc_git
cd libilbc_git
if [[ ! -f "configure" ]]; then
autoreconf -fiv
fi
generic_configure_make_install
cd ..
}

I managed to get the binary I wanted - thanks! You may want to add this to
the script (could always have it disabled by default).

Some more dependency checks could be added I think at the start (I was
using out-of-the-box ubuntu), you need
curl package to get the zeranoe build script, this in turn, requires cvs
flex and bison to run I believe.

Also, a disclaimer about the multiple of gigabytes required (mainly due to the mingw compiler build) would be nice. Had to repartition my virtual linux dist after an "out of disk failure" after half a days compiling =)

BR
/Christian

Running this on Raspberry Pi / Debian / Wheezy

Worked pretty nice.

For libxavs I had to add the "--disable-asm" option to configure.

build_libxavs() {
do_svn_checkout https://xavs.svn.sourceforge.net/svnroot/xavs/trunk xavs
cd xavs
export LDFLAGS='-lm'
generic_configure "--disable-asm" # unfortunately this using --host isn't enough apparently...
unset LDFLAGS
do_make_install "CC=$(echo $cross_prefix)gcc AR=$(echo $cross_prefix)ar PREFIX=$mingw_w64_x86_64_prefix RANLIB=$(echo $cross_prefix)ranlib STRIP=$(echo $cross-prefix)strip"
cd ..
}

openjpeg 1.5.1

Hi Roger,
I have seeing it that you was trying to compile openjpeg 1.5.1 but it doesn't work. By me was the same under msys but I found the parameter: CFLAGS="$CFLAGS -DOPJ_STATIC" and with that it works. Maybe by you also.

Have a good time!
jb_

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.