m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.53k stars 264 forks source link

fontconfig fails to build #2496

Closed Barough closed 9 months ago

Barough commented 1 year ago

┌ fontconfig git ........................................ [Updates found] ├ Running uninstall... ├ Installing gperf... done ├ Running meson... ├ Running build... Likely error (tail of the failed operation logfile): D:/MABS-ffmpeg/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/MABS-ffmpeg/msys64/mingw32/lib/libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x945): undefined reference to inflate' D:/MABS-ffmpeg/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/MABS-ffmpeg/msys64/mingw32/lib/libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x954): undefined reference toinflateEnd' D:/MABS-ffmpeg/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/MABS-ffmpeg/msys64/mingw32/lib/libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x9ba): undefined reference to inflateEnd' D:/MABS-ffmpeg/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/MABS-ffmpeg/msys64/mingw32/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x80): undefined reference toBZ2_bzDecompressEnd' D:/MABS-ffmpeg/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/MABS-ffmpeg/msys64/mingw32/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x136): undefined reference to BZ2_bzDecompress' D:/MABS-ffmpeg/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/MABS-ffmpeg/msys64/mingw32/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x309): undefined reference toBZ2_bzDecompressEnd' D:/MABS-ffmpeg/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/MABS-ffmpeg/msys64/mingw32/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x365): undefined reference to BZ2_bzDecompressInit' D:/MABS-ffmpeg/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/MABS-ffmpeg/msys64/mingw32/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x5f8): undefined reference toBZ2_bzDecompressInit' collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed.

logs.zip

basilisk0315 commented 1 year ago

Hi Barough,

I have the same issue.

ultrasound1372 commented 1 year ago

Same here. Here's my logs.zip. The relevant portion from this end is probably this blurb.


C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/msys64/mingw64/lib/libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x94e): undefined reference to `inflate'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/msys64/mingw64/lib/libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x95d): undefined reference to `inflateEnd'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/msys64/mingw64/lib/libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x9ba): undefined reference to `inflateEnd'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/msys64/mingw64/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x6c): undefined reference to `BZ2_bzDecompressEnd'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/msys64/mingw64/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x11d): undefined reference to `BZ2_bzDecompress'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/msys64/mingw64/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x32a): undefined reference to `BZ2_bzDecompressEnd'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/msys64/mingw64/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x380): undefined reference to `BZ2_bzDecompressInit'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/msys64/mingw64/lib/libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x612): undefined reference to `BZ2_bzDecompressInit'

collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
build failed. Check C:/tools/mabs/build/fontconfig-git/build-64bit/ab-suite.build.log
This is required for other packages, so this script will exit.
  Creating diagnostics file...
`
``
Mhanz3500 commented 1 year ago

Same issue, new build ab-suite.build.log logs.zip

ultrasound1372 commented 1 year ago

Yeah it turns out it gets hundreds of linker errors on my end, that tail was only a tiny fraction of them.

Ajaja commented 1 year ago

Had the same problem with x64 build. Removing msys2 freetype package (pacman -R mingw-w64-x86_64-freetype ... with all packages that depend on it) fixed the issue.

ultrasound1372 commented 1 year ago

That doesn't break anything else about the environment? I saw that removing glib2 and pcre among others. It also removed libcaca and harfbuzz but we already build those. And will the automatic update bring them back?

doehrm commented 1 year ago

I can confirm that doing

pacman -R mingw-w64-x86_64-freetype mingw-w64-x86_64-fontconfig mingw-w64-x86_64-harfbuzz mingw-w64-x86_64-libcaca mingw-w64-x86_64-pango mingw-w64-x86_64-cairo

will bring back libcaca and harfbuzz after automatic update (with some error messages) but fontconfig can be built afterwards.

Selur commented 1 year ago

How should that look for 32bit?

Selur commented 1 year ago

logs.zip

hydra3333 commented 1 year ago

I can confirm that doing

pacman -R mingw-w64-x86_64-freetype mingw-w64-x86_64-fontconfig mingw-w64-x86_64-harfbuzz mingw-w64-x86_64-libcaca mingw-w64-x86_64-pango mingw-w64-x86_64-cairo

will bring back libcaca and harfbuzz after automatic update (with some error messages) but fontconfig can be built afterwards.

Does that mean this command to remove those packages should be in MABS now so that it runs every time ? Thanks in advance.

Murmur commented 11 months ago

See this comment I was finally able to compile ffmpeg with vulkan+libglslang+drawtext flags and fontconfig module as well compiled fine. https://github.com/m-ab-s/media-autobuild_suite/issues/2494#issuecomment-1782566361