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.07k stars 409 forks source link

Build fails on Fedora 32 & CentOS 8 - Can't find libiconv #497

Open robotogre opened 3 years ago

robotogre commented 3 years ago

./cross_compile_ffmpeg.sh --ffmpeg-source-dir=~/FFmpeg

Sadly, I get the following error:

/home/fedora/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld: /home/fedora/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libunistring.a(striconveh.o):striconveh.c:(.text+0xcb): undefined reference to "libiconv"

collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/srt-live-transmit.dir/build.make:118: srt-live-transmit.exe] Error 1 make[1]: *** [CMakeFiles/Makefile2:135: CMakeFiles/srt-live-transmit.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/srt-file-transmit.dir/build.make:118: srt-file-transmit.exe] Error 1 make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/srt-file-transmit.dir/all] Error 2 make: *** [Makefile:150: all] Error 2

EDIT: I just got the same error on a new CentOS 8 VM.

rdp commented 3 years ago

But Ubuntu is OK?

On Friday, October 16, 2020, robotogre notifications@github.com wrote:

I started a new Fedora 32 VM at Digital Ocean, I cloned the FFMpeg repo, and checked out commit beaa350e24. (This is roughly FFmpeg n4.2) Installed the Fedora prerequisites as instructed by the ReadMe. Ran the build script and pointed it to my n4.2 FFmpeg source folder:

./cross_compile_ffmpeg.sh --ffmpeg-source-dir=~/FFmpeg

I chose "Build Windows 64-bit only"

Sadly, I get the following error:

/home/fedora/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld: /home/fedora/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libunistring.a(striconveh.o):striconveh.c:(.text+0xcb): undefined reference to libiconv' ... collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/srt-live-transmit.dir/build.make:118: srt-live-transmit.exe] Error 1 make[1]: [CMakeFiles/Makefile2:135: CMakeFiles/srt-live-transmit.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/srt-file-transmit.dir/build.make:118: srt-file-transmit.exe] Error 1 make[1]: [CMakeFiles/Makefile2:107: CMakeFiles/srt-file-transmit.dir/all] Error 2 make: [Makefile:150: all] Error 2`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.< https://ci4.googleusercontent.com/proxy/t9ApqZz3yTdT47Fo3NRWPxWrSHo2UbkFzvaEtiaOliYNIX_EVbPhZK6uxqk9ZUkSMAitws_CYXfR-zENfCN-9_GOyomEjvl8x0REsmlSlTr6e4C4Ni7UJAxPJZtr3ysejSp19eN5xYv2B70Jfq4O7XT4pmOXoZTdaO-IcP1VGfEVPIyD5uKeESJgFwySa_WsSzbOMePSQNhVqitlOP6XoGZe_QU=s0-d-e1-ft#https://github.com/notifications/beacon/AAADBUAQI2PV24KACH2OF4DSLAM4NA5CNFSM4STEVNFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KYZRSNA.gif>

effleurager commented 3 years ago

Ubuntu 20.04 passes that point successfully. FWIW, Arch Linux on WSL also fails at this point.

Edit: I didn't specify a specific commit or ffmpeg directory.

robotogre commented 3 years ago

But Ubuntu is OK?

I have not yet tried Ubuntu. I also did not try the latest FFmpeg. (I ended up cross-compiling on CentOS 8 manually.) Thank you VERY much for making this tool, and next time I will be very happy to use Ubuntu.

pessimism commented 3 years ago

This issue is also present in Fedora 33

rdp commented 3 years ago

PR welcome, unfortunately Ubuntu is about the only one supported by "me" the rest is just helpful contributors, thanks!

On 11/13/20, Steve Trotman notifications@github.com wrote:

This issue is also present in Fedora 33

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/rdp/ffmpeg-windows-build-helpers/issues/497#issuecomment-726943542

SuperNinja-4965 commented 3 years ago

From what i have found (compiling on Fedora 32) the issue lies in the build_libsrt subroutine. Assuming you do not need that library then you can comment out the build_libsrt # requires gnutls, mingw-std-threads line in the script. You will also need to remove the --enable-libsrt option from the FFmpeg configure options. For me I also had to remove the --enable-libbluray, --enable-fontconfig and the --enable-libfreetype options because of some package config not found errors. And now ffmpeg will compile. I am not very experienced with this kind of stuff so this is the best fix i can find. (I am only compiling option 3 the win64 option). By disabling this line in the script i have successfully compiled ffmpeg (the latest version) with no arguments given to the script.

I hope all this makes sense. And for now this can work as a temporary solution. I have attached my modified script (inside a zip because i cannot upload sh files) so you can compare the differences. cross_compile_ffmpeg.zip

I have not done much testing with this modified version of ffmpeg and so i cannot say how well it works in comparison to the original script Edit: Clarity

rdp commented 3 years ago

Thanks for your help

On Saturday, December 5, 2020, Joshua Glass notifications@github.com wrote:

