When I tried to run build-libcxx.sh script, I get this error:
`./build-libcxx.sh --disable-shared /d/mingw-llvm
-- The C compiler identification is Clang 9.0.0
-- The CXX compiler identification is Clang 9.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - failed
-- Found LLVM_CONFIG_PATH as D:/mingw-llvm/bin/llvm-config.exe
-- Performing Test LLVM_LIBSTDCXX_MIN
-- Performing Test LLVM_LIBSTDCXX_MIN - Failed
CMake Error at D:/mingw-llvm/lib/cmake/llvm/CheckCompilerVersion.cmake:80 (message):
libstdc++ version must be at least 4.8.
Call Stack (most recent call first):
D:/mingw-llvm/lib/cmake/llvm/HandleLLVMOptions.cmake:9 (include)
CMakeLists.txt:80 (include)
-- Configuring incomplete, errors occurred!
See also "D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeOutput.log".
See also "D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeError.log".`
CMakeOutput.log:
`The target system is: Windows - -
The host system is: Windows - 10.0.18850 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: D:/mingw-llvm/bin/i686-w64-mingw32-clang.exe
Build flags: -Wno-dll-attribute-on-redeclaration;-O2;-I/d/ffbuild/llvm/llvm-mingw/libcxx/include
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is Clang, found in "D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/3.14.0-rc4/CompilerIdC/a.exe"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: D:/mingw-llvm/bin/i686-w64-mingw32-clang++.exe
Build flags: -Wno-dll-attribute-on-redeclaration;-O2;-I/d/ffbuild/llvm/llvm-mingw/libcxx/include
Id flags: -c
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"
The CXX compiler identification is Clang, found in "D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/3.14.0-rc4/CompilerIdCXX/CMakeCXXCompilerId.o"
Detecting C compiler ABI info compiled with the following output:
Change Dir: D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp
Run Build Command(s):E:/msys64/usr/bin/make.exe cmTC_80b96/fast
/usr/bin/make -f CMakeFiles/cmTC_80b96.dir/build.make CMakeFiles/cmTC_80b96.dir/build
make[1]: Entering directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_80b96.dir/CMakeCCompilerABI.c.obj
/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -v -o CMakeFiles/cmTC_80b96.dir/CMakeCCompilerABI.c.obj -c /C/CMake/share/cmake-3.14/Modules/CMakeCCompilerABI.c
clang version 9.0.0 (trunk)
Target: i686-w64-windows-gnu
Thread model: posix
InstalledDir: D:\mingw-llvm\bin
D:/mingw-llvm/bin/clang-9.exe -cc1 -triple i686-w64-windows-gnu -emit-obj -disable-free -main-file-name CMakeCCompilerABI.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -v -coverage-notes-file D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_80b96.dir/CMakeCCompilerABI.c.gcno -resource-dir D:/mingw-llvm/lib/clang/9.0.0 -I D:/ffbuild/llvm/llvm-mingw/libcxx/include -internal-isystem D:/mingw-llvm/lib/clang/9.0.0/include -internal-isystem D:/mingw-llvm/i686-w64-mingw32/include -internal-isystem D:/mingw-llvm/include -O2 -Wno-dll-attribute-on-redeclaration -fdebug-compilation-dir D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fsjlj-exceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o CMakeFiles/cmTC_80b96.dir/CMakeCCompilerABI.c.obj -x c C:/CMake/share/cmake-3.14/Modules/CMakeCCompilerABI.c -faddrsig
clang -cc1 version 9.0.0 based upon LLVM 9.0.0svn default target x86_64-w64-mingw32
#include "..." search starts here:
#include <...> search starts here:
D:/ffbuild/llvm/llvm-mingw/libcxx/include
D:/mingw-llvm/lib/clang/9.0.0/include
D:/mingw-llvm/i686-w64-mingw32/include
D:/mingw-llvm/include
End of search list.
Linking C executable cmTC_80b96.exe
/C/CMake/bin/cmake.exe -E remove -f CMakeFiles/cmTC_80b96.dir/objects.a
/D/mingw-llvm/bin/llvm-ar cr CMakeFiles/cmTC_80b96.dir/objects.a @CMakeFiles/cmTC_80b96.dir/objects1.rsp
/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -v -Wl,--whole-archive CMakeFiles/cmTC_80b96.dir/objects.a -Wl,--no-whole-archive -o cmTC_80b96.exe -Wl,--out-implib,libcmTC_80b96.dll.a -Wl,--major-image-version,0,--minor-image-version,0
clang version 9.0.0 (trunk)
Target: i686-w64-windows-gnu
Thread model: posix
InstalledDir: D:\mingw-llvm\bin
D:/mingw-llvm/bin/ld.lld -m i386pe -Bdynamic -o cmTC_80b96.exe D:/mingw-llvm/i686-w64-mingw32/lib/crt2.o D:/mingw-llvm/i686-w64-mingw32/lib/crtbegin.o -LD:/mingw-llvm/i686-w64-mingw32/lib -LD:/mingw-llvm/lib -LD:/mingw-llvm/i686-w64-mingw32/sys-root/mingw/lib --whole-archive CMakeFiles/cmTC_80b96.dir/objects.a --no-whole-archive --out-implib libcmTC_80b96.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a -lmoldname -lmingwex -lmsvcrt D:/mingw-llvm/i686-w64-mingw32/lib/crtend.o
make[1]: Leaving directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Parsed C implicit include dir info from above output: rv=done
found start of include info
found start of implicit include info
add: [D:/ffbuild/llvm/llvm-mingw/libcxx/include
]
add: [D:/mingw-llvm/lib/clang/9.0.0/include
]
add: [D:/mingw-llvm/i686-w64-mingw32/include
]
add: [D:/mingw-llvm/include
]
end of search list found
implicit include dirs: [D:/ffbuild/llvm/llvm-mingw/libcxx/include
;D:/mingw-llvm/lib/clang/9.0.0/include
;D:/mingw-llvm/i686-w64-mingw32/include
;D:/mingw-llvm/include
]
Parsed C implicit link information from above output:
link line regex: [^( |.[/])(i686-w64-mingw32-ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command(s):E:/msys64/usr/bin/make.exe cmTC_80b96/fast ]
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_80b96.dir/build.make CMakeFiles/cmTC_80b96.dir/build]
ignore line: [make[1]: Entering directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp']
ignore line: [Building C object CMakeFiles/cmTC_80b96.dir/CMakeCCompilerABI.c.obj]
ignore line: [/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -v -o CMakeFiles/cmTC_80b96.dir/CMakeCCompilerABI.c.obj -c /C/CMake/share/cmake-3.14/Modules/CMakeCCompilerABI.c]
ignore line: [clang version 9.0.0 (trunk)
]
ignore line: [Target: i686-w64-windows-gnu
]
ignore line: [Thread model: posix
]
ignore line: [InstalledDir: D:\mingw-llvm\bin
]
ignore line: [ D:/mingw-llvm/bin/clang-9.exe -cc1 -triple i686-w64-windows-gnu -emit-obj -disable-free -main-file-name CMakeCCompilerABI.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -v -coverage-notes-file D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_80b96.dir/CMakeCCompilerABI.c.gcno -resource-dir D:/mingw-llvm/lib/clang/9.0.0 -I D:/ffbuild/llvm/llvm-mingw/libcxx/include -internal-isystem D:/mingw-llvm/lib/clang/9.0.0/include -internal-isystem D:/mingw-llvm/i686-w64-mingw32/include -internal-isystem D:/mingw-llvm/include -O2 -Wno-dll-attribute-on-redeclaration -fdebug-compilation-dir D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fsjlj-exceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o CMakeFiles/cmTC_80b96.dir/CMakeCCompilerABI.c.obj -x c C:/CMake/share/cmake-3.14/Modules/CMakeCCompilerABI.c -faddrsig
]
ignore line: [clang -cc1 version 9.0.0 based upon LLVM 9.0.0svn default target x86_64-w64-mingw32
]
ignore line: [#include "..." search starts here:
]
ignore line: [#include <...> search starts here:
]
ignore line: [ D:/ffbuild/llvm/llvm-mingw/libcxx/include
]
ignore line: [ D:/mingw-llvm/lib/clang/9.0.0/include
]
ignore line: [ D:/mingw-llvm/i686-w64-mingw32/include
]
ignore line: [ D:/mingw-llvm/include
]
ignore line: [End of search list.
]
ignore line: [Linking C executable cmTC_80b96.exe]
ignore line: [/C/CMake/bin/cmake.exe -E remove -f CMakeFiles/cmTC_80b96.dir/objects.a]
ignore line: [/D/mingw-llvm/bin/llvm-ar cr CMakeFiles/cmTC_80b96.dir/objects.a @CMakeFiles/cmTC_80b96.dir/objects1.rsp]
ignore line: [/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -v -Wl,--whole-archive CMakeFiles/cmTC_80b96.dir/objects.a -Wl,--no-whole-archive -o cmTC_80b96.exe -Wl,--out-implib,libcmTC_80b96.dll.a -Wl,--major-image-version,0,--minor-image-version,0 ]
ignore line: [clang version 9.0.0 (trunk)
]
ignore line: [Target: i686-w64-windows-gnu
]
ignore line: [Thread model: posix
]
ignore line: [InstalledDir: D:\mingw-llvm\bin
]
link line: [ D:/mingw-llvm/bin/ld.lld -m i386pe -Bdynamic -o cmTC_80b96.exe D:/mingw-llvm/i686-w64-mingw32/lib/crt2.o D:/mingw-llvm/i686-w64-mingw32/lib/crtbegin.o -LD:/mingw-llvm/i686-w64-mingw32/lib -LD:/mingw-llvm/lib -LD:/mingw-llvm/i686-w64-mingw32/sys-root/mingw/lib --whole-archive CMakeFiles/cmTC_80b96.dir/objects.a --no-whole-archive --out-implib libcmTC_80b96.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a -lmoldname -lmingwex -lmsvcrt D:/mingw-llvm/i686-w64-mingw32/lib/crtend.o
]
arg [D:/mingw-llvm/bin/ld.lld] ==> ignore
arg [-m] ==> ignore
arg [i386pe] ==> ignore
arg [-Bdynamic] ==> ignore
arg [-o] ==> ignore
arg [cmTC_80b96.exe] ==> ignore
arg [D:/mingw-llvm/i686-w64-mingw32/lib/crt2.o] ==> ignore
arg [D:/mingw-llvm/i686-w64-mingw32/lib/crtbegin.o] ==> ignore
arg [-LD:/mingw-llvm/i686-w64-mingw32/lib] ==> dir [D:/mingw-llvm/i686-w64-mingw32/lib]
arg [-LD:/mingw-llvm/lib] ==> dir [D:/mingw-llvm/lib]
arg [-LD:/mingw-llvm/i686-w64-mingw32/sys-root/mingw/lib] ==> dir [D:/mingw-llvm/i686-w64-mingw32/sys-root/mingw/lib]
arg [--whole-archive] ==> ignore
arg [CMakeFiles/cmTC_80b96.dir/objects.a] ==> ignore
arg [--no-whole-archive] ==> ignore
arg [--out-implib] ==> ignore
arg [libcmTC_80b96.dll.a] ==> ignore
arg [--major-image-version] ==> ignore
arg [0] ==> ignore
arg [--minor-image-version] ==> ignore
arg [0] ==> ignore
arg [-lmingw32] ==> lib [mingw32]
arg [D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a] ==> lib [D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a]
arg [-lmoldname] ==> lib [moldname]
arg [-lmingwex] ==> lib [mingwex]
arg [-lmsvcrt] ==> lib [msvcrt]
arg [-lpthread] ==> lib [pthread]
arg [-ladvapi32] ==> lib [advapi32]
arg [-lshell32] ==> lib [shell32]
arg [-luser32] ==> lib [user32]
arg [-lkernel32] ==> lib [kernel32]
arg [-lmingw32] ==> lib [mingw32]
arg [D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a] ==> lib [D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a]
arg [-lmoldname] ==> lib [moldname]
arg [-lmingwex] ==> lib [mingwex]
arg [-lmsvcrt] ==> lib [msvcrt]
arg [D:/mingw-llvm/i686-w64-mingw32/lib/crtend.o] ==> ignore
remove lib [D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a]
remove lib [msvcrt]
remove lib [D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a]
remove lib [msvcrt]
collapse library dir [D:/mingw-llvm/i686-w64-mingw32/lib] ==> [D:/mingw-llvm/i686-w64-mingw32/lib]
collapse library dir [D:/mingw-llvm/lib] ==> [D:/mingw-llvm/lib]
collapse library dir [D:/mingw-llvm/i686-w64-mingw32/sys-root/mingw/lib] ==> [D:/mingw-llvm/i686-w64-mingw32/sys-root/mingw/lib]
implicit libs: [mingw32;moldname;mingwex;pthread;advapi32;shell32;user32;kernel32;mingw32;moldname;mingwex]
implicit dirs: [D:/mingw-llvm/i686-w64-mingw32/lib;D:/mingw-llvm/lib;D:/mingw-llvm/i686-w64-mingw32/sys-root/mingw/lib]
implicit fwks: []
Detecting C [-std=c11] compiler features compiled with the following output:
Change Dir: D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp
Run Build Command(s):E:/msys64/usr/bin/make.exe cmTC_da0ec/fast
/usr/bin/make -f CMakeFiles/cmTC_da0ec.dir/build.make CMakeFiles/cmTC_da0ec.dir/build
make[1]: Entering directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_da0ec.dir/feature_tests.c.obj
/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -std=c11 -o CMakeFiles/cmTC_da0ec.dir/feature_tests.c.obj -c /D/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/feature_tests.c
Linking C executable cmTC_da0ec.exe
/C/CMake/bin/cmake.exe -E remove -f CMakeFiles/cmTC_da0ec.dir/objects.a
/D/mingw-llvm/bin/llvm-ar cr CMakeFiles/cmTC_da0ec.dir/objects.a @CMakeFiles/cmTC_da0ec.dir/objects1.rsp
/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -Wl,--whole-archive CMakeFiles/cmTC_da0ec.dir/objects.a -Wl,--no-whole-archive -o cmTC_da0ec.exe -Wl,--out-implib,libcmTC_da0ec.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/cmTC_da0ec.dir/linklibs.rsp
make[1]: Leaving directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:1c_static_assert
Feature record: C_FEATURE:1c_variadic_macros
Detecting C [-std=c99] compiler features compiled with the following output:
Change Dir: D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp
Run Build Command(s):E:/msys64/usr/bin/make.exe cmTC_b463f/fast
/usr/bin/make -f CMakeFiles/cmTC_b463f.dir/build.make CMakeFiles/cmTC_b463f.dir/build
make[1]: Entering directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b463f.dir/feature_tests.c.obj
/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -std=c99 -o CMakeFiles/cmTC_b463f.dir/feature_tests.c.obj -c /D/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/feature_tests.c
Linking C executable cmTC_b463f.exe
/C/CMake/bin/cmake.exe -E remove -f CMakeFiles/cmTC_b463f.dir/objects.a
/D/mingw-llvm/bin/llvm-ar cr CMakeFiles/cmTC_b463f.dir/objects.a @CMakeFiles/cmTC_b463f.dir/objects1.rsp
/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -Wl,--whole-archive CMakeFiles/cmTC_b463f.dir/objects.a -Wl,--no-whole-archive -o cmTC_b463f.exe -Wl,--out-implib,libcmTC_b463f.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/cmTC_b463f.dir/linklibs.rsp
make[1]: Leaving directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:0c_static_assert
Feature record: C_FEATURE:1c_variadic_macros
Detecting C [-std=c90] compiler features compiled with the following output:
Change Dir: D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp
Run Build Command(s):E:/msys64/usr/bin/make.exe cmTC_15bd5/fast
/usr/bin/make -f CMakeFiles/cmTC_15bd5.dir/build.make CMakeFiles/cmTC_15bd5.dir/build
make[1]: Entering directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_15bd5.dir/feature_tests.c.obj
/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -std=c90 -o CMakeFiles/cmTC_15bd5.dir/feature_tests.c.obj -c /D/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/feature_tests.c
Linking C executable cmTC_15bd5.exe
/C/CMake/bin/cmake.exe -E remove -f CMakeFiles/cmTC_15bd5.dir/objects.a
/D/mingw-llvm/bin/llvm-ar cr CMakeFiles/cmTC_15bd5.dir/objects.a @CMakeFiles/cmTC_15bd5.dir/objects1.rsp
/D/mingw-llvm/bin/i686-w64-mingw32-clang.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -Wl,--whole-archive CMakeFiles/cmTC_15bd5.dir/objects.a -Wl,--no-whole-archive -o cmTC_15bd5.exe -Wl,--out-implib,libcmTC_15bd5.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/cmTC_15bd5.dir/linklibs.rsp
make[1]: Leaving directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:0c_restrict
Feature record: C_FEATURE:0c_static_assert
Feature record: C_FEATURE:0c_variadic_macros
`
CMakeError.log:
`Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: D:/mingw-llvm/bin/i686-w64-mingw32-clang++.exe
Build flags: -Wno-dll-attribute-on-redeclaration;-O2;-I/d/ffbuild/llvm/llvm-mingw/libcxx/include
Id flags:
The output was:
1
lld: error: unable to find library -lc++
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
Detecting CXX compiler ABI info failed to compile with the following output:
Change Dir: D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp
Run Build Command(s):E:/msys64/usr/bin/make.exe cmTC_48a15/fast
/usr/bin/make -f CMakeFiles/cmTC_48a15.dir/build.make CMakeFiles/cmTC_48a15.dir/build
make[1]: Entering directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_48a15.dir/CMakeCXXCompilerABI.cpp.obj
/D/mingw-llvm/bin/i686-w64-mingw32-clang++.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -v -o CMakeFiles/cmTC_48a15.dir/CMakeCXXCompilerABI.cpp.obj -c /C/CMake/share/cmake-3.14/Modules/CMakeCXXCompilerABI.cpp
clang version 9.0.0 (trunk)
Target: i686-w64-windows-gnu
Thread model: posix
InstalledDir: D:\mingw-llvm\bin
D:/mingw-llvm/bin/clang-9.exe -cc1 -triple i686-w64-windows-gnu -emit-obj -disable-free -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -v -coverage-notes-file D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_48a15.dir/CMakeCXXCompilerABI.cpp.gcno -resource-dir D:/mingw-llvm/lib/clang/9.0.0 -I D:/ffbuild/llvm/llvm-mingw/libcxx/include -internal-isystem D:/mingw-llvm/i686-w64-mingw32/include/c++/v1 -internal-isystem D:/mingw-llvm/include/c++/v1 -internal-isystem D:/mingw-llvm/lib/clang/9.0.0/include -internal-isystem D:/mingw-llvm/i686-w64-mingw32/include -internal-isystem D:/mingw-llvm/include -O2 -Wno-dll-attribute-on-redeclaration -fdeprecated-macro -fdebug-compilation-dir D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fsjlj-exceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o CMakeFiles/cmTC_48a15.dir/CMakeCXXCompilerABI.cpp.obj -x c++ C:/CMake/share/cmake-3.14/Modules/CMakeCXXCompilerABI.cpp -faddrsig
clang -cc1 version 9.0.0 based upon LLVM 9.0.0svn default target x86_64-w64-mingw32
ignoring nonexistent directory "D:\mingw-llvm\i686-w64-mingw32\include\c++\v1"
ignoring nonexistent directory "D:\mingw-llvm\include\c++\v1"
#include "..." search starts here:
#include <...> search starts here:
D:/ffbuild/llvm/llvm-mingw/libcxx/include
D:/mingw-llvm/lib/clang/9.0.0/include
D:/mingw-llvm/i686-w64-mingw32/include
D:/mingw-llvm/include
End of search list.
Linking CXX executable cmTC_48a15.exe
/C/CMake/bin/cmake.exe -E remove -f CMakeFiles/cmTC_48a15.dir/objects.a
/D/mingw-llvm/bin/llvm-ar cr CMakeFiles/cmTC_48a15.dir/objects.a @CMakeFiles/cmTC_48a15.dir/objects1.rsp
/D/mingw-llvm/bin/i686-w64-mingw32-clang++.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -v -Wl,--whole-archive CMakeFiles/cmTC_48a15.dir/objects.a -Wl,--no-whole-archive -o cmTC_48a15.exe -Wl,--out-implib,libcmTC_48a15.dll.a -Wl,--major-image-version,0,--minor-image-version,0
clang version 9.0.0 (trunk)
Target: i686-w64-windows-gnu
Thread model: posix
InstalledDir: D:\mingw-llvm\bin
D:/mingw-llvm/bin/ld.lld -m i386pe -Bdynamic -o cmTC_48a15.exe D:/mingw-llvm/i686-w64-mingw32/lib/crt2.o D:/mingw-llvm/i686-w64-mingw32/lib/crtbegin.o -LD:/mingw-llvm/i686-w64-mingw32/lib -LD:/mingw-llvm/lib -LD:/mingw-llvm/i686-w64-mingw32/sys-root/mingw/lib --whole-archive CMakeFiles/cmTC_48a15.dir/objects.a --no-whole-archive --out-implib libcmTC_48a15.dll.a --major-image-version 0 --minor-image-version 0 -lc++ -lmingw32 D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 D:/mingw-llvm/lib/clang/9.0.0/lib/windows/libclang_rt.builtins-i386.a -lmoldname -lmingwex -lmsvcrt D:/mingw-llvm/i686-w64-mingw32/lib/crtend.o
lld: error: unable to find library -lc++
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [CMakeFiles/cmTC_48a15.dir/build.make:89: cmTC_48a15.exe] Error 1
make[1]: Leaving directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_48a15/fast] Error 2
Detecting CXX [-std=c++2a] compiler features failed to compile with the following output:
Change Dir: D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp
Run Build Command(s):E:/msys64/usr/bin/make.exe cmTC_5539b/fast
/usr/bin/make -f CMakeFiles/cmTC_5539b.dir/build.make CMakeFiles/cmTC_5539b.dir/build
make[1]: Entering directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_5539b.dir/feature_tests.cxx.obj
/D/mingw-llvm/bin/i686-w64-mingw32-clang++.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -std=c++2a -o CMakeFiles/cmTC_5539b.dir/feature_tests.cxx.obj -c /D/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_5539b.exe
/C/CMake/bin/cmake.exe -E remove -f CMakeFiles/cmTC_5539b.dir/objects.a
/D/mingw-llvm/bin/llvm-ar cr CMakeFiles/cmTC_5539b.dir/objects.a @CMakeFiles/cmTC_5539b.dir/objects1.rsp
/D/mingw-llvm/bin/i686-w64-mingw32-clang++.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -Wl,--whole-archive CMakeFiles/cmTC_5539b.dir/objects.a -Wl,--no-whole-archive -o cmTC_5539b.exe -Wl,--out-implib,libcmTC_5539b.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/cmTC_5539b.dir/linklibs.rsp
lld: error: unable to find library -lc++
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [CMakeFiles/cmTC_5539b.dir/build.make:90: cmTC_5539b.exe] Error 1
make[1]: Leaving directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_5539b/fast] Error 2
Performing C++ SOURCE FILE Test LLVM_LIBSTDCXX_MIN failed with the following output:
Change Dir: D:/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp
Run Build Command(s):E:/msys64/usr/bin/make.exe cmTC_f5bf3/fast
/usr/bin/make -f CMakeFiles/cmTC_f5bf3.dir/build.make CMakeFiles/cmTC_f5bf3.dir/build
make[1]: Entering directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_f5bf3.dir/src.cxx.obj
/D/mingw-llvm/bin/i686-w64-mingw32-clang++.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -DLLVM_LIBSTDCXX_MIN -std=c++0x -o CMakeFiles/cmTC_f5bf3.dir/src.cxx.obj -c /D/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_f5bf3.exe
/C/CMake/bin/cmake.exe -E remove -f CMakeFiles/cmTC_f5bf3.dir/objects.a
/D/mingw-llvm/bin/llvm-ar cr CMakeFiles/cmTC_f5bf3.dir/objects.a @CMakeFiles/cmTC_f5bf3.dir/objects1.rsp
/D/mingw-llvm/bin/i686-w64-mingw32-clang++.exe -Wno-dll-attribute-on-redeclaration -O2 -I/d/ffbuild/llvm/llvm-mingw/libcxx/include -DLLVM_LIBSTDCXX_MIN -std=c++0x -Wl,--whole-archive CMakeFiles/cmTC_f5bf3.dir/objects.a -Wl,--no-whole-archive -o cmTC_f5bf3.exe -Wl,--out-implib,libcmTC_f5bf3.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/cmTC_f5bf3.dir/linklibs.rsp
lld: error: unable to find library -lc++
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [CMakeFiles/cmTC_f5bf3.dir/build.make:90: cmTC_f5bf3.exe] Error 1
make[1]: Leaving directory '/d/ffbuild/llvm/llvm-mingw/libunwind/build-i686-static/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_f5bf3/fast] Error 2
Source file was:
#include
#if defined(GLIBCXX)
#if GLIBCXX < 20130322
#error Unsupported libstdc++ version
#endif
#endif
#if defined(GLIBCXX)
extern const char _ZNKSt17bad_function_call4whatEv[];
const char *chk = _ZNKSt17bad_function_call4whatEv;
#else
const char *chk = "";
#endif
int main() { ++chk; return 0; }
`
Seemingly, clang cannot find libc++, even when building libc++ itself. What shoul I do now?
Note: Why we not building libunwind always static and link it into libc++ shared?