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.5k stars 257 forks source link

mingw64 libxml2 cmake error #2489

Closed kliffgomel closed 8 months ago

kliffgomel commented 11 months ago
    Starting 64bit compilation of global tools

21:41:14 ├ Running rustup_update... 21:41:15 ├ Running set_default_toolchain... 21:41:15 Running git clone for libxml2... 21:41:51 Running git update for libxml2... 21:41:51 ┌ libxml2 git .............................. [Recently updated] 21:41:52 ├ Running cmake... Likely error (tail of the failed operation logfile):

CPPFLAGS: -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 CFLAGS: -fstack-protector-strong -march=znver1 -O3 -pipe -mthreads CXXFLAGS: -fstack-protector-strong -march=znver1 -O3 -pipe -mthreads LDFLAGS: -pipe -static-libgcc -fstack-protector-strong -static-libstdc++ cmake .. -G Ninja -DBUILD_SHARED_LIBS=off -DCMAKE_TOOLCHAIN_FILE=/local64/etc/toolchain.cmake -DCMAKE_INSTALL_PREFIX=/local64 -DUNIX=on -DCMAKE_BUILD_TYPE=Release -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_TESTS=OFF -- The C compiler identification is unknown -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: C:/ffmpeg-autobuild/msys64/mingw64/bin/ccache.exe -- Check for working C compiler: C:/ffmpeg-autobuild/msys64/mingw64/bin/ccache.exe - broken CMake Error at C:/ffmpeg-autobuild/msys64/mingw64/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message): The C compiler

"C:/ffmpeg-autobuild/msys64/mingw64/bin/ccache.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: 'C:/ffmpeg-autobuild/build/libxml2-git/build-64bit/CMakeFiles/CMakeScratch/TryCompile-u4hhej'

Run Build Command(s): C:/ffmpeg-autobuild/msys64/mingw64/bin/ninja.exe -v cmTC_3284b
[1/2] C:\ffmpeg-autobuild\msys64\mingw64\bin\ccache.exe  gcc   -fstack-protector-strong -march=znver1 -O3 -pipe -mthreads -o CMakeFiles\cmTC_3284b.dir\testCCompiler.c.o -c C:\ffmpeg-autobuild\build\libxml2-git\build-64bit\CMakeFiles\CMakeScratch\TryCompile-u4hhej\testCCompiler.c
FAILED: CMakeFiles/cmTC_3284b.dir/testCCompiler.c.o 
C:\ffmpeg-autobuild\msys64\mingw64\bin\ccache.exe  gcc   -fstack-protector-strong -march=znver1 -O3 -pipe -mthreads -o CMakeFiles\cmTC_3284b.dir\testCCompiler.c.o -c C:\ffmpeg-autobuild\build\libxml2-git\build-64bit\CMakeFiles\CMakeScratch\TryCompile-u4hhej\testCCompiler.c
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'

  what():  filesystem error: Cannot convert character sequence: Illegal byte sequence

ninja: build stopped: subcommand failed.

logs.zip

kliffgomel commented 11 months ago

Still not fixed.

kliffgomel commented 11 months ago

Also for clang The C compiler

"C:/ffmpeg-autobuild-clang/msys64/mingw64/bin/ccache.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: 'C:/ffmpeg-autobuild-clang/build/libxml2-git/build-64bit/CMakeFiles/CMakeScratch/TryCompile-f0wv94'

Run Build Command(s): C:/ffmpeg-autobuild-clang/msys64/mingw64/bin/ninja.exe -v cmTC_a9786
[1/2] C:\ffmpeg-autobuild-clang\msys64\mingw64\bin\ccache.exe  clang   -fstack-protector-strong -mtune=generic -O2 -pipe -o CMakeFiles\cmTC_a9786.dir\testCCompiler.c.o -c C:\ffmpeg-autobuild-clang\build\libxml2-git\build-64bit\CMakeFiles\CMakeScratch\TryCompile-f0wv94\testCCompiler.c
FAILED: CMakeFiles/cmTC_a9786.dir/testCCompiler.c.o 
C:\ffmpeg-autobuild-clang\msys64\mingw64\bin\ccache.exe  clang   -fstack-protector-strong -mtune=generic -O2 -pipe -o CMakeFiles\cmTC_a9786.dir\testCCompiler.c.o -c C:\ffmpeg-autobuild-clang\build\libxml2-git\build-64bit\CMakeFiles\CMakeScratch\TryCompile-f0wv94\testCCompiler.c
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'

  what():  filesystem error: Cannot convert character sequence: Illegal byte sequence

ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:13 (project)

kliffgomel commented 9 months ago

Please help me solve the problem, I can’t compile the entire project because of this error.

hydra3333 commented 9 months ago

libxml2 has been building fine for me (x64 static) these last 5 or 6 times. Are you able to disable ccache somehow (is it a question asked during 1st-run) ? For the moment, there seems to be other build issues you'll run into after that ;)

kliffgomel commented 9 months ago

cchache is disabled. The error occurred during a clean build of the project from scratch. At the same time, I checked on two different systems, the error repeats.

kliffgomel commented 9 months ago

It seems to me that the problem on this device may be related to the user's home folder name, which contains non-English characters and a space. How can I configure the script so that it does not automatically create a home folder from the username, but points to the manually created folder?

kliffgomel commented 8 months ago

I can't find a solution for this device