From what i have found (compiling on Fedora 32) the issue lies in the build_libsrt subroutine. Assuming you do not need that library then you can comment out the build_libsrt # requires gnutls, mingw-std-threads line in the script. You will also need to remove the --enable-libsrt option from the FFmpeg configure options. For me I also had to remove the --enable-libbluray, --enable-fontconfig, --enable-libfreetype options because of some package config not found errors. And now ffmpeg will compile. I am not very experienced with this kind of stuff so this is the best fix i can find. (I am only compiling option 3 the win64 option). By disabling this line in the script i have successfully compiled ffmpeg (the latest version) with no arguments given to the script.

I hope all this makes sense. And for now this can work as a temporary solution. I have attached my modified script (inside a zip because i cannot upload sh files) so you can compare the differences. cross_compile_ffmpeg.zip

I have not done much testing with this modified version of ffmpeg and so i cannot say how well it works in comparison to the original script

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.< https://ci4.googleusercontent.com/proxy/wQQw3hKdCPAwH1bYxsfisFpTHQ1wDpwQeGTQG6sXgoyskyfeD24f-AIYQZOEQvv88Hk2PtofVqP6iYo9294Qz-NpMzQOpU8INVjE93Ty7uXmggy1xRi8fPvRHOvMeJ43BAfEq-V3eGkSx2Rig4VCcaDAlRhNqkhTWXf-pnFcTEwzg37B_7FMjpf6vVOs1J6rFg_f9HiUmy-H1jLTFuI0TL7S16IakBqaGy9OjZ9ouQ=s0-d-e1-ft#https://github.com/notifications/beacon/AAADBUC5E46KMREN2534YG3STLDLHA5CNFSM4STEVNFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFQJN2EI.gif>

rdp commented 3 years ago

PR possible?

AndCycle commented 2 years ago

I get caught by ERROR: libbluray not found using pkg-config too

PKG_CONFIG_PATH=/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/pkgconfig PATH=/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin:$PATH ./configure --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg  --enable-libopenh264 --enable-liblensfun  --enable-libvmaf --enable-libsrt --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-libsvthevc --enable-libsvtav1 --enable-libaom --enable-libvpx --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-avisynth --enable-libaribb24 --enable-libxvid --enable-libdavs2 --enable-libxavs2 --enable-libxavs --extra-cflags=-mtune=generic --extra-cflags=-O3 --enable-static --disable-shared --prefix=/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32
ERROR: libbluray not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

here is part of config.log

/tmp/ffconf.0OQkiakd/test.c: In function 'check_bd_open':
/tmp/ffconf.0OQkiakd/test.c:3:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    3 | long check_bd_open(void) { return (long) bd_open; }
      |                                   ^
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-gcc -Wl,--nxcompat,--dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--pic-executable,-e,mainCRTStartup -Wl
,--image-base,0x140000000 -I/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/include -I/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compi
lers/mingw-w64-x86_64/x86_64-w64-mingw32/include/libxml2 -DLIBXML_STATIC -I/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/include/freetype2 -I/tmp/tmp.1632314428.wR
IGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/include/libpng16 -I/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/
include/harfbuzz -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w6
4-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_com
pilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sa
ndbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-b
uild-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -o /tmp/ffconf.0OQkiakd/test.exe /tmp/ffconf.0OQkiakd/test.o -lbluray -lgdi32 -lxml2 -lz -llzma -liconv -lws2_32 -lpthread -lbz2 -lz -lpng16 -lz -lz -lharfbuzz
-lfreetype -lm -lpthread -lm -lharfbuzz
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/san
dbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(sfnt.o):sfnt.c:(.text+0x5241): undefined reference to `png_create_read_struct'
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/san
dbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(sfnt.o):sfnt.c:(.text+0x5256): undefined reference to `png_create_info_struct'
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/san
dbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(sfnt.o):sfnt.c:(.text+0x5279): undefined reference to `png_set_longjmp_fn'
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/san
dbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(sfnt.o):sfnt.c:(.text+0x529f): undefined reference to `png_destroy_read_struct'

...

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:96: undefined reference to `pthread_mutex_unlock'
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:96: undefined reference to `pthread_mutex_unlock'
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libharfbuzz.a(libharfbuzz_la-hb-face.o): in function `hb_mutex_t::fini()':
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:97: undefined reference to `pthread_mutex_destroy'
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libharfbuzz.a(libharfbuzz_la-hb-ot-shape-complex-arabic.o): in function `hb_mutex_t::lock()':
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:95: undefined reference to `pthread_mutex_lock'
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libharfbuzz.a(libharfbuzz_la-hb-ot-shape-complex-arabic.o): in function `hb_mutex_t::unlock()':
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:96: undefined reference to `pthread_mutex_unlock'
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:96: undefined reference to `pthread_mutex_unlock'
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libharfbuzz.a(libharfbuzz_la-hb-ot-shape-complex-arabic.o): in function `hb_mutex_t::fini()':
/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:97: undefined reference to `pthread_mutex_destroy'
collect2: error: ld returned 1 exit status
ERROR: libbluray not found using pkg-config
rdp commented 2 years ago

Of seems to be depending on png... Wonder what's different, seems to work ok here..

On Wednesday, September 22, 2021, AndCycle @.***> wrote:

I get caught by ERROR: libbluray not found using pkg-config too

PKG_CONFIG_PATH=/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/pkgconfig PATH=/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin:$PATH ./configure --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-liblensfun --enable-libvmaf --enable-libsrt --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-libsvthevc --enable-libsvtav1 --enable-libaom --enable-libvpx --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-avisynth --enable-libaribb24 --enable-libxvid --enable-libdavs2 --enable-libxavs2 --enable-libxavs --extra-cflags=-mtune=generic --extra-cflags=-O3 --enable-static --disable-shared --prefix=/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32 ERROR: libbluray not found using pkg-config

If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the @.*** mailing list or IRC #ffmpeg on irc.libera.chat. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem.

here is part of config.log

/tmp/ffconf.0OQkiakd/test.c: In function 'check_bd_open': /tmp/ffconf.0OQkiakd/test.c:3:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 3 | long check_bd_open(void) { return (long) bd_open; } | ^

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-gcc -Wl,--nxcompat,--dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--pic-executable,-e,mainCRTStartup -Wl ,--image-base,0x140000000 -I/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/include -I/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compi lers/mingw-w64-x86_64/x86_64-w64-mingw32/include/libxml2 -DLIBXML_STATIC -I/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/include/freetype2 -I/tmp/tmp.1632314428.wR

IGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/include/libpng16 -I/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/ include/harfbuzz -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w6 4-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_com pilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sa ndbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -L/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-b

uild-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib -o /tmp/ffconf.0OQkiakd/test.exe /tmp/ffconf.0OQkiakd/test.o -lbluray -lgdi32 -lxml2 -lz -llzma -liconv -lws2_32 -lpthread -lbz2 -lz -lpng16 -lz -lz -lharfbuzz -lfreetype -lm -lpthread -lm -lharfbuzz

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/san

dbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(sfnt.o):sfnt.c:(.text+0x5241): undefined reference to `png_create_read_struct'

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/san

dbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(sfnt.o):sfnt.c:(.text+0x5256): undefined reference to `png_create_info_struct'

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/san

dbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(sfnt.o):sfnt.c:(.text+0x5279): undefined reference to `png_set_longjmp_fn'

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/san

dbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libfreetype.a(sfnt.o):sfnt.c:(.text+0x529f): undefined reference to `png_destroy_read_struct'

...

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:96: undefined reference to `pthread_mutex_unlock'

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:96: undefined reference to `pthread_mutex_unlock'

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libharfbuzz.a(libharfbuzz_la-hb-face.o): in function `hb_mutex_t::fini()':

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:97: undefined reference to `pthread_mutex_destroy'

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libharfbuzz.a(libharfbuzz_la-hb-ot-shape-complex-arabic.o): in function `hb_mutex_t::lock()':

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:95: undefined reference to `pthread_mutex_lock'

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libharfbuzz.a(libharfbuzz_la-hb-ot-shape-complex-arabic.o): in function `hb_mutex_t::unlock()':

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:96: undefined reference to `pthread_mutex_unlock'

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:96: undefined reference to `pthread_mutex_unlock'

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/lib/libharfbuzz.a(libharfbuzz_la-hb-ot-shape-complex-arabic.o): in function `hb_mutex_t::fini()':

/tmp/tmp.1632314428.wRIGkFOwPW/ffmpeg-windows-build-helpers/sandbox/win64/harfbuzz_git/src/hb-mutex.hh:97: undefined reference to `pthread_mutex_destroy' collect2: error: ld returned 1 exit status ERROR: libbluray not found using pkg-config

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. < https://ci4.googleusercontent.com/proxy/J7_9g8uzs83YbTYTc4k_TOjjDX7pRotYb1fic6IZMM4IhJkY3DMdoBAgptKMfV8tbxuEBq04vEqKF_jjB47xAHdjsTbjiq3pnENBosS5rkAXsl5LvfwYJasd-q8YfICY0iepnkFIFkEGAdS9nBJLhLH6QsDhAOjK0oaDcH4SZk-B7upm4445bMbjN1Sk2KvFu8pxhGyzfYhRT7tMOrFR9PkqJEmcXa8jfdqb4NbZBw=s0-d-e1-ft#https://github.com/notifications/beacon/AAADBUEOVMJ67CKWOAHBCADUDKYCPA5CNFSM4STEVNFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG4VCFJY.gif>

AndCycle commented 2 years ago

https://github.com/AndCycle/ffmpeg-windows-build-helpers/commit/b4b48b74598dbe113b6583b10b3ed94ab1cb8a76 I did some random fix which can build in one shot on my system without any pkg-config issue, and I have no clue about why this works, haven't clean up the change for merge.