ffmpeg-windows-build-helpers icon indicating copy to clipboard operation
ffmpeg-windows-build-helpers copied to clipboard

Problems cross compiling on Debian 9 for target win64

Open yethie opened this issue 6 years ago • 5 comments

Hello,

I ran the script on a debian 9 machine, targeting win64 and enabling non-free support. I got a fatal error while building tesseract:

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
./configure: line 4220: syntax error near unexpected token `-mavx,'
./configure: line 4220: `AX_CHECK_COMPILE_FLAG(-mavx, avx=true, avx=false)'

I removed the support for tesseract and the build completed successfully. But the executables do not work as expected, when encoding a file with the libvpx encoder the program exits almost immediately with a segmentation fault error. Encoding the same video with libx264 works fine.

Is there anything I can do to help on this issue? Thanks!

yethie avatar Nov 06 '18 08:11 yethie

Does it link for you if you remove the fno... Part from vpx' configure? That's recent...

On Tuesday, November 6, 2018, yethie [email protected] wrote:

Hello,

I ran the script on a debian 9 machine, targeting win64 and enabling non-free support. I got a fatal error while building tesseract:

checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-w64-mingw32 ./configure: line 4220: syntax error near unexpected token -mavx,' ./configure: line 4220: AX_CHECK_COMPILE_FLAG(-mavx, avx=true, avx=false)'

I removed the support for tesseract and the build completed successfully. But the executables do not work as expected, when encoding a file with the libvpx encoder the program exits almost immediately with a segmentation fault error. Encoding the same video with libx264 works fine.

Is there anything I can do to help on this issue? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.< https://ci5.googleusercontent.com/proxy/nf2b_WTSndIdl-0QI_l3UAluDL5CkrAEtaEx1-Dk_1vuPh4gbUJyfaPb5LMzmF-FXwTtQy9mS8IEeU1pW6Y1m-Du0gmWRv3PAPgBbio4mdDij9TkW_llcf8iqvMhnZxf6g-5O9jxV04yM8zx_S4cPFq00g=s0-d-e1-ft#https://github.com/notifications/beacon/AAAw0LW8J6ssHzl55xUz4ApIK2DFBbwPks5usU7QgaJpZM4YQAMN.gif>

rdp avatar Nov 06 '18 13:11 rdp

No, if I remove the fno... part the compiler complains with this message:

/tmp/ccLGT9SD.s: Assembler messages:
/tmp/ccLGT9SD.s:19: Error: invalid register for .seh_savexmm
Makefile:155: recipe for target 'vpx_dsp/x86/sad4d_avx512.c.o' failed
make[1]: *** [vpx_dsp/x86/sad4d_avx512.c.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:17: recipe for target '.DEFAULT' failed

yethie avatar Nov 07 '18 08:11 yethie

I fixed it with with following steps:

  1. Install additional dependency for building libtesseract: sudo apt install autoconf-archive

  2. Add the following line "./autogen.sh" to cross_compile_ffmpeg.sh into this function:

  build_libtesseract() {
  build_libleptonica
  build_libtiff # no disable configure option for this in tesseract? odd...
  do_git_checkout https://github.com/tesseract-ocr/tesseract.git tesseract_git a2e72f258a3bd6811cae226a01802d # #315
  cd tesseract_git
  ./autogen.sh # <-------
  generic_configure_make_install
  ...

For reference:

  • https://github.com/tesseract-ocr/tesseract/issues/647
  • https://vorba.ch/2014/tesseract-cygwin.html

ghost avatar Nov 15 '18 03:11 ghost

I would like to independently confirm that this is a problem on Debian 9.6 for target Win64.

@8pr previous post fixed this issue for me.

jftuga avatar Dec 18 '18 22:12 jftuga

This problem is either still present or has re-emerged. Debian 10 host, same fix works.

Phane7 avatar Apr 23 '20 17:04 Phane7