Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
30th July 2019, 17:40 | #1 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Issue with GCC 9.1.0 and ffms2 and x264
I don't know exactly where to put the information (here or in h264), so for now i put it here.
I build : - ffmpeg 4.1.4. - ffms2 (last commit a9e8f73 of 19/03/2019.) - lsmash (last git commit 88208b5 of 25/02/2019.) and after, i build x264. Under MSYS2, with GCC provided by msys2 (get with "pacman") : With version 7.4.0 Rev1 (x86) and 8.3.0 Rev2 (x64) ffms2 is included and checked/tested "Ok" by the configure script of x264. With version 9.1.0 Rev3 (x86/x64), ffms2 is not included, it seems that the check/test by the configure script fails. The code and the building scripts are of course exactly the same in all cases.
__________________
My github. |
31st July 2019, 20:09 | #5 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
ffms2.pc created by :
gcc 9.1.0 (fail) here. gcc 8.1.0 (success) here. Except directory wich is different (but it's normal as i use 8.1.0 for the winthread build, and 9.1.0 for posix build), i don't see any difference. Didn't keep the 7.4.0 posix, but if realy needed, i can do it (it's just that i'll have to redo all the ffmpeg and ffms2 build).
__________________
My github. Last edited by jpsdr; 31st July 2019 at 20:15. |
1st August 2019, 17:23 | #7 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
gcc 9.1.0 :
-LG:/msys32/local-x264_x86/posix/t_mod/lib -lffms2 -IG:/msys32/local-x264_x86/posix/t_mod/include gcc 8.1.0 : -L/local-x264_x86/posix/t_mod/lib -LG:/msys32/mingw32/lib -L/local-x264_x86/posix/t_mod/lib -LG:/msys32/mingw32/lib -L/local-x264_x86/posix/t_mod/lib -lz -lffms2 -lavformat -lm -lbz2 -lz -lavcodec -pthread -liconv -lm -llzma -lz -lswscale -lm -lswresample -lm -lavutil -pthread -lm -luser32 -lbcrypt -I/local-x264_x86/posix/t_mod/include gcc 7.4.0 : -L/local-x264_x86/posix/t_mod/lib -LG:/msys32/mingw32/lib -L/local-x264_x86/posix/t_mod/lib -LG:/msys32/mingw32/lib -L/local-x264_x86/posix/t_mod/lib -lz -lffms2 -lavformat -lm -lbz2 -lz -lavcodec -pthread -liconv -lm -llzma -lz -lswscale -lm -lswresample -lm -lavutil -pthread -lm -luser32 -lbcrypt -I/local-x264_x86/posix/t_mod/include For the three test cases, i've configured PKG_CONFIG_PATH with the exact same location.
__________________
My github. |
12th August 2019, 09:45 | #10 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Odds ! "pkg-config --version" returns 0.29.2 in all cases, when "pkg-config --libs ffms2" returns different results for the exact same PKG_CONFIG_PATH, and so for also the exact same ffms2.pc file.
But... I've noticed that there is two pkg-config.exe files. One in "mingw32/bin" and another in "usr/bin". But, if i go in the directory where there is pkg-config.exe and ask the version : "usr/bin" returns version 0.29.2. GCC 9.1.0 "mingw32/bin" returns 0.29.2. GCC 8.1.0 "mingw32/bin" returns 0.29.2. Ok, i'm totaly
__________________
My github. |
12th August 2019, 13:58 | #11 | Link | |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
|
Quote:
Last edited by filler56789; 12th August 2019 at 14:00. |
|
12th August 2019, 14:53 | #12 | Link | |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
|
Quote:
Anyway it won't be easy to make me change my mind. Last week I was playing around with "the latest and greatest" MSYS2 and found out that the mingw32 and mingw64 directories were full of "strange" and "garbage" stuff — in other words, full of files that were not supposed to be there... Last edited by filler56789; 12th August 2019 at 14:56. Reason: better wording |
|
13th August 2019, 09:16 | #13 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Building ffms2 has always been tricky.
To build x264 with ffms2, you need a little modification in ffms.h (thanks Komisar). About GCC, for posix thread model, i use the one provided with MSYS2 (get with pacman). For win32 thread model, i use one provided here : https://sourceforge.net/projects/min.../mingw-builds/ When you build ffms2, there is first a lot of tests done, and if they all pass Ok, the build begins. If i build ffms2 with the MSYS2 posix GCC version, the build goes to the end properly, and finish Ok. (*) If i try to build ffms2 with a posix GCC version from the link above, the build fails at the end during the link of the EXE file. With this version, the build never ends properly. But, except the exe file, all the others files (libraries) are build properly. To build ffms2 with a win32 thread model GCC it's lot tricky. You need a not so trivial patch (at least for me), including putting back numthreads files, again, thanks Komisar. Now, after patched, if you try to build ffms2 with a win32 GCC version from the link above, the build fails at the end during the link of the EXE file. But, except the exe file, all the others files (libraries) are build properly. You have to install the files manualy. (*) : Well... That was true until around a year ago. Now, even with the MSYS2 posix GCC, the build fails at the end during the link of the exe. For now, personnaly, i don't know a GCC version which can build ffms2... It's not a big deal, as i don't need the EXE files, and all the other stuff i need are made properly (libraries, .pc file, etc...). Unlike ffmpeg where the is a --disable-programs option, practical when you just want to build/install the libraries and don't need the EXE files, i've not been able to find such an option for ffms2. It would be very practical, because it would prevent the build to fail at the end, and allow make install to install... Out of curiosity, i took the GCC provided by filler56789. Big and good surprise, it was a win32 thread model. So i build ffmpeg, build ffms2... no... This version unfortunately doesn't even begin to build, it fails during the preliminary tests... Edit : It fails with the following : Code:
checking whether the i686-w64-mingw32-g++ linker (g:/msys32/mingw32/i686-w64-mingw32/bin/ld.exe) supports shared libraries... yes checking dynamic linker characteristics... Win32 ld.exe checking how to hardcode library paths into programs... immediate checking zlib.h usability... no checking zlib.h presence... no checking for zlib.h... no checking for inflateEnd in -lz... no configure: error: in `/g/x264/ffms2/Build_x264': configure: error: cannot locate zlib.h and -lz, specify a valid zlib installation using --with-zlib=DIR See `config.log' for more details make: *** Pas de cible spécifiée et aucun makefile n'a été trouvé. Arrêt. make: *** Aucune règle pour fabriquer la cible «*install*». Arrêt. Another ffms2 mystery of why it fails here with this GCC version, and not with the others GCC version. Tested with 8.3.0 and 9.2.0, same results, fails here on the zlib check...
__________________
My github. Last edited by jpsdr; 13th August 2019 at 12:41. |
13th August 2019, 10:47 | #14 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Just tested the fresh new 9.2.0 MSYS2 GCC version, still no ffms2 when building x264...
I begin to wonder if it's not a GCC 9.x issue...
__________________
My github. Last edited by jpsdr; 13th August 2019 at 10:52. |
13th August 2019, 14:10 | #15 | Link | |
Helenium(Easter)
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
|
Your issue sounds like a broken environment.
Quote:
I build ffms2 using the meson build system from HolyWu: https://github.com/FFMS/ffms2/pull/338, and adds -DFFMS_STATIC to Cflags in ffms2.pc No need for any patches from Komisar.
__________________
Monochrome Anomaly |
|
13th August 2019, 16:09 | #16 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Tested to run pacman -S --needed mingw-w64-i686-zlib but it says allready installed and up to date.
Issue is that swapping gcc version by only renaming directories. Once zlib is installed, it seems it doesn't check in the directory if it exist, but it checks in a database if it's installed. Finaly i think, when i swap gcc version renaming directories, even if i swap to a directory without zlib, for the environment zlib is installed. The gcc versions i usualy use are probably provided with zlib allready installed.
__________________
My github. |
14th August 2019, 07:20 | #17 | Link | |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
|
Maybe off-topic but surely necessary:
Quote:
And especially when they are placed inside the /mingw##/bin/ directories. </END_OF_RANT> Last edited by filler56789; 14th August 2019 at 07:24. Reason: remove emoji — old vBulletin suxxx. |
|
14th August 2019, 07:38 | #18 | Link | |
Registered User
Join Date: Jul 2018
Posts: 450
|
Quote:
I'm preferring this GCC for MSYS2 - https://gcc-mcf.lhmouse.com/ ; https://github.com/lhmouse/mcfgthread/wiki ; https://github.com/lhmouse/mcfgthread/wiki/Benchmarking |
|
14th August 2019, 08:47 | #19 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Tested with pacman -S --overwrite --needed mingw-w64-i686-zlib (as --force is deprecated). I've seen the zlib stuff appears in the mingw32 directory of filler56789 GCC version. Unfortunately, ffms2 build with it is still failling on the zlib test.
I'll stop here, it's not like if i haven't allready others GCC versions working. I'll take a look at StvG links, thanks for these.
__________________
My github. |
14th August 2019, 10:02 | #20 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Tested ffms2 integration in x264 with the 8.3.1 from the link provided by StvG. ffms2 builds, but unfortunately, the integration in x264 fails.
The pkg-config --libs ffms2 returns the same value than 9.1.0 (or 9.2.0) MSYS2 GCC (see previous post). Can't test a 8.1.x because these GCC versions begin with 8.3.1. As far as i know, it doesn't exist mcf thread build option for ffmpeg, ffms2 or x264, only posix or win32threads. What is the closets ? My guess would be Win32threads, but...
__________________
My github. Last edited by jpsdr; 14th August 2019 at 10:06. |
|
|