rdp / ffmpeg-windows-build-helpers

Helper script for cross compiling some media tools for windows, like customizable ffmpeg.exe (with or without non-free components, etc), and some other bonuses like mplayer, mp4box, mxf, etc.
GNU General Public License v3.0
1.08k stars 414 forks source link

Building libmodplug fails #275

Closed rboy1 closed 7 years ago

rboy1 commented 7 years ago

When trying to build the latest build of ffmpeg it fails with this error:

making /ffmpeg/sandbox/win32/libmodplug_git as $ PATH=/ffmpeg/sandbox/cross_compilers/mingw-w64-i686/bin:$PATH make -j 4

CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /ffmpeg/sandbox/win32/libmodplug_git/missing aclocal-1.15 -I m4 CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /ffmpeg/sandbox/win32/libmodplug_git/missing autoconf cd . && /bin/bash /ffmpeg/sandbox/win32/libmodplug_git/missing automake-1.15 --gnu configure.ac:21: error: required file './compile' not found configure.ac:21: 'automake --add-missing' can install 'compile'

I believe the solution is to run automake with the --add-missing parameter, do you think this can be patched up through the build script?

rboy1 commented 7 years ago

@rdp here's the solution

modify the method from:

build_libmodplug() {
  do_git_checkout https://github.com/Konstanty/libmodplug.git
  cd libmodplug_git
    sed -i.bak 's/__declspec(dllexport)//' "$mingw_w64_x86_64_prefix/include/libmodplug/modplug.h" #strip DLL import/export directives
    sed -i.bak 's/__declspec(dllimport)//' "$mingw_w64_x86_64_prefix/include/libmodplug/modplug.h"
    generic_configure_make_install # or could use cmake I guess
  cd ..
}

to this:

build_libmodplug() {
  do_git_checkout https://github.com/Konstanty/libmodplug.git
  cd libmodplug_git
    sed -i.bak 's/__declspec(dllexport)//' "$mingw_w64_x86_64_prefix/include/libmodplug/modplug.h" #strip DLL import/export directives
    sed -i.bak 's/__declspec(dllimport)//' "$mingw_w64_x86_64_prefix/include/libmodplug/modplug.h"
    if [[ ! -f "configure" ]]; then
      autoreconf -fiv || exit 1
      automake --add-missing || exit 1
    fi
    generic_configure_make_install # or could use cmake I guess
  cd ..
}
hydra3333 commented 7 years ago

Just checking in ... not something like this (untested) ?

build_libmodplug() {
echo "---------------------------------------------------------------------------------------------------"
echo "---------------------------------------------------------------------------------------------------"
echo "build_libmodplug \"${1}\""
echo "---------------------------------------------------------------------------------------------------"
echo "---------------------------------------------------------------------------------------------------"
  do_git_checkout https://github.com/Konstanty/libmodplug.git
  ## was
  #cd libmodplug_git
  #  sed -i.bak 's/__declspec(dllexport)//' "./src/modplug.h" || exit 1 # ignore failures  #strip DLL import/export directives
  #  generic_configure_make_install # or could use cmake I guess
  #  sed -i.bak 's/-lmodplug.*/-lmodplug -lstdc++/' "$PKG_CONFIG_PATH/libmodplug.pc"  # ignore failures
  #  sed -i.bak 's/__declspec(dllexport)//' "$mingw_w64_x86_64_prefix/include/libmodplug/modplug.h" # ignore failures  #strip DLL import/export directives
  #cd ..
  ## is
  cd libmodplug_git
    sed -i.bak 's/__declspec(dllexport)//' "./src/modplug.h" || exit 1 # ignore failures  #strip DLL import/export directives
    sed -i.bak 's/__declspec(dllexport)//' "$mingw_w64_x86_64_prefix/include/libmodplug/modplug.h" #strip DLL import/export directives
    if [[ ! -f "configure" ]]; then
      autoreconf -fiv || exit 1
      automake --add-missing || exit 1
    fi
    generic_configure_make_install # or could use cmake I guess
    sed -i.bak 's/-lmodplug.*/-lmodplug -lstdc++/' "$PKG_CONFIG_PATH/libmodplug.pc"  # ignore failures
    sed -i.bak 's/__declspec(dllexport)//' "$mingw_w64_x86_64_prefix/include/libmodplug/modplug.h" # ignore failures  #strip DLL import/export directives
  cd ..
}
rboy1 commented 7 years ago

The earlier one worked for me. I delete the downloaded repository and rebuilt it. I didn't try to rebuild it after a successful build.

rboy1 commented 7 years ago

The patch I posted above worked perfectly on a rebuild also. Rebuilt from scratch and incrementally with the patch and it's working now

@rdp

rdp commented 7 years ago

OK hopefully fixed in 0a6bc96 thanks again!

rdp commented 6 years ago

FWIW had this happen again recently. Fix was to nuke the modplug_git folder and just reclone :)