Конан создает проект cpp, используя gcc в WindowsC++

Программы на C++. Форум разработчиков
Ответить
Anonymous
 Конан создает проект cpp, используя gcc в Windows

Сообщение Anonymous »

Мне было трудно заставить conan создать проект с использованием gcc на моем компьютере с Windows.
Это то, что у меня сейчас есть в моем профиле conan.

Код: Выделить всё

toolchain=F:/tools/msys2/mingw64/bin
target_host=x86_64-w64-mingw32
cc_compiler=gcc
cxx_compiler=g++

[env]
CONAN_CMAKE_FIND_ROOT_PATH=$toolchain
CHOST=$target_host
AR=$target_host-ar
AS=$target_host-as
RANLIB=$target_host-ranlib
CC=$target_host-$cc_compiler
CXX=$target_host-$cxx_compiler
STRIP=$target_host-strip
RC=$target_host-windres

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
build_type=Release
compiler.libcxx=libstdc++11
compiler.cppstd=20
compiler.version=11.2
[options]
[build_requires]
[env]
CC=F:/tools/msys2/mingw64/bin/gcc
CXX=F:/tools/msys2/mingw64/bin/g++
До того, как попробовать ниндзя и Конана. Я скомпилировал с использованием gcc без проблем с кодом clion или vs.
Это просто не работает. Судя по ошибке и моим настройкам, чего мне не хватает?
Ошибка, которую я получаю, приведена ниже.

Код: Выделить всё

Consolidate compiler generated dependencies of target zlibstatic
[100%] Built target zlibstatic
Install the project...
-- Install configuration: "Release"
-- Installing: C:/Users/Ruslan/.conan/data/zlib/1.2.11/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14/lib/libzlibstatic.a
-- Installing: C:/Users/Ruslan/.conan/data/zlib/1.2.11/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14/include/zconf.h
-- Installing: C:/Users/Ruslan/.conan/data/zlib/1.2.11/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14/include/zlib.h
zlib/1.2.11 package(): Packaged 2 '.h' files: zconf.h, zlib.h
zlib/1.2.11 package(): Packaged 1 '.a' file: libzlib.a
zlib/1.2.11 package(): Packaged 1 file: LICENSE
zlib/1.2.11: Package 'd846067d59c3b90a9880f5caaf4b040d4f30bf14' created
zlib/1.2.11: Created package revision 281d3c2cde56d66bef4dac5d2b0c380d
boost/1.77.0: Applying build-requirement: b2/4.7.1
Downloading conan_sources.tgz
boost/1.77.0: Configuring sources in C:\.conan\be116f\1

boost/1.77.0: Building your package in C:\.conan\b56bd8\1
boost/1.77.0: Generator txt created conanbuildinfo.txt
boost/1.77.0: Aggregating env generators
boost/1.77.0: Calling build()
notice: found boost-build.jam at C:/.conan/be116f/1/source_subfolder/boost-build.jam
notice: loading B2 from C:/.conan/be116f/1/source_subfolder/tools/build/src/bootstrap.jam
warning: mismatched versions of B2 engine and core
warning: B2 engine (b2.exe) is 4.7.1
warning: B2 core (at C:/.conan/be116f/1/source_subfolder/tools/build/src) is 4.6-git
notice: Searching 'C:\Users\Ruslan' 'C:\Users\Ruslan' 'C:\Users\Ruslan' 'C:/.conan/be116f/1/source_subfolder/tools/build/src' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/kernel' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/util' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/build' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/tools' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/contrib' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/.' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in 'C:\Users\Ruslan' 'C:\Users\Ruslan' 'C:\Users\Ruslan' 'C:/.conan/be116f/1/source_subfolder/tools/build/src' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/kernel' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/util' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/build' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/tools' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/contrib' 'C:/.conan/be116f/1/source_subfolder/tools/build/src/.'.
notice: Loading explicitly specified user configuration file:
C:\.conan\be116f\1\source_subfolder\tools\build\user-config.jam
notice: Searching 'C:\.conan\be116f\1\source_subfolder\tools\build' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'C:/.conan/be116f/1/source_subfolder/tools/build'.
notice: [zlib] Using pre-installed library
notice: [zlib] Condition
notice: [bzip2] Using pre-installed library
notice: [bzip2] Condition
notice: will use 'F:/tools/msys2/mingw64/bin/g++' for gcc, condition gcc-11
notice: using gcc libraries :: gcc-11 :: F:/tools/msys2/mingw64/bin F:/tools/msys2/mingw64/lib F:/tools/msys2/mingw64/lib32 F:/tools/msys2/mingw64/lib64
notice: using gcc archiver :: gcc-11 :: F:/tools/msys2/mingw64/x86_64-w64-mingw32/bin/ar.exe
notice: using gcc ranlib :: gcc-11 :: F:/tools/msys2/mingw64/x86_64-w64-mingw32/bin/ranlib.exe
notice: using rc compiler :: gcc-11 :: F:\tools\msys2\mingw64\bin\windres.exe
notice: [zlib] zlib is already configured
notice: [bzip2] bzip is already configured
notice: iostreams: not using lzma compression
notice: iostreams: not using zstd compression
notice: [python-cfg] Configuring python...
notice: [python-cfg] Checking interpreter command "python"...
notice: [python-cfg] running command 'DIR /-C /A:S "F:\tools\msys2\mingw64\bin\python.exe" 2>&1'
notice: [python-cfg] running command 'python -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))"  2>&1'
notice: [python-cfg] ...requested configuration matched!
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg]   interpreter command: "python"
notice: [python-cfg]   include path: "F:/tools/msys2/mingw64\Include"
notice: [python-cfg]   library path: "F:/tools/msys2/mingw64\libs"
notice: [python-cfg]   DLL search path: "F:/tools/msys2/mingw64"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command 'python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"'
notice: [python-cfg] NumPy disabled.  Reason:
notice: [python-cfg]   python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"  aborted with
notice: [python-cfg]   Traceback (most recent call last):
File "", line 1, in 
ModuleNotFoundError: No module named 'numpy'
Performing configuration checks

- default address-model    : 64-bit [1]
- default architecture     : x86 [1]
- compiler supports SSE2   : yes [2]
- compiler supports SSE4.1 : yes [2]
- has synchronization.lib  : yes [2]
- has std::atomic_ref      : yes [2]
- has statx                : no [2]
- has statx syscall        : no [2]
- has BCrypt API           : yes [2]
- has init_priority attribute : yes [2]
- has stat::st_blksize     : no [2]
- has stat::st_mtim        : no [2]
- has stat::st_mtimensec   : no [2]
- has stat::st_mtimespec   : no [2]
- has stat::st_birthtim    : no [2]
- has stat::st_birthtimensec : no [2]
- has stat::st_birthtimespec : no [2]
- cxx11_auto_declarations  : yes [2]
- cxx11_constexpr          : yes [2]
- cxx11_defaulted_functions : yes [2]
- cxx11_final              : yes [2]
- cxx11_hdr_mutex          : yes [2]
- cxx11_hdr_tuple          : yes [2]
- cxx11_lambdas            : yes [2]
- cxx11_noexcept           : yes [2]
- cxx11_nullptr            : yes [2]
- cxx11_rvalue_references  : yes [2]
- cxx11_template_aliases   : yes [2]
- cxx11_thread_local       : yes [2]
- cxx11_variadic_templates : yes [2]
- has_icu builds           : no [2]
- zlib                     : yes [3]
- bzip2                    : yes [3]
- cxx11_decltype           : yes [2]
- cxx11_basic_alignas      : yes [2]
- native atomic int32 supported : yes [2]
- has message compiler     : no [2]
- native syslog supported  : no [2]
- pthread supports robust mutexes : no [2]
- compiler supports SSSE3  : yes [2]
- compiler supports AVX2   : yes [2]
- gcc visibility           : yes [2]
- sfinae_expr              : yes [2]
- cxx11_unified_initialization_syntax : yes [2]
- cxx11_hdr_initializer_list : yes [2]
- cxx11_hdr_chrono         : yes [2]
- cxx11_numeric_limits     : yes [2]
- cxx11_hdr_array          : yes [2]
- cxx11_hdr_atomic         : yes [2]
- cxx11_hdr_type_traits    : yes [2]
- cxx11_allocator          : yes [2]
- cxx11_explicit_conversion_operators : yes [2]
- gcc visibility           : yes [4]
- cxx11_noexcept           : yes [4]
- cxx11_rvalue_references  : yes [4]
- sfinae_expr              : yes [4]
- cxx11_auto_declarations  : yes [4]
- cxx11_lambdas            : yes [4]
- cxx11_unified_initialization_syntax : yes [4]
- cxx11_hdr_tuple          : yes [4]
- cxx11_hdr_initializer_list : yes [4]
- cxx11_hdr_chrono         : yes [4]
- cxx11_thread_local       : yes [4]
- cxx11_constexpr          : yes [4]
- cxx11_nullptr            : yes [4]
- cxx11_numeric_limits     : yes [4]
- cxx11_decltype           : yes [4]
- cxx11_hdr_array          : yes [4]
- cxx11_hdr_atomic         : yes [4]
- cxx11_hdr_type_traits    : yes [4]
- cxx11_allocator          : yes [4]
- cxx11_explicit_conversion_operators : yes [4]
- long double support      : yes [4]
- cxx11_static_assert      : yes [2]
- std::fstream is moveable and swappable : yes [2]
- Has Large File Support   : yes [2]
- Has attribute init_priority : yes [2]
- libbacktrace builds      : no [2]
- libbacktrace builds      : no [5]
- addr2line builds         : no [2]
- addr2line builds         : no [5]
- WinDbg builds            : yes [2]
- WinDbg builds            : yes [5]
- WinDbgCached builds      : yes [2]
- BOOST_COMP_GNUC >= 4.3.0 : yes [2]

[1] gcc-11
[2] gcc-11/rls/bst.l-off/bst.l-off/lnk-sttc/nm-on/pythn-3.9/thrdp-wn32/thrd-mlt/vsblt-hdn
[3] lnk-sttc
[4] gcc-11/rls/bst.l-off/bst.l-off/lnk-sttc/nm-on/pch-off/pythn-3.9/thrdp-wn32/thrd-mlt/vsblt-hdn
[5] gcc-11/rls/bst.l-off/bst.l-off/bld-no/lnk-sttc/nm-on/pythn-3.9/thrdp-wn32/thrd-mlt/vsblt-hdn

Component configuration:

- atomic                   : building
- chrono                   : building
- container                : building
- context                  : building
- contract                 : building
- coroutine                : building
- date_time                : building
- exception                :  building
- fiber                    : building
- filesystem               : building
- graph                    : building
- graph_parallel           : not building
- headers                  : not building
- iostreams                : building
- json                     : building
- locale                   : building
- log                      : building
- math                     : building
- mpi                      : not building
- nowide                   : building
- program_options          : building
- python                   : not building
- random                   : building
- regex                    : building
- serialization            : building
- stacktrace               : building
- system                   : building
- test                     : building
- thread                   : building
- timer                    : building
- type_erasure             : building
- wave                     : building

...failed updating 2 targets...
boost/1.77.0:
WARN: replace_in_file didn't find pattern '/* thread_local */' in 'C:\.conan\be116f\1\source_subfolder\boost\stacktrace\detail\libbacktrace_impls.hpp' file.
WARN: replace_in_file didn't find pattern '/* static __thread */' in 'C:\.conan\be116f\1\source_subfolder\boost\stacktrace\detail\libbacktrace_impls.hpp' file.
boost/1.77.0: WARN: Patching user-config.jam
boost/1.77.0: WARN:
using zlib : 1.2.11 : "C:/Users/Ruslan/.conan/data/zlib/1.2.11/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14/include" "C:/Users/Ruslan/.conan/data/zlib/1.2.11/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14/lib" zlib ;
using bzip2 : 1.0.8 : "C:/Users/Ruslan/.conan/data/bzip2/1.0.8/_/_/package/07f1212a082286f0a4860450e86ce4aca0317e05/include" "C:/Users/Ruslan/.conan/data/bzip2/1.0.8/_/_/package/07f1212a082286f0a4860450e86ce4aca0317e05/lib" bz2 ;
using "gcc" :  :  F:/tools/msys2/mingw64/bin/g++ :
;
boost/1.77.0: WARN: b2.exe -q numa=on target-os=windows architecture=x86 address-model=64 binary-format=pe abi=ms --layout=system --user-config=C:\.conan\be116f\1\source_subfolder\tools\build\user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=off --disable-iconv threading=multi visibility=hidden link=static variant=release --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave toolset=gcc cxxflags=-std=c++2a define=_GLIBCXX_USE_CXX11_ABI=1 pch=on  cxxflags="-fPIC" install --prefix=C:\.conan\bbf755\1 -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="C:\.conan\b56bd8\1"
boost/1.77.0: ERROR: Package '6c2d1fff171f1115008f92b1231de7ab8ab916fc' build failed
boost/1.77.0: WARN: Build folder C:\.conan\b56bd8\1
ERROR: boost/1.77.0: Error in build() method, line 837
self.run(full_command, run_environment=True)
ConanException: Error 1 while executing b2.exe -q numa=on target-os=windows architecture=x86 address-model=64 binary-format=pe abi=ms --layout=system --user-config=C:\.conan\be116f\1\source_subfolder\tools\build\user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=off --disable-iconv threading=multi visibility=hidden link=static variant=release --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave toolset=gcc cxxflags=-std=c++2a define=_GLIBCXX_USE_CXX11_ABI=1 pch=on  cxxflags="-fPIC"  install --prefix=C:\.conan\bbf755\1 -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="C:\.conan\b56bd8\1"
Когда я запускаю неудачную команду b2 вручную из терминала, я получаю следующий вывод (ошибка)

Код: Выделить всё

notice: found boost-build.jam at C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/kernel/boost-build.jam
notice: loading B2 from C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/kernel/bootstrap.jam
notice: Searching 'C:\WINDOWS' 'C:\Users\Ruslan' 'C:\Users\Ruslan' 'C:\Users\Ruslan' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/kernel' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/kernel' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/util' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/build' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/tools' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/contrib' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/.' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in 'C:\WINDOWS' 'C:\Users\Ruslan' 'C:\Users\Ruslan' 'C:\Users\Ruslan' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/kernel' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/kernel' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/util' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/build' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/tools' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/contrib' 'C:/Users/Ruslan/.conan/data/b2/4.7.1/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/bin/.b2/.'.
notice: Loading explicitly specified user configuration file:
C:\.conan\be116f\1\source_subfolder\tools\build\user-config.jam
notice: Searching 'C:\.conan\be116f\1\source_subfolder\tools\build' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'C:/.conan/be116f/1/source_subfolder/tools/build'.
notice: [zlib] Using pre-installed library
notice: [zlib] Condition
notice: [bzip2] Using pre-installed library
notice: [bzip2] Condition
notice: will use 'F:/tools/msys2/mingw64/bin/g++' for gcc, condition gcc-11
notice: using gcc libraries :: gcc-11 :: F:/tools/msys2/mingw64/bin F:/tools/msys2/mingw64/lib F:/tools/msys2/mingw64/lib32 F:/tools/msys2/mingw64/lib64
notice: using gcc archiver :: gcc-11 :: F:/tools/msys2/mingw64/x86_64-w64-mingw32/bin/ar.exe
notice: using rc compiler :: gcc-11 :: F:\tools\msys2\mingw64\bin\windres.exe
notice: assuming it is a name of file to create.
notice: could not find main target install
notice: assuming it is a name of file to create.
error: Project target requested but not yet assigned for module 'Jamfile'.
Я не понимаю, что означает не назначена цель проекта?


Подробнее здесь: https://stackoverflow.com/questions/712 ... on-windows
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C++»