Я пытаюсь установить библиотеку tbb
в Windows с помощью компилятора MinGW C++ g++
и менеджера пакетов vcpkg
. Однако запуск .\vcpkg install tbb --triplet=x64-mingw-static --host-triplet=x64-mingw-static
выдает следующую ошибку:
The C++ compiler "C:/msys64/mingw64/bin/x86_64-w64-mingw32-g++.exe" is not able to compile a simple test program.
Есть ли у кого-нибудь идеи, как решить эту проблему?
Отчет об ошибках GitHub: https://github.com/microsoft/vcpkg/issues/40664
Вывод .\vcpkg --version
в C:\Users\<user>\vcpkg
:
vcpkg package management program version 2024-08-01-fd884a0d390d12783076341bd43d77c3a6a15658
See LICENSE.txt for license information.
Вывод .\g++ --version
в C:\msys64\mingw64\bin
:
g++ (Rev3, Built by MSYS2 project) 14.1.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Вывод .\x86_64-w64-mingw32-g++.exe --version
в C:\msys64\mingw64\bin
:
x86_64-w64-mingw32-g++.exe (Rev3, Built by MSYS2 project) 14.1.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Вывод .\vcpkg install tbb --triplet=x64-mingw-static --host-triplet=x64-mingw-static
в C:\Users\<user>\vcpkg
:
Computing installation plan...
The following packages will be built and installed:
tbb:[email protected]
Detecting compiler hash for triplet x64-mingw-static...
Compiler found: C:/msys64/mingw64/bin/x86_64-w64-mingw32-g++.exe
Restored 0 package(s) from C:\Users\<user>\AppData\Local\vcpkg\archives in 226 us. Use --debug to see more details.
Installing 1/1 tbb:[email protected]...
Building tbb:[email protected]...
C:\Users\<user>\vcpkg\triplets\community\x64-mingw-static.cmake: info: loaded community triplet from here. Community triplets are not built in the curated registry and are thus less likely to succeed.
-- Using cached oneapi-src-oneTBB-v2021.13.0.tar.gz.
-- Cleaning sources at C:/Users/<user>/vcpkg/buildtrees/tbb/src/v2021.13.0-c5ed208c36.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/<user>/vcpkg/downloads/oneapi-src-oneTBB-v2021.13.0.tar.gz
-- Using source at C:/Users/<user>/vcpkg/buildtrees/tbb/src/v2021.13.0-c5ed208c36.clean
-- Configuring x64-mingw-static
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
Command failed: C:/Users/<user>/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe -v
Working Directory: C:/Users/<user>/vcpkg/buildtrees/tbb/x64-mingw-static-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
C:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-dbg-CMakeCache.txt.log
C:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-rel-CMakeCache.txt.log
C:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-dbg-CMakeConfigureLog.yaml.log
C:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-rel-CMakeConfigureLog.yaml.log
C:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-out.log
Call Stack (most recent call first):
installed/x64-mingw-static/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:269 (vcpkg_execute_required_process)
ports/tbb/portfile.cmake:17 (vcpkg_cmake_configure)
scripts/ports.cmake:192 (include)
error: building tbb:x64-mingw-static failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle tbb:x64-mingw-static: 6.3 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+tbb
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[tbb]+Build+error+on+x64-mingw-static&body=Copy+issue+body+from+C%3A%2FUsers%2F<user>%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
Вот файлы журналов:
C:/Users/<user>/vcpkg/installed/vcpkg/issue_body.md
https://pastebin.com/KGhPaR1rC:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-rel-CMakeConfigureLog.yaml.log
https://pastebin.com/CM3kysi8C:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-rel-CMakeCache.txt.log
https://pastebin.com/bkJkstb2C:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-out.log
https://pastebin.com/GkbrQwYsC:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-dbg-CMakeConfigureLog.yaml.log
https://pastebin.com/UZDx7WntC:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-dbg-CMakeCache.txt.log
https://pastebin.com/qgDL3vJcСоответствующая часть C:\Users\<user>\vcpkg\buildtrees\tbb\config-x64-mingw-static-out.log
выглядит следующим образом:
-- The CXX compiler identification is GNU 14.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/msys64/mingw64/bin/x86_64-w64-mingw32-g++.exe
-- Check for working CXX compiler: C:/msys64/mingw64/bin/x86_64-w64-mingw32-g++.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.30/Modules/CMakeTestCXXCompiler.cmake:73 (message):
The C++ compiler
"C:/msys64/mingw64/bin/x86_64-w64-mingw32-g++.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: 'C:/Users/<user>/vcpkg/buildtrees/tbb/x64-mingw-static-rel/CMakeFiles/CMakeScratch/TryCompile-cvmmjb'
Run Build Command(s): C:/Users/<user>/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe -v cmTC_ef730
[1/2] C:\msys64\mingw64\bin\x86_64-w64-mingw32-g++.exe -o CMakeFiles/cmTC_ef730.dir/testCXXCompiler.cxx.obj -c C:/Users/<user>/vcpkg/buildtrees/tbb/x64-mingw-static-rel/CMakeFiles/CMakeScratch/TryCompile-cvmmjb/testCXXCompiler.cxx
[2/2] C:\WINDOWS\system32\cmd.exe /C "cd . && C:\msys64\mingw64\bin\x86_64-w64-mingw32-g++.exe CMakeFiles/cmTC_ef730.dir/testCXXCompiler.cxx.obj -o cmTC_ef730.exe -Wl,--out-implib,libcmTC_ef730.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
FAILED: cmTC_ef730.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\msys64\mingw64\bin\x86_64-w64-mingw32-g++.exe CMakeFiles/cmTC_ef730.dir/testCXXCompiler.cxx.obj -o cmTC_ef730.exe -Wl,--out-implib,libcmTC_ef730.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
Das System kann den angegebenen Pfad nicht finden.
ninja: build stopped: subcommand failed.
Основная ошибка, видимо,
Das System kann den angegebenen Pfad nicht finden.
что буквально переводится как
The system cannot find the path specified.
Однако я не знаю, о каком пути идет речь. Как показано выше, файл C:\msys64\mingw64\bin\x86_64-w64-mingw32-g++.exe
существует.
@AlanBirtles Спасибо за ваш комментарий. Я добавил соответствующую часть журнала в сообщение. Как вы сказали, соответствующая ошибка, похоже, The system cannot find the path specified.
. Насколько я понимаю, это не относится к пути компилятора, поскольку, как показано выше, компилятор действительно существует в этом месте. Я не понимаю, о каком еще файле может идти речь.
Мне удалось решить вопрос, удалив следующие записи реестра:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
Следующие вопросы кажутся связанными:
Das System kann den angegebenen Pfad nicht finden.
— это ошибка. Путь компилятора правильный? Пожалуйста, разместите всю соответствующую информацию в вопросе, не полагаясь на внешние ссылки.