sssssssssssssssssss...........................F.......Fs................ [ 9%] ......ss.........................................F........s..s.......s.. [ 19%] ............................ss......F...........ssss...F....ssssssssssss [ 28%] sssss.F.......FssssF....F.......F......ssssssssssssssssssssssF...Fsss..s [ 38%] ss.ss.x....s..s...sssss...ssss.ss..FF.ss.FssssssF...s....s..ssss..s..sss [ 48%] .s.sss.s..s.sF.sss..s...s.s..s.s...ssssss....ssssssssssssssssss.FFE.s.ss [ 57%] ss.s.sssssss.....F.......EFsEsssssssEE.F..FFFFFF.F..FFss.....F......EEE. [ 67%] EF..Fs...F...s...........F....sss.........E....s...ss....Fsss.FFF.sFF.Fs [ 77%] sssssF....ss.ssssss.F..F..s.sxssssssssssssssssssssssssss.......sss.sssss [ 86%] ssssssss..............................s........sssss.s...............F.s [ 96%] .s.....ssssss...s..sssssssss [100%] ==================================== ERRORS ==================================== ______________________ ERROR at setup of test_aggregator _______________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python _matrix_client = @pytest.fixture(scope="session") def _transitive_libraries(_matrix_client): """ engine/1.0->matrix/1.0 """ c = TestClient() c.cache_folder = os.path.join(temp_folder(), ".conan2") shutil.copytree(_matrix_client.cache_folder, c.cache_folder) c.save({}, clean_first=True) c.run("new cmake_lib -d name=engine -d version=1.0 -d requires=matrix/1.0") # create both static and shared > c.run("create . -tf=") conans/test/functional/toolchains/conftest.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -tf=', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nException: engine/1.0: Error in build() method, line 45\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -tf= E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E engine/1.0: Exporting package recipe: /tmp/tmpf8xosybeconans/path with spaces/conanfile.py E engine/1.0: Copied 1 '.py' file: conanfile.py E engine/1.0: Copied 1 '.txt' file: CMakeLists.txt E engine/1.0: Copied 1 '.cpp' file: engine.cpp E engine/1.0: Copied 1 '.h' file: engine.h E engine/1.0: Exported to cache folder: /tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/engincdf45cc1fe758/e E engine/1.0: Exported: engine/1.0#bb0a12461706725fc6595fb4f5e53dfb (2024-04-16 13:17:04 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E engine/1.0#bb0a12461706725fc6595fb4f5e53dfb - Cache E matrix/1.0#0fd6ccef90970c84ccacf46c59c6cc74 - Cache E E ======== Computing necessary packages ======== E engine/1.0: Forced build from source E Requirements E engine/1.0#bb0a12461706725fc6595fb4f5e53dfb:18f0ebc172869f8064e88a7c222fc01162dd815b - Build E matrix/1.0#0fd6ccef90970c84ccacf46c59c6cc74:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#cded365c0fba7b5de99c3aedf349bc88 - Cache E E ======== Installing packages ======== E matrix/1.0: Already installed! (1 of 2) E E -------- Installing package engine/1.0 (2 of 2) -------- E engine/1.0: Building from source E engine/1.0: Package engine/1.0:18f0ebc172869f8064e88a7c222fc01162dd815b E engine/1.0: Copying sources to build folder E engine/1.0: Building your package in /tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b E engine/1.0: Calling generate() E engine/1.0: Generators folder: /tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b/build/Release/generators E engine/1.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(matrix) E target_link_libraries(... matrix::matrix) E engine/1.0: CMakeToolchain generated: conan_toolchain.cmake E engine/1.0: CMakeToolchain generated: /tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b/build/Release/generators/CMakePresets.json E engine/1.0: CMakeToolchain generated: /tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b/CMakeUserPresets.json E engine/1.0: Generating aggregated env files E engine/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E engine/1.0: Calling build() E engine/1.0: Running CMake.configure() E engine/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b" E -- Using Conan toolchain: /tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'matrix::matrix' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b/build/Release E E engine/1.0: Running CMake.build() E engine/1.0: RUN: cmake --build "/tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b/build/Release" -- -j4 E Scanning dependencies of target engine E [ 50%] Building CXX object CMakeFiles/engine.dir/src/engine.cpp.o E /tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b/src/engine.cpp:3:10: fatal error: matrix.h: No such file or directory E 3 | #include "matrix.h" E | ^~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/engine.dir/build.make:63: CMakeFiles/engine.dir/src/engine.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/engine.dir/all] Error 2 E make: *** [Makefile:130: all] Error 2 E E engine/1.0: ERROR: E Package '18f0ebc172869f8064e88a7c222fc01162dd815b' build failed E engine/1.0: WARN: Build folder /tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/b/engin48bfc05eb8afe/b/build/Release E ERROR: engine/1.0: Error in build() method, line 45 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp_v6x5ockconans/path with spaces/.conan2/p/engincdf45cc1fe758/e/conanfile.py", line 45, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: engine/1.0: Error in build() method, line 45 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _______________ ERROR at setup of test_other_client_can_execute ________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.fixture(scope="module") def transitive_shared_client(): client = TestClient(default_server_user=True) client.save(pkg_cmake("hello", "0.1")) client.run("create . -o hello/*:shared=True") client.save(pkg_cmake("chat", "0.1", requires=["hello/0.1"]), clean_first=True) > client.run("create . -o chat/*:shared=True -o hello/*:shared=True") conans/test/functional/toolchains/cmake/test_shared_cmake.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -o chat/*:shared=True -o hello/*:shared=True' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nanException: chat/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -o chat/*:shared=True -o hello/*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E chat/0.1: Exporting package recipe: /tmp/tmpmqmrzxd3conans/path with spaces/conanfile.py E chat/0.1: Copied 1 '.py' file: conanfile.py E chat/0.1: Copied 1 '.txt' file: CMakeLists.txt E chat/0.1: Copied 1 '.cpp' file: chat.cpp E chat/0.1: Copied 1 '.h' file: chat.h E chat/0.1: Exported to cache folder: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/chatf7005d8881231/e E chat/0.1: Exported: chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 (2024-04-16 13:17:12 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E chat/*:shared=True E hello/*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 - Cache E hello/0.1#234bf56e60ac669e4bc4897583f19c83 - Cache E E ======== Computing necessary packages ======== E chat/0.1: Forced build from source E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123:0eaf9738e59c9117fa4ff046132a23272c3f160a - Build E hello/0.1#234bf56e60ac669e4bc4897583f19c83:0645178f9911c96e0f11d63b451090c571726042#7e3cd26dc8a386ccb9e1125339b812db - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 2) E E -------- Installing package chat/0.1 (2 of 2) -------- E chat/0.1: Building from source E chat/0.1: Package chat/0.1:0eaf9738e59c9117fa4ff046132a23272c3f160a E chat/0.1: Copying sources to build folder E chat/0.1: Building your package in /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b E chat/0.1: Writing generators to /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators E chat/0.1: Generator 'CMakeToolchain' calling 'generate()' E chat/0.1: CMakeToolchain generated: conan_toolchain.cmake E chat/0.1: CMakeToolchain generated: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators/CMakePresets.json E chat/0.1: CMakeToolchain generated: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/CMakeUserPresets.json E chat/0.1: Generator 'CMakeDeps' calling 'generate()' E chat/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E chat/0.1: Generating aggregated env files E chat/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E chat/0.1: Calling build() E chat/0.1: Running CMake.configure() E chat/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b" E -- Using Conan toolchain: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release E E chat/0.1: Running CMake.build() E chat/0.1: RUN: cmake --build "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release" -- -j4 E Scanning dependencies of target chat E [ 50%] Building CXX object CMakeFiles/chat.dir/src/chat.cpp.o E /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/src/chat.cpp:8:10: fatal error: hello.h: No such file or directory E 8 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/chat.dir/build.make:63: CMakeFiles/chat.dir/src/chat.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/chat.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E chat/0.1: ERROR: E Package '0eaf9738e59c9117fa4ff046132a23272c3f160a' build failed E chat/0.1: WARN: Build folder /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release E ERROR: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/chatf7005d8881231/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ______________ ERROR at setup of test_other_client_can_link_cmake ______________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.fixture(scope="module") def transitive_shared_client(): client = TestClient(default_server_user=True) client.save(pkg_cmake("hello", "0.1")) client.run("create . -o hello/*:shared=True") client.save(pkg_cmake("chat", "0.1", requires=["hello/0.1"]), clean_first=True) > client.run("create . -o chat/*:shared=True -o hello/*:shared=True") conans/test/functional/toolchains/cmake/test_shared_cmake.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -o chat/*:shared=True -o hello/*:shared=True' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nanException: chat/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -o chat/*:shared=True -o hello/*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E chat/0.1: Exporting package recipe: /tmp/tmpmqmrzxd3conans/path with spaces/conanfile.py E chat/0.1: Copied 1 '.py' file: conanfile.py E chat/0.1: Copied 1 '.txt' file: CMakeLists.txt E chat/0.1: Copied 1 '.cpp' file: chat.cpp E chat/0.1: Copied 1 '.h' file: chat.h E chat/0.1: Exported to cache folder: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/chatf7005d8881231/e E chat/0.1: Exported: chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 (2024-04-16 13:17:12 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E chat/*:shared=True E hello/*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 - Cache E hello/0.1#234bf56e60ac669e4bc4897583f19c83 - Cache E E ======== Computing necessary packages ======== E chat/0.1: Forced build from source E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123:0eaf9738e59c9117fa4ff046132a23272c3f160a - Build E hello/0.1#234bf56e60ac669e4bc4897583f19c83:0645178f9911c96e0f11d63b451090c571726042#7e3cd26dc8a386ccb9e1125339b812db - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 2) E E -------- Installing package chat/0.1 (2 of 2) -------- E chat/0.1: Building from source E chat/0.1: Package chat/0.1:0eaf9738e59c9117fa4ff046132a23272c3f160a E chat/0.1: Copying sources to build folder E chat/0.1: Building your package in /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b E chat/0.1: Writing generators to /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators E chat/0.1: Generator 'CMakeToolchain' calling 'generate()' E chat/0.1: CMakeToolchain generated: conan_toolchain.cmake E chat/0.1: CMakeToolchain generated: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators/CMakePresets.json E chat/0.1: CMakeToolchain generated: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/CMakeUserPresets.json E chat/0.1: Generator 'CMakeDeps' calling 'generate()' E chat/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E chat/0.1: Generating aggregated env files E chat/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E chat/0.1: Calling build() E chat/0.1: Running CMake.configure() E chat/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b" E -- Using Conan toolchain: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release E E chat/0.1: Running CMake.build() E chat/0.1: RUN: cmake --build "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release" -- -j4 E Scanning dependencies of target chat E [ 50%] Building CXX object CMakeFiles/chat.dir/src/chat.cpp.o E /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/src/chat.cpp:8:10: fatal error: hello.h: No such file or directory E 8 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/chat.dir/build.make:63: CMakeFiles/chat.dir/src/chat.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/chat.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E chat/0.1: ERROR: E Package '0eaf9738e59c9117fa4ff046132a23272c3f160a' build failed E chat/0.1: WARN: Build folder /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release E ERROR: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/chatf7005d8881231/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ______________ ERROR at setup of test_other_client_can_link_meson ______________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.fixture(scope="module") def transitive_shared_client(): client = TestClient(default_server_user=True) client.save(pkg_cmake("hello", "0.1")) client.run("create . -o hello/*:shared=True") client.save(pkg_cmake("chat", "0.1", requires=["hello/0.1"]), clean_first=True) > client.run("create . -o chat/*:shared=True -o hello/*:shared=True") conans/test/functional/toolchains/cmake/test_shared_cmake.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -o chat/*:shared=True -o hello/*:shared=True' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nanException: chat/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -o chat/*:shared=True -o hello/*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E chat/0.1: Exporting package recipe: /tmp/tmpmqmrzxd3conans/path with spaces/conanfile.py E chat/0.1: Copied 1 '.py' file: conanfile.py E chat/0.1: Copied 1 '.txt' file: CMakeLists.txt E chat/0.1: Copied 1 '.cpp' file: chat.cpp E chat/0.1: Copied 1 '.h' file: chat.h E chat/0.1: Exported to cache folder: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/chatf7005d8881231/e E chat/0.1: Exported: chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 (2024-04-16 13:17:12 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E chat/*:shared=True E hello/*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 - Cache E hello/0.1#234bf56e60ac669e4bc4897583f19c83 - Cache E E ======== Computing necessary packages ======== E chat/0.1: Forced build from source E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123:0eaf9738e59c9117fa4ff046132a23272c3f160a - Build E hello/0.1#234bf56e60ac669e4bc4897583f19c83:0645178f9911c96e0f11d63b451090c571726042#7e3cd26dc8a386ccb9e1125339b812db - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 2) E E -------- Installing package chat/0.1 (2 of 2) -------- E chat/0.1: Building from source E chat/0.1: Package chat/0.1:0eaf9738e59c9117fa4ff046132a23272c3f160a E chat/0.1: Copying sources to build folder E chat/0.1: Building your package in /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b E chat/0.1: Writing generators to /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators E chat/0.1: Generator 'CMakeToolchain' calling 'generate()' E chat/0.1: CMakeToolchain generated: conan_toolchain.cmake E chat/0.1: CMakeToolchain generated: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators/CMakePresets.json E chat/0.1: CMakeToolchain generated: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/CMakeUserPresets.json E chat/0.1: Generator 'CMakeDeps' calling 'generate()' E chat/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E chat/0.1: Generating aggregated env files E chat/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E chat/0.1: Calling build() E chat/0.1: Running CMake.configure() E chat/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b" E -- Using Conan toolchain: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release E E chat/0.1: Running CMake.build() E chat/0.1: RUN: cmake --build "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release" -- -j4 E Scanning dependencies of target chat E [ 50%] Building CXX object CMakeFiles/chat.dir/src/chat.cpp.o E /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/src/chat.cpp:8:10: fatal error: hello.h: No such file or directory E 8 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/chat.dir/build.make:63: CMakeFiles/chat.dir/src/chat.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/chat.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E chat/0.1: ERROR: E Package '0eaf9738e59c9117fa4ff046132a23272c3f160a' build failed E chat/0.1: WARN: Build folder /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release E ERROR: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/chatf7005d8881231/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ____________ ERROR at setup of test_other_client_can_link_autotools ____________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.fixture(scope="module") def transitive_shared_client(): client = TestClient(default_server_user=True) client.save(pkg_cmake("hello", "0.1")) client.run("create . -o hello/*:shared=True") client.save(pkg_cmake("chat", "0.1", requires=["hello/0.1"]), clean_first=True) > client.run("create . -o chat/*:shared=True -o hello/*:shared=True") conans/test/functional/toolchains/cmake/test_shared_cmake.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -o chat/*:shared=True -o hello/*:shared=True' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nanException: chat/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -o chat/*:shared=True -o hello/*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E chat/0.1: Exporting package recipe: /tmp/tmpmqmrzxd3conans/path with spaces/conanfile.py E chat/0.1: Copied 1 '.py' file: conanfile.py E chat/0.1: Copied 1 '.txt' file: CMakeLists.txt E chat/0.1: Copied 1 '.cpp' file: chat.cpp E chat/0.1: Copied 1 '.h' file: chat.h E chat/0.1: Exported to cache folder: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/chatf7005d8881231/e E chat/0.1: Exported: chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 (2024-04-16 13:17:12 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E chat/*:shared=True E hello/*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 - Cache E hello/0.1#234bf56e60ac669e4bc4897583f19c83 - Cache E E ======== Computing necessary packages ======== E chat/0.1: Forced build from source E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123:0eaf9738e59c9117fa4ff046132a23272c3f160a - Build E hello/0.1#234bf56e60ac669e4bc4897583f19c83:0645178f9911c96e0f11d63b451090c571726042#7e3cd26dc8a386ccb9e1125339b812db - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 2) E E -------- Installing package chat/0.1 (2 of 2) -------- E chat/0.1: Building from source E chat/0.1: Package chat/0.1:0eaf9738e59c9117fa4ff046132a23272c3f160a E chat/0.1: Copying sources to build folder E chat/0.1: Building your package in /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b E chat/0.1: Writing generators to /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators E chat/0.1: Generator 'CMakeToolchain' calling 'generate()' E chat/0.1: CMakeToolchain generated: conan_toolchain.cmake E chat/0.1: CMakeToolchain generated: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators/CMakePresets.json E chat/0.1: CMakeToolchain generated: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/CMakeUserPresets.json E chat/0.1: Generator 'CMakeDeps' calling 'generate()' E chat/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E chat/0.1: Generating aggregated env files E chat/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E chat/0.1: Calling build() E chat/0.1: Running CMake.configure() E chat/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b" E -- Using Conan toolchain: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release E E chat/0.1: Running CMake.build() E chat/0.1: RUN: cmake --build "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release" -- -j4 E Scanning dependencies of target chat E [ 50%] Building CXX object CMakeFiles/chat.dir/src/chat.cpp.o E /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/src/chat.cpp:8:10: fatal error: hello.h: No such file or directory E 8 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/chat.dir/build.make:63: CMakeFiles/chat.dir/src/chat.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/chat.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E chat/0.1: ERROR: E Package '0eaf9738e59c9117fa4ff046132a23272c3f160a' build failed E chat/0.1: WARN: Build folder /tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/b/chat252815087a343/b/build/Release E ERROR: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp3f_prrzrconans/path with spaces/.conan2/p/chatf7005d8881231/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ____________________ ERROR at setup of test_standard_names _____________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.slow @pytest.mark.tool("cmake") @pytest.fixture(scope="module") def setup_client_with_greetings(): """ creates a multi-component package with 2 components "hello" and "bye """ hello_h = gen_function_h(name="hello") hello_cpp = gen_function_cpp(name="hello", includes=["hello"]) bye_h = gen_function_h(name="bye") bye_cpp = gen_function_cpp(name="bye", includes=["bye"]) conanfile_greetings = textwrap.dedent(""" from os.path import join from conan import ConanFile from conan.tools.cmake import CMake from conan.tools.files import copy class GreetingsConan(ConanFile): name = "greetings" version = "0.0.1" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" exports_sources = "src/*" options = {"components": ["standard", "custom", "none"]} default_options = {"components": "standard"} def build(self): cmake = CMake(self) cmake.configure(build_script_folder="src") cmake.build() def package(self): copy(self, "*.h", src=join(self.source_folder, "src"), dst=join(self.package_folder, "include")) copy(self, "*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) copy(self, "*.a", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) def package_info(self): def set_comp_default_dirs(): self.cpp_info.components["hello"].includedirs = ["include"] self.cpp_info.components["hello"].libdirs = ["lib"] self.cpp_info.components["bye"].includedirs = ["include"] self.cpp_info.components["bye"].libdirs = ["lib"] if self.options.components == "standard": self.cpp_info.components["hello"].libs = ["hello"] self.cpp_info.components["bye"].libs = ["bye"] set_comp_default_dirs() elif self.options.components == "custom": self.cpp_info.set_property("cmake_file_name", "MYG") self.cpp_info.set_property("cmake_target_name", "MyGreetings::MyGreetings") self.cpp_info.components["hello"].set_property("cmake_target_name", "MyGreetings::MyHello") self.cpp_info.components["bye"].set_property("cmake_target_name", "MyGreetings::MyBye") self.cpp_info.components["hello"].libs = ["hello"] self.cpp_info.components["bye"].libs = ["bye"] set_comp_default_dirs() else: self.cpp_info.libs = ["hello", "bye"] def package_id(self): del self.info.options.components """) cmakelists_greetings = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(greetings CXX) add_library(hello hello.cpp) add_library(bye bye.cpp) """) test_package_greetings_conanfile = textwrap.dedent(""" import os from conan import ConanFile from conan.tools.cmake import CMake class GreetingsTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" def requirements(self): self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): path = "{}".format(self.settings.build_type) if self.settings.os == "Windows" else "." self.run("{}{}example".format(path, os.sep)) """) test_package_greetings_cpp = gen_function_cpp(name="main", includes=["hello", "bye"], calls=["hello", "bye"]) test_package_greetings_cmakelists = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(PackageTest CXX) find_package(greetings) add_executable(example example.cpp) target_link_libraries(example greetings::greetings) """) client = TestClient() client.save({"conanfile.py": conanfile_greetings, "src/CMakeLists.txt": cmakelists_greetings, "src/hello.h": hello_h, "src/hello.cpp": hello_cpp, "src/bye.h": bye_h, "src/bye.cpp": bye_cpp, "test_package/conanfile.py": test_package_greetings_conanfile, "test_package/example.cpp": test_package_greetings_cpp, "test_package/CMakeLists.txt": test_package_greetings_cmakelists}) > client.run("create . -s build_type=Release") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -s build_type=Release', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...s/0.0.1 (test package): Error in build() method, line 16\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -s build_type=Release E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E greetings/0.0.1: Exporting package recipe: /tmp/tmpzwal_ei3conans/path with spaces/conanfile.py E greetings/0.0.1: Copied 1 '.py' file: conanfile.py E greetings/0.0.1: Copied 2 '.cpp' files: hello.cpp, bye.cpp E greetings/0.0.1: Copied 2 '.h' files: hello.h, bye.h E greetings/0.0.1: Copied 1 '.txt' file: CMakeLists.txt E greetings/0.0.1: Exported to cache folder: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/greet1ee102c8e3bf7/e E greetings/0.0.1: Exported: greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 (2024-04-16 13:17:24 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 - Cache E E ======== Computing necessary packages ======== E greetings/0.0.1: Forced build from source E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca - Build E E ======== Installing packages ======== E E -------- Installing package greetings/0.0.1 (1 of 1) -------- E greetings/0.0.1: Building from source E greetings/0.0.1: Package greetings/0.0.1:f4bec17cf5bb949234cd84c756060aa715eaa5ca E greetings/0.0.1: Copying sources to build folder E greetings/0.0.1: Building your package in /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Writing generators to /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Generator 'CMakeDeps' calling 'generate()' E greetings/0.0.1: Generator 'CMakeToolchain' calling 'generate()' E greetings/0.0.1: CMakeToolchain generated: conan_toolchain.cmake E greetings/0.0.1: CMakeToolchain generated: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/CMakePresets.json E greetings/0.0.1: Generating aggregated env files E greetings/0.0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E greetings/0.0.1: Calling build() E greetings/0.0.1: Running CMake.configure() E greetings/0.0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/src" E -- Using Conan toolchain: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E E greetings/0.0.1: Running CMake.build() E greetings/0.0.1: RUN: cmake --build "/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b" -- -j4 E Scanning dependencies of target hello E Scanning dependencies of target bye E [ 25%] Building CXX object CMakeFiles/hello.dir/hello.cpp.o E [ 50%] Building CXX object CMakeFiles/bye.dir/bye.cpp.o E [ 75%] Linking CXX static library libbye.a E [100%] Linking CXX static library libhello.a E [100%] Built target bye E [100%] Built target hello E E greetings/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' built E greetings/0.0.1: Build folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Generating the package E greetings/0.0.1: Packaging in folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p E greetings/0.0.1: Calling package() E greetings/0.0.1: package(): Packaged 2 '.a' files: libbye.a, libhello.a E greetings/0.0.1: package(): Packaged 2 '.h' files: hello.h, bye.h E greetings/0.0.1: Created package revision fc3a6ab829217e07b1c94b510b66ae1a E greetings/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' created E greetings/0.0.1: Full package reference: greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#fc3a6ab829217e07b1c94b510b66ae1a E greetings/0.0.1: Package folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E greetings/0.0.1 (test package): /tmp/tmpzwal_ei3conans/path with spaces/test_package/conanfile.py E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 - Cache E E ======== Computing necessary packages ======== E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#fc3a6ab829217e07b1c94b510b66ae1a - Cache E E ======== Installing packages ======== E greetings/0.0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E greetings/0.0.1 (test package): Test package build: E greetings/0.0.1 (test package): Test package build folder: /tmp/tmpzwal_ei3conans/path with spaces/test_package E greetings/0.0.1 (test package): Writing generators to /tmp/tmpzwal_ei3conans/path with spaces/test_package E greetings/0.0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E greetings/0.0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(greetings) E target_link_libraries(... greetings::greetings) E greetings/0.0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E greetings/0.0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E greetings/0.0.1 (test package): CMakeToolchain generated: /tmp/tmpzwal_ei3conans/path with spaces/test_package/CMakePresets.json E greetings/0.0.1 (test package): Generating aggregated env files E greetings/0.0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E greetings/0.0.1 (test package): Calling build() E greetings/0.0.1 (test package): Running CMake.configure() E greetings/0.0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpzwal_ei3conans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpzwal_ei3conans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmpzwal_ei3conans/path with spaces/test_package/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Component target declared 'greetings::hello' E -- Conan: Component target declared 'greetings::bye' E -- Conan: Target declared 'greetings::greetings' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpzwal_ei3conans/path with spaces/test_package E E greetings/0.0.1 (test package): Running CMake.build() E greetings/0.0.1 (test package): RUN: cmake --build "/tmp/tmpzwal_ei3conans/path with spaces/test_package" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/example.cpp.o E /tmp/tmpzwal_ei3conans/path with spaces/test_package/example.cpp:6:10: fatal error: hello.h: No such file or directory E 6 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: greetings/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpzwal_ei3conans/path with spaces/test_package/conanfile.py", line 16, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: greetings/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _____________________ ERROR at setup of test_custom_names ______________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.slow @pytest.mark.tool("cmake") @pytest.fixture(scope="module") def setup_client_with_greetings(): """ creates a multi-component package with 2 components "hello" and "bye """ hello_h = gen_function_h(name="hello") hello_cpp = gen_function_cpp(name="hello", includes=["hello"]) bye_h = gen_function_h(name="bye") bye_cpp = gen_function_cpp(name="bye", includes=["bye"]) conanfile_greetings = textwrap.dedent(""" from os.path import join from conan import ConanFile from conan.tools.cmake import CMake from conan.tools.files import copy class GreetingsConan(ConanFile): name = "greetings" version = "0.0.1" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" exports_sources = "src/*" options = {"components": ["standard", "custom", "none"]} default_options = {"components": "standard"} def build(self): cmake = CMake(self) cmake.configure(build_script_folder="src") cmake.build() def package(self): copy(self, "*.h", src=join(self.source_folder, "src"), dst=join(self.package_folder, "include")) copy(self, "*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) copy(self, "*.a", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) def package_info(self): def set_comp_default_dirs(): self.cpp_info.components["hello"].includedirs = ["include"] self.cpp_info.components["hello"].libdirs = ["lib"] self.cpp_info.components["bye"].includedirs = ["include"] self.cpp_info.components["bye"].libdirs = ["lib"] if self.options.components == "standard": self.cpp_info.components["hello"].libs = ["hello"] self.cpp_info.components["bye"].libs = ["bye"] set_comp_default_dirs() elif self.options.components == "custom": self.cpp_info.set_property("cmake_file_name", "MYG") self.cpp_info.set_property("cmake_target_name", "MyGreetings::MyGreetings") self.cpp_info.components["hello"].set_property("cmake_target_name", "MyGreetings::MyHello") self.cpp_info.components["bye"].set_property("cmake_target_name", "MyGreetings::MyBye") self.cpp_info.components["hello"].libs = ["hello"] self.cpp_info.components["bye"].libs = ["bye"] set_comp_default_dirs() else: self.cpp_info.libs = ["hello", "bye"] def package_id(self): del self.info.options.components """) cmakelists_greetings = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(greetings CXX) add_library(hello hello.cpp) add_library(bye bye.cpp) """) test_package_greetings_conanfile = textwrap.dedent(""" import os from conan import ConanFile from conan.tools.cmake import CMake class GreetingsTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" def requirements(self): self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): path = "{}".format(self.settings.build_type) if self.settings.os == "Windows" else "." self.run("{}{}example".format(path, os.sep)) """) test_package_greetings_cpp = gen_function_cpp(name="main", includes=["hello", "bye"], calls=["hello", "bye"]) test_package_greetings_cmakelists = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(PackageTest CXX) find_package(greetings) add_executable(example example.cpp) target_link_libraries(example greetings::greetings) """) client = TestClient() client.save({"conanfile.py": conanfile_greetings, "src/CMakeLists.txt": cmakelists_greetings, "src/hello.h": hello_h, "src/hello.cpp": hello_cpp, "src/bye.h": bye_h, "src/bye.cpp": bye_cpp, "test_package/conanfile.py": test_package_greetings_conanfile, "test_package/example.cpp": test_package_greetings_cpp, "test_package/CMakeLists.txt": test_package_greetings_cmakelists}) > client.run("create . -s build_type=Release") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -s build_type=Release', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...s/0.0.1 (test package): Error in build() method, line 16\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -s build_type=Release E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E greetings/0.0.1: Exporting package recipe: /tmp/tmpzwal_ei3conans/path with spaces/conanfile.py E greetings/0.0.1: Copied 1 '.py' file: conanfile.py E greetings/0.0.1: Copied 2 '.cpp' files: hello.cpp, bye.cpp E greetings/0.0.1: Copied 2 '.h' files: hello.h, bye.h E greetings/0.0.1: Copied 1 '.txt' file: CMakeLists.txt E greetings/0.0.1: Exported to cache folder: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/greet1ee102c8e3bf7/e E greetings/0.0.1: Exported: greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 (2024-04-16 13:17:24 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 - Cache E E ======== Computing necessary packages ======== E greetings/0.0.1: Forced build from source E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca - Build E E ======== Installing packages ======== E E -------- Installing package greetings/0.0.1 (1 of 1) -------- E greetings/0.0.1: Building from source E greetings/0.0.1: Package greetings/0.0.1:f4bec17cf5bb949234cd84c756060aa715eaa5ca E greetings/0.0.1: Copying sources to build folder E greetings/0.0.1: Building your package in /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Writing generators to /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Generator 'CMakeDeps' calling 'generate()' E greetings/0.0.1: Generator 'CMakeToolchain' calling 'generate()' E greetings/0.0.1: CMakeToolchain generated: conan_toolchain.cmake E greetings/0.0.1: CMakeToolchain generated: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/CMakePresets.json E greetings/0.0.1: Generating aggregated env files E greetings/0.0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E greetings/0.0.1: Calling build() E greetings/0.0.1: Running CMake.configure() E greetings/0.0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/src" E -- Using Conan toolchain: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E E greetings/0.0.1: Running CMake.build() E greetings/0.0.1: RUN: cmake --build "/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b" -- -j4 E Scanning dependencies of target hello E Scanning dependencies of target bye E [ 25%] Building CXX object CMakeFiles/hello.dir/hello.cpp.o E [ 50%] Building CXX object CMakeFiles/bye.dir/bye.cpp.o E [ 75%] Linking CXX static library libbye.a E [100%] Linking CXX static library libhello.a E [100%] Built target bye E [100%] Built target hello E E greetings/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' built E greetings/0.0.1: Build folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Generating the package E greetings/0.0.1: Packaging in folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p E greetings/0.0.1: Calling package() E greetings/0.0.1: package(): Packaged 2 '.a' files: libbye.a, libhello.a E greetings/0.0.1: package(): Packaged 2 '.h' files: hello.h, bye.h E greetings/0.0.1: Created package revision fc3a6ab829217e07b1c94b510b66ae1a E greetings/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' created E greetings/0.0.1: Full package reference: greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#fc3a6ab829217e07b1c94b510b66ae1a E greetings/0.0.1: Package folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E greetings/0.0.1 (test package): /tmp/tmpzwal_ei3conans/path with spaces/test_package/conanfile.py E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 - Cache E E ======== Computing necessary packages ======== E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#fc3a6ab829217e07b1c94b510b66ae1a - Cache E E ======== Installing packages ======== E greetings/0.0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E greetings/0.0.1 (test package): Test package build: E greetings/0.0.1 (test package): Test package build folder: /tmp/tmpzwal_ei3conans/path with spaces/test_package E greetings/0.0.1 (test package): Writing generators to /tmp/tmpzwal_ei3conans/path with spaces/test_package E greetings/0.0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E greetings/0.0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(greetings) E target_link_libraries(... greetings::greetings) E greetings/0.0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E greetings/0.0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E greetings/0.0.1 (test package): CMakeToolchain generated: /tmp/tmpzwal_ei3conans/path with spaces/test_package/CMakePresets.json E greetings/0.0.1 (test package): Generating aggregated env files E greetings/0.0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E greetings/0.0.1 (test package): Calling build() E greetings/0.0.1 (test package): Running CMake.configure() E greetings/0.0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpzwal_ei3conans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpzwal_ei3conans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmpzwal_ei3conans/path with spaces/test_package/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Component target declared 'greetings::hello' E -- Conan: Component target declared 'greetings::bye' E -- Conan: Target declared 'greetings::greetings' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpzwal_ei3conans/path with spaces/test_package E E greetings/0.0.1 (test package): Running CMake.build() E greetings/0.0.1 (test package): RUN: cmake --build "/tmp/tmpzwal_ei3conans/path with spaces/test_package" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/example.cpp.o E /tmp/tmpzwal_ei3conans/path with spaces/test_package/example.cpp:6:10: fatal error: hello.h: No such file or directory E 6 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: greetings/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpzwal_ei3conans/path with spaces/test_package/conanfile.py", line 16, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: greetings/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception __________________ ERROR at setup of test_different_namespace __________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.slow @pytest.mark.tool("cmake") @pytest.fixture(scope="module") def setup_client_with_greetings(): """ creates a multi-component package with 2 components "hello" and "bye """ hello_h = gen_function_h(name="hello") hello_cpp = gen_function_cpp(name="hello", includes=["hello"]) bye_h = gen_function_h(name="bye") bye_cpp = gen_function_cpp(name="bye", includes=["bye"]) conanfile_greetings = textwrap.dedent(""" from os.path import join from conan import ConanFile from conan.tools.cmake import CMake from conan.tools.files import copy class GreetingsConan(ConanFile): name = "greetings" version = "0.0.1" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" exports_sources = "src/*" options = {"components": ["standard", "custom", "none"]} default_options = {"components": "standard"} def build(self): cmake = CMake(self) cmake.configure(build_script_folder="src") cmake.build() def package(self): copy(self, "*.h", src=join(self.source_folder, "src"), dst=join(self.package_folder, "include")) copy(self, "*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) copy(self, "*.a", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) def package_info(self): def set_comp_default_dirs(): self.cpp_info.components["hello"].includedirs = ["include"] self.cpp_info.components["hello"].libdirs = ["lib"] self.cpp_info.components["bye"].includedirs = ["include"] self.cpp_info.components["bye"].libdirs = ["lib"] if self.options.components == "standard": self.cpp_info.components["hello"].libs = ["hello"] self.cpp_info.components["bye"].libs = ["bye"] set_comp_default_dirs() elif self.options.components == "custom": self.cpp_info.set_property("cmake_file_name", "MYG") self.cpp_info.set_property("cmake_target_name", "MyGreetings::MyGreetings") self.cpp_info.components["hello"].set_property("cmake_target_name", "MyGreetings::MyHello") self.cpp_info.components["bye"].set_property("cmake_target_name", "MyGreetings::MyBye") self.cpp_info.components["hello"].libs = ["hello"] self.cpp_info.components["bye"].libs = ["bye"] set_comp_default_dirs() else: self.cpp_info.libs = ["hello", "bye"] def package_id(self): del self.info.options.components """) cmakelists_greetings = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(greetings CXX) add_library(hello hello.cpp) add_library(bye bye.cpp) """) test_package_greetings_conanfile = textwrap.dedent(""" import os from conan import ConanFile from conan.tools.cmake import CMake class GreetingsTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" def requirements(self): self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): path = "{}".format(self.settings.build_type) if self.settings.os == "Windows" else "." self.run("{}{}example".format(path, os.sep)) """) test_package_greetings_cpp = gen_function_cpp(name="main", includes=["hello", "bye"], calls=["hello", "bye"]) test_package_greetings_cmakelists = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(PackageTest CXX) find_package(greetings) add_executable(example example.cpp) target_link_libraries(example greetings::greetings) """) client = TestClient() client.save({"conanfile.py": conanfile_greetings, "src/CMakeLists.txt": cmakelists_greetings, "src/hello.h": hello_h, "src/hello.cpp": hello_cpp, "src/bye.h": bye_h, "src/bye.cpp": bye_cpp, "test_package/conanfile.py": test_package_greetings_conanfile, "test_package/example.cpp": test_package_greetings_cpp, "test_package/CMakeLists.txt": test_package_greetings_cmakelists}) > client.run("create . -s build_type=Release") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -s build_type=Release', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...s/0.0.1 (test package): Error in build() method, line 16\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -s build_type=Release E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E greetings/0.0.1: Exporting package recipe: /tmp/tmpzwal_ei3conans/path with spaces/conanfile.py E greetings/0.0.1: Copied 1 '.py' file: conanfile.py E greetings/0.0.1: Copied 2 '.cpp' files: hello.cpp, bye.cpp E greetings/0.0.1: Copied 2 '.h' files: hello.h, bye.h E greetings/0.0.1: Copied 1 '.txt' file: CMakeLists.txt E greetings/0.0.1: Exported to cache folder: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/greet1ee102c8e3bf7/e E greetings/0.0.1: Exported: greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 (2024-04-16 13:17:24 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 - Cache E E ======== Computing necessary packages ======== E greetings/0.0.1: Forced build from source E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca - Build E E ======== Installing packages ======== E E -------- Installing package greetings/0.0.1 (1 of 1) -------- E greetings/0.0.1: Building from source E greetings/0.0.1: Package greetings/0.0.1:f4bec17cf5bb949234cd84c756060aa715eaa5ca E greetings/0.0.1: Copying sources to build folder E greetings/0.0.1: Building your package in /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Writing generators to /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Generator 'CMakeDeps' calling 'generate()' E greetings/0.0.1: Generator 'CMakeToolchain' calling 'generate()' E greetings/0.0.1: CMakeToolchain generated: conan_toolchain.cmake E greetings/0.0.1: CMakeToolchain generated: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/CMakePresets.json E greetings/0.0.1: Generating aggregated env files E greetings/0.0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E greetings/0.0.1: Calling build() E greetings/0.0.1: Running CMake.configure() E greetings/0.0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/src" E -- Using Conan toolchain: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E E greetings/0.0.1: Running CMake.build() E greetings/0.0.1: RUN: cmake --build "/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b" -- -j4 E Scanning dependencies of target hello E Scanning dependencies of target bye E [ 25%] Building CXX object CMakeFiles/hello.dir/hello.cpp.o E [ 50%] Building CXX object CMakeFiles/bye.dir/bye.cpp.o E [ 75%] Linking CXX static library libbye.a E [100%] Linking CXX static library libhello.a E [100%] Built target bye E [100%] Built target hello E E greetings/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' built E greetings/0.0.1: Build folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Generating the package E greetings/0.0.1: Packaging in folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p E greetings/0.0.1: Calling package() E greetings/0.0.1: package(): Packaged 2 '.a' files: libbye.a, libhello.a E greetings/0.0.1: package(): Packaged 2 '.h' files: hello.h, bye.h E greetings/0.0.1: Created package revision fc3a6ab829217e07b1c94b510b66ae1a E greetings/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' created E greetings/0.0.1: Full package reference: greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#fc3a6ab829217e07b1c94b510b66ae1a E greetings/0.0.1: Package folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E greetings/0.0.1 (test package): /tmp/tmpzwal_ei3conans/path with spaces/test_package/conanfile.py E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 - Cache E E ======== Computing necessary packages ======== E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#fc3a6ab829217e07b1c94b510b66ae1a - Cache E E ======== Installing packages ======== E greetings/0.0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E greetings/0.0.1 (test package): Test package build: E greetings/0.0.1 (test package): Test package build folder: /tmp/tmpzwal_ei3conans/path with spaces/test_package E greetings/0.0.1 (test package): Writing generators to /tmp/tmpzwal_ei3conans/path with spaces/test_package E greetings/0.0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E greetings/0.0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(greetings) E target_link_libraries(... greetings::greetings) E greetings/0.0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E greetings/0.0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E greetings/0.0.1 (test package): CMakeToolchain generated: /tmp/tmpzwal_ei3conans/path with spaces/test_package/CMakePresets.json E greetings/0.0.1 (test package): Generating aggregated env files E greetings/0.0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E greetings/0.0.1 (test package): Calling build() E greetings/0.0.1 (test package): Running CMake.configure() E greetings/0.0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpzwal_ei3conans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpzwal_ei3conans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmpzwal_ei3conans/path with spaces/test_package/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Component target declared 'greetings::hello' E -- Conan: Component target declared 'greetings::bye' E -- Conan: Target declared 'greetings::greetings' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpzwal_ei3conans/path with spaces/test_package E E greetings/0.0.1 (test package): Running CMake.build() E greetings/0.0.1 (test package): RUN: cmake --build "/tmp/tmpzwal_ei3conans/path with spaces/test_package" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/example.cpp.o E /tmp/tmpzwal_ei3conans/path with spaces/test_package/example.cpp:6:10: fatal error: hello.h: No such file or directory E 6 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: greetings/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpzwal_ei3conans/path with spaces/test_package/conanfile.py", line 16, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: greetings/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _____________________ ERROR at setup of test_no_components _____________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.slow @pytest.mark.tool("cmake") @pytest.fixture(scope="module") def setup_client_with_greetings(): """ creates a multi-component package with 2 components "hello" and "bye """ hello_h = gen_function_h(name="hello") hello_cpp = gen_function_cpp(name="hello", includes=["hello"]) bye_h = gen_function_h(name="bye") bye_cpp = gen_function_cpp(name="bye", includes=["bye"]) conanfile_greetings = textwrap.dedent(""" from os.path import join from conan import ConanFile from conan.tools.cmake import CMake from conan.tools.files import copy class GreetingsConan(ConanFile): name = "greetings" version = "0.0.1" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" exports_sources = "src/*" options = {"components": ["standard", "custom", "none"]} default_options = {"components": "standard"} def build(self): cmake = CMake(self) cmake.configure(build_script_folder="src") cmake.build() def package(self): copy(self, "*.h", src=join(self.source_folder, "src"), dst=join(self.package_folder, "include")) copy(self, "*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) copy(self, "*.a", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) def package_info(self): def set_comp_default_dirs(): self.cpp_info.components["hello"].includedirs = ["include"] self.cpp_info.components["hello"].libdirs = ["lib"] self.cpp_info.components["bye"].includedirs = ["include"] self.cpp_info.components["bye"].libdirs = ["lib"] if self.options.components == "standard": self.cpp_info.components["hello"].libs = ["hello"] self.cpp_info.components["bye"].libs = ["bye"] set_comp_default_dirs() elif self.options.components == "custom": self.cpp_info.set_property("cmake_file_name", "MYG") self.cpp_info.set_property("cmake_target_name", "MyGreetings::MyGreetings") self.cpp_info.components["hello"].set_property("cmake_target_name", "MyGreetings::MyHello") self.cpp_info.components["bye"].set_property("cmake_target_name", "MyGreetings::MyBye") self.cpp_info.components["hello"].libs = ["hello"] self.cpp_info.components["bye"].libs = ["bye"] set_comp_default_dirs() else: self.cpp_info.libs = ["hello", "bye"] def package_id(self): del self.info.options.components """) cmakelists_greetings = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(greetings CXX) add_library(hello hello.cpp) add_library(bye bye.cpp) """) test_package_greetings_conanfile = textwrap.dedent(""" import os from conan import ConanFile from conan.tools.cmake import CMake class GreetingsTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" def requirements(self): self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): path = "{}".format(self.settings.build_type) if self.settings.os == "Windows" else "." self.run("{}{}example".format(path, os.sep)) """) test_package_greetings_cpp = gen_function_cpp(name="main", includes=["hello", "bye"], calls=["hello", "bye"]) test_package_greetings_cmakelists = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(PackageTest CXX) find_package(greetings) add_executable(example example.cpp) target_link_libraries(example greetings::greetings) """) client = TestClient() client.save({"conanfile.py": conanfile_greetings, "src/CMakeLists.txt": cmakelists_greetings, "src/hello.h": hello_h, "src/hello.cpp": hello_cpp, "src/bye.h": bye_h, "src/bye.cpp": bye_cpp, "test_package/conanfile.py": test_package_greetings_conanfile, "test_package/example.cpp": test_package_greetings_cpp, "test_package/CMakeLists.txt": test_package_greetings_cmakelists}) > client.run("create . -s build_type=Release") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -s build_type=Release', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...s/0.0.1 (test package): Error in build() method, line 16\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -s build_type=Release E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E greetings/0.0.1: Exporting package recipe: /tmp/tmpzwal_ei3conans/path with spaces/conanfile.py E greetings/0.0.1: Copied 1 '.py' file: conanfile.py E greetings/0.0.1: Copied 2 '.cpp' files: hello.cpp, bye.cpp E greetings/0.0.1: Copied 2 '.h' files: hello.h, bye.h E greetings/0.0.1: Copied 1 '.txt' file: CMakeLists.txt E greetings/0.0.1: Exported to cache folder: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/greet1ee102c8e3bf7/e E greetings/0.0.1: Exported: greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 (2024-04-16 13:17:24 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 - Cache E E ======== Computing necessary packages ======== E greetings/0.0.1: Forced build from source E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca - Build E E ======== Installing packages ======== E E -------- Installing package greetings/0.0.1 (1 of 1) -------- E greetings/0.0.1: Building from source E greetings/0.0.1: Package greetings/0.0.1:f4bec17cf5bb949234cd84c756060aa715eaa5ca E greetings/0.0.1: Copying sources to build folder E greetings/0.0.1: Building your package in /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Writing generators to /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Generator 'CMakeDeps' calling 'generate()' E greetings/0.0.1: Generator 'CMakeToolchain' calling 'generate()' E greetings/0.0.1: CMakeToolchain generated: conan_toolchain.cmake E greetings/0.0.1: CMakeToolchain generated: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/CMakePresets.json E greetings/0.0.1: Generating aggregated env files E greetings/0.0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E greetings/0.0.1: Calling build() E greetings/0.0.1: Running CMake.configure() E greetings/0.0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/src" E -- Using Conan toolchain: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E E greetings/0.0.1: Running CMake.build() E greetings/0.0.1: RUN: cmake --build "/tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b" -- -j4 E Scanning dependencies of target hello E Scanning dependencies of target bye E [ 25%] Building CXX object CMakeFiles/hello.dir/hello.cpp.o E [ 50%] Building CXX object CMakeFiles/bye.dir/bye.cpp.o E [ 75%] Linking CXX static library libbye.a E [100%] Linking CXX static library libhello.a E [100%] Built target bye E [100%] Built target hello E E greetings/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' built E greetings/0.0.1: Build folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/b E greetings/0.0.1: Generating the package E greetings/0.0.1: Packaging in folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p E greetings/0.0.1: Calling package() E greetings/0.0.1: package(): Packaged 2 '.a' files: libbye.a, libhello.a E greetings/0.0.1: package(): Packaged 2 '.h' files: hello.h, bye.h E greetings/0.0.1: Created package revision fc3a6ab829217e07b1c94b510b66ae1a E greetings/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' created E greetings/0.0.1: Full package reference: greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#fc3a6ab829217e07b1c94b510b66ae1a E greetings/0.0.1: Package folder /tmp/tmpxgf262vkconans/path with spaces/.conan2/p/b/greeta429b6adf00f5/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E greetings/0.0.1 (test package): /tmp/tmpzwal_ei3conans/path with spaces/test_package/conanfile.py E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5 - Cache E E ======== Computing necessary packages ======== E Requirements E greetings/0.0.1#b096ff1728b0b4ab911722d29614edb5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#fc3a6ab829217e07b1c94b510b66ae1a - Cache E E ======== Installing packages ======== E greetings/0.0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E greetings/0.0.1 (test package): Test package build: E greetings/0.0.1 (test package): Test package build folder: /tmp/tmpzwal_ei3conans/path with spaces/test_package E greetings/0.0.1 (test package): Writing generators to /tmp/tmpzwal_ei3conans/path with spaces/test_package E greetings/0.0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E greetings/0.0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(greetings) E target_link_libraries(... greetings::greetings) E greetings/0.0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E greetings/0.0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E greetings/0.0.1 (test package): CMakeToolchain generated: /tmp/tmpzwal_ei3conans/path with spaces/test_package/CMakePresets.json E greetings/0.0.1 (test package): Generating aggregated env files E greetings/0.0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E greetings/0.0.1 (test package): Calling build() E greetings/0.0.1 (test package): Running CMake.configure() E greetings/0.0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpzwal_ei3conans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpzwal_ei3conans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmpzwal_ei3conans/path with spaces/test_package/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Component target declared 'greetings::hello' E -- Conan: Component target declared 'greetings::bye' E -- Conan: Target declared 'greetings::greetings' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpzwal_ei3conans/path with spaces/test_package E E greetings/0.0.1 (test package): Running CMake.build() E greetings/0.0.1 (test package): RUN: cmake --build "/tmp/tmpzwal_ei3conans/path with spaces/test_package" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/example.cpp.o E /tmp/tmpzwal_ei3conans/path with spaces/test_package/example.cpp:6:10: fatal error: hello.h: No such file or directory E 6 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: greetings/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpzwal_ei3conans/path with spaces/test_package/conanfile.py", line 16, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: greetings/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ___________ ERROR at setup of test_shared_requires_static_build_all ____________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python _matrix_client = @pytest.fixture(scope="session") def _transitive_libraries(_matrix_client): """ engine/1.0->matrix/1.0 """ c = TestClient() c.cache_folder = os.path.join(temp_folder(), ".conan2") shutil.copytree(_matrix_client.cache_folder, c.cache_folder) c.save({}, clean_first=True) c.run("new cmake_lib -d name=engine -d version=1.0 -d requires=matrix/1.0") # create both static and shared > c.run("create . -tf=") conans/test/functional/toolchains/conftest.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -tf=', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nException: engine/1.0: Error in build() method, line 45\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -tf= E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E engine/1.0: Exporting package recipe: /tmp/tmpqnrmnf5bconans/path with spaces/conanfile.py E engine/1.0: Copied 1 '.py' file: conanfile.py E engine/1.0: Copied 1 '.txt' file: CMakeLists.txt E engine/1.0: Copied 1 '.cpp' file: engine.cpp E engine/1.0: Copied 1 '.h' file: engine.h E engine/1.0: Exported to cache folder: /tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/engincdf45cc1fe758/e E engine/1.0: Exported: engine/1.0#bb0a12461706725fc6595fb4f5e53dfb (2024-04-16 13:17:36 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E engine/1.0#bb0a12461706725fc6595fb4f5e53dfb - Cache E matrix/1.0#0fd6ccef90970c84ccacf46c59c6cc74 - Cache E E ======== Computing necessary packages ======== E engine/1.0: Forced build from source E Requirements E engine/1.0#bb0a12461706725fc6595fb4f5e53dfb:18f0ebc172869f8064e88a7c222fc01162dd815b - Build E matrix/1.0#0fd6ccef90970c84ccacf46c59c6cc74:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#cded365c0fba7b5de99c3aedf349bc88 - Cache E E ======== Installing packages ======== E matrix/1.0: Already installed! (1 of 2) E E -------- Installing package engine/1.0 (2 of 2) -------- E engine/1.0: Building from source E engine/1.0: Package engine/1.0:18f0ebc172869f8064e88a7c222fc01162dd815b E engine/1.0: Copying sources to build folder E engine/1.0: Building your package in /tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b E engine/1.0: Calling generate() E engine/1.0: Generators folder: /tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b/build/Release/generators E engine/1.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(matrix) E target_link_libraries(... matrix::matrix) E engine/1.0: CMakeToolchain generated: conan_toolchain.cmake E engine/1.0: CMakeToolchain generated: /tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b/build/Release/generators/CMakePresets.json E engine/1.0: CMakeToolchain generated: /tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b/CMakeUserPresets.json E engine/1.0: Generating aggregated env files E engine/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E engine/1.0: Calling build() E engine/1.0: Running CMake.configure() E engine/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b" E -- Using Conan toolchain: /tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'matrix::matrix' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b/build/Release E E engine/1.0: Running CMake.build() E engine/1.0: RUN: cmake --build "/tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b/build/Release" -- -j4 E Scanning dependencies of target engine E [ 50%] Building CXX object CMakeFiles/engine.dir/src/engine.cpp.o E /tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b/src/engine.cpp:3:10: fatal error: matrix.h: No such file or directory E 3 | #include "matrix.h" E | ^~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/engine.dir/build.make:63: CMakeFiles/engine.dir/src/engine.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/engine.dir/all] Error 2 E make: *** [Makefile:130: all] Error 2 E E engine/1.0: ERROR: E Package '18f0ebc172869f8064e88a7c222fc01162dd815b' build failed E engine/1.0: WARN: Build folder /tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/b/engin6bdbbe9eb69b5/b/build/Release E ERROR: engine/1.0: Error in build() method, line 45 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpu9y11gv_conans/path with spaces/.conan2/p/engincdf45cc1fe758/e/conanfile.py", line 45, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: engine/1.0: Error in build() method, line 45 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception =================================== FAILURES =================================== __________ TestLocalRecipeIndexNew.test_conan_new_local_recipes_index __________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python self = def test_conan_new_local_recipes_index(self): # Setup the release pkg0.1.zip http server file_server = TestFileServer() zippath = os.path.join(file_server.store, "pkg0.1.zip") repo_folder = temp_folder() cmake = gen_cmakelists(libname="pkg", libsources=["pkg.cpp"], install=True, public_header="pkg.h") save_files(repo_folder, {"pkg/CMakeLists.txt": cmake, "pkg/pkg.h": gen_function_h(name="pkg"), "pkg/pkg.cpp": gen_function_cpp(name="pkg")}) zipdir(repo_folder, zippath) sha256 = sha256sum(zippath) url = f"{file_server.fake_url}/pkg0.1.zip" c0 = TestClient() c0.servers["file_server"] = file_server c0.run(f"new local_recipes_index -d name=pkg -d version=0.1 -d url={url} -d sha256={sha256}") # A local create is possible, and it includes a test_package > c0.run("create recipes/pkg/all --version=0.1") conans/test/functional/test_local_recipes_index.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create recipes/pkg/all --version=0.1', assert_error = False error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...pkg/0.1 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create recipes/pkg/all --version=0.1 E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E pkg/0.1: Exporting package recipe: /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/conanfile.py E pkg/0.1: exports: File 'conandata.yml' found. Exporting it... E pkg/0.1: Calling export_sources() E pkg/0.1: export_conandata_patches(): No patches defined in conandata E pkg/0.1: Copied 1 '.yml' file: conandata.yml E pkg/0.1: Copied 1 '.py' file: conanfile.py E pkg/0.1: Exported to cache folder: /tmp/tmpau9662daconans/path with spaces/.conan2/p/pkg3a3f2a78cadc8/e E pkg/0.1: Exported: pkg/0.1#010516ab39b1a1e920a6edeb633756e7 (2024-04-16 13:16:00 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E pkg/0.1#010516ab39b1a1e920a6edeb633756e7 - Cache E E ======== Computing necessary packages ======== E pkg/0.1: Forced build from source E Requirements E pkg/0.1#010516ab39b1a1e920a6edeb633756e7:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Build E E ======== Installing packages ======== E pkg/0.1: Calling source() in /tmp/tmpau9662daconans/path with spaces/.conan2/p/pkg3a3f2a78cadc8/s/src E pkg/0.1: Unzipping 2.6KB E E pkg/0.1: apply_conandata_patches(): No patches defined in conandata E E -------- Installing package pkg/0.1 (1 of 1) -------- E pkg/0.1: Building from source E pkg/0.1: Package pkg/0.1:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E pkg/0.1: Copying sources to build folder E pkg/0.1: Building your package in /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b E pkg/0.1: Calling generate() E pkg/0.1: Generators folder: /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b/build/Release/generators E pkg/0.1: CMakeToolchain generated: conan_toolchain.cmake E pkg/0.1: CMakeToolchain generated: /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b/build/Release/generators/CMakePresets.json E pkg/0.1: CMakeToolchain generated: /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b/src/CMakeUserPresets.json E pkg/0.1: Generating aggregated env files E pkg/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E pkg/0.1: Calling build() E pkg/0.1: Running CMake.configure() E pkg/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b/src" E -- Using Conan toolchain: /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b/build/Release E E pkg/0.1: Running CMake.build() E pkg/0.1: RUN: cmake --build "/tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b/build/Release" -- -j4 E Scanning dependencies of target pkg E [ 50%] Building CXX object CMakeFiles/pkg.dir/pkg.cpp.o E [100%] Linking CXX static library libpkg.a E [100%] Built target pkg E E pkg/0.1: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' built E pkg/0.1: Build folder /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b/build/Release E pkg/0.1: Generating the package E pkg/0.1: Packaging in folder /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/p E pkg/0.1: Calling package() E pkg/0.1: Running CMake.install() E pkg/0.1: RUN: cmake --install "/tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/b/build/Release" --prefix "/tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/p/lib/libpkg.a E -- Installing: /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/p/include/pkg.h E E pkg/0.1: package(): Packaged 1 '.a' file: libpkg.a E pkg/0.1: package(): Packaged 1 '.h' file: pkg.h E pkg/0.1: Created package revision dce62ca9bfecd613ee5116194e145ff1 E pkg/0.1: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E pkg/0.1: Full package reference: pkg/0.1#010516ab39b1a1e920a6edeb633756e7:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#dce62ca9bfecd613ee5116194e145ff1 E pkg/0.1: Package folder /tmp/tmpau9662daconans/path with spaces/.conan2/p/b/pkgedd379d8ec85f/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E pkg/0.1 (test package): /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/conanfile.py E Requirements E pkg/0.1#010516ab39b1a1e920a6edeb633756e7 - Cache E E ======== Computing necessary packages ======== E Requirements E pkg/0.1#010516ab39b1a1e920a6edeb633756e7:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#dce62ca9bfecd613ee5116194e145ff1 - Cache E E ======== Installing packages ======== E pkg/0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/build/gcc-8-x86_64-release E pkg/0.1 (test package): Test package build: build/gcc-8-x86_64-release E pkg/0.1 (test package): Test package build folder: /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/build/gcc-8-x86_64-release E pkg/0.1 (test package): Writing generators to /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/build/gcc-8-x86_64-release/generators E pkg/0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E pkg/0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(pkg) E target_link_libraries(... pkg::pkg) E pkg/0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E pkg/0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E pkg/0.1 (test package): CMakeToolchain generated: /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E pkg/0.1 (test package): CMakeToolchain generated: /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/CMakeUserPresets.json E pkg/0.1 (test package): Generating aggregated env files E pkg/0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E pkg/0.1 (test package): Calling build() E pkg/0.1 (test package): Running CMake.configure() E pkg/0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package" E -- Using Conan toolchain: /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'pkg::pkg' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/build/gcc-8-x86_64-release E E pkg/0.1 (test package): Running CMake.build() E pkg/0.1 (test package): RUN: cmake --build "/tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/src/example.cpp:1:10: fatal error: pkg.h: No such file or directory E 1 | #include "pkg.h" E | ^~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: pkg/0.1 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmphzzve6juconans/path with spaces/recipes/pkg/all/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: pkg/0.1 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ___________________________ TestInRepo.test_in_repo ____________________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python self = def test_in_repo(self): """testing that it is possible to put a "recipes" folder inside a source repo, and use it as local-recipes-index repository, exporting the source from itself """ repo_folder = temp_folder() cmake = gen_cmakelists(libname="pkg", libsources=["pkg.cpp"], install=True, public_header="pkg.h") config_yml = textwrap.dedent("""\ versions: "0.1": folder: all """) conanfile = textwrap.dedent("""\ import os from conan import ConanFile from conan.tools.cmake import CMake, cmake_layout from conan.tools.files import copy class PkgRecipe(ConanFile): name = "pkg" package_type = "library" # Binary configuration settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} generators = "CMakeToolchain" def export_sources(self): src = os.path.dirname(os.path.dirname(os.path.dirname(self.recipe_folder))) copy(self, "*", src=src, dst=self.export_sources_folder, excludes=["recipes*"]) def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") def configure(self): if self.options.shared: self.options.rm_safe("fPIC") def layout(self): cmake_layout(self) def build(self): cmake = CMake(self) cmake.configure() cmake.build() def package(self): cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = [self.name] """) save_files(repo_folder, {"recipes/pkg/config.yml": config_yml, "recipes/pkg/all/conanfile.py": conanfile, "CMakeLists.txt": cmake, "pkg.h": gen_function_h(name="pkg"), "pkg.cpp": gen_function_cpp(name="pkg")}) c = TestClient() c.run(f"remote add local '{repo_folder}'") c.run("new cmake_exe -d name=app -d version=0.1 -d requires=pkg/0.1") > c.run("create . --build=missing") conans/test/functional/test_local_recipes_index.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --build=missing', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...onanException: app/0.1: Error in build() method, line 35\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --build=missing E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E app/0.1: Exporting package recipe: /tmp/tmpsxgg2w6rconans/path with spaces/conanfile.py E app/0.1: Copied 1 '.py' file: conanfile.py E app/0.1: Copied 1 '.txt' file: CMakeLists.txt E app/0.1: Copied 2 '.cpp' files: main.cpp, app.cpp E app/0.1: Copied 1 '.h' file: app.h E app/0.1: Exported to cache folder: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/appb30bb2a632370/e E app/0.1: Exported: app/0.1#c9cb22ceee1222f4de66846ba79b9cae (2024-04-16 13:16:04 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E pkg/0.1: Not found in local cache, looking in remotes... E pkg/0.1: Checking remote: local E pkg/0.1: Downloaded recipe revision 765d2a89a82233a3cb4f5c963150f570 E Graph root E cli E Requirements E app/0.1#c9cb22ceee1222f4de66846ba79b9cae - Cache E pkg/0.1#765d2a89a82233a3cb4f5c963150f570 - Downloaded (local) E E ======== Computing necessary packages ======== E Requirements E app/0.1#c9cb22ceee1222f4de66846ba79b9cae:81b721025a78712c590098ed3ce15ad16df2b38a - Build E pkg/0.1#765d2a89a82233a3cb4f5c963150f570:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Build E E ======== Installing packages ======== E pkg/0.1: Sources downloaded from 'local' E E -------- Installing package pkg/0.1 (1 of 2) -------- E pkg/0.1: Building from source E pkg/0.1: Package pkg/0.1:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E pkg/0.1: Copying sources to build folder E pkg/0.1: Building your package in /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b E pkg/0.1: Writing generators to /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b/build/Release/generators E pkg/0.1: Generator 'CMakeToolchain' calling 'generate()' E pkg/0.1: CMakeToolchain generated: conan_toolchain.cmake E pkg/0.1: CMakeToolchain generated: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b/build/Release/generators/CMakePresets.json E pkg/0.1: CMakeToolchain generated: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b/CMakeUserPresets.json E pkg/0.1: Generating aggregated env files E pkg/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E pkg/0.1: Calling build() E pkg/0.1: Running CMake.configure() E pkg/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b" E -- Using Conan toolchain: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b/build/Release E E pkg/0.1: Running CMake.build() E pkg/0.1: RUN: cmake --build "/tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b/build/Release" -- -j4 E Scanning dependencies of target pkg E [ 50%] Building CXX object CMakeFiles/pkg.dir/pkg.cpp.o E [100%] Linking CXX static library libpkg.a E [100%] Built target pkg E E pkg/0.1: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' built E pkg/0.1: Build folder /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b/build/Release E pkg/0.1: Generating the package E pkg/0.1: Packaging in folder /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/p E pkg/0.1: Calling package() E pkg/0.1: Running CMake.install() E pkg/0.1: RUN: cmake --install "/tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/b/build/Release" --prefix "/tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/p/lib/libpkg.a E -- Installing: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/p/include/pkg.h E E pkg/0.1: package(): Packaged 1 '.a' file: libpkg.a E pkg/0.1: package(): Packaged 1 '.h' file: pkg.h E pkg/0.1: Created package revision dce62ca9bfecd613ee5116194e145ff1 E pkg/0.1: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E pkg/0.1: Full package reference: pkg/0.1#765d2a89a82233a3cb4f5c963150f570:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#dce62ca9bfecd613ee5116194e145ff1 E pkg/0.1: Package folder /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/pkg8457b03965e16/p E E -------- Installing package app/0.1 (2 of 2) -------- E app/0.1: Building from source E app/0.1: Package app/0.1:81b721025a78712c590098ed3ce15ad16df2b38a E app/0.1: Copying sources to build folder E app/0.1: Building your package in /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b E app/0.1: Calling generate() E app/0.1: Generators folder: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b/build/Release/generators E app/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(pkg) E target_link_libraries(... pkg::pkg) E app/0.1: CMakeToolchain generated: conan_toolchain.cmake E app/0.1: CMakeToolchain generated: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b/build/Release/generators/CMakePresets.json E app/0.1: CMakeToolchain generated: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b/CMakeUserPresets.json E app/0.1: Generating aggregated env files E app/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E app/0.1: Calling build() E app/0.1: Running CMake.configure() E app/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b" E -- Using Conan toolchain: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b/build/Release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'pkg::pkg' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b/build/Release E E app/0.1: Running CMake.build() E app/0.1: RUN: cmake --build "/tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b/build/Release" -- -j4 E Scanning dependencies of target app E [ 33%] Building CXX object CMakeFiles/app.dir/src/app.cpp.o E [ 66%] Building CXX object CMakeFiles/app.dir/src/main.cpp.o E /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b/src/app.cpp:3:10: fatal error: pkg.h: No such file or directory E 3 | #include "pkg.h" E | ^~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/app.dir/build.make:63: CMakeFiles/app.dir/src/app.cpp.o] Error 1 E make[2]: *** Waiting for unfinished jobs.... E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/app.dir/all] Error 2 E make: *** [Makefile:130: all] Error 2 E E app/0.1: ERROR: E Package '81b721025a78712c590098ed3ce15ad16df2b38a' build failed E app/0.1: WARN: Build folder /tmp/tmppjxh749hconans/path with spaces/.conan2/p/b/app495831f32a948/b/build/Release E ERROR: app/0.1: Error in build() method, line 35 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmppjxh749hconans/path with spaces/.conan2/p/appb30bb2a632370/e/conanfile.py", line 35, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: app/0.1: Error in build() method, line 35 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _________________________ test_diamonds_cmake_with_new _________________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_diamonds_cmake_with_new(): tc = TestClient() tc.run("new cmake_lib -d name=mathematics -d version=3.14") > tc.run("create .") conans/test/functional/command/new_test.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create .', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...cs/3.14 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E mathematics/3.14: Exporting package recipe: /tmp/tmp2__owok4conans/path with spaces/conanfile.py E mathematics/3.14: Copied 1 '.py' file: conanfile.py E mathematics/3.14: Copied 1 '.txt' file: CMakeLists.txt E mathematics/3.14: Copied 1 '.cpp' file: mathematics.cpp E mathematics/3.14: Copied 1 '.h' file: mathematics.h E mathematics/3.14: Exported to cache folder: /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/mathe6219d91097fc4/e E mathematics/3.14: Exported: mathematics/3.14#4c577f95251563befa2fc6da791a3a04 (2024-04-16 13:16:13 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E mathematics/3.14#4c577f95251563befa2fc6da791a3a04 - Cache E E ======== Computing necessary packages ======== E mathematics/3.14: Forced build from source E Requirements E mathematics/3.14#4c577f95251563befa2fc6da791a3a04:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Build E E ======== Installing packages ======== E E -------- Installing package mathematics/3.14 (1 of 1) -------- E mathematics/3.14: Building from source E mathematics/3.14: Package mathematics/3.14:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E mathematics/3.14: Copying sources to build folder E mathematics/3.14: Building your package in /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b E mathematics/3.14: Calling generate() E mathematics/3.14: Generators folder: /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b/build/Release/generators E mathematics/3.14: CMakeToolchain generated: conan_toolchain.cmake E mathematics/3.14: CMakeToolchain generated: /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b/build/Release/generators/CMakePresets.json E mathematics/3.14: CMakeToolchain generated: /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b/CMakeUserPresets.json E mathematics/3.14: Generating aggregated env files E mathematics/3.14: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E mathematics/3.14: Calling build() E mathematics/3.14: Running CMake.configure() E mathematics/3.14: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b" E -- Using Conan toolchain: /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b/build/Release E E mathematics/3.14: Running CMake.build() E mathematics/3.14: RUN: cmake --build "/tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b/build/Release" -- -j4 E Scanning dependencies of target mathematics E [ 50%] Building CXX object CMakeFiles/mathematics.dir/src/mathematics.cpp.o E [100%] Linking CXX static library libmathematics.a E [100%] Built target mathematics E E mathematics/3.14: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' built E mathematics/3.14: Build folder /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b/build/Release E mathematics/3.14: Generating the package E mathematics/3.14: Packaging in folder /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/p E mathematics/3.14: Calling package() E mathematics/3.14: Running CMake.install() E mathematics/3.14: RUN: cmake --install "/tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/b/build/Release" --prefix "/tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/p/lib/libmathematics.a E -- Installing: /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/p/include/mathematics.h E E mathematics/3.14: package(): Packaged 1 '.a' file: libmathematics.a E mathematics/3.14: package(): Packaged 1 '.h' file: mathematics.h E mathematics/3.14: Created package revision e41049f9047f0085d1a2c73a584a7bf9 E mathematics/3.14: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E mathematics/3.14: Full package reference: mathematics/3.14#4c577f95251563befa2fc6da791a3a04:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#e41049f9047f0085d1a2c73a584a7bf9 E mathematics/3.14: Package folder /tmp/tmpgzqtv1kxconans/path with spaces/.conan2/p/b/mathea5ae1d2382272/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E mathematics/3.14 (test package): /tmp/tmp2__owok4conans/path with spaces/test_package/conanfile.py E Requirements E mathematics/3.14#4c577f95251563befa2fc6da791a3a04 - Cache E E ======== Computing necessary packages ======== E Requirements E mathematics/3.14#4c577f95251563befa2fc6da791a3a04:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#e41049f9047f0085d1a2c73a584a7bf9 - Cache E E ======== Installing packages ======== E mathematics/3.14: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmp2__owok4conans/path with spaces/test_package/build/gcc-8-x86_64-release E mathematics/3.14 (test package): Test package build: build/gcc-8-x86_64-release E mathematics/3.14 (test package): Test package build folder: /tmp/tmp2__owok4conans/path with spaces/test_package/build/gcc-8-x86_64-release E mathematics/3.14 (test package): Writing generators to /tmp/tmp2__owok4conans/path with spaces/test_package/build/gcc-8-x86_64-release/generators E mathematics/3.14 (test package): Generator 'CMakeDeps' calling 'generate()' E mathematics/3.14 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(mathematics) E target_link_libraries(... mathematics::mathematics) E mathematics/3.14 (test package): Generator 'CMakeToolchain' calling 'generate()' E mathematics/3.14 (test package): CMakeToolchain generated: conan_toolchain.cmake E mathematics/3.14 (test package): CMakeToolchain generated: /tmp/tmp2__owok4conans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E mathematics/3.14 (test package): CMakeToolchain generated: /tmp/tmp2__owok4conans/path with spaces/test_package/CMakeUserPresets.json E mathematics/3.14 (test package): Generating aggregated env files E mathematics/3.14 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E mathematics/3.14 (test package): Calling build() E mathematics/3.14 (test package): Running CMake.configure() E mathematics/3.14 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp2__owok4conans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp2__owok4conans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmp2__owok4conans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'mathematics::mathematics' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp2__owok4conans/path with spaces/test_package/build/gcc-8-x86_64-release E E mathematics/3.14 (test package): Running CMake.build() E mathematics/3.14 (test package): RUN: cmake --build "/tmp/tmp2__owok4conans/path with spaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmp2__owok4conans/path with spaces/test_package/src/example.cpp:1:10: fatal error: mathematics.h: No such file or directory E 1 | #include "mathematics.h" E | ^~~~~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: mathematics/3.14 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp2__owok4conans/path with spaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: mathematics/3.14 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ___________________ test_exports_sources_common_code_layout ____________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_exports_sources_common_code_layout(): """ Equal to the previous test, but actually building and using cmake_layout """ c = TestClient() conanfile = textwrap.dedent(""" import os from conan import ConanFile from conan.tools.cmake import cmake_layout, CMake from conan.tools.files import load, copy, save class Pkg(ConanFile): name = "pkg" version = "0.1" settings = "os", "compiler", "build_type", "arch" generators = "CMakeToolchain" def layout(self): self.folders.root = ".." self.folders.subproject = "pkg" cmake_layout(self) def export_sources(self): source_folder = os.path.join(self.recipe_folder, "..") copy(self, "*", source_folder, self.export_sources_folder) def build(self): cmake = CMake(self) cmake.configure() cmake.build() self.run(os.path.join(self.cpp.build.bindirs[0], "myapp")) """) cmake_include = "include(${CMAKE_CURRENT_LIST_DIR}/../common/myutils.cmake)" c.save({"pkg/conanfile.py": conanfile, "pkg/app.cpp": gen_function_cpp(name="main", includes=["../common/myheader"], preprocessor=["MYDEFINE"]), "pkg/CMakeLists.txt": gen_cmakelists(appsources=["app.cpp"], custom_content=cmake_include), "common/myutils.cmake": 'message(STATUS "MYUTILS.CMAKE!")', "common/myheader.h": '#define MYDEFINE "MYDEFINEVALUE"'}) c.run("create pkg") assert "MYUTILS.CMAKE!" in c.out > assert "main: Release!" in c.out E AssertionError: assert 'main: Release!' in '\n======== Exporting recipe to the cache ========\npkg/0.1: Exporting package recipe: /tmp/tmp74_tim_7conans/path wit...6d584a04cc60dd65767b\npkg/0.1: Package folder /tmp/tmphefm7qdvconans/path with spaces/.conan2/p/b/pkg757ad680c66d6/p\n' E + where '\n======== Exporting recipe to the cache ========\npkg/0.1: Exporting package recipe: /tmp/tmp74_tim_7conans/path wit...6d584a04cc60dd65767b\npkg/0.1: Package folder /tmp/tmphefm7qdvconans/path with spaces/.conan2/p/b/pkg757ad680c66d6/p\n' = .out conans/test/functional/layout/test_in_subfolder.py:156: AssertionError _____________________ test_editable_cmake_windows_folders ______________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_editable_cmake_windows_folders(): build_folder = temp_folder() > editable_cmake(generator=None, build_folder=build_folder) conans/test/functional/layout/test_editable_cmake.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/functional/layout/test_editable_cmake.py:48: in editable_cmake build_pkg("dep") conans/test/functional/layout/test_editable_cmake.py:34: in build_pkg c.run(f"build . {build_editable}") conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'build . ', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...conanfile.py (pkg/0.1): Error in build() method, line 21\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E build . E =================================== Output: ==================================== E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E conanfile.py (pkg/0.1): /tmp/tmpjhawjeyrconans/path with spaces/pkg/conanfile.py E Requirements E dep/0.1 - Editable E E ======== Computing necessary packages ======== E Requirements E dep/0.1:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Editable E E ======== Installing packages ======== E E ======== Installing packages ======== E dep/0.1: Rewriting files of editable package 'dep' at '/tmp/tmp0dqwjk6mconans/path with spaces/build/Release/generators' E dep/0.1: Writing generators to /tmp/tmp0dqwjk6mconans/path with spaces/build/Release/generators E dep/0.1: Generator 'CMakeToolchain' calling 'generate()' E dep/0.1: CMakeToolchain generated: conan_toolchain.cmake E dep/0.1: CMakeToolchain generated: /tmp/tmp0dqwjk6mconans/path with spaces/build/Release/generators/CMakePresets.json E dep/0.1: CMakeToolchain generated: /tmp/tmpjhawjeyrconans/path with spaces/dep/CMakeUserPresets.json E dep/0.1: Generator 'CMakeDeps' calling 'generate()' E dep/0.1: Generating aggregated env files E dep/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Finalizing install (deploy, generators) ======== E conanfile.py (pkg/0.1): Writing generators to /tmp/tmpjhawjeyrconans/path with spaces/pkg/build/Release/generators E conanfile.py (pkg/0.1): Generator 'CMakeToolchain' calling 'generate()' E conanfile.py (pkg/0.1): CMakeToolchain generated: conan_toolchain.cmake E conanfile.py (pkg/0.1): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json. E (cmake>=3.23) cmake --preset conan-release E (cmake<3.23) cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE:STRING=Release E conanfile.py (pkg/0.1): CMakeToolchain generated: /tmp/tmpjhawjeyrconans/path with spaces/pkg/build/Release/generators/CMakePresets.json E conanfile.py (pkg/0.1): CMakeToolchain generated: /tmp/tmpjhawjeyrconans/path with spaces/pkg/CMakeUserPresets.json E conanfile.py (pkg/0.1): Generator 'CMakeDeps' calling 'generate()' E conanfile.py (pkg/0.1): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(dep) E target_link_libraries(... dep::dep) E conanfile.py (pkg/0.1): Generating aggregated env files E conanfile.py (pkg/0.1): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Calling build() ======== E conanfile.py (pkg/0.1): Calling build() E conanfile.py (pkg/0.1): Running CMake.configure() E conanfile.py (pkg/0.1): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpjhawjeyrconans/path with spaces/pkg" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpjhawjeyrconans/path with spaces/pkg" E -- Using Conan toolchain: /tmp/tmpjhawjeyrconans/path with spaces/pkg/build/Release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'dep::dep' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpjhawjeyrconans/path with spaces/pkg/build/Release E E conanfile.py (pkg/0.1): Running CMake.build() E conanfile.py (pkg/0.1): RUN: cmake --build "/tmp/tmpjhawjeyrconans/path with spaces/pkg/build/Release" -- -j4 E Scanning dependencies of target pkg E [ 50%] Building CXX object CMakeFiles/pkg.dir/src/pkg.cpp.o E /tmp/tmpjhawjeyrconans/path with spaces/pkg/src/pkg.cpp:6:10: fatal error: dep.h: No such file or directory E 6 | #include "dep.h" E | ^~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/pkg.dir/build.make:63: CMakeFiles/pkg.dir/src/pkg.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/pkg.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: conanfile.py (pkg/0.1): Error in build() method, line 21 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpjhawjeyrconans/path with spaces/pkg/conanfile.py", line 21, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/build.py", line 70, in build E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: conanfile.py (pkg/0.1): Error in build() method, line 21 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ____________________ LinuxTest.test_toolchain_linux_0_Debug ____________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python a = (,) @wraps(func) def standalone_func(*a): > return func(*(a + p.args), **p.kwargs) .pyenv/versions/3.6.15/lib/python3.6/site-packages/parameterized/parameterized.py:533: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/functional/toolchains/cmake/test_cmake.py:366: in test_toolchain_linux self._run_build(settings, {"shared": shared}) conans/test/functional/toolchains/cmake/test_cmake.py:160: in _run_build self.client.run("build .. %s %s -of=." % (settings, options)) conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'build .. -s compiler="gcc" -s compiler.cppstd="14" -s compiler.libcxx="libstdc++" -s arch="x86" -s build_type="Debug" -o shared=True -of=.' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...xception: conanfile.py: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E build .. -s compiler="gcc" -s compiler.cppstd="14" -s compiler.libcxx="libstdc++" -s arch="x86" -s build_type="Debug" -o shared=True -of=. E =================================== Output: ==================================== E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86 E build_type=Debug E compiler=gcc E compiler.cppstd=14 E compiler.libcxx=libstdc++ E compiler.version=8 E os=Linux E [options] E shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E conanfile.py: /tmp/tmpzaba87quconans/path with spaces/conanfile.py E Requirements E hello/0.1#837c81a8a7b6351feb6d4f1152f3e784 - Cache E E ======== Computing necessary packages ======== E Requirements E hello/0.1#837c81a8a7b6351feb6d4f1152f3e784:9e186f6d94c008b544af1569d1a6368d8339efc5#30289471bbb8d5d73a139ddb42a2a117 - Cache E E ======== Installing packages ======== E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 1) E E ======== Finalizing install (deploy, generators) ======== E conanfile.py: Writing generators to /tmp/tmpzaba87quconans/path with spaces/build E conanfile.py: Generator 'CMakeDeps' calling 'generate()' E conanfile.py: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E conanfile.py: Calling generate() E conanfile.py: Generators folder: /tmp/tmpzaba87quconans/path with spaces/build E conanfile.py: CMakeToolchain generated: conan_toolchain.cmake E conanfile.py: CMakeToolchain: Preset 'conan-debug' added to CMakePresets.json. E (cmake>=3.23) cmake --preset conan-debug E (cmake<3.23) cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH=conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE:STRING=Debug E conanfile.py: CMakeToolchain generated: /tmp/tmpzaba87quconans/path with spaces/build/CMakePresets.json E conanfile.py: CMakeToolchain generated: /tmp/tmpzaba87quconans/path with spaces/CMakeUserPresets.json E conanfile.py: Generating aggregated env files E conanfile.py: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Calling build() ======== E conanfile.py: Calling build() E conanfile.py: Running CMake.configure() E conanfile.py: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpzaba87quconans/path with spaces/build" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Debug', 'type': 'STRING'}" "/tmp/tmpzaba87quconans/path with spaces" E -- Using Conan toolchain: /tmp/tmpzaba87quconans/path with spaces/build/conan_toolchain.cmake E -- Conan toolchain: C++ Standard 14 with extensions OFF E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The C compiler identification is GNU 9.4.0 E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working C compiler: /usr/bin/cc E -- Check for working C compiler: /usr/bin/cc -- works E -- Detecting C compiler ABI info E -- Detecting C compiler ABI info - done E -- Detecting C compile features E -- Detecting C compile features - done E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpzaba87quconans/path with spaces/build E >> CMAKE_GENERATOR_PLATFORM: E >> CMAKE_BUILD_TYPE: {'value': 'Debug', 'type': 'STRING'} E >> CMAKE_CXX_FLAGS: -m32 E >> CMAKE_CXX_FLAGS_DEBUG: -g E >> CMAKE_CXX_FLAGS_RELEASE: -O3 -DNDEBUG E >> CMAKE_C_FLAGS: -m32 E >> CMAKE_C_FLAGS_DEBUG: -g E >> CMAKE_C_FLAGS_RELEASE: -O3 -DNDEBUG E >> CMAKE_SHARED_LINKER_FLAGS: -m32 E >> CMAKE_EXE_LINKER_FLAGS: -m32 E >> CMAKE_CXX_STANDARD: 14 E >> CMAKE_CXX_EXTENSIONS: OFF E >> CMAKE_POSITION_INDEPENDENT_CODE: E >> CMAKE_SKIP_RPATH: NO E >> CMAKE_INSTALL_NAME_DIR: E >> CMAKE_MODULE_PATH: /tmp/tmpzaba87quconans/path with spaces/build E >> CMAKE_PREFIX_PATH: /tmp/tmpzaba87quconans/path with spaces/build E >> BUILD_SHARED_LIBS: ON E >> COMPILE_DEFINITIONS: _GLIBCXX_USE_CXX11_ABI=0;MYDEFINE="MYDEF_VALUE";MYDEFINEINT=42;$<$:MYDEFINE_CONFIG="MYDEF_DEBUG">$<$:MYDEFINE_CONFIG="MYDEF_RELEASE">;$<$:MYDEFINEINT_CONFIG=421>$<$:MYDEFINEINT_CONFIG=422> E E conanfile.py: Running CMake.build() E conanfile.py: RUN: cmake --build "/tmp/tmpzaba87quconans/path with spaces/build" -- -j4 E Scanning dependencies of target app_lib E [ 25%] Building CXX object CMakeFiles/app_lib.dir/app_lib.cpp.o E /tmp/tmpzaba87quconans/path with spaces/app_lib.cpp:8:10: fatal error: hello.h: No such file or directory E 8 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/app_lib.dir/build.make:63: CMakeFiles/app_lib.dir/app_lib.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/app_lib.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: conanfile.py: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpzaba87quconans/path with spaces/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/build.py", line 70, in build E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: conanfile.py: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ___________________ LinuxTest.test_toolchain_linux_1_Release ___________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python a = (,) @wraps(func) def standalone_func(*a): > return func(*(a + p.args), **p.kwargs) .pyenv/versions/3.6.15/lib/python3.6/site-packages/parameterized/parameterized.py:533: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/functional/toolchains/cmake/test_cmake.py:366: in test_toolchain_linux self._run_build(settings, {"shared": shared}) conans/test/functional/toolchains/cmake/test_cmake.py:160: in _run_build self.client.run("build .. %s %s -of=." % (settings, options)) conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'build .. -s compiler="gcc" -s compiler.cppstd="gnu14" -s compiler.libcxx="libstdc++11" -s arch="x86_64" -s build_type="Release" -o shared=False -of=.' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...xception: conanfile.py: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E build .. -s compiler="gcc" -s compiler.cppstd="gnu14" -s compiler.libcxx="libstdc++11" -s arch="x86_64" -s build_type="Release" -o shared=False -of=. E =================================== Output: ==================================== E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.cppstd=gnu14 E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E shared=False E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E conanfile.py: /tmp/tmp3gl0c9rfconans/path with spaces/conanfile.py E Requirements E hello/0.1#837c81a8a7b6351feb6d4f1152f3e784 - Cache E E ======== Computing necessary packages ======== E Requirements E hello/0.1#837c81a8a7b6351feb6d4f1152f3e784:efa83b160a55b033c4ea706ddb980cd708e3ba1b#08179761b7535eb52fa8f4c0d24f8f0e - Cache E E ======== Installing packages ======== E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 1) E E ======== Finalizing install (deploy, generators) ======== E conanfile.py: Writing generators to /tmp/tmp3gl0c9rfconans/path with spaces/build E conanfile.py: Generator 'CMakeDeps' calling 'generate()' E conanfile.py: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E conanfile.py: Calling generate() E conanfile.py: Generators folder: /tmp/tmp3gl0c9rfconans/path with spaces/build E conanfile.py: CMakeToolchain generated: conan_toolchain.cmake E conanfile.py: CMakeToolchain: Preset 'conan-release' added to CMakePresets.json. E (cmake>=3.23) cmake --preset conan-release E (cmake<3.23) cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH=conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE:STRING=Release E conanfile.py: CMakeToolchain generated: /tmp/tmp3gl0c9rfconans/path with spaces/build/CMakePresets.json E conanfile.py: CMakeToolchain generated: /tmp/tmp3gl0c9rfconans/path with spaces/CMakeUserPresets.json E conanfile.py: Generating aggregated env files E conanfile.py: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Calling build() ======== E conanfile.py: Calling build() E conanfile.py: Running CMake.configure() E conanfile.py: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp3gl0c9rfconans/path with spaces/build" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp3gl0c9rfconans/path with spaces" E -- Using Conan toolchain: /tmp/tmp3gl0c9rfconans/path with spaces/build/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: C++ Standard 14 with extensions ON E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The C compiler identification is GNU 9.4.0 E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working C compiler: /usr/bin/cc E -- Check for working C compiler: /usr/bin/cc -- works E -- Detecting C compiler ABI info E -- Detecting C compiler ABI info - done E -- Detecting C compile features E -- Detecting C compile features - done E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp3gl0c9rfconans/path with spaces/build E >> CMAKE_GENERATOR_PLATFORM: E >> CMAKE_BUILD_TYPE: {'value': 'Release', 'type': 'STRING'} E >> CMAKE_CXX_FLAGS: -m64 E >> CMAKE_CXX_FLAGS_DEBUG: -g E >> CMAKE_CXX_FLAGS_RELEASE: -O3 -DNDEBUG E >> CMAKE_C_FLAGS: -m64 E >> CMAKE_C_FLAGS_DEBUG: -g E >> CMAKE_C_FLAGS_RELEASE: -O3 -DNDEBUG E >> CMAKE_SHARED_LINKER_FLAGS: -m64 E >> CMAKE_EXE_LINKER_FLAGS: -m64 E >> CMAKE_CXX_STANDARD: 14 E >> CMAKE_CXX_EXTENSIONS: ON E >> CMAKE_POSITION_INDEPENDENT_CODE: ON E >> CMAKE_SKIP_RPATH: NO E >> CMAKE_INSTALL_NAME_DIR: E >> CMAKE_MODULE_PATH: /tmp/tmp3gl0c9rfconans/path with spaces/build E >> CMAKE_PREFIX_PATH: /tmp/tmp3gl0c9rfconans/path with spaces/build E >> BUILD_SHARED_LIBS: OFF E >> COMPILE_DEFINITIONS: MYDEFINE="MYDEF_VALUE";MYDEFINEINT=42;$<$:MYDEFINE_CONFIG="MYDEF_DEBUG">$<$:MYDEFINE_CONFIG="MYDEF_RELEASE">;$<$:MYDEFINEINT_CONFIG=421>$<$:MYDEFINEINT_CONFIG=422> E E conanfile.py: Running CMake.build() E conanfile.py: RUN: cmake --build "/tmp/tmp3gl0c9rfconans/path with spaces/build" -- -j4 E Scanning dependencies of target app_lib E [ 25%] Building CXX object CMakeFiles/app_lib.dir/app_lib.cpp.o E /tmp/tmp3gl0c9rfconans/path with spaces/app_lib.cpp:8:10: fatal error: hello.h: No such file or directory E 8 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/app_lib.dir/build.make:63: CMakeFiles/app_lib.dir/app_lib.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/app_lib.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: conanfile.py: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp3gl0c9rfconans/path with spaces/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/build.py", line 70, in build E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: conanfile.py: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _______________________ test_editable_cmake_linux[None] ________________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python generator = None @pytest.mark.skipif(platform.system() != "Linux", reason="Only linux") @pytest.mark.parametrize("generator", [None, "Ninja", "Ninja Multi-Config"]) @pytest.mark.tool("cmake", "3.17") def test_editable_cmake_linux(generator): > editable_cmake(generator) conans/test/functional/layout/test_editable_cmake.py:90: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/functional/layout/test_editable_cmake.py:48: in editable_cmake build_pkg("dep") conans/test/functional/layout/test_editable_cmake.py:34: in build_pkg c.run(f"build . {build_editable}") conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'build . ', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...conanfile.py (pkg/0.1): Error in build() method, line 21\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E build . E =================================== Output: ==================================== E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E conanfile.py (pkg/0.1): /tmp/tmpfeskixqyconans/path with spaces/pkg/conanfile.py E Requirements E dep/0.1 - Editable E E ======== Computing necessary packages ======== E Requirements E dep/0.1:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Editable E E ======== Installing packages ======== E E ======== Installing packages ======== E dep/0.1: Rewriting files of editable package 'dep' at '/tmp/tmpfeskixqyconans/path with spaces/dep/build/Release/generators' E dep/0.1: Writing generators to /tmp/tmpfeskixqyconans/path with spaces/dep/build/Release/generators E dep/0.1: Generator 'CMakeToolchain' calling 'generate()' E dep/0.1: CMakeToolchain generated: conan_toolchain.cmake E dep/0.1: CMakeToolchain generated: /tmp/tmpfeskixqyconans/path with spaces/dep/build/Release/generators/CMakePresets.json E dep/0.1: CMakeToolchain generated: /tmp/tmpfeskixqyconans/path with spaces/dep/CMakeUserPresets.json E dep/0.1: Generator 'CMakeDeps' calling 'generate()' E dep/0.1: Generating aggregated env files E dep/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Finalizing install (deploy, generators) ======== E conanfile.py (pkg/0.1): Writing generators to /tmp/tmpfeskixqyconans/path with spaces/pkg/build/Release/generators E conanfile.py (pkg/0.1): Generator 'CMakeToolchain' calling 'generate()' E conanfile.py (pkg/0.1): CMakeToolchain generated: conan_toolchain.cmake E conanfile.py (pkg/0.1): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json. E (cmake>=3.23) cmake --preset conan-release E (cmake<3.23) cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE:STRING=Release E conanfile.py (pkg/0.1): CMakeToolchain generated: /tmp/tmpfeskixqyconans/path with spaces/pkg/build/Release/generators/CMakePresets.json E conanfile.py (pkg/0.1): CMakeToolchain generated: /tmp/tmpfeskixqyconans/path with spaces/pkg/CMakeUserPresets.json E conanfile.py (pkg/0.1): Generator 'CMakeDeps' calling 'generate()' E conanfile.py (pkg/0.1): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(dep) E target_link_libraries(... dep::dep) E conanfile.py (pkg/0.1): Generating aggregated env files E conanfile.py (pkg/0.1): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Calling build() ======== E conanfile.py (pkg/0.1): Calling build() E conanfile.py (pkg/0.1): Running CMake.configure() E conanfile.py (pkg/0.1): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpfeskixqyconans/path with spaces/pkg" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpfeskixqyconans/path with spaces/pkg" E -- Using Conan toolchain: /tmp/tmpfeskixqyconans/path with spaces/pkg/build/Release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'dep::dep' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpfeskixqyconans/path with spaces/pkg/build/Release E E conanfile.py (pkg/0.1): Running CMake.build() E conanfile.py (pkg/0.1): RUN: cmake --build "/tmp/tmpfeskixqyconans/path with spaces/pkg/build/Release" -- -j4 E Scanning dependencies of target pkg E [ 50%] Building CXX object CMakeFiles/pkg.dir/src/pkg.cpp.o E /tmp/tmpfeskixqyconans/path with spaces/pkg/src/pkg.cpp:6:10: fatal error: dep.h: No such file or directory E 6 | #include "dep.h" E | ^~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/pkg.dir/build.make:83: CMakeFiles/pkg.dir/src/pkg.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/pkg.dir/all] Error 2 E make: *** [Makefile:104: all] Error 2 E E ERROR: conanfile.py (pkg/0.1): Error in build() method, line 21 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpfeskixqyconans/path with spaces/pkg/conanfile.py", line 21, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/build.py", line 70, in build E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: conanfile.py (pkg/0.1): Error in build() method, line 21 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _______________________ test_editable_cmake_linux[Ninja] _______________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python generator = 'Ninja' @pytest.mark.skipif(platform.system() != "Linux", reason="Only linux") @pytest.mark.parametrize("generator", [None, "Ninja", "Ninja Multi-Config"]) @pytest.mark.tool("cmake", "3.17") def test_editable_cmake_linux(generator): > editable_cmake(generator) conans/test/functional/layout/test_editable_cmake.py:90: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/functional/layout/test_editable_cmake.py:30: in editable_cmake build_dep() conans/test/functional/layout/test_editable_cmake.py:25: in build_dep c.run("build . {}".format(output_folder)) conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'build . ', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nfile.py (dep/0.1): Error in build() method, line 30\n\tcmake.configure()\n\tConanException: Error 1 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E build . E =================================== Output: ==================================== E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [conf] E tools.cmake.cmaketoolchain:generator=Ninja E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [conf] E tools.cmake.cmaketoolchain:generator=Ninja E E E ======== Computing dependency graph ======== E Graph root E conanfile.py (dep/0.1): /tmp/tmpbzb3fe50conans/path with spaces/dep/conanfile.py E E ======== Computing necessary packages ======== E E ======== Installing packages ======== E E ======== Installing packages ======== E E ======== Finalizing install (deploy, generators) ======== E conanfile.py (dep/0.1): Writing generators to /tmp/tmpbzb3fe50conans/path with spaces/dep/build/Release/generators E conanfile.py (dep/0.1): Generator 'CMakeToolchain' calling 'generate()' E conanfile.py (dep/0.1): CMakeToolchain generated: conan_toolchain.cmake E conanfile.py (dep/0.1): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json. E (cmake>=3.23) cmake --preset conan-release E (cmake<3.23) cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE:STRING=Release E conanfile.py (dep/0.1): CMakeToolchain generated: /tmp/tmpbzb3fe50conans/path with spaces/dep/build/Release/generators/CMakePresets.json E conanfile.py (dep/0.1): CMakeToolchain generated: /tmp/tmpbzb3fe50conans/path with spaces/dep/CMakeUserPresets.json E conanfile.py (dep/0.1): Generator 'CMakeDeps' calling 'generate()' E conanfile.py (dep/0.1): Generating aggregated env files E conanfile.py (dep/0.1): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Calling build() ======== E conanfile.py (dep/0.1): Calling build() E conanfile.py (dep/0.1): Running CMake.configure() E conanfile.py (dep/0.1): RUN: cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpbzb3fe50conans/path with spaces/dep" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpbzb3fe50conans/path with spaces/dep" E -- Using Conan toolchain: /tmp/tmpbzb3fe50conans/path with spaces/dep/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E CMake Error: E Running E E '/usr/bin/ninja' '-C' '/tmp/tmpbzb3fe50conans/path with spaces/dep/build/Release' '-t' 'cleandead' E E failed with: E E ninja: error: rules.ninja:25: expected newline, got lexing error E E rule CXX_COMPILER__dep_{'value': 'Release', 'type': 'STRING'} E E ^ near here E E E E CMake Error: E Running E E '/usr/bin/ninja' '-C' '/tmp/tmpbzb3fe50conans/path with spaces/dep/build/Release' '-t' 'recompact' E E failed with: E E ninja: error: rules.ninja:25: expected newline, got lexing error E E rule CXX_COMPILER__dep_{'value': 'Release', 'type': 'STRING'} E E ^ near here E E E E CMake Generate step failed. Build files cannot be regenerated correctly. E E ERROR: conanfile.py (dep/0.1): Error in build() method, line 30 E cmake.configure() E ConanException: Error 1 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpbzb3fe50conans/path with spaces/dep/conanfile.py", line 30, in build E cmake.configure() E File "/home/conan/conan/tools/cmake/cmake.py", line 119, in configure E self._conanfile.run(command, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 1 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/build.py", line 70, in build E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: conanfile.py (dep/0.1): Error in build() method, line 30 E cmake.configure() E ConanException: Error 1 while executing conans/test/utils/tools.py:609: Exception ________________________ TestCmakeTestMethod.test_test _________________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python self = def test_test(self): conanfile = textwrap.dedent(""" from conan import ConanFile from conan.tools.cmake import CMake class App(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv", "VirtualRunEnv" exports_sources = "CMakeLists.txt", "example.cpp" def build_requirements(self): self.test_requires("test/0.1") def build(self): cmake = CMake(self) cmake.configure() cmake.build() cmake.test() cmake.ctest() """) cmakelist = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) project(App CXX) find_package(test CONFIG REQUIRED) add_executable(example example.cpp) target_link_libraries(example test::test) enable_testing() add_test(NAME example COMMAND example) """) c = TestClient() c.run("new cmake_lib -d name=test -d version=0.1") c.run("create . -tf=\"\" -o test*:shared=True") c.save({"conanfile.py": conanfile, "CMakeLists.txt": cmakelist, "example.cpp": gen_function_cpp(name="main", includes=["test"], calls=["test"])}, clean_first=True) # The create flow must work > c.run("create . --name=pkg --version=0.1 -pr:b=default -o test*:shared=True") conans/test/functional/toolchains/cmake/test_cmake.py:641: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=pkg --version=0.1 -pr:b=default -o test*:shared=True' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...onanException: pkg/0.1: Error in build() method, line 15\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=pkg --version=0.1 -pr:b=default -o test*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E pkg/0.1: Exporting package recipe: /tmp/tmpos_9jc83conans/path with spaces/conanfile.py E pkg/0.1: Copied 1 '.py' file: conanfile.py E pkg/0.1: Copied 1 '.txt' file: CMakeLists.txt E pkg/0.1: Copied 1 '.cpp' file: example.cpp E pkg/0.1: Exported to cache folder: /tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/pkge20b3ab7f3f88/e E pkg/0.1: Exported: pkg/0.1#4ae7cd26e80275e257ada494a40f2c5d (2024-04-16 13:16:33 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E test*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E pkg/0.1#4ae7cd26e80275e257ada494a40f2c5d - Cache E Test requirements E test/0.1#1940d305d19108f47986fba7e00367d2 - Cache E E ======== Computing necessary packages ======== E pkg/0.1: Forced build from source E Requirements E pkg/0.1#4ae7cd26e80275e257ada494a40f2c5d:f4bec17cf5bb949234cd84c756060aa715eaa5ca - Build E Test requirements E test/0.1#1940d305d19108f47986fba7e00367d2:0645178f9911c96e0f11d63b451090c571726042#12e8e46c917fbbfaed5623a87befbc7d - Cache E E ======== Installing packages ======== E test/0.1: Already installed! (1 of 2) E E -------- Installing package pkg/0.1 (2 of 2) -------- E pkg/0.1: Building from source E pkg/0.1: Package pkg/0.1:f4bec17cf5bb949234cd84c756060aa715eaa5ca E pkg/0.1: Copying sources to build folder E pkg/0.1: Building your package in /tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/b E pkg/0.1: Writing generators to /tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/b E pkg/0.1: Generator 'CMakeDeps' calling 'generate()' E pkg/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(test) E target_link_libraries(... test::test) E pkg/0.1: Generator 'CMakeToolchain' calling 'generate()' E pkg/0.1: CMakeToolchain generated: conan_toolchain.cmake E pkg/0.1: CMakeToolchain generated: /tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/b/CMakePresets.json E pkg/0.1: Generator 'VirtualBuildEnv' calling 'generate()' E pkg/0.1: Generator 'VirtualRunEnv' calling 'generate()' E pkg/0.1: Generating aggregated env files E pkg/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E pkg/0.1: Calling build() E pkg/0.1: Running CMake.configure() E pkg/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/b" E -- Using Conan toolchain: /tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'test::test' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/b E E pkg/0.1: Running CMake.build() E pkg/0.1: RUN: cmake --build "/tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/b" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/example.cpp.o E /tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/b/example.cpp:6:10: fatal error: test.h: No such file or directory E 6 | #include "test.h" E | ^~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:95: all] Error 2 E E pkg/0.1: ERROR: E Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' build failed E pkg/0.1: WARN: Build folder /tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/b/pkg8850c4afc3cbc/b E ERROR: pkg/0.1: Error in build() method, line 15 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpnhcj5gf9conans/path with spaces/.conan2/p/pkge20b3ab7f3f88/e/conanfile.py", line 15, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: pkg/0.1: Error in build() method, line 15 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception __________________________ test_no_soname_flag[True] ___________________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python nosoname_property = True @pytest.mark.skipif(platform.system() != "Linux", reason="Only Linux") @pytest.mark.tool("cmake") @pytest.mark.parametrize("nosoname_property", [ True, # without SONAME False # By default, with SONAME ]) def test_no_soname_flag(nosoname_property): """ This test case is testing this graph structure: * 'Executable' -> 'LibB' -> 'LibNoSoname' Where: * LibNoSoname: is a package built as shared and without the SONAME flag. * LibB: is a package which requires LibNoSoname. * Executable: is the final consumer building an application and depending on OtherLib. How: 1- Creates LibNoSoname and upload it to remote server 2- Creates LibB and upload it to remote server 3- Remove the Conan cache folder 4- Creates an application and consume LibB Goal: * If `self.cpp_info.set_property("nosoname", True), then the `Executable` runs OK. * If `self.cpp_info.set_property("nosoname", False), then the `Executable` fails. """ client = TestClient(default_server_user=True) # Creating nosoname/0.1 library client.save(pkg_cmake("nosoname", "0.1")) replace_in_file(ConanFileMock(), os.path.join(client.current_folder, "conanfile.py"), 'self.cpp_info.libs = ["nosoname"]', f'self.cpp_info.libs = ["nosoname"]\n self.cpp_info.set_property("nosoname", {nosoname_property})') replace_in_file(ConanFileMock(), os.path.join(client.current_folder, "CMakeLists.txt"), 'target_include_directories(nosoname PUBLIC "include")', 'target_include_directories(nosoname PUBLIC "include")\nset_target_properties(nosoname PROPERTIES NO_SONAME 1)') client.run("create . -o nosoname/*:shared=True") # Creating lib_b/0.1 library (depends on nosoname/0.1) client.save(pkg_cmake("lib_b", "0.1", requires=["nosoname/0.1"]), clean_first=True) > client.run("create . -o lib_b/*:shared=True -o nosoname/*:shared=True") conans/test/functional/toolchains/cmake/test_cmake_and_no_soname_flag.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -o lib_b/*:shared=True -o nosoname/*:shared=True' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...anException: lib_b/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -o lib_b/*:shared=True -o nosoname/*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E lib_b/0.1: Exporting package recipe: /tmp/tmpu5d07z0vconans/path with spaces/conanfile.py E lib_b/0.1: Copied 1 '.py' file: conanfile.py E lib_b/0.1: Copied 1 '.txt' file: CMakeLists.txt E lib_b/0.1: Copied 1 '.cpp' file: lib_b.cpp E lib_b/0.1: Copied 1 '.h' file: lib_b.h E lib_b/0.1: Exported to cache folder: /tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/lib_b0b942e97e5ada/e E lib_b/0.1: Exported: lib_b/0.1#a4b5ae764ea04efa2d0f165d14177a01 (2024-04-16 13:16:37 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E lib_b/*:shared=True E nosoname/*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E lib_b/0.1#a4b5ae764ea04efa2d0f165d14177a01 - Cache E nosoname/0.1#da98bd32d2d6e3be0ab1293610db86e2 - Cache E E ======== Computing necessary packages ======== E lib_b/0.1: Forced build from source E Requirements E lib_b/0.1#a4b5ae764ea04efa2d0f165d14177a01:3bc097f2ea2d60d9490ccdf527f0f164be1532fe - Build E nosoname/0.1#da98bd32d2d6e3be0ab1293610db86e2:0645178f9911c96e0f11d63b451090c571726042#92c87265ca0e0f28f0b4dd99f7cc1b3e - Cache E E ======== Installing packages ======== E nosoname/0.1: Already installed! (1 of 2) E E -------- Installing package lib_b/0.1 (2 of 2) -------- E lib_b/0.1: Building from source E lib_b/0.1: Package lib_b/0.1:3bc097f2ea2d60d9490ccdf527f0f164be1532fe E lib_b/0.1: Copying sources to build folder E lib_b/0.1: Building your package in /tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b E lib_b/0.1: Writing generators to /tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b/build/Release/generators E lib_b/0.1: Generator 'CMakeToolchain' calling 'generate()' E lib_b/0.1: CMakeToolchain generated: conan_toolchain.cmake E lib_b/0.1: CMakeToolchain generated: /tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b/build/Release/generators/CMakePresets.json E lib_b/0.1: CMakeToolchain generated: /tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b/CMakeUserPresets.json E lib_b/0.1: Generator 'CMakeDeps' calling 'generate()' E lib_b/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(nosoname) E target_link_libraries(... nosoname::nosoname) E lib_b/0.1: Generating aggregated env files E lib_b/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E lib_b/0.1: Calling build() E lib_b/0.1: Running CMake.configure() E lib_b/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b" E -- Using Conan toolchain: /tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'nosoname::nosoname' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b/build/Release E E lib_b/0.1: Running CMake.build() E lib_b/0.1: RUN: cmake --build "/tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b/build/Release" -- -j4 E Scanning dependencies of target lib_b E [ 50%] Building CXX object CMakeFiles/lib_b.dir/src/lib_b.cpp.o E /tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b/src/lib_b.cpp:8:10: fatal error: nosoname.h: No such file or directory E 8 | #include "nosoname.h" E | ^~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/lib_b.dir/build.make:63: CMakeFiles/lib_b.dir/src/lib_b.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/lib_b.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E lib_b/0.1: ERROR: E Package '3bc097f2ea2d60d9490ccdf527f0f164be1532fe' build failed E lib_b/0.1: WARN: Build folder /tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/b/lib_bfccf7d734249d/b/build/Release E ERROR: lib_b/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmprhyxcbpoconans/path with spaces/.conan2/p/lib_b0b942e97e5ada/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: lib_b/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception __________________________ test_no_soname_flag[False] __________________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python nosoname_property = False @pytest.mark.skipif(platform.system() != "Linux", reason="Only Linux") @pytest.mark.tool("cmake") @pytest.mark.parametrize("nosoname_property", [ True, # without SONAME False # By default, with SONAME ]) def test_no_soname_flag(nosoname_property): """ This test case is testing this graph structure: * 'Executable' -> 'LibB' -> 'LibNoSoname' Where: * LibNoSoname: is a package built as shared and without the SONAME flag. * LibB: is a package which requires LibNoSoname. * Executable: is the final consumer building an application and depending on OtherLib. How: 1- Creates LibNoSoname and upload it to remote server 2- Creates LibB and upload it to remote server 3- Remove the Conan cache folder 4- Creates an application and consume LibB Goal: * If `self.cpp_info.set_property("nosoname", True), then the `Executable` runs OK. * If `self.cpp_info.set_property("nosoname", False), then the `Executable` fails. """ client = TestClient(default_server_user=True) # Creating nosoname/0.1 library client.save(pkg_cmake("nosoname", "0.1")) replace_in_file(ConanFileMock(), os.path.join(client.current_folder, "conanfile.py"), 'self.cpp_info.libs = ["nosoname"]', f'self.cpp_info.libs = ["nosoname"]\n self.cpp_info.set_property("nosoname", {nosoname_property})') replace_in_file(ConanFileMock(), os.path.join(client.current_folder, "CMakeLists.txt"), 'target_include_directories(nosoname PUBLIC "include")', 'target_include_directories(nosoname PUBLIC "include")\nset_target_properties(nosoname PROPERTIES NO_SONAME 1)') client.run("create . -o nosoname/*:shared=True") # Creating lib_b/0.1 library (depends on nosoname/0.1) client.save(pkg_cmake("lib_b", "0.1", requires=["nosoname/0.1"]), clean_first=True) > client.run("create . -o lib_b/*:shared=True -o nosoname/*:shared=True") conans/test/functional/toolchains/cmake/test_cmake_and_no_soname_flag.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -o lib_b/*:shared=True -o nosoname/*:shared=True' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...anException: lib_b/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -o lib_b/*:shared=True -o nosoname/*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E lib_b/0.1: Exporting package recipe: /tmp/tmpbr5nefktconans/path with spaces/conanfile.py E lib_b/0.1: Copied 1 '.py' file: conanfile.py E lib_b/0.1: Copied 1 '.txt' file: CMakeLists.txt E lib_b/0.1: Copied 1 '.cpp' file: lib_b.cpp E lib_b/0.1: Copied 1 '.h' file: lib_b.h E lib_b/0.1: Exported to cache folder: /tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/lib_b0b942e97e5ada/e E lib_b/0.1: Exported: lib_b/0.1#a4b5ae764ea04efa2d0f165d14177a01 (2024-04-16 13:16:40 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E lib_b/*:shared=True E nosoname/*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E lib_b/0.1#a4b5ae764ea04efa2d0f165d14177a01 - Cache E nosoname/0.1#597d910ad1fac16908dce85d63e11a60 - Cache E E ======== Computing necessary packages ======== E lib_b/0.1: Forced build from source E Requirements E lib_b/0.1#a4b5ae764ea04efa2d0f165d14177a01:3bc097f2ea2d60d9490ccdf527f0f164be1532fe - Build E nosoname/0.1#597d910ad1fac16908dce85d63e11a60:0645178f9911c96e0f11d63b451090c571726042#92c87265ca0e0f28f0b4dd99f7cc1b3e - Cache E E ======== Installing packages ======== E nosoname/0.1: Already installed! (1 of 2) E E -------- Installing package lib_b/0.1 (2 of 2) -------- E lib_b/0.1: Building from source E lib_b/0.1: Package lib_b/0.1:3bc097f2ea2d60d9490ccdf527f0f164be1532fe E lib_b/0.1: Copying sources to build folder E lib_b/0.1: Building your package in /tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b E lib_b/0.1: Writing generators to /tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b/build/Release/generators E lib_b/0.1: Generator 'CMakeToolchain' calling 'generate()' E lib_b/0.1: CMakeToolchain generated: conan_toolchain.cmake E lib_b/0.1: CMakeToolchain generated: /tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b/build/Release/generators/CMakePresets.json E lib_b/0.1: CMakeToolchain generated: /tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b/CMakeUserPresets.json E lib_b/0.1: Generator 'CMakeDeps' calling 'generate()' E lib_b/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(nosoname) E target_link_libraries(... nosoname::nosoname) E lib_b/0.1: Generating aggregated env files E lib_b/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E lib_b/0.1: Calling build() E lib_b/0.1: Running CMake.configure() E lib_b/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b" E -- Using Conan toolchain: /tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'nosoname::nosoname' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b/build/Release E E lib_b/0.1: Running CMake.build() E lib_b/0.1: RUN: cmake --build "/tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b/build/Release" -- -j4 E Scanning dependencies of target lib_b E [ 50%] Building CXX object CMakeFiles/lib_b.dir/src/lib_b.cpp.o E /tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b/src/lib_b.cpp:8:10: fatal error: nosoname.h: No such file or directory E 8 | #include "nosoname.h" E | ^~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/lib_b.dir/build.make:63: CMakeFiles/lib_b.dir/src/lib_b.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/lib_b.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E lib_b/0.1: ERROR: E Package '3bc097f2ea2d60d9490ccdf527f0f164be1532fe' build failed E lib_b/0.1: WARN: Build folder /tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/b/lib_bca46dd2d877d9/b/build/Release E ERROR: lib_b/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp0m_ismx3conans/path with spaces/.conan2/p/lib_b0b942e97e5ada/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: lib_b/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _______________________ test_install_output_directories ________________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python def test_install_output_directories(): """ If we change the libdirs of the cpp.package, as we are doing cmake.install, the output directory for the libraries is changed """ ref = RecipeReference.loads("zlib/1.2.11") client = TurboTestClient() client.run("new cmake_lib -d name=zlib -d version=1.2.11") cf = client.load("conanfile.py") > pref = client.create(ref, conanfile=cf) conans/test/functional/toolchains/cmake/test_cmake_toolchain.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:834: in create assert_error=assert_error) conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=zlib --version=1.2.11 ', assert_error = False error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\.../1.2.11 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=zlib --version=1.2.11 E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E zlib/1.2.11: Exporting package recipe: /tmp/tmpw62ha1ueconans/path with spaces/conanfile.py E zlib/1.2.11: Copied 1 '.py' file: conanfile.py E zlib/1.2.11: Copied 1 '.txt' file: CMakeLists.txt E zlib/1.2.11: Copied 1 '.cpp' file: zlib.cpp E zlib/1.2.11: Copied 1 '.h' file: zlib.h E zlib/1.2.11: Exported to cache folder: /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/zlibe8a11d7278ce7/e E zlib/1.2.11: Exported: zlib/1.2.11#ca132aec262236240c25ab03058b6d22 (2024-04-16 13:16:45 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E zlib/1.2.11#ca132aec262236240c25ab03058b6d22 - Cache E E ======== Computing necessary packages ======== E zlib/1.2.11: Forced build from source E Requirements E zlib/1.2.11#ca132aec262236240c25ab03058b6d22:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Build E E ======== Installing packages ======== E E -------- Installing package zlib/1.2.11 (1 of 1) -------- E zlib/1.2.11: Building from source E zlib/1.2.11: Package zlib/1.2.11:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E zlib/1.2.11: Copying sources to build folder E zlib/1.2.11: Building your package in /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b E zlib/1.2.11: Calling generate() E zlib/1.2.11: Generators folder: /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b/build/Release/generators E zlib/1.2.11: CMakeToolchain generated: conan_toolchain.cmake E zlib/1.2.11: CMakeToolchain generated: /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b/build/Release/generators/CMakePresets.json E zlib/1.2.11: CMakeToolchain generated: /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b/CMakeUserPresets.json E zlib/1.2.11: Generating aggregated env files E zlib/1.2.11: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E zlib/1.2.11: Calling build() E zlib/1.2.11: Running CMake.configure() E zlib/1.2.11: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b" E -- Using Conan toolchain: /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b/build/Release E E zlib/1.2.11: Running CMake.build() E zlib/1.2.11: RUN: cmake --build "/tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b/build/Release" -- -j4 E Scanning dependencies of target zlib E [ 50%] Building CXX object CMakeFiles/zlib.dir/src/zlib.cpp.o E [100%] Linking CXX static library libzlib.a E [100%] Built target zlib E E zlib/1.2.11: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' built E zlib/1.2.11: Build folder /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b/build/Release E zlib/1.2.11: Generating the package E zlib/1.2.11: Packaging in folder /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/p E zlib/1.2.11: Calling package() E zlib/1.2.11: Running CMake.install() E zlib/1.2.11: RUN: cmake --install "/tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/b/build/Release" --prefix "/tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/p/lib/libzlib.a E -- Installing: /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/p/include/zlib.h E E zlib/1.2.11: package(): Packaged 1 '.a' file: libzlib.a E zlib/1.2.11: package(): Packaged 1 '.h' file: zlib.h E zlib/1.2.11: Created package revision c3b9d32ddc8f55b201d70bcbc5e3f87f E zlib/1.2.11: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E zlib/1.2.11: Full package reference: zlib/1.2.11#ca132aec262236240c25ab03058b6d22:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#c3b9d32ddc8f55b201d70bcbc5e3f87f E zlib/1.2.11: Package folder /tmp/tmpu6wn14e2conans/path with spaces/.conan2/p/b/zlib82738f0c2a920/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E zlib/1.2.11 (test package): /tmp/tmpw62ha1ueconans/path with spaces/test_package/conanfile.py E Requirements E zlib/1.2.11#ca132aec262236240c25ab03058b6d22 - Cache E E ======== Computing necessary packages ======== E Requirements E zlib/1.2.11#ca132aec262236240c25ab03058b6d22:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#c3b9d32ddc8f55b201d70bcbc5e3f87f - Cache E E ======== Installing packages ======== E zlib/1.2.11: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmpw62ha1ueconans/path with spaces/test_package/build/gcc-8-x86_64-release E zlib/1.2.11 (test package): Test package build: build/gcc-8-x86_64-release E zlib/1.2.11 (test package): Test package build folder: /tmp/tmpw62ha1ueconans/path with spaces/test_package/build/gcc-8-x86_64-release E zlib/1.2.11 (test package): Writing generators to /tmp/tmpw62ha1ueconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators E zlib/1.2.11 (test package): Generator 'CMakeDeps' calling 'generate()' E zlib/1.2.11 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(zlib) E target_link_libraries(... zlib::zlib) E zlib/1.2.11 (test package): Generator 'CMakeToolchain' calling 'generate()' E zlib/1.2.11 (test package): CMakeToolchain generated: conan_toolchain.cmake E zlib/1.2.11 (test package): CMakeToolchain generated: /tmp/tmpw62ha1ueconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E zlib/1.2.11 (test package): CMakeToolchain generated: /tmp/tmpw62ha1ueconans/path with spaces/test_package/CMakeUserPresets.json E zlib/1.2.11 (test package): Generating aggregated env files E zlib/1.2.11 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E zlib/1.2.11 (test package): Calling build() E zlib/1.2.11 (test package): Running CMake.configure() E zlib/1.2.11 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpw62ha1ueconans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpw62ha1ueconans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmpw62ha1ueconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'zlib::zlib' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpw62ha1ueconans/path with spaces/test_package/build/gcc-8-x86_64-release E E zlib/1.2.11 (test package): Running CMake.build() E zlib/1.2.11 (test package): RUN: cmake --build "/tmp/tmpw62ha1ueconans/path with spaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmpw62ha1ueconans/path with spaces/test_package/src/example.cpp: In function 'int main()': E /tmp/tmpw62ha1ueconans/path with spaces/test_package/src/example.cpp:6:5: error: 'zlib' was not declared in this scope E 6 | zlib(); E | ^~~~ E /tmp/tmpw62ha1ueconans/path with spaces/test_package/src/example.cpp:11:5: error: 'zlib_print_vector' was not declared in this scope E 11 | zlib_print_vector(vec); E | ^~~~~~~~~~~~~~~~~ E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: zlib/1.2.11 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpw62ha1ueconans/path with spaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: zlib/1.2.11 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _____________________ test_editable_cmake_linux_exe[None] ______________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python generator = None @pytest.mark.skipif(platform.system() != "Linux", reason="Only linux") @pytest.mark.parametrize("generator", [None, "Ninja", "Ninja Multi-Config"]) @pytest.mark.tool("cmake", "3.17") def test_editable_cmake_linux_exe(generator): > editable_cmake_exe(generator) conans/test/functional/layout/test_editable_cmake.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/functional/layout/test_editable_cmake.py:132: in editable_cmake_exe run_pkg("dep") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ msg = 'dep' def run_pkg(msg): host_arch = c.get_default_host_profile().settings['arch'] # FIXME: This only works with ``--install-folder``, layout() will break this cmd_release = environment_wrap_command(f"conanrunenv-release-{host_arch}", c.current_folder, "dep_app",) c.run_command(cmd_release) > assert "{}: Release!".format(msg) in c.out E AssertionError: assert 'dep: Release!' in 'main: Debug!\n main __x86_64__ defined\n main _GLIBCXX_USE_CXX11_ABI 1\n main __cplusplus201402\n main __GNUC__9\... __x86_64__ defined\n dep _GLIBCXX_USE_CXX11_ABI 1\n dep __cplusplus201402\n dep __GNUC__9\n dep __GNUC_MINOR__4\n' E + where 'dep: Release!' = ('dep') E + where = '{}: Release!'.format E + and 'main: Debug!\n main __x86_64__ defined\n main _GLIBCXX_USE_CXX11_ABI 1\n main __cplusplus201402\n main __GNUC__9\... __x86_64__ defined\n dep _GLIBCXX_USE_CXX11_ABI 1\n dep __cplusplus201402\n dep __GNUC__9\n dep __GNUC_MINOR__4\n' = .out conans/test/functional/layout/test_editable_cmake.py:123: AssertionError _______________ test_cmake_toolchain_definitions_complex_strings _______________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_cmake_toolchain_definitions_complex_strings(): # https://github.com/conan-io/conan/issues/11043 client = TestClient(path_with_spaces=False) profile = textwrap.dedent(r''' include(default) [conf] tools.build:defines+=["escape=partially \"escaped\""] tools.build:defines+=["spaces=me you"] tools.build:defines+=["foobar=bazbuz"] tools.build:defines+=["answer=42"] ''') conanfile = textwrap.dedent(r''' from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout class Test(ConanFile): exports_sources = "CMakeLists.txt", "src/*" settings = "os", "compiler", "arch", "build_type" def generate(self): tc = CMakeToolchain(self) tc.preprocessor_definitions["escape2"] = "partially \"escaped\"" tc.preprocessor_definitions["spaces2"] = "me you" tc.preprocessor_definitions["foobar2"] = "bazbuz" tc.preprocessor_definitions["answer2"] = 42 tc.preprocessor_definitions["NOVALUE_DEF"] = None tc.preprocessor_definitions.release["escape_release"] = "release partially \"escaped\"" tc.preprocessor_definitions.release["spaces_release"] = "release me you" tc.preprocessor_definitions.release["foobar_release"] = "release bazbuz" tc.preprocessor_definitions.release["answer_release"] = 42 tc.preprocessor_definitions.release["NOVALUE_DEF_RELEASE"] = None tc.preprocessor_definitions.debug["escape_debug"] = "debug partially \"escaped\"" tc.preprocessor_definitions.debug["spaces_debug"] = "debug me you" tc.preprocessor_definitions.debug["foobar_debug"] = "debug bazbuz" tc.preprocessor_definitions.debug["answer_debug"] = 21 tc.generate() def layout(self): cmake_layout(self) def build(self): cmake = CMake(self) cmake.configure() cmake.build() ''') main = textwrap.dedent(""" #include #define STR(x) #x #define SHOW_DEFINE(x) printf("%s=%s", #x, STR(x)) int main(int argc, char *argv[]) { SHOW_DEFINE(escape); SHOW_DEFINE(spaces); SHOW_DEFINE(foobar); SHOW_DEFINE(answer); SHOW_DEFINE(escape2); SHOW_DEFINE(spaces2); SHOW_DEFINE(foobar2); SHOW_DEFINE(answer2); #ifdef NDEBUG SHOW_DEFINE(escape_release); SHOW_DEFINE(spaces_release); SHOW_DEFINE(foobar_release); SHOW_DEFINE(answer_release); #else SHOW_DEFINE(escape_debug); SHOW_DEFINE(spaces_debug); SHOW_DEFINE(foobar_debug); SHOW_DEFINE(answer_debug); #endif #ifdef NOVALUE_DEF printf("NO VALUE!!!!"); #endif #ifdef NOVALUE_DEF_RELEASE printf("NO VALUE RELEASE!!!!"); #endif return 0; } """) cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) project(Test CXX) set(CMAKE_CXX_STANDARD 11) add_executable(example src/main.cpp) """) client.save({"conanfile.py": conanfile, "profile": profile, "src/main.cpp": main, "CMakeLists.txt": cmakelists}, clean_first=True) client.run("install . -pr=./profile") client.run("build . -pr=./profile") exe = "build/Release/example" if platform.system() != "Windows" else r"build\Release\example.exe" client.run_command(exe) assert 'escape=partially "escaped"' in client.out assert 'spaces=me you' in client.out assert 'foobar=bazbuz' in client.out assert 'answer=42' in client.out assert 'escape2=partially "escaped"' in client.out assert 'spaces2=me you' in client.out assert 'foobar2=bazbuz' in client.out assert 'answer2=42' in client.out > assert 'escape_release=release partially "escaped"' in client.out E assert 'escape_release=release partially "escaped"' in 'escape=partially "escaped"spaces=me youfoobar=bazbuzanswer=42escape2=partially "escaped"spaces2=me youfoobar2=bazbuzanswer2=42escape_debug=escape_debugspaces_debug=spaces_debugfoobar_debug=foobar_debuganswer_debug=answer_debugNO VALUE!!!!' E + where 'escape=partially "escaped"spaces=me youfoobar=bazbuzanswer=42escape2=partially "escaped"spaces2=me youfoobar2=bazbuzanswer2=42escape_debug=escape_debugspaces_debug=spaces_debugfoobar_debug=foobar_debuganswer_debug=answer_debugNO VALUE!!!!' = .out conans/test/functional/toolchains/cmake/test_cmake_toolchain.py:470: AssertionError _____________________ test_editable_cmake_linux_exe[Ninja] _____________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python generator = 'Ninja' @pytest.mark.skipif(platform.system() != "Linux", reason="Only linux") @pytest.mark.parametrize("generator", [None, "Ninja", "Ninja Multi-Config"]) @pytest.mark.tool("cmake", "3.17") def test_editable_cmake_linux_exe(generator): > editable_cmake_exe(generator) conans/test/functional/layout/test_editable_cmake.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/functional/layout/test_editable_cmake.py:115: in editable_cmake_exe build_dep() conans/test/functional/layout/test_editable_cmake.py:110: in build_dep c.run("build . -o dep/*:shared=True") conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'build . -o dep/*:shared=True', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nfile.py (dep/0.1): Error in build() method, line 30\n\tcmake.configure()\n\tConanException: Error 1 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E build . -o dep/*:shared=True E =================================== Output: ==================================== E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E dep/*:shared=True E [conf] E tools.cmake.cmaketoolchain:generator=Ninja E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [conf] E tools.cmake.cmaketoolchain:generator=Ninja E E E ======== Computing dependency graph ======== E Graph root E conanfile.py (dep/0.1): /tmp/tmpvlu6bshfconans/path with spaces/dep/conanfile.py E E ======== Computing necessary packages ======== E E ======== Installing packages ======== E E ======== Installing packages ======== E E ======== Finalizing install (deploy, generators) ======== E conanfile.py (dep/0.1): Writing generators to /tmp/tmpvlu6bshfconans/path with spaces/dep/build/Release/generators E conanfile.py (dep/0.1): Generator 'CMakeToolchain' calling 'generate()' E conanfile.py (dep/0.1): CMakeToolchain generated: conan_toolchain.cmake E conanfile.py (dep/0.1): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json. E (cmake>=3.23) cmake --preset conan-release E (cmake<3.23) cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE:STRING=Release E conanfile.py (dep/0.1): CMakeToolchain generated: /tmp/tmpvlu6bshfconans/path with spaces/dep/build/Release/generators/CMakePresets.json E conanfile.py (dep/0.1): CMakeToolchain generated: /tmp/tmpvlu6bshfconans/path with spaces/dep/CMakeUserPresets.json E conanfile.py (dep/0.1): Generator 'CMakeDeps' calling 'generate()' E conanfile.py (dep/0.1): Generating aggregated env files E conanfile.py (dep/0.1): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Calling build() ======== E conanfile.py (dep/0.1): Calling build() E conanfile.py (dep/0.1): Running CMake.configure() E conanfile.py (dep/0.1): RUN: cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpvlu6bshfconans/path with spaces/dep" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpvlu6bshfconans/path with spaces/dep" E -- Using Conan toolchain: /tmp/tmpvlu6bshfconans/path with spaces/dep/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E CMake Error: E Running E E '/usr/bin/ninja' '-C' '/tmp/tmpvlu6bshfconans/path with spaces/dep/build/Release' '-t' 'cleandead' E E failed with: E E ninja: error: rules.ninja:25: expected newline, got lexing error E E rule CXX_COMPILER__dep_app_{'value': 'Release', 'type': 'STRING'} E E ^ near here E E E E CMake Error: E Running E E '/usr/bin/ninja' '-C' '/tmp/tmpvlu6bshfconans/path with spaces/dep/build/Release' '-t' 'recompact' E E failed with: E E ninja: error: rules.ninja:25: expected newline, got lexing error E E rule CXX_COMPILER__dep_app_{'value': 'Release', 'type': 'STRING'} E E ^ near here E E E E CMake Generate step failed. Build files cannot be regenerated correctly. E E ERROR: conanfile.py (dep/0.1): Error in build() method, line 30 E cmake.configure() E ConanException: Error 1 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpvlu6bshfconans/path with spaces/dep/conanfile.py", line 30, in build E cmake.configure() E File "/home/conan/conan/tools/cmake/cmake.py", line 119, in configure E self._conanfile.run(command, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 1 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/build.py", line 70, in build E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: conanfile.py (dep/0.1): Error in build() method, line 30 E cmake.configure() E ConanException: Error 1 while executing conans/test/utils/tools.py:609: Exception ________________________ test_editable_cmake_components ________________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python def test_editable_cmake_components(): hello_h = gen_function_h(name="hello") hello_cpp = gen_function_cpp(name="hello", includes=["hello"]) bye_h = gen_function_h(name="bye") bye_cpp = gen_function_cpp(name="bye", includes=["bye"]) conanfile_greetings = textwrap.dedent(""" from os.path import join from conan import ConanFile from conan.tools.cmake import CMake, cmake_layout from conan.tools.files import copy class GreetingsConan(ConanFile): name = "greetings" version = "0.1" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" exports_sources = "src/*" def build(self): cmake = CMake(self) cmake.configure() cmake.build() def layout(self): cmake_layout(self, src_folder="src") self.cpp.source.components["hello"].includedirs = ["."] self.cpp.source.components["bye"].includedirs = ["."] bt = "." if self.settings.os != "Windows" else str(self.settings.build_type) self.cpp.build.components["hello"].libdirs = [bt] self.cpp.build.components["bye"].libdirs = [bt] def package(self): copy(self, "*.h", src=self.source_folder, dst=join(self.package_folder, "include")) copy(self, "*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) copy(self, "*.a", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) def package_info(self): self.cpp_info.components["hello"].libs = ["hello"] self.cpp_info.components["bye"].libs = ["bye"] self.cpp_info.set_property("cmake_file_name", "MYG") self.cpp_info.set_property("cmake_target_name", "MyGreetings::MyGreetings") self.cpp_info.components["hello"].set_property("cmake_target_name", "MyGreetings::MyHello") self.cpp_info.components["bye"].set_property("cmake_target_name", "MyGreetings::MyBye") """) cmakelists_greetings = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(greetings CXX) add_library(hello hello.cpp) target_include_directories(hello PRIVATE hello) add_library(bye bye.cpp) target_include_directories(bye PRIVATE bye) """) app_conanfile = textwrap.dedent(""" import os from conan import ConanFile from conan.tools.cmake import CMake, cmake_layout class GreetingsTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" def requirements(self): self.requires("greetings/0.1") def layout(self): cmake_layout(self) def build(self): cmake = CMake(self) cmake.configure() cmake.build() self.run(os.path.join(self.cpp.build.bindirs[0], "example")) self.run(os.path.join(self.cpp.build.bindirs[0], "example2")) """) app_cpp = gen_function_cpp(name="main", includes=["hello/hello", "bye/bye"], calls=["hello", "bye"]) app_cpp2 = gen_function_cpp(name="main", includes=["hello/hello"], calls=["hello"]) app_cmakelists = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(PackageTest CXX) find_package(MYG) add_executable(example example.cpp) target_link_libraries(example MyGreetings::MyGreetings) add_executable(example2 example2.cpp) target_link_libraries(example2 MyGreetings::MyHello) """) client = TestClient() client.save({"greetings/conanfile.py": conanfile_greetings, "greetings/src/CMakeLists.txt": cmakelists_greetings, "greetings/src/hello/hello.h": hello_h, "greetings/src/hello.cpp": hello_cpp, "greetings/src/bye/bye.h": bye_h, "greetings/src/bye.cpp": bye_cpp, "app/conanfile.py": app_conanfile, "app/example.cpp": app_cpp, "app/example2.cpp": app_cpp2, "app/CMakeLists.txt": app_cmakelists}) client.run("create greetings") > client.run("build app") conans/test/functional/layout/test_editable_cmake_components.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'build app', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...xception: conanfile.py: Error in build() method, line 19\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E build app E =================================== Output: ==================================== E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E conanfile.py: /tmp/tmphx6gl6urconans/path with spaces/app/conanfile.py E Requirements E greetings/0.1#6caacac57db10587e4ac92584eb484ec - Cache E E ======== Computing necessary packages ======== E Requirements E greetings/0.1#6caacac57db10587e4ac92584eb484ec:f4bec17cf5bb949234cd84c756060aa715eaa5ca#5adf543a44f1121c5f214c1e0e298c00 - Cache E E ======== Installing packages ======== E E ======== Installing packages ======== E greetings/0.1: Already installed! (1 of 1) E E ======== Finalizing install (deploy, generators) ======== E conanfile.py: Writing generators to /tmp/tmphx6gl6urconans/path with spaces/app/build/Release/generators E conanfile.py: Generator 'CMakeDeps' calling 'generate()' E conanfile.py: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(MYG) E target_link_libraries(... MyGreetings::MyGreetings) E conanfile.py: Generator 'CMakeToolchain' calling 'generate()' E conanfile.py: CMakeToolchain generated: conan_toolchain.cmake E conanfile.py: CMakeToolchain: Preset 'conan-release' added to CMakePresets.json. E (cmake>=3.23) cmake --preset conan-release E (cmake<3.23) cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE:STRING=Release E conanfile.py: CMakeToolchain generated: /tmp/tmphx6gl6urconans/path with spaces/app/build/Release/generators/CMakePresets.json E conanfile.py: CMakeToolchain generated: /tmp/tmphx6gl6urconans/path with spaces/app/CMakeUserPresets.json E conanfile.py: Generating aggregated env files E conanfile.py: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Calling build() ======== E conanfile.py: Calling build() E conanfile.py: Running CMake.configure() E conanfile.py: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmphx6gl6urconans/path with spaces/app" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmphx6gl6urconans/path with spaces/app" E -- Using Conan toolchain: /tmp/tmphx6gl6urconans/path with spaces/app/build/Release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Component target declared 'MyGreetings::MyHello' E -- Conan: Component target declared 'MyGreetings::MyBye' E -- Conan: Target declared 'MyGreetings::MyGreetings' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmphx6gl6urconans/path with spaces/app/build/Release E E conanfile.py: Running CMake.build() E conanfile.py: RUN: cmake --build "/tmp/tmphx6gl6urconans/path with spaces/app/build/Release" -- -j4 E Scanning dependencies of target example E Scanning dependencies of target example2 E [ 25%] Building CXX object CMakeFiles/example.dir/example.cpp.o E [ 50%] Building CXX object CMakeFiles/example2.dir/example2.cpp.o E /tmp/tmphx6gl6urconans/path with spaces/app/example.cpp:6:10: fatal error: hello/hello.h: No such file or directory E 6 | #include "hello/hello.h" E | ^~~~~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/example.dir/all] Error 2 E make[1]: *** Waiting for unfinished jobs.... E /tmp/tmphx6gl6urconans/path with spaces/app/example2.cpp:6:10: fatal error: hello/hello.h: No such file or directory E 6 | #include "hello/hello.h" E | ^~~~~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example2.dir/build.make:63: CMakeFiles/example2.dir/example2.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:109: CMakeFiles/example2.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: conanfile.py: Error in build() method, line 19 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmphx6gl6urconans/path with spaces/app/conanfile.py", line 19, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/build.py", line 70, in build E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: conanfile.py: Error in build() method, line 19 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ___________________ test_locally_build_linux[Release-False] ____________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python build_type = 'Release', shared = False client = @pytest.mark.skipif(platform.system() != "Linux", reason="Only Linux") @pytest.mark.parametrize("build_type,shared", [("Release", False), ("Debug", True)]) @pytest.mark.tool("ninja") def test_locally_build_linux(build_type, shared, client): settings = "-s os=Linux -s arch=x86_64 -s build_type={} -o hello/*:shared={}".format(build_type, shared) client.run("install . {}".format(settings)) client.run_command('cmake . -G "Ninja" -DCMAKE_TOOLCHAIN_FILE={} -DCMAKE_BUILD_TYPE={}' .format(CMakeToolchain.filename, build_type)) client.run_command('ninja') if shared: assert "Linking CXX shared library libmylibrary.so" in client.out else: assert "Linking CXX static library libmylibrary.a" in client.out client.run_command("./myapp") check_exe_run(client.out, ["main", "hello"], "gcc", None, build_type, "x86_64", cppstd=None) # create should also work client.run("create . --name=hello --version=1.0 {}".format(settings)) assert 'cmake -G "Ninja"' in client.out > assert "main: {}!".format(build_type) in client.out E AssertionError: assert 'main: Release!' in '\n======== Exporting recipe to the cache ========\nhello/1.0: Exporting package recipe: /tmp/tmpogmtld38conans/pathwi...1d1a220817a359b\nhello/1.0: Package folder /tmp/tmpd7bvw2y9conans/pathwithoutspaces/.conan2/p/b/hello1556c417fcbc4/p\n' E + where 'main: Release!' = ('Release') E + where = 'main: {}!'.format E + and '\n======== Exporting recipe to the cache ========\nhello/1.0: Exporting package recipe: /tmp/tmpogmtld38conans/pathwi...1d1a220817a359b\nhello/1.0: Package folder /tmp/tmpd7bvw2y9conans/pathwithoutspaces/.conan2/p/b/hello1556c417fcbc4/p\n' = .out conans/test/functional/toolchains/cmake/test_ninja.py:79: AssertionError ________________ test_error_cmakedeps_transitive_build_requires ________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python def test_error_cmakedeps_transitive_build_requires(): """ CMakeDeps when building an intermediate "tool_requires" that has a normal "requires" to other package, needs to use ``require.build`` trait instead of the more global "dep.is_build_context" We do build "protobuf" in the "build" context to make sure the whole CMakeDeps is working correctly """ c = TestClient() c.save(pkg_cmake("zlib", "0.1")) c.run("create .") c.save(pkg_cmake("openssl", "0.1", requires=["zlib/0.1"]), clean_first=True) > c.run("create .") conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_transitive_build.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create .', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...Exception: openssl/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E openssl/0.1: Exporting package recipe: /tmp/tmpwi1o9quaconans/path with spaces/conanfile.py E openssl/0.1: Copied 1 '.py' file: conanfile.py E openssl/0.1: Copied 1 '.txt' file: CMakeLists.txt E openssl/0.1: Copied 1 '.cpp' file: openssl.cpp E openssl/0.1: Copied 1 '.h' file: openssl.h E openssl/0.1: Exported to cache folder: /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/opensae56fdf3a3039/e E openssl/0.1: Exported: openssl/0.1#bf5ba0092962ed8f0da924472837e851 (2024-04-16 13:17:03 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E openssl/0.1#bf5ba0092962ed8f0da924472837e851 - Cache E zlib/0.1#67798682eb34d8da1026cea3287c074a - Cache E E ======== Computing necessary packages ======== E openssl/0.1: Forced build from source E Requirements E openssl/0.1#bf5ba0092962ed8f0da924472837e851:4b967187360729533a03248ec83dd55079293d61 - Build E zlib/0.1#67798682eb34d8da1026cea3287c074a:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#739e7490deebf65814987a5fc6354ef3 - Cache E E ======== Installing packages ======== E zlib/0.1: Already installed! (1 of 2) E E -------- Installing package openssl/0.1 (2 of 2) -------- E openssl/0.1: Building from source E openssl/0.1: Package openssl/0.1:4b967187360729533a03248ec83dd55079293d61 E openssl/0.1: Copying sources to build folder E openssl/0.1: Building your package in /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b E openssl/0.1: Writing generators to /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b/build/Release/generators E openssl/0.1: Generator 'CMakeToolchain' calling 'generate()' E openssl/0.1: CMakeToolchain generated: conan_toolchain.cmake E openssl/0.1: CMakeToolchain generated: /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b/build/Release/generators/CMakePresets.json E openssl/0.1: CMakeToolchain generated: /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b/CMakeUserPresets.json E openssl/0.1: Generator 'CMakeDeps' calling 'generate()' E openssl/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(zlib) E target_link_libraries(... zlib::zlib) E openssl/0.1: Generating aggregated env files E openssl/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E openssl/0.1: Calling build() E openssl/0.1: Running CMake.configure() E openssl/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b" E -- Using Conan toolchain: /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'zlib::zlib' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b/build/Release E E openssl/0.1: Running CMake.build() E openssl/0.1: RUN: cmake --build "/tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b/build/Release" -- -j4 E Scanning dependencies of target openssl E [ 50%] Building CXX object CMakeFiles/openssl.dir/src/openssl.cpp.o E /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b/src/openssl.cpp: In function 'int openssl()': E /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b/src/openssl.cpp:105:5: error: 'zlib' was not declared in this scope E 105 | zlib(); E | ^~~~ E make[2]: *** [CMakeFiles/openssl.dir/build.make:63: CMakeFiles/openssl.dir/src/openssl.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/openssl.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E openssl/0.1: ERROR: E Package '4b967187360729533a03248ec83dd55079293d61' build failed E openssl/0.1: WARN: Build folder /tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/b/opens131b5128d70f5/b/build/Release E ERROR: openssl/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpuq8fc2tcconans/path with spaces/.conan2/p/opensae56fdf3a3039/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: openssl/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ___________________________ test_cmake_lib_template ____________________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_cmake_lib_template(): client = TestClient(path_with_spaces=False) client.run("new cmake_lib -d name=hello -d version=0.1") # Local flow works client.run("build .") > client.run("export-pkg .") conans/test/functional/toolchains/cmake/test_v2_cmake_template.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'export-pkg .', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...llo/0.1 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E export-pkg . E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E hello/0.1: Exporting package recipe: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/conanfile.py E hello/0.1: Copied 1 '.py' file: conanfile.py E hello/0.1: Copied 1 '.txt' file: CMakeLists.txt E hello/0.1: Copied 1 '.cpp' file: hello.cpp E hello/0.1: Copied 1 '.h' file: hello.h E hello/0.1: Exported to cache folder: /tmp/tmpjvzj48wxconans/pathwithoutspaces/.conan2/p/helloa434967fb081b/e E hello/0.1: Exported: hello/0.1#2f6611bc551ce99ad4161398d3822cb0 (2024-04-16 13:17:08 UTC) E E ======== Computing dependency graph ======== E Graph root E conanfile.py (hello/0.1): /tmp/tmp0p1bd6lgconans/pathwithoutspaces/conanfile.py E E ======== Computing necessary packages ======== E E ======== Installing packages ======== E conanfile.py (hello/0.1): Calling generate() E conanfile.py (hello/0.1): Generators folder: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/build/Release/generators E conanfile.py (hello/0.1): CMakeToolchain generated: conan_toolchain.cmake E conanfile.py (hello/0.1): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json. E (cmake>=3.23) cmake --preset conan-release E (cmake<3.23) cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE:STRING=Release E conanfile.py (hello/0.1): CMakeToolchain generated: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/build/Release/generators/CMakePresets.json E conanfile.py (hello/0.1): CMakeToolchain generated: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/CMakeUserPresets.json E conanfile.py (hello/0.1): Generating aggregated env files E conanfile.py (hello/0.1): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Exporting recipe and package to the cache ======== E conanfile.py (hello/0.1): Exporting binary from user folder to Conan cache E conanfile.py (hello/0.1): Packaging to ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E conanfile.py (hello/0.1): Generating the package E conanfile.py (hello/0.1): Packaging in folder /tmp/tmpjvzj48wxconans/pathwithoutspaces/.conan2/p/b/hello6fdc0b04c445d/p E conanfile.py (hello/0.1): Calling package() E conanfile.py (hello/0.1): Running CMake.install() E conanfile.py (hello/0.1): RUN: cmake --install "/tmp/tmp0p1bd6lgconans/pathwithoutspaces/build/Release" --prefix "/tmp/tmpjvzj48wxconans/pathwithoutspaces/.conan2/p/b/hello6fdc0b04c445d/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmpjvzj48wxconans/pathwithoutspaces/.conan2/p/b/hello6fdc0b04c445d/p/lib/libhello.a E -- Installing: /tmp/tmpjvzj48wxconans/pathwithoutspaces/.conan2/p/b/hello6fdc0b04c445d/p/include/hello.h E E conanfile.py (hello/0.1): package(): Packaged 1 '.a' file: libhello.a E conanfile.py (hello/0.1): package(): Packaged 1 '.h' file: hello.h E conanfile.py (hello/0.1): Created package revision 6c470c15efb574bd6a7e2ce9161c96b0 E conanfile.py (hello/0.1): Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E conanfile.py (hello/0.1): Full package reference: hello/0.1#2f6611bc551ce99ad4161398d3822cb0:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#6c470c15efb574bd6a7e2ce9161c96b0 E conanfile.py (hello/0.1): Package folder /tmp/tmpjvzj48wxconans/pathwithoutspaces/.conan2/p/b/hello6fdc0b04c445d/p E conanfile.py (hello/0.1): Exported package binary E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E hello/0.1 (test package): /tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/conanfile.py E Requirements E hello/0.1#2f6611bc551ce99ad4161398d3822cb0 - Cache E E ======== Computing necessary packages ======== E Requirements E hello/0.1#2f6611bc551ce99ad4161398d3822cb0:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#6c470c15efb574bd6a7e2ce9161c96b0 - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E hello/0.1 (test package): Test package build: build/gcc-8-x86_64-release E hello/0.1 (test package): Test package build folder: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E hello/0.1 (test package): Writing generators to /tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators E hello/0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E hello/0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E hello/0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E hello/0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E hello/0.1 (test package): CMakeToolchain generated: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E hello/0.1 (test package): CMakeToolchain generated: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/CMakeUserPresets.json E hello/0.1 (test package): Generating aggregated env files E hello/0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E hello/0.1 (test package): Calling build() E hello/0.1 (test package): Running CMake.configure() E hello/0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package" E -- Using Conan toolchain: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E E hello/0.1 (test package): Running CMake.build() E hello/0.1 (test package): RUN: cmake --build "/tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/src/example.cpp:1:10: fatal error: hello.h: No such file or directory E 1 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: hello/0.1 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp0p1bd6lgconans/pathwithoutspaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/export_pkg.py", line 99, in export_pkg E remotes=remotes, lockfile=lockfile, update=None, build_modes=None) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: hello/0.1 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ___________________________ test_cmake_exe_template ____________________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_cmake_exe_template(): client = TestClient(path_with_spaces=False) client.run("new cmake_exe -d name=greet -d version=0.1") # Local flow works client.run("build .") # Create works client.run("create .") > assert "greet/0.1: Hello World Release!" in client.out E AssertionError: assert 'greet/0.1: Hello World Release!' in '\n======== Exporting recipe to the cache ========\ngreet/0.1: Exporting package recipe: /tmp/tmp2u055vahconans/pathwi...BI 1\n greet/0.1: __cplusplus201402\n greet/0.1: __GNUC__9\n greet/0.1: __GNUC_MINOR__4\ngreet/0.1 test_package\n\n' E + where '\n======== Exporting recipe to the cache ========\ngreet/0.1: Exporting package recipe: /tmp/tmp2u055vahconans/pathwi...BI 1\n greet/0.1: __cplusplus201402\n greet/0.1: __GNUC__9\n greet/0.1: __GNUC_MINOR__4\ngreet/0.1 test_package\n\n' = .out conans/test/functional/toolchains/cmake/test_v2_cmake_template.py:40: AssertionError ____________________ test_build_modules_from_build_context _____________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python client = @pytest.mark.tool("cmake") def test_build_modules_from_build_context(client): consumer_cmake = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.15) project(MyApp CXX) find_package(protobuf) find_package(protobuf_BUILD) add_executable(app main.cpp) foo_generate() target_link_libraries(app protobuf::protobuf) """) cmake_deps_conf = """ deps.build_context_activated = ["protobuf"] deps.build_context_build_modules = ["protobuf"] deps.build_context_suffix = {"protobuf": "_BUILD"} """ client.save({"conanfile.py": consumer_conanfile.format(cmake_deps_conf), "CMakeLists.txt": consumer_cmake, "main.cpp": main}) > client.run("create . --name=app --version=1.0 -pr:b default -pr:h default") conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=app --version=1.0 -pr:b default -pr:h default' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...onanException: app/1.0: Error in build() method, line 29\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=app --version=1.0 -pr:b default -pr:h default E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E app/1.0: Exporting package recipe: /tmp/tmpof9l7zb1conans/path with spaces/conanfile.py E app/1.0: Copied 1 '.py' file: conanfile.py E app/1.0: Copied 1 '.cpp' file: main.cpp E app/1.0: Copied 1 '.txt' file: CMakeLists.txt E app/1.0: Exported to cache folder: /tmp/tmp_ajam86econans/path with spaces/.conan2/p/app09705c68d8331/e E app/1.0: Exported: app/1.0#3ececaf9cba4d98356bc20056e985ced (2024-04-16 13:17:13 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E app/1.0#3ececaf9cba4d98356bc20056e985ced - Cache E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E E ======== Computing necessary packages ======== E app/1.0: Forced build from source E Requirements E app/1.0#3ececaf9cba4d98356bc20056e985ced:25690441c330e01b1a4c7c5de975c5dc676bdc06 - Build E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E E ======== Installing packages ======== E protobuf/1.0: Already installed! (1 of 2) E E -------- Installing package app/1.0 (2 of 2) -------- E app/1.0: Building from source E app/1.0: Package app/1.0:25690441c330e01b1a4c7c5de975c5dc676bdc06 E app/1.0: Copying sources to build folder E app/1.0: Building your package in /tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/b E app/1.0: Calling generate() E app/1.0: Generators folder: /tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/b E app/1.0: CMakeToolchain generated: conan_toolchain.cmake E app/1.0: CMakeToolchain generated: /tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/b/CMakePresets.json E app/1.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(protobuf) E find_package(protobuf_BUILD) E target_link_libraries(... protobuf::protobuf protobuf_BUILD::protobuf_BUILD) E app/1.0: Generating aggregated env files E app/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E app/1.0: Calling build() E app/1.0: Running CMake.configure() E app/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/b" E -- Using Conan toolchain: /tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'protobuf::protobuf' E -- Conan: Target declared 'protobuf_BUILD::protobuf_BUILD' E -- Conan: Including build module from '/tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/proto5b74d07f3aa32/p/build/my_tools_build.cmake' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/b E E app/1.0: Running CMake.build() E app/1.0: RUN: cmake --build "/tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/b" -- -j4 E Scanning dependencies of target app E [ 50%] Building CXX object CMakeFiles/app.dir/main.cpp.o E /tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/b/main.cpp:3:10: fatal error: protobuf.h: No such file or directory E 3 | #include "protobuf.h" E | ^~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/app.dir/build.make:63: CMakeFiles/app.dir/main.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/app.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E app/1.0: ERROR: E Package '25690441c330e01b1a4c7c5de975c5dc676bdc06' build failed E app/1.0: WARN: Build folder /tmp/tmp_ajam86econans/path with spaces/.conan2/p/b/app002a4f0cae563/b E ERROR: app/1.0: Error in build() method, line 29 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp_ajam86econans/path with spaces/.conan2/p/app09705c68d8331/e/conanfile.py", line 29, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: app/1.0: Error in build() method, line 29 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _______________ test_build_modules_and_target_from_build_context _______________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python client = def test_build_modules_and_target_from_build_context(client): consumer_cmake = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.15) project(MyApp CXX) find_package(protobuf) find_package(protobuf_BUILD) add_executable(app main.cpp) foo_generate() target_link_libraries(app protobuf_BUILD::protobuf_BUILD) """) cmake_deps_conf = """ deps.build_context_activated = ["protobuf"] deps.build_context_build_modules = ["protobuf"] deps.build_context_suffix = {"protobuf": "_BUILD"} """ client.save({"conanfile.py": consumer_conanfile.format(cmake_deps_conf), "CMakeLists.txt": consumer_cmake, "main.cpp": main}) > client.run("create . --name=app --version=1.0 -pr:b default -pr:h default") conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py:155: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=app --version=1.0 -pr:b default -pr:h default' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...onanException: app/1.0: Error in build() method, line 29\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=app --version=1.0 -pr:b default -pr:h default E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E app/1.0: Exporting package recipe: /tmp/tmp5fdb_b2qconans/path with spaces/conanfile.py E app/1.0: Copied 1 '.py' file: conanfile.py E app/1.0: Copied 1 '.cpp' file: main.cpp E app/1.0: Copied 1 '.txt' file: CMakeLists.txt E app/1.0: Exported to cache folder: /tmp/tmpct6vty3pconans/path with spaces/.conan2/p/appbd074caac0c64/e E app/1.0: Exported: app/1.0#f3b76485e574597fb3ed06362b728a4d (2024-04-16 13:17:14 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E app/1.0#f3b76485e574597fb3ed06362b728a4d - Cache E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E E ======== Computing necessary packages ======== E app/1.0: Forced build from source E Requirements E app/1.0#f3b76485e574597fb3ed06362b728a4d:25690441c330e01b1a4c7c5de975c5dc676bdc06 - Build E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E E ======== Installing packages ======== E protobuf/1.0: Already installed! (1 of 2) E E -------- Installing package app/1.0 (2 of 2) -------- E app/1.0: Building from source E app/1.0: Package app/1.0:25690441c330e01b1a4c7c5de975c5dc676bdc06 E app/1.0: Copying sources to build folder E app/1.0: Building your package in /tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/b E app/1.0: Calling generate() E app/1.0: Generators folder: /tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/b E app/1.0: CMakeToolchain generated: conan_toolchain.cmake E app/1.0: CMakeToolchain generated: /tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/b/CMakePresets.json E app/1.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(protobuf) E find_package(protobuf_BUILD) E target_link_libraries(... protobuf::protobuf protobuf_BUILD::protobuf_BUILD) E app/1.0: Generating aggregated env files E app/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E app/1.0: Calling build() E app/1.0: Running CMake.configure() E app/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/b" E -- Using Conan toolchain: /tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'protobuf::protobuf' E -- Conan: Target declared 'protobuf_BUILD::protobuf_BUILD' E -- Conan: Including build module from '/tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/proto4178082703cc9/p/build/my_tools_build.cmake' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/b E E app/1.0: Running CMake.build() E app/1.0: RUN: cmake --build "/tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/b" -- -j4 E Scanning dependencies of target app E [ 50%] Building CXX object CMakeFiles/app.dir/main.cpp.o E /tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/b/main.cpp:3:10: fatal error: protobuf.h: No such file or directory E 3 | #include "protobuf.h" E | ^~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/app.dir/build.make:63: CMakeFiles/app.dir/main.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/app.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E app/1.0: ERROR: E Package '25690441c330e01b1a4c7c5de975c5dc676bdc06' build failed E app/1.0: WARN: Build folder /tmp/tmpct6vty3pconans/path with spaces/.conan2/p/b/app752b093be7a11/b E ERROR: app/1.0: Error in build() method, line 29 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpct6vty3pconans/path with spaces/.conan2/p/appbd074caac0c64/e/conanfile.py", line 29, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: app/1.0: Error in build() method, line 29 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ____________________ test_shared_cmake_toolchain_components ____________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_shared_cmake_toolchain_components(): """ the same as above, but with components. """ client = TestClient(default_server_user=True) client.save(pkg_cmake("hello", "0.1")) conanfile = client.load("conanfile.py") conanfile2 = conanfile.replace('self.cpp_info.libs = ["hello"]', 'self.cpp_info.components["hi"].libs = ["hello"]') assert conanfile != conanfile2 client.save({"conanfile.py": conanfile2}) client.run("create . -o hello/*:shared=True") # Chat client.save(pkg_cmake("chat", "0.1", requires=["hello/0.1"]), clean_first=True) conanfile = client.load("conanfile.py") conanfile2 = conanfile.replace('self.cpp_info.libs = ["chat"]', 'self.cpp_info.components["talk"].libs = ["chat"]\n' ' self.cpp_info.components["talk"].requires=["hello::hi"]') assert conanfile != conanfile2 client.save({"conanfile.py": conanfile2}) > client.run("create . -o chat/*:shared=True -o hello/*:shared=True") conans/test/functional/toolchains/cmake/test_shared_cmake.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -o chat/*:shared=True -o hello/*:shared=True' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nanException: chat/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -o chat/*:shared=True -o hello/*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E chat/0.1: Exporting package recipe: /tmp/tmp123dypc_conans/path with spaces/conanfile.py E chat/0.1: Copied 1 '.py' file: conanfile.py E chat/0.1: Copied 1 '.txt' file: CMakeLists.txt E chat/0.1: Copied 1 '.cpp' file: chat.cpp E chat/0.1: Copied 1 '.h' file: chat.h E chat/0.1: Exported to cache folder: /tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/chat74e0f2dbf4949/e E chat/0.1: Exported: chat/0.1#31b278e5fbaebce63fd15166c84e827e (2024-04-16 13:17:15 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E chat/*:shared=True E hello/*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E chat/0.1#31b278e5fbaebce63fd15166c84e827e - Cache E hello/0.1#e277cd5b220b8425f9049e9d057d28eb - Cache E E ======== Computing necessary packages ======== E chat/0.1: Forced build from source E Requirements E chat/0.1#31b278e5fbaebce63fd15166c84e827e:0eaf9738e59c9117fa4ff046132a23272c3f160a - Build E hello/0.1#e277cd5b220b8425f9049e9d057d28eb:0645178f9911c96e0f11d63b451090c571726042#7e3cd26dc8a386ccb9e1125339b812db - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 2) E E -------- Installing package chat/0.1 (2 of 2) -------- E chat/0.1: Building from source E chat/0.1: Package chat/0.1:0eaf9738e59c9117fa4ff046132a23272c3f160a E chat/0.1: Copying sources to build folder E chat/0.1: Building your package in /tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b E chat/0.1: Writing generators to /tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b/build/Release/generators E chat/0.1: Generator 'CMakeToolchain' calling 'generate()' E chat/0.1: CMakeToolchain generated: conan_toolchain.cmake E chat/0.1: CMakeToolchain generated: /tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b/build/Release/generators/CMakePresets.json E chat/0.1: CMakeToolchain generated: /tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b/CMakeUserPresets.json E chat/0.1: Generator 'CMakeDeps' calling 'generate()' E chat/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E chat/0.1: Generating aggregated env files E chat/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E chat/0.1: Calling build() E chat/0.1: Running CMake.configure() E chat/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b" E -- Using Conan toolchain: /tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Component target declared 'hello::hi' E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b/build/Release E E chat/0.1: Running CMake.build() E chat/0.1: RUN: cmake --build "/tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b/build/Release" -- -j4 E Scanning dependencies of target chat E [ 50%] Building CXX object CMakeFiles/chat.dir/src/chat.cpp.o E /tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b/src/chat.cpp:8:10: fatal error: hello.h: No such file or directory E 8 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/chat.dir/build.make:63: CMakeFiles/chat.dir/src/chat.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/chat.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E chat/0.1: ERROR: E Package '0eaf9738e59c9117fa4ff046132a23272c3f160a' build failed E chat/0.1: WARN: Build folder /tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/b/chatc74f30aa9dc48/b/build/Release E ERROR: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpgf_7su5xconans/path with spaces/.conan2/p/chat74e0f2dbf4949/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception __________ test_build_modules_from_host_and_target_from_build_context __________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python client = def test_build_modules_from_host_and_target_from_build_context(client): consumer_cmake = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.15) project(MyApp CXX) find_package(protobuf) find_package(protobuf_BUILD) add_executable(app main.cpp) foo_generate() target_link_libraries(app protobuf_BUILD::protobuf_BUILD) """) cmake_deps_conf = """ deps.build_context_activated = ["protobuf"] deps.build_context_suffix = {"protobuf": "_BUILD"} """ client.save({"conanfile.py": consumer_conanfile.format(cmake_deps_conf), "CMakeLists.txt": consumer_cmake, "main.cpp": main}) > client.run("create . --name=app --version=1.0 -pr:b default -pr:h default") conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py:183: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=app --version=1.0 -pr:b default -pr:h default' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...onanException: app/1.0: Error in build() method, line 28\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=app --version=1.0 -pr:b default -pr:h default E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E app/1.0: Exporting package recipe: /tmp/tmp4wqmzc5hconans/path with spaces/conanfile.py E app/1.0: Copied 1 '.py' file: conanfile.py E app/1.0: Copied 1 '.cpp' file: main.cpp E app/1.0: Copied 1 '.txt' file: CMakeLists.txt E app/1.0: Exported to cache folder: /tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/app1064e1820abac/e E app/1.0: Exported: app/1.0#31a0201610970a7ce63674b5c5668dc3 (2024-04-16 13:17:15 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E app/1.0#31a0201610970a7ce63674b5c5668dc3 - Cache E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E E ======== Computing necessary packages ======== E app/1.0: Forced build from source E Requirements E app/1.0#31a0201610970a7ce63674b5c5668dc3:25690441c330e01b1a4c7c5de975c5dc676bdc06 - Build E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E E ======== Installing packages ======== E protobuf/1.0: Already installed! (1 of 2) E E -------- Installing package app/1.0 (2 of 2) -------- E app/1.0: Building from source E app/1.0: Package app/1.0:25690441c330e01b1a4c7c5de975c5dc676bdc06 E app/1.0: Copying sources to build folder E app/1.0: Building your package in /tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/b E app/1.0: Calling generate() E app/1.0: Generators folder: /tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/b E app/1.0: CMakeToolchain generated: conan_toolchain.cmake E app/1.0: CMakeToolchain generated: /tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/b/CMakePresets.json E app/1.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(protobuf) E find_package(protobuf_BUILD) E target_link_libraries(... protobuf::protobuf protobuf_BUILD::protobuf_BUILD) E app/1.0: Generating aggregated env files E app/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E app/1.0: Calling build() E app/1.0: Running CMake.configure() E app/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/b" E -- Using Conan toolchain: /tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'protobuf::protobuf' E -- Conan: Including build module from '/tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/proto0bd79ab4c6cbb/p/build/my_tools_host.cmake' E -- Conan: Target declared 'protobuf_BUILD::protobuf_BUILD' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/b E E app/1.0: Running CMake.build() E app/1.0: RUN: cmake --build "/tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/b" -- -j4 E Scanning dependencies of target app E [ 50%] Building CXX object CMakeFiles/app.dir/main.cpp.o E /tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/b/main.cpp:3:10: fatal error: protobuf.h: No such file or directory E 3 | #include "protobuf.h" E | ^~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/app.dir/build.make:63: CMakeFiles/app.dir/main.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/app.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E app/1.0: ERROR: E Package '25690441c330e01b1a4c7c5de975c5dc676bdc06' build failed E app/1.0: WARN: Build folder /tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/b/appb06e73569817c/b E ERROR: app/1.0: Error in build() method, line 28 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp5pkaab0vconans/path with spaces/.conan2/p/app1064e1820abac/e/conanfile.py", line 28, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: app/1.0: Error in build() method, line 28 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ____________________________ test_shared_link_flags ____________________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.skipif(platform.system() != "Linux", reason="Only Linux") @pytest.mark.tool("cmake") def test_shared_link_flags(): """ Testing CMakeDeps and linker flags injection Issue: https://github.com/conan-io/conan/issues/9936 """ conanfile = textwrap.dedent(""" from conan import ConanFile from conan.tools.cmake import CMake, cmake_layout class HelloConan(ConanFile): name = "hello" version = "1.0" settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False]} default_options = {"shared": False} exports_sources = "CMakeLists.txt", "src/*", "include/*" generators = "CMakeDeps", "CMakeToolchain" def layout(self): cmake_layout(self) def build(self): cmake = CMake(self) cmake.configure() cmake.build() def package(self): cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = ["hello"] self.cpp_info.sharedlinkflags = ["-z now", "-z relro"] self.cpp_info.exelinkflags = ["-z now", "-z relro"] """) client = TestClient() client.run("new cmake_lib -d name=hello -d version=1.0") client.save({"conanfile.py": conanfile}) > client.run("create .") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_and_linker_flags.py:54: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create .', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...llo/1.0 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E hello/1.0: Exporting package recipe: /tmp/tmpzei6x54xconans/path with spaces/conanfile.py E hello/1.0: Copied 1 '.py' file: conanfile.py E hello/1.0: Copied 1 '.txt' file: CMakeLists.txt E hello/1.0: Copied 1 '.cpp' file: hello.cpp E hello/1.0: Copied 1 '.h' file: hello.h E hello/1.0: Exported to cache folder: /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/hello55a65e8f4d4b8/e E hello/1.0: Exported: hello/1.0#5dc2de33225c174d635e541a5c14ab1b (2024-04-16 13:17:14 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E hello/1.0#5dc2de33225c174d635e541a5c14ab1b - Cache E E ======== Computing necessary packages ======== E hello/1.0: Forced build from source E Requirements E hello/1.0#5dc2de33225c174d635e541a5c14ab1b:35563071032dcce6df9ba729ee9e0ddd1078672e - Build E E ======== Installing packages ======== E E -------- Installing package hello/1.0 (1 of 1) -------- E hello/1.0: Building from source E hello/1.0: Package hello/1.0:35563071032dcce6df9ba729ee9e0ddd1078672e E hello/1.0: Copying sources to build folder E hello/1.0: Building your package in /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b E hello/1.0: Writing generators to /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b/build/Release/generators E hello/1.0: Generator 'CMakeDeps' calling 'generate()' E hello/1.0: Generator 'CMakeToolchain' calling 'generate()' E hello/1.0: CMakeToolchain generated: conan_toolchain.cmake E hello/1.0: CMakeToolchain generated: /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b/build/Release/generators/CMakePresets.json E hello/1.0: CMakeToolchain generated: /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b/CMakeUserPresets.json E hello/1.0: Generating aggregated env files E hello/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E hello/1.0: Calling build() E hello/1.0: Running CMake.configure() E hello/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b" E -- Using Conan toolchain: /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b/build/Release E E hello/1.0: Running CMake.build() E hello/1.0: RUN: cmake --build "/tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b/build/Release" -- -j4 E Scanning dependencies of target hello E [ 50%] Building CXX object CMakeFiles/hello.dir/src/hello.cpp.o E [100%] Linking CXX static library libhello.a E [100%] Built target hello E E hello/1.0: Package '35563071032dcce6df9ba729ee9e0ddd1078672e' built E hello/1.0: Build folder /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b/build/Release E hello/1.0: Generating the package E hello/1.0: Packaging in folder /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/p E hello/1.0: Calling package() E hello/1.0: Running CMake.install() E hello/1.0: RUN: cmake --install "/tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/b/build/Release" --prefix "/tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/p/lib/libhello.a E -- Installing: /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/p/include/hello.h E E hello/1.0: package(): Packaged 1 '.a' file: libhello.a E hello/1.0: package(): Packaged 1 '.h' file: hello.h E hello/1.0: Created package revision 893e1cb6ead25491e4375b50156e02c5 E hello/1.0: Package '35563071032dcce6df9ba729ee9e0ddd1078672e' created E hello/1.0: Full package reference: hello/1.0#5dc2de33225c174d635e541a5c14ab1b:35563071032dcce6df9ba729ee9e0ddd1078672e#893e1cb6ead25491e4375b50156e02c5 E hello/1.0: Package folder /tmp/tmpbm4up1h5conans/path with spaces/.conan2/p/b/hello61b3e4c17106e/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E hello/1.0 (test package): /tmp/tmpzei6x54xconans/path with spaces/test_package/conanfile.py E Requirements E hello/1.0#5dc2de33225c174d635e541a5c14ab1b - Cache E E ======== Computing necessary packages ======== E Requirements E hello/1.0#5dc2de33225c174d635e541a5c14ab1b:35563071032dcce6df9ba729ee9e0ddd1078672e#893e1cb6ead25491e4375b50156e02c5 - Cache E E ======== Installing packages ======== E hello/1.0: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmpzei6x54xconans/path with spaces/test_package/build/gcc-8-x86_64-release E hello/1.0 (test package): Test package build: build/gcc-8-x86_64-release E hello/1.0 (test package): Test package build folder: /tmp/tmpzei6x54xconans/path with spaces/test_package/build/gcc-8-x86_64-release E hello/1.0 (test package): Writing generators to /tmp/tmpzei6x54xconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators E hello/1.0 (test package): Generator 'CMakeDeps' calling 'generate()' E hello/1.0 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E hello/1.0 (test package): Generator 'CMakeToolchain' calling 'generate()' E hello/1.0 (test package): CMakeToolchain generated: conan_toolchain.cmake E hello/1.0 (test package): CMakeToolchain generated: /tmp/tmpzei6x54xconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E hello/1.0 (test package): CMakeToolchain generated: /tmp/tmpzei6x54xconans/path with spaces/test_package/CMakeUserPresets.json E hello/1.0 (test package): Generating aggregated env files E hello/1.0 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E hello/1.0 (test package): Calling build() E hello/1.0 (test package): Running CMake.configure() E hello/1.0 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpzei6x54xconans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpzei6x54xconans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmpzei6x54xconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpzei6x54xconans/path with spaces/test_package/build/gcc-8-x86_64-release E E hello/1.0 (test package): Running CMake.build() E hello/1.0 (test package): RUN: cmake --build "/tmp/tmpzei6x54xconans/path with spaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmpzei6x54xconans/path with spaces/test_package/src/example.cpp:1:10: fatal error: hello.h: No such file or directory E 1 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: hello/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpzei6x54xconans/path with spaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: hello/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _______________ test_build_modules_and_target_from_host_context ________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python client = @pytest.mark.tool("cmake") def test_build_modules_and_target_from_host_context(client): consumer_cmake = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.15) project(MyApp CXX) find_package(protobuf) find_package(protobuf_BUILD) add_executable(app main.cpp) foo_generate() target_link_libraries(app protobuf::protobuf) """) cmake_deps_conf = """ deps.build_context_activated = ["protobuf"] deps.build_context_build_modules = [] deps.build_context_suffix = {"protobuf": "_BUILD"} """ client.save({"conanfile.py": consumer_conanfile.format(cmake_deps_conf), "CMakeLists.txt": consumer_cmake, "main.cpp": main}) > client.run("create . --name=app --version=1.0 -pr:b default -pr:h default") conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py:213: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=app --version=1.0 -pr:b default -pr:h default' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...onanException: app/1.0: Error in build() method, line 29\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=app --version=1.0 -pr:b default -pr:h default E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E app/1.0: Exporting package recipe: /tmp/tmpj262464gconans/path with spaces/conanfile.py E app/1.0: Copied 1 '.py' file: conanfile.py E app/1.0: Copied 1 '.cpp' file: main.cpp E app/1.0: Copied 1 '.txt' file: CMakeLists.txt E app/1.0: Exported to cache folder: /tmp/tmpmriba2epconans/path with spaces/.conan2/p/app29a56b528c361/e E app/1.0: Exported: app/1.0#ff53c1e11a69dac9532aa35237a26781 (2024-04-16 13:17:17 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E app/1.0#ff53c1e11a69dac9532aa35237a26781 - Cache E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E E ======== Computing necessary packages ======== E app/1.0: Forced build from source E Requirements E app/1.0#ff53c1e11a69dac9532aa35237a26781:25690441c330e01b1a4c7c5de975c5dc676bdc06 - Build E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E E ======== Installing packages ======== E protobuf/1.0: Already installed! (1 of 2) E E -------- Installing package app/1.0 (2 of 2) -------- E app/1.0: Building from source E app/1.0: Package app/1.0:25690441c330e01b1a4c7c5de975c5dc676bdc06 E app/1.0: Copying sources to build folder E app/1.0: Building your package in /tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/b E app/1.0: Calling generate() E app/1.0: Generators folder: /tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/b E app/1.0: CMakeToolchain generated: conan_toolchain.cmake E app/1.0: CMakeToolchain generated: /tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/b/CMakePresets.json E app/1.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(protobuf) E find_package(protobuf_BUILD) E target_link_libraries(... protobuf::protobuf protobuf_BUILD::protobuf_BUILD) E app/1.0: Generating aggregated env files E app/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E app/1.0: Calling build() E app/1.0: Running CMake.configure() E app/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/b" E -- Using Conan toolchain: /tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'protobuf::protobuf' E -- Conan: Including build module from '/tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/proto33a110bb78365/p/build/my_tools_host.cmake' E -- Conan: Target declared 'protobuf_BUILD::protobuf_BUILD' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/b E E app/1.0: Running CMake.build() E app/1.0: RUN: cmake --build "/tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/b" -- -j4 E Scanning dependencies of target app E [ 50%] Building CXX object CMakeFiles/app.dir/main.cpp.o E /tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/b/main.cpp:3:10: fatal error: protobuf.h: No such file or directory E 3 | #include "protobuf.h" E | ^~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/app.dir/build.make:63: CMakeFiles/app.dir/main.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/app.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E app/1.0: ERROR: E Package '25690441c330e01b1a4c7c5de975c5dc676bdc06' build failed E app/1.0: WARN: Build folder /tmp/tmpmriba2epconans/path with spaces/.conan2/p/b/app1b2bf2c350c1d/b E ERROR: app/1.0: Error in build() method, line 29 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpmriba2epconans/path with spaces/.conan2/p/app29a56b528c361/e/conanfile.py", line 29, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: app/1.0: Error in build() method, line 29 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ___________________ test_shared_cmake_toolchain_test_package ___________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_shared_cmake_toolchain_test_package(): client = TestClient() files = pkg_cmake("hello", "0.1") files.update(pkg_cmake_test("hello")) client.save(files) > client.run("create . -o hello/*:shared=True") conans/test/functional/toolchains/cmake/test_shared_cmake.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -o hello/*:shared=True', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...llo/0.1 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -o hello/*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E hello/0.1: Exporting package recipe: /tmp/tmp_x14ieuqconans/path with spaces/conanfile.py E hello/0.1: Copied 1 '.py' file: conanfile.py E hello/0.1: Copied 1 '.txt' file: CMakeLists.txt E hello/0.1: Copied 1 '.cpp' file: hello.cpp E hello/0.1: Copied 1 '.h' file: hello.h E hello/0.1: Exported to cache folder: /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/hellob525c31a4697b/e E hello/0.1: Exported: hello/0.1#234bf56e60ac669e4bc4897583f19c83 (2024-04-16 13:17:16 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E hello/*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E hello/0.1#234bf56e60ac669e4bc4897583f19c83 - Cache E E ======== Computing necessary packages ======== E hello/0.1: Forced build from source E Requirements E hello/0.1#234bf56e60ac669e4bc4897583f19c83:0645178f9911c96e0f11d63b451090c571726042 - Build E E ======== Installing packages ======== E E -------- Installing package hello/0.1 (1 of 1) -------- E hello/0.1: Building from source E hello/0.1: Package hello/0.1:0645178f9911c96e0f11d63b451090c571726042 E hello/0.1: Copying sources to build folder E hello/0.1: Building your package in /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/b E hello/0.1: Writing generators to /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/b/build/Release/generators E hello/0.1: Generator 'CMakeToolchain' calling 'generate()' E hello/0.1: CMakeToolchain generated: conan_toolchain.cmake E hello/0.1: CMakeToolchain generated: /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/b/build/Release/generators/CMakePresets.json E hello/0.1: CMakeToolchain generated: /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/b/CMakeUserPresets.json E hello/0.1: Generator 'CMakeDeps' calling 'generate()' E hello/0.1: Generating aggregated env files E hello/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E hello/0.1: Calling build() E hello/0.1: Running CMake.configure() E hello/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/b" E -- Using Conan toolchain: /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/b/build/Release E E hello/0.1: Running CMake.build() E hello/0.1: RUN: cmake --build "/tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/b/build/Release" -- -j4 E Scanning dependencies of target hello E [ 50%] Building CXX object CMakeFiles/hello.dir/src/hello.cpp.o E [100%] Linking CXX shared library libhello.so E [100%] Built target hello E E hello/0.1: Package '0645178f9911c96e0f11d63b451090c571726042' built E hello/0.1: Build folder /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/b/build/Release E hello/0.1: Generating the package E hello/0.1: Packaging in folder /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/p E hello/0.1: Calling package() E hello/0.1: package(): Packaged 1 '.so' file: libhello.so E hello/0.1: package(): Packaged 1 '.h' file: hello.h E hello/0.1: Created package revision 7e3cd26dc8a386ccb9e1125339b812db E hello/0.1: Package '0645178f9911c96e0f11d63b451090c571726042' created E hello/0.1: Full package reference: hello/0.1#234bf56e60ac669e4bc4897583f19c83:0645178f9911c96e0f11d63b451090c571726042#7e3cd26dc8a386ccb9e1125339b812db E hello/0.1: Package folder /tmp/tmps6sffv1zconans/path with spaces/.conan2/p/b/hello7794a325b6414/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E hello/0.1 (test package): /tmp/tmp_x14ieuqconans/path with spaces/test_package/conanfile.py E Requirements E hello/0.1#234bf56e60ac669e4bc4897583f19c83 - Cache E E ======== Computing necessary packages ======== E Requirements E hello/0.1#234bf56e60ac669e4bc4897583f19c83:0645178f9911c96e0f11d63b451090c571726042#7e3cd26dc8a386ccb9e1125339b812db - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmp_x14ieuqconans/path with spaces/test_package/build/gcc-8-x86_64-release E hello/0.1 (test package): Test package build: build/gcc-8-x86_64-release E hello/0.1 (test package): Test package build folder: /tmp/tmp_x14ieuqconans/path with spaces/test_package/build/gcc-8-x86_64-release E hello/0.1 (test package): Writing generators to /tmp/tmp_x14ieuqconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators E hello/0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E hello/0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E hello/0.1 (test package): CMakeToolchain generated: /tmp/tmp_x14ieuqconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E hello/0.1 (test package): CMakeToolchain generated: /tmp/tmp_x14ieuqconans/path with spaces/test_package/CMakeUserPresets.json E hello/0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E hello/0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E hello/0.1 (test package): Generator 'VirtualRunEnv' calling 'generate()' E hello/0.1 (test package): Generating aggregated env files E hello/0.1 (test package): Generated aggregated env files: ['conanrun.sh', 'conanbuild.sh'] E E ======== Testing the package: Building ======== E hello/0.1 (test package): Calling build() E hello/0.1 (test package): Running CMake.configure() E hello/0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp_x14ieuqconans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp_x14ieuqconans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmp_x14ieuqconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp_x14ieuqconans/path with spaces/test_package/build/gcc-8-x86_64-release E E hello/0.1 (test package): Running CMake.build() E hello/0.1 (test package): RUN: cmake --build "/tmp/tmp_x14ieuqconans/path with spaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target test E [ 50%] Building CXX object CMakeFiles/test.dir/src/test.cpp.o E /tmp/tmp_x14ieuqconans/path with spaces/test_package/src/test.cpp:6:10: fatal error: hello.h: No such file or directory E 6 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/test.dir/build.make:63: CMakeFiles/test.dir/src/test.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/test.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: hello/0.1 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp_x14ieuqconans/path with spaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: hello/0.1 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception __________________________ test_cpp_info_link_objects __________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_cpp_info_link_objects(): client = TestClient() obj_ext = "obj" if platform.system() == "Windows" else "o" cpp_info = {"objects": [os.path.join("lib", "myobject.{}".format(obj_ext))]} object_cpp = gen_function_cpp(name="myobject") object_h = gen_function_h(name="myobject") cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) project(MyObject) file(GLOB HEADERS *.h) add_library(myobject OBJECT myobject.cpp) if( WIN32 ) set(OBJ_PATH "myobject.dir/Release/myobject${CMAKE_C_OUTPUT_EXTENSION}") else() set(OBJ_PATH "CMakeFiles/myobject.dir/myobject.cpp${CMAKE_C_OUTPUT_EXTENSION}") endif() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${OBJ_PATH} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib RENAME myobject${CMAKE_C_OUTPUT_EXTENSION}) install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include) """) test_package_cpp = gen_function_cpp(name="main", includes=["myobject"], calls=["myobject"]) test_package_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) project(example) find_package(myobject REQUIRED) add_executable(example example.cpp) target_link_libraries(example myobject::myobject) """) client.save({"CMakeLists.txt": cmakelists, "conanfile.py": GenConanfile("myobject", "1.0").with_package_info(cpp_info=cpp_info, env_info={}) .with_exports_sources("*") .with_cmake_build() .with_package("cmake = CMake(self)", "cmake.install()"), "myobject.cpp": object_cpp, "myobject.h": object_h, "test_package/conanfile.py": GenConanfile().with_cmake_build() .with_import("import os") .with_test('path = "{}".format(self.settings.build_type) ' 'if self.settings.os == "Windows" else "."') .with_test('self.run("{}{}example".format(path, os.sep))'), "test_package/example.cpp": test_package_cpp, "test_package/CMakeLists.txt": test_package_cmakelists}) > client.run("create . -s build_type=Release") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -s build_type=Release', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...ect/1.0 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -s build_type=Release E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E myobject/1.0: Exporting package recipe: /tmp/tmp3dixja8econans/path with spaces/conanfile.py E myobject/1.0: Copied 3 '.py' files: conanfile.py, conanfile.py, conanfile.py E myobject/1.0: Copied 2 '.cpp' files: myobject.cpp, example.cpp E myobject/1.0: Copied 1 '.h' file: myobject.h E myobject/1.0: Copied 2 '.txt' files: CMakeLists.txt, CMakeLists.txt E myobject/1.0: Exported to cache folder: /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/myobj6267ba24f63d2/e E myobject/1.0: Exported: myobject/1.0#4a85f75c849862a8e41dfd43b4218612 (2024-04-16 13:17:15 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E myobject/1.0#4a85f75c849862a8e41dfd43b4218612 - Cache E E ======== Computing necessary packages ======== E myobject/1.0: Forced build from source E Requirements E myobject/1.0#4a85f75c849862a8e41dfd43b4218612:f4bec17cf5bb949234cd84c756060aa715eaa5ca - Build E E ======== Installing packages ======== E E -------- Installing package myobject/1.0 (1 of 1) -------- E myobject/1.0: Building from source E myobject/1.0: Package myobject/1.0:f4bec17cf5bb949234cd84c756060aa715eaa5ca E myobject/1.0: Copying sources to build folder E myobject/1.0: Building your package in /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/b E myobject/1.0: Writing generators to /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/b E myobject/1.0: Generator 'CMakeDeps' calling 'generate()' E myobject/1.0: Generator 'CMakeToolchain' calling 'generate()' E myobject/1.0: CMakeToolchain generated: conan_toolchain.cmake E myobject/1.0: CMakeToolchain generated: /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/b/CMakePresets.json E myobject/1.0: Generating aggregated env files E myobject/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E myobject/1.0: Calling build() E myobject/1.0: Running CMake.configure() E myobject/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/b" E -- Using Conan toolchain: /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/b/conan_toolchain.cmake E -- The C compiler identification is GNU 9.4.0 E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working C compiler: /usr/bin/cc E -- Check for working C compiler: /usr/bin/cc -- works E -- Detecting C compiler ABI info E -- Detecting C compiler ABI info - done E -- Detecting C compile features E -- Detecting C compile features - done E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/b E E myobject/1.0: Running CMake.build() E myobject/1.0: RUN: cmake --build "/tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/b" -- -j4 E Scanning dependencies of target myobject E [100%] Building CXX object CMakeFiles/myobject.dir/myobject.cpp.o E [100%] Built target myobject E E myobject/1.0: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' built E myobject/1.0: Build folder /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/b E myobject/1.0: Generating the package E myobject/1.0: Packaging in folder /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/p E myobject/1.0: Calling package() E myobject/1.0: Running CMake.install() E myobject/1.0: RUN: cmake --install "/tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/b" --prefix "/tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/p/lib/myobject.o E -- Installing: /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/p/include/myobject.h E E myobject/1.0: package(): Packaged 1 '.o' file: myobject.o E myobject/1.0: package(): Packaged 1 '.h' file: myobject.h E myobject/1.0: Created package revision bb5e033bb063a6c801bb5e6299c98a77 E myobject/1.0: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' created E myobject/1.0: Full package reference: myobject/1.0#4a85f75c849862a8e41dfd43b4218612:f4bec17cf5bb949234cd84c756060aa715eaa5ca#bb5e033bb063a6c801bb5e6299c98a77 E myobject/1.0: Package folder /tmp/tmpg_ks2bbeconans/path with spaces/.conan2/p/b/myobja23cfa590c123/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E myobject/1.0 (test package): /tmp/tmp3dixja8econans/path with spaces/test_package/conanfile.py E Requirements E myobject/1.0#4a85f75c849862a8e41dfd43b4218612 - Cache E E ======== Computing necessary packages ======== E Requirements E myobject/1.0#4a85f75c849862a8e41dfd43b4218612:f4bec17cf5bb949234cd84c756060aa715eaa5ca#bb5e033bb063a6c801bb5e6299c98a77 - Cache E E ======== Installing packages ======== E myobject/1.0: Already installed! (1 of 1) E E ======== Testing the package ======== E myobject/1.0 (test package): Test package build: E myobject/1.0 (test package): Test package build folder: /tmp/tmp3dixja8econans/path with spaces/test_package E myobject/1.0 (test package): Writing generators to /tmp/tmp3dixja8econans/path with spaces/test_package E myobject/1.0 (test package): Generator 'CMakeDeps' calling 'generate()' E myobject/1.0 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(myobject) E target_link_libraries(... myobject::myobject) E myobject/1.0 (test package): Generator 'CMakeToolchain' calling 'generate()' E myobject/1.0 (test package): CMakeToolchain generated: conan_toolchain.cmake E myobject/1.0 (test package): CMakeToolchain generated: /tmp/tmp3dixja8econans/path with spaces/test_package/CMakePresets.json E myobject/1.0 (test package): Generating aggregated env files E myobject/1.0 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E myobject/1.0 (test package): Calling build() E myobject/1.0 (test package): Running CMake.configure() E myobject/1.0 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp3dixja8econans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp3dixja8econans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmp3dixja8econans/path with spaces/test_package/conan_toolchain.cmake E -- The C compiler identification is GNU 9.4.0 E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working C compiler: /usr/bin/cc E -- Check for working C compiler: /usr/bin/cc -- works E -- Detecting C compiler ABI info E -- Detecting C compiler ABI info - done E -- Detecting C compile features E -- Detecting C compile features - done E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'myobject::myobject' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp3dixja8econans/path with spaces/test_package E E myobject/1.0 (test package): Running CMake.build() E myobject/1.0 (test package): RUN: cmake --build "/tmp/tmp3dixja8econans/path with spaces/test_package" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/example.cpp.o E /tmp/tmp3dixja8econans/path with spaces/test_package/example.cpp:6:10: fatal error: myobject.h: No such file or directory E 6 | #include "myobject.h" E | ^~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: myobject/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp3dixja8econans/path with spaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: myobject/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ________________________ test_not_mixed_configurations _________________________ [gw1] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python def test_not_mixed_configurations(): # https://github.com/conan-io/conan/issues/11852 client = TestClient() client.run("new cmake_lib -d name=foo -d version=1.0") conanfile = client.load("conanfile.py") conanfile.replace("package_info(self)", "invalid(self)") conanfile += """ def package_info(self): self.cpp_info.libs = ["foo" if self.settings.build_type == "Release" else "foo_d"] """ cmake = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) project(foo CXX) add_library(foo "src/foo.cpp") target_include_directories(foo PUBLIC include) set_target_properties(foo PROPERTIES PUBLIC_HEADER "include/foo.h") # Different name for Release or Debug set_target_properties(foo PROPERTIES OUTPUT_NAME_DEBUG foo_d) set_target_properties(foo PROPERTIES OUTPUT_NAME_RELEASE foo) install(TARGETS foo) """) client.save({"CMakeLists.txt": cmake, "conanfile.py": conanfile}) > client.run("create .") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_and_linker_flags.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create .', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...foo/1.0 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E foo/1.0: Exporting package recipe: /tmp/tmprerf8cs3conans/path with spaces/conanfile.py E foo/1.0: Copied 1 '.py' file: conanfile.py E foo/1.0: Copied 1 '.txt' file: CMakeLists.txt E foo/1.0: Copied 1 '.cpp' file: foo.cpp E foo/1.0: Copied 1 '.h' file: foo.h E foo/1.0: Exported to cache folder: /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/foo5432f892316c7/e E foo/1.0: Exported: foo/1.0#21dcf8ad99e6fd9cdde07f7a7650f6f9 (2024-04-16 13:17:17 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E foo/1.0#21dcf8ad99e6fd9cdde07f7a7650f6f9 - Cache E E ======== Computing necessary packages ======== E foo/1.0: Forced build from source E Requirements E foo/1.0#21dcf8ad99e6fd9cdde07f7a7650f6f9:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Build E E ======== Installing packages ======== E E -------- Installing package foo/1.0 (1 of 1) -------- E foo/1.0: Building from source E foo/1.0: Package foo/1.0:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E foo/1.0: Copying sources to build folder E foo/1.0: Building your package in /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b E foo/1.0: Calling generate() E foo/1.0: Generators folder: /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b/build/Release/generators E foo/1.0: CMakeToolchain generated: conan_toolchain.cmake E foo/1.0: CMakeToolchain generated: /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b/build/Release/generators/CMakePresets.json E foo/1.0: CMakeToolchain generated: /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b/CMakeUserPresets.json E foo/1.0: Generating aggregated env files E foo/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E foo/1.0: Calling build() E foo/1.0: Running CMake.configure() E foo/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b" E -- Using Conan toolchain: /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b/build/Release E E foo/1.0: Running CMake.build() E foo/1.0: RUN: cmake --build "/tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b/build/Release" -- -j4 E Scanning dependencies of target foo E [ 50%] Building CXX object CMakeFiles/foo.dir/src/foo.cpp.o E [100%] Linking CXX static library libfoo.a E [100%] Built target foo E E foo/1.0: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' built E foo/1.0: Build folder /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b/build/Release E foo/1.0: Generating the package E foo/1.0: Packaging in folder /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/p E foo/1.0: Calling package() E foo/1.0: Running CMake.install() E foo/1.0: RUN: cmake --install "/tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/b/build/Release" --prefix "/tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/p/lib/libfoo.a E -- Installing: /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/p/include/foo.h E E foo/1.0: package(): Packaged 1 '.a' file: libfoo.a E foo/1.0: package(): Packaged 1 '.h' file: foo.h E foo/1.0: Created package revision b3b9290b4621e131643ff96ad744c51b E foo/1.0: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E foo/1.0: Full package reference: foo/1.0#21dcf8ad99e6fd9cdde07f7a7650f6f9:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#b3b9290b4621e131643ff96ad744c51b E foo/1.0: Package folder /tmp/tmptz6kjlohconans/path with spaces/.conan2/p/b/foo6ef05106ef48a/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E foo/1.0 (test package): /tmp/tmprerf8cs3conans/path with spaces/test_package/conanfile.py E Requirements E foo/1.0#21dcf8ad99e6fd9cdde07f7a7650f6f9 - Cache E E ======== Computing necessary packages ======== E Requirements E foo/1.0#21dcf8ad99e6fd9cdde07f7a7650f6f9:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#b3b9290b4621e131643ff96ad744c51b - Cache E E ======== Installing packages ======== E foo/1.0: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmprerf8cs3conans/path with spaces/test_package/build/gcc-8-x86_64-release E foo/1.0 (test package): Test package build: build/gcc-8-x86_64-release E foo/1.0 (test package): Test package build folder: /tmp/tmprerf8cs3conans/path with spaces/test_package/build/gcc-8-x86_64-release E foo/1.0 (test package): Writing generators to /tmp/tmprerf8cs3conans/path with spaces/test_package/build/gcc-8-x86_64-release/generators E foo/1.0 (test package): Generator 'CMakeDeps' calling 'generate()' E foo/1.0 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(foo) E target_link_libraries(... foo::foo) E foo/1.0 (test package): Generator 'CMakeToolchain' calling 'generate()' E foo/1.0 (test package): CMakeToolchain generated: conan_toolchain.cmake E foo/1.0 (test package): CMakeToolchain generated: /tmp/tmprerf8cs3conans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E foo/1.0 (test package): CMakeToolchain generated: /tmp/tmprerf8cs3conans/path with spaces/test_package/CMakeUserPresets.json E foo/1.0 (test package): Generating aggregated env files E foo/1.0 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E foo/1.0 (test package): Calling build() E foo/1.0 (test package): Running CMake.configure() E foo/1.0 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmprerf8cs3conans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmprerf8cs3conans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmprerf8cs3conans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'foo::foo' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmprerf8cs3conans/path with spaces/test_package/build/gcc-8-x86_64-release E E foo/1.0 (test package): Running CMake.build() E foo/1.0 (test package): RUN: cmake --build "/tmp/tmprerf8cs3conans/path with spaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmprerf8cs3conans/path with spaces/test_package/src/example.cpp:1:10: fatal error: foo.h: No such file or directory E 1 | #include "foo.h" E | ^~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: foo/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmprerf8cs3conans/path with spaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: foo/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _________________________ test_not_activated_not_fail __________________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python client = @pytest.mark.tool("cmake") def test_not_activated_not_fail(client): consumer_cmake = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.15) project(MyApp CXX) find_package(protobuf) add_executable(app main.cpp) foo_generate() target_link_libraries(app protobuf::protobuf) """) client.save({"conanfile.py": consumer_conanfile.format(""), "CMakeLists.txt": consumer_cmake, "main.cpp": main}) > client.run("create . --name=app --version=1.0 -pr:b default -pr:h default") conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py:251: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=app --version=1.0 -pr:b default -pr:h default' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...onanException: app/1.0: Error in build() method, line 25\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=app --version=1.0 -pr:b default -pr:h default E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E app/1.0: Exporting package recipe: /tmp/tmphjskmni9conans/path with spaces/conanfile.py E app/1.0: Copied 1 '.py' file: conanfile.py E app/1.0: Copied 1 '.cpp' file: main.cpp E app/1.0: Copied 1 '.txt' file: CMakeLists.txt E app/1.0: Exported to cache folder: /tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/app2ead98e07d0f4/e E app/1.0: Exported: app/1.0#0755636d62bfba910f5e834ea881105f (2024-04-16 13:17:18 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E app/1.0#0755636d62bfba910f5e834ea881105f - Cache E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734 - Cache E E ======== Computing necessary packages ======== E app/1.0: Forced build from source E Requirements E app/1.0#0755636d62bfba910f5e834ea881105f:25690441c330e01b1a4c7c5de975c5dc676bdc06 - Build E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E Build requirements E protobuf/1.0#b1bd03f2a6c5baf9f1e431651915e734:f4bec17cf5bb949234cd84c756060aa715eaa5ca#56d8f0f6598bb9d2bccef4f1a9e57962 - Cache E E ======== Installing packages ======== E protobuf/1.0: Already installed! (1 of 2) E E -------- Installing package app/1.0 (2 of 2) -------- E app/1.0: Building from source E app/1.0: Package app/1.0:25690441c330e01b1a4c7c5de975c5dc676bdc06 E app/1.0: Copying sources to build folder E app/1.0: Building your package in /tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/b E app/1.0: Calling generate() E app/1.0: Generators folder: /tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/b E app/1.0: CMakeToolchain generated: conan_toolchain.cmake E app/1.0: CMakeToolchain generated: /tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/b/CMakePresets.json E app/1.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(protobuf) E target_link_libraries(... protobuf::protobuf) E app/1.0: Generating aggregated env files E app/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E app/1.0: Calling build() E app/1.0: Running CMake.configure() E app/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/b" E -- Using Conan toolchain: /tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'protobuf::protobuf' E -- Conan: Including build module from '/tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/protobf901b90b35c0/p/build/my_tools_host.cmake' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/b E E app/1.0: Running CMake.build() E app/1.0: RUN: cmake --build "/tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/b" -- -j4 E Scanning dependencies of target app E [ 50%] Building CXX object CMakeFiles/app.dir/main.cpp.o E /tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/b/main.cpp:3:10: fatal error: protobuf.h: No such file or directory E 3 | #include "protobuf.h" E | ^~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/app.dir/build.make:63: CMakeFiles/app.dir/main.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/app.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E app/1.0: ERROR: E Package '25690441c330e01b1a4c7c5de975c5dc676bdc06' build failed E app/1.0: WARN: Build folder /tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/b/app4a2ceefffbb3c/b E ERROR: app/1.0: Error in build() method, line 25 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpcjf03f5hconans/path with spaces/.conan2/p/app2ead98e07d0f4/e/conanfile.py", line 25, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: app/1.0: Error in build() method, line 25 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _______________________________ test_system_dep ________________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_system_dep(): """This test creates a zlib package and use the installation CMake FindZLIB.cmake to locate the library of the package. That happens because: - The package declares: self.cpp_info.set_property("cmake_find_mode", "none") so CMakeDeps does nothing - The toolchain set the CMAKE_LIBRARY_PATH to the "lib" of the package, so the library file is found """ client = TestClient() files = pkg_cmake("zlib", "0.1") files["conanfile.py"] += """ def package_info(self): # This will use the FindZLIB from CMake but will find this library package self.cpp_info.set_property("cmake_file_name", "ZLIB") self.cpp_info.set_property("cmake_target_name", "ZLIB::ZLIB") self.cpp_info.set_property("cmake_find_mode", "none") """ client.save({os.path.join("zlib", name): content for name, content in files.items()}) files = pkg_cmake("mylib", "0.1", requires=["zlib/0.1"]) files["CMakeLists.txt"] = files["CMakeLists.txt"].replace("find_package(zlib)", "find_package(ZLIB)") files["CMakeLists.txt"] = files["CMakeLists.txt"].replace("zlib::zlib", "ZLIB::ZLIB") client.save({os.path.join("mylib", name): content for name, content in files.items()}) files = pkg_cmake("consumer", "0.1", requires=["mylib/0.1"]) client.save({os.path.join("consumer", name): content for name, content in files.items()}) client.run("create zlib") client.run("create mylib") > client.run("create consumer") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py:553: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create consumer', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...xception: consumer/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create consumer E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E consumer/0.1: Exporting package recipe: /tmp/tmpahi2jr9_conans/path with spaces/consumer/conanfile.py E consumer/0.1: Copied 1 '.py' file: conanfile.py E consumer/0.1: Copied 1 '.txt' file: CMakeLists.txt E consumer/0.1: Copied 1 '.cpp' file: consumer.cpp E consumer/0.1: Copied 1 '.h' file: consumer.h E consumer/0.1: Exported to cache folder: /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/consuffc4abfbccca8/e E consumer/0.1: Exported: consumer/0.1#2606db5c9713e01407c6c49b36a54f35 (2024-04-16 13:17:21 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E consumer/0.1#2606db5c9713e01407c6c49b36a54f35 - Cache E mylib/0.1#89ee529074af9abeb3bde3c2bde6340d - Cache E zlib/0.1#87df6b0886a00d8a0e353fdbf246ddbe - Cache E E ======== Computing necessary packages ======== E consumer/0.1: Forced build from source E Requirements E consumer/0.1#2606db5c9713e01407c6c49b36a54f35:ea543b7a5a86e98b0b738afed815b7415e1d2249 - Build E mylib/0.1#89ee529074af9abeb3bde3c2bde6340d:4b967187360729533a03248ec83dd55079293d61#5cfecdbf09c2c552202c452f7c09673c - Cache E zlib/0.1#87df6b0886a00d8a0e353fdbf246ddbe:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#739e7490deebf65814987a5fc6354ef3 - Cache E E ======== Installing packages ======== E zlib/0.1: Already installed! (1 of 3) E mylib/0.1: Already installed! (2 of 3) E E -------- Installing package consumer/0.1 (3 of 3) -------- E consumer/0.1: Building from source E consumer/0.1: Package consumer/0.1:ea543b7a5a86e98b0b738afed815b7415e1d2249 E consumer/0.1: Copying sources to build folder E consumer/0.1: Building your package in /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b E consumer/0.1: Writing generators to /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b/build/Release/generators E consumer/0.1: Generator 'CMakeToolchain' calling 'generate()' E consumer/0.1: CMakeToolchain generated: conan_toolchain.cmake E consumer/0.1: CMakeToolchain generated: /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b/build/Release/generators/CMakePresets.json E consumer/0.1: CMakeToolchain generated: /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b/CMakeUserPresets.json E consumer/0.1: Generator 'CMakeDeps' calling 'generate()' E consumer/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(mylib) E target_link_libraries(... mylib::mylib) E consumer/0.1: Generating aggregated env files E consumer/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E consumer/0.1: Calling build() E consumer/0.1: Running CMake.configure() E consumer/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b" E -- Using Conan toolchain: /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'mylib::mylib' E -- Found ZLIB: /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/zlib863620a34e78c/p/lib/libzlib.a (found version "..") E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b/build/Release E E consumer/0.1: Running CMake.build() E consumer/0.1: RUN: cmake --build "/tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b/build/Release" -- -j4 E Scanning dependencies of target consumer E [ 50%] Building CXX object CMakeFiles/consumer.dir/src/consumer.cpp.o E /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b/src/consumer.cpp:8:10: fatal error: mylib.h: No such file or directory E 8 | #include "mylib.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/consumer.dir/build.make:63: CMakeFiles/consumer.dir/src/consumer.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/consumer.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E consumer/0.1: ERROR: E Package 'ea543b7a5a86e98b0b738afed815b7415e1d2249' build failed E consumer/0.1: WARN: Build folder /tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/b/consu6bf0f1584454a/b/build/Release E ERROR: consumer/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp35rf2t8fconans/path with spaces/.conan2/p/consuffc4abfbccca8/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: consumer/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ________________________ test_error_missing_build_type _________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python matrix_client = @pytest.mark.tool("cmake", "3.19") def test_error_missing_build_type(matrix_client): # https://github.com/conan-io/conan/issues/11168 client = matrix_client conanfile = textwrap.dedent(""" [requires] matrix/1.0 [generators] CMakeDeps CMakeToolchain """) main = textwrap.dedent(""" #include int main() {matrix();return 0;} """) cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) project(app) find_package(matrix REQUIRED) add_executable(app) target_link_libraries(app matrix::matrix) target_sources(app PRIVATE main.cpp) """) if platform.system() != "Windows": client.save({ "conanfile.txt": conanfile, "main.cpp": main, "CMakeLists.txt": cmakelists }, clean_first=True) client.run("install .") client.run_command("cmake . -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -G 'Unix Makefiles'", assert_error=True) assert "Please, set the CMAKE_BUILD_TYPE variable when calling to CMake" in client.out client.save({ "conanfile.txt": conanfile, "main.cpp": main, "CMakeLists.txt": cmakelists }, clean_first=True) client.run("install .") generator = { "Windows": '-G "Visual Studio 15 2017"', "Darwin": '-G "Xcode"', "Linux": '-G "Ninja Multi-Config"' }.get(platform.system()) client.run_command("cmake . -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake {}".format(generator)) client.run_command("cmake --build . --config Release") run_app = r".\Release\app.exe" if platform.system() == "Windows" else "./Release/app" client.run_command(run_app) > assert "matrix/1.0: Hello World Release!" in client.out E AssertionError: assert 'matrix/1.0: Hello World Release!' in 'matrix/1.0: Hello World Debug!\n matrix/1.0: __x86_64__ defined\n matrix/1.0: _GLIBCXX_USE_CXX11_ABI 1\n matrix/1.0: __cplusplus201402\n matrix/1.0: __GNUC__9\n matrix/1.0: __GNUC_MINOR__4\n' E + where 'matrix/1.0: Hello World Debug!\n matrix/1.0: __x86_64__ defined\n matrix/1.0: _GLIBCXX_USE_CXX11_ABI 1\n matrix/1.0: __cplusplus201402\n matrix/1.0: __GNUC__9\n matrix/1.0: __GNUC_MINOR__4\n' = .out conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py:620: AssertionError ___________________________ test_map_imported_config ___________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python matrix_client = @pytest.mark.tool("cmake") def test_map_imported_config(matrix_client): # https://github.com/conan-io/conan/issues/12041 client = matrix_client # It is necessary a 2-level test to make the fixes evident talk_cpp = gen_function_cpp(name="talk", includes=["matrix"], calls=["matrix"]) talk_h = gen_function_h(name="talk") conanfile = textwrap.dedent(""" import os from conan import ConanFile from conan.tools.cmake import CMake from conan.tools.files import copy class HelloConan(ConanFile): name = 'talk' version = '1.0' exports_sources = "*" generators = "CMakeDeps", "CMakeToolchain" requires = ("matrix/1.0", ) settings = "os", "compiler", "arch", "build_type" def build(self): cmake = CMake(self) cmake.configure() cmake.build() def package(self): cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs.append("talk") """) client.save({"conanfile.py": conanfile, "CMakeLists.txt": gen_cmakelists(libname="talk", libsources=["talk.cpp"], find_package=["matrix"], install=True, public_header="talk.h"), "talk.cpp": talk_cpp, "talk.h": talk_h}, clean_first=True) > client.run("create . -tf=\"\" -s build_type=Release") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py:663: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -tf="" -s build_type=Release', assert_error = False error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nanException: talk/1.0: Error in build() method, line 17\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -tf="" -s build_type=Release E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E talk/1.0: Exporting package recipe: /tmp/tmpduup3umjconans/path with spaces/conanfile.py E talk/1.0: Copied 2 '.py' files: conanfile.py, conanfile.py E talk/1.0: Copied 1 '.cpp' file: talk.cpp E talk/1.0: Copied 1 '.h' file: talk.h E talk/1.0: Copied 1 '.txt' file: CMakeLists.txt E talk/1.0: Exported to cache folder: /tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/talk0ed5745026058/e E talk/1.0: Exported: talk/1.0#bb65e024ea068c21782d7cb340c26542 (2024-04-16 13:17:27 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E matrix/1.0#0fd6ccef90970c84ccacf46c59c6cc74 - Cache E talk/1.0#bb65e024ea068c21782d7cb340c26542 - Cache E E ======== Computing necessary packages ======== E talk/1.0: Forced build from source E Requirements E matrix/1.0#0fd6ccef90970c84ccacf46c59c6cc74:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#cded365c0fba7b5de99c3aedf349bc88 - Cache E talk/1.0#bb65e024ea068c21782d7cb340c26542:8323cfcb2e2af4a49d49774fe34e47363fa77470 - Build E E ======== Installing packages ======== E matrix/1.0: Already installed! (1 of 2) E E -------- Installing package talk/1.0 (2 of 2) -------- E talk/1.0: Building from source E talk/1.0: Package talk/1.0:8323cfcb2e2af4a49d49774fe34e47363fa77470 E talk/1.0: Copying sources to build folder E talk/1.0: Building your package in /tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/b E talk/1.0: Writing generators to /tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/b E talk/1.0: Generator 'CMakeDeps' calling 'generate()' E talk/1.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(matrix) E target_link_libraries(... matrix::matrix) E talk/1.0: Generator 'CMakeToolchain' calling 'generate()' E talk/1.0: CMakeToolchain generated: conan_toolchain.cmake E talk/1.0: CMakeToolchain generated: /tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/b/CMakePresets.json E talk/1.0: Generating aggregated env files E talk/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E talk/1.0: Calling build() E talk/1.0: Running CMake.configure() E talk/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/b" E -- Using Conan toolchain: /tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'matrix::matrix' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/b E E talk/1.0: Running CMake.build() E talk/1.0: RUN: cmake --build "/tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/b" -- -j4 E Scanning dependencies of target talk E [ 50%] Building CXX object CMakeFiles/talk.dir/talk.cpp.o E /tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/b/talk.cpp:8:10: fatal error: matrix.h: No such file or directory E 8 | #include "matrix.h" E | ^~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/talk.dir/build.make:63: CMakeFiles/talk.dir/talk.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/talk.dir/all] Error 2 E make: *** [Makefile:130: all] Error 2 E E talk/1.0: ERROR: E Package '8323cfcb2e2af4a49d49774fe34e47363fa77470' build failed E talk/1.0: WARN: Build folder /tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/b/talk5daa68b16c780/b E ERROR: talk/1.0: Error in build() method, line 17 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpl5xkuyl4conans/path with spaces/.conan2/p/talk0ed5745026058/e/conanfile.py", line 17, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: talk/1.0: Error in build() method, line 17 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _______________________________ test_same_names ________________________________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.slow @pytest.mark.tool("cmake") def test_same_names(): client = TestClient() conanfile_greetings = textwrap.dedent(""" from os.path import join from conan import ConanFile from conan.tools.cmake import CMake from conan.tools.files import copy class HelloConan(ConanFile): name = "hello" version = "0.0.1" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" exports_sources = "src/*" def build(self): cmake = CMake(self) cmake.configure(build_script_folder="src") cmake.build() def package(self): copy(self, "*.h", src=join(self.source_folder, "src"), dst=join(self.package_folder, "include")) copy(self, "*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) copy(self, "*.a", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) def package_info(self): self.cpp_info.components["global"].name = "hello" self.cpp_info.components["global"].libs = ["hello"] self.cpp_info.components["global"].includedirs = ["include"] self.cpp_info.components["global"].libdirs = ["lib"] """) hello_h = gen_function_h(name="hello") hello_cpp = gen_function_cpp(name="hello", includes=["hello"]) cmakelists_greetings = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(greetings CXX) add_library(hello hello.cpp) """) test_package_greetings_conanfile = textwrap.dedent(""" import os from conan import ConanFile from conan.tools.cmake import CMake class HelloTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" def requirements(self): self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): path = "{}".format(self.settings.build_type) if self.settings.os == "Windows" else "." self.run("{}{}example".format(path, os.sep)) """) test_package_greetings_cpp = gen_function_cpp(name="main", includes=["hello"], calls=["hello"]) test_package_greetings_cmakelists = textwrap.dedent(""" set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) cmake_minimum_required(VERSION 3.0) project(PackageTest CXX) find_package(hello) add_executable(example example.cpp) target_link_libraries(example hello::hello) """) client.save({"conanfile.py": conanfile_greetings, "src/CMakeLists.txt": cmakelists_greetings, "src/hello.h": hello_h, "src/hello.cpp": hello_cpp, "test_package/conanfile.py": test_package_greetings_conanfile, "test_package/example.cpp": test_package_greetings_cpp, "test_package/CMakeLists.txt": test_package_greetings_cmakelists}) > client.run("create .") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py:524: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create .', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...o/0.0.1 (test package): Error in build() method, line 16\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E hello/0.0.1: Exporting package recipe: /tmp/tmp47m578y4conans/path with spaces/conanfile.py E hello/0.0.1: Copied 1 '.py' file: conanfile.py E hello/0.0.1: Copied 1 '.cpp' file: hello.cpp E hello/0.0.1: Copied 1 '.h' file: hello.h E hello/0.0.1: Copied 1 '.txt' file: CMakeLists.txt E hello/0.0.1: Exported to cache folder: /tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/hello10cc076bde364/e E hello/0.0.1: Exported: hello/0.0.1#6b8496b9e356cb9a487b1f746b7babe5 (2024-04-16 13:17:27 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E hello/0.0.1#6b8496b9e356cb9a487b1f746b7babe5 - Cache E E ======== Computing necessary packages ======== E hello/0.0.1: Forced build from source E Requirements E hello/0.0.1#6b8496b9e356cb9a487b1f746b7babe5:f4bec17cf5bb949234cd84c756060aa715eaa5ca - Build E E ======== Installing packages ======== E E -------- Installing package hello/0.0.1 (1 of 1) -------- E hello/0.0.1: Building from source E hello/0.0.1: Package hello/0.0.1:f4bec17cf5bb949234cd84c756060aa715eaa5ca E hello/0.0.1: Copying sources to build folder E hello/0.0.1: Building your package in /tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/b E hello/0.0.1: Writing generators to /tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/b E hello/0.0.1: Generator 'CMakeDeps' calling 'generate()' E hello/0.0.1: Generator 'CMakeToolchain' calling 'generate()' E hello/0.0.1: CMakeToolchain generated: conan_toolchain.cmake E hello/0.0.1: CMakeToolchain generated: /tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/b/CMakePresets.json E hello/0.0.1: Generating aggregated env files E hello/0.0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E hello/0.0.1: Calling build() E hello/0.0.1: Running CMake.configure() E hello/0.0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/b/src" E -- Using Conan toolchain: /tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/b E E hello/0.0.1: Running CMake.build() E hello/0.0.1: RUN: cmake --build "/tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/b" -- -j4 E Scanning dependencies of target hello E [ 50%] Building CXX object CMakeFiles/hello.dir/hello.cpp.o E [100%] Linking CXX static library libhello.a E [100%] Built target hello E E hello/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' built E hello/0.0.1: Build folder /tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/b E hello/0.0.1: Generating the package E hello/0.0.1: Packaging in folder /tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/p E hello/0.0.1: Calling package() E hello/0.0.1: package(): Packaged 1 '.a' file: libhello.a E hello/0.0.1: package(): Packaged 1 '.h' file: hello.h E hello/0.0.1: Created package revision a6621e80fc4639b285bc9339640aead2 E hello/0.0.1: Package 'f4bec17cf5bb949234cd84c756060aa715eaa5ca' created E hello/0.0.1: Full package reference: hello/0.0.1#6b8496b9e356cb9a487b1f746b7babe5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#a6621e80fc4639b285bc9339640aead2 E hello/0.0.1: Package folder /tmp/tmpdqyhayg1conans/path with spaces/.conan2/p/b/hello2b7f169a0815a/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E hello/0.0.1 (test package): /tmp/tmp47m578y4conans/path with spaces/test_package/conanfile.py E Requirements E hello/0.0.1#6b8496b9e356cb9a487b1f746b7babe5 - Cache E E ======== Computing necessary packages ======== E Requirements E hello/0.0.1#6b8496b9e356cb9a487b1f746b7babe5:f4bec17cf5bb949234cd84c756060aa715eaa5ca#a6621e80fc4639b285bc9339640aead2 - Cache E E ======== Installing packages ======== E hello/0.0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E hello/0.0.1 (test package): Test package build: E hello/0.0.1 (test package): Test package build folder: /tmp/tmp47m578y4conans/path with spaces/test_package E hello/0.0.1 (test package): Writing generators to /tmp/tmp47m578y4conans/path with spaces/test_package E hello/0.0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E hello/0.0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E hello/0.0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E hello/0.0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E hello/0.0.1 (test package): CMakeToolchain generated: /tmp/tmp47m578y4conans/path with spaces/test_package/CMakePresets.json E hello/0.0.1 (test package): Generating aggregated env files E hello/0.0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E hello/0.0.1 (test package): Calling build() E hello/0.0.1 (test package): Running CMake.configure() E hello/0.0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp47m578y4conans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp47m578y4conans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmp47m578y4conans/path with spaces/test_package/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Component target declared 'hello::global' E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp47m578y4conans/path with spaces/test_package E E hello/0.0.1 (test package): Running CMake.build() E hello/0.0.1 (test package): RUN: cmake --build "/tmp/tmp47m578y4conans/path with spaces/test_package" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/example.cpp.o E /tmp/tmp47m578y4conans/path with spaces/test_package/example.cpp:6:10: fatal error: hello.h: No such file or directory E 6 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: hello/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp47m578y4conans/path with spaces/test_package/conanfile.py", line 16, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: hello/0.0.1 (test package): Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _____ TestComponentsCMakeGenerators.test_same_name_global_target_collision _____ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python self = @pytest.mark.slow def test_same_name_global_target_collision(self): # https://github.com/conan-io/conan/issues/7889 conanfile_tpl = textwrap.dedent(""" from os.path import join from conan import ConanFile from conan.tools.cmake import CMake from conan.tools.files import copy class Conan(ConanFile): name = "{name}" version = "1.0" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" exports_sources = "src/*", "include/*" def build(self): cmake = CMake(self) cmake.configure(build_script_folder="src") cmake.build() def package(self): copy(self, "*.h", src=join(self.source_folder, "include"), dst=join(self.package_folder, "include")) copy(self, "*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) copy(self, "*.a", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) def package_info(self): self.cpp_info.set_property("cmake_target_name", "nonstd::nonstd" ) self.cpp_info.set_property("cmake_file_name", "{name}") self.cpp_info.components["1"].set_property("cmake_target_name", "nonstd::{name}") self.cpp_info.components["1"].libs = ["{name}"] self.cpp_info.components["1"].includedirs = ["include"] self.cpp_info.components["1"].libdirs = ["lib"] """) basic_cmake = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) project(middle CXX) add_library({name} {name}.cpp) target_include_directories({name} PUBLIC ../include) """) client = TestClient() for name in ["expected", "variant"]: client.run("new cmake_lib -d name={name} -d version=1.0 -f".format(name=name)) client.save({"conanfile.py": conanfile_tpl.format(name=name), "src/CMakeLists.txt": basic_cmake.format(name=name)}) shutil.rmtree(os.path.join(client.current_folder, "test_package")) client.run("create .") middle_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CXX_ABI_COMPILED 1) project(middle CXX) find_package(expected) find_package(variant) add_library(middle middle.cpp) target_link_libraries(middle nonstd::nonstd) """) middle_h = gen_function_h(name="middle") middle_cpp = gen_function_cpp(name="middle", includes=["middle", "expected", "variant"], calls=["expected", "variant"]) middle_conanfile = textwrap.dedent(""" from os.path import join from conan import ConanFile from conan.tools.cmake import CMake from conan.tools.files import copy class Conan(ConanFile): name = "middle" version = "1.0" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" exports_sources = "src/*" requires = "expected/1.0", "variant/1.0" def build(self): cmake = CMake(self) cmake.configure(build_script_folder="src") cmake.build() def package(self): copy(self, "*.h", src=join(self.source_folder, "src"), dst=join(self.package_folder, "include")) copy(self, "*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) copy(self, "*.a", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) def package_info(self): self.cpp_info.libs = ["middle"] """) client.save({"conanfile.py": middle_conanfile, "src/CMakeLists.txt": middle_cmakelists, "src/middle.h": middle_h, "src/middle.cpp": middle_cpp}, clean_first=True) > client.run("create . --name=middle --version=1.0") conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py:725: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=middle --version=1.0', assert_error = False error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nException: middle/1.0: Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=middle --version=1.0 E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E middle/1.0: Exporting package recipe: /tmp/tmp3dbkmf10conans/path with spaces/conanfile.py E middle/1.0: Copied 1 '.py' file: conanfile.py E middle/1.0: Copied 1 '.cpp' file: middle.cpp E middle/1.0: Copied 1 '.txt' file: CMakeLists.txt E middle/1.0: Copied 1 '.h' file: middle.h E middle/1.0: Exported to cache folder: /tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/middl09dcb63c271ae/e E middle/1.0: Exported: middle/1.0#5dcbb93f90976f069861ef2f97dd109c (2024-04-16 13:17:33 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E expected/1.0#d4a30208b2a3cad43587d7a704156e7a - Cache E middle/1.0#5dcbb93f90976f069861ef2f97dd109c - Cache E variant/1.0#2f232c35bf0384c0eba21500e518a1fd - Cache E E ======== Computing necessary packages ======== E middle/1.0: Forced build from source E Requirements E expected/1.0#d4a30208b2a3cad43587d7a704156e7a:f4bec17cf5bb949234cd84c756060aa715eaa5ca#2d6ef4dfb978c7f570d45eb1d68f7da0 - Cache E middle/1.0#5dcbb93f90976f069861ef2f97dd109c:f497536d3b7e4161abab68fb8f34a7dfdc3839bf - Build E variant/1.0#2f232c35bf0384c0eba21500e518a1fd:f4bec17cf5bb949234cd84c756060aa715eaa5ca#890ac9c266ac61bfbc422247131222b7 - Cache E E ======== Installing packages ======== E expected/1.0: Already installed! (1 of 3) E variant/1.0: Already installed! (2 of 3) E E -------- Installing package middle/1.0 (3 of 3) -------- E middle/1.0: Building from source E middle/1.0: Package middle/1.0:f497536d3b7e4161abab68fb8f34a7dfdc3839bf E middle/1.0: Copying sources to build folder E middle/1.0: Building your package in /tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/b E middle/1.0: Writing generators to /tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/b E middle/1.0: Generator 'CMakeDeps' calling 'generate()' E middle/1.0: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(expected) E find_package(variant) E target_link_libraries(... nonstd::nonstd nonstd::nonstd) E middle/1.0: Generator 'CMakeToolchain' calling 'generate()' E middle/1.0: CMakeToolchain generated: conan_toolchain.cmake E middle/1.0: CMakeToolchain generated: /tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/b/CMakePresets.json E middle/1.0: Generating aggregated env files E middle/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E middle/1.0: Calling build() E middle/1.0: Running CMake.configure() E middle/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/b/src" E -- Using Conan toolchain: /tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Component target declared 'nonstd::expected' E -- Conan: Target declared 'nonstd::nonstd' E -- Conan: Component target declared 'nonstd::variant' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/b E E middle/1.0: Running CMake.build() E middle/1.0: RUN: cmake --build "/tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/b" -- -j4 E Scanning dependencies of target middle E [ 50%] Building CXX object CMakeFiles/middle.dir/middle.cpp.o E /tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/b/src/middle.cpp:9:10: fatal error: expected.h: No such file or directory E 9 | #include "expected.h" E | ^~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/middle.dir/build.make:63: CMakeFiles/middle.dir/middle.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/middle.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E middle/1.0: ERROR: E Package 'f497536d3b7e4161abab68fb8f34a7dfdc3839bf' build failed E middle/1.0: WARN: Build folder /tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/b/middl62bf6029bf539/b E ERROR: middle/1.0: Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp5r94_ne5conans/path with spaces/.conan2/p/middl09dcb63c271ae/e/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: middle/1.0: Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ________________________________ test_autotools ________________________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.skipif(platform.system() not in ["Linux", "Darwin"], reason="Requires Autotools") @pytest.mark.tool("autotools") def test_autotools(): client = TestClient(path_with_spaces=False) client.run("new cmake_lib -d name=hello -d version=0.1") > client.run("create .") conans/test/functional/toolchains/gnu/autotools/test_basic.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create .', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...llo/0.1 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E hello/0.1: Exporting package recipe: /tmp/tmpjbw6u9_iconans/pathwithoutspaces/conanfile.py E hello/0.1: Copied 1 '.py' file: conanfile.py E hello/0.1: Copied 1 '.txt' file: CMakeLists.txt E hello/0.1: Copied 1 '.cpp' file: hello.cpp E hello/0.1: Copied 1 '.h' file: hello.h E hello/0.1: Exported to cache folder: /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/helloa434967fb081b/e E hello/0.1: Exported: hello/0.1#2f6611bc551ce99ad4161398d3822cb0 (2024-04-16 13:17:40 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E hello/0.1#2f6611bc551ce99ad4161398d3822cb0 - Cache E E ======== Computing necessary packages ======== E hello/0.1: Forced build from source E Requirements E hello/0.1#2f6611bc551ce99ad4161398d3822cb0:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Build E E ======== Installing packages ======== E E -------- Installing package hello/0.1 (1 of 1) -------- E hello/0.1: Building from source E hello/0.1: Package hello/0.1:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E hello/0.1: Copying sources to build folder E hello/0.1: Building your package in /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b E hello/0.1: Calling generate() E hello/0.1: Generators folder: /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b/build/Release/generators E hello/0.1: CMakeToolchain generated: conan_toolchain.cmake E hello/0.1: CMakeToolchain generated: /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b/build/Release/generators/CMakePresets.json E hello/0.1: CMakeToolchain generated: /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b/CMakeUserPresets.json E hello/0.1: Generating aggregated env files E hello/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E hello/0.1: Calling build() E hello/0.1: Running CMake.configure() E hello/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b" E -- Using Conan toolchain: /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b/build/Release E E hello/0.1: Running CMake.build() E hello/0.1: RUN: cmake --build "/tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b/build/Release" -- -j4 E Scanning dependencies of target hello E [ 50%] Building CXX object CMakeFiles/hello.dir/src/hello.cpp.o E [100%] Linking CXX static library libhello.a E [100%] Built target hello E E hello/0.1: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' built E hello/0.1: Build folder /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b/build/Release E hello/0.1: Generating the package E hello/0.1: Packaging in folder /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/p E hello/0.1: Calling package() E hello/0.1: Running CMake.install() E hello/0.1: RUN: cmake --install "/tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/b/build/Release" --prefix "/tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/p/lib/libhello.a E -- Installing: /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/p/include/hello.h E E hello/0.1: package(): Packaged 1 '.a' file: libhello.a E hello/0.1: package(): Packaged 1 '.h' file: hello.h E hello/0.1: Created package revision 6c470c15efb574bd6a7e2ce9161c96b0 E hello/0.1: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E hello/0.1: Full package reference: hello/0.1#2f6611bc551ce99ad4161398d3822cb0:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#6c470c15efb574bd6a7e2ce9161c96b0 E hello/0.1: Package folder /tmp/tmp3dh7xiofconans/pathwithoutspaces/.conan2/p/b/hello16e252fd55b53/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E hello/0.1 (test package): /tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/conanfile.py E Requirements E hello/0.1#2f6611bc551ce99ad4161398d3822cb0 - Cache E E ======== Computing necessary packages ======== E Requirements E hello/0.1#2f6611bc551ce99ad4161398d3822cb0:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#6c470c15efb574bd6a7e2ce9161c96b0 - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E hello/0.1 (test package): Test package build: build/gcc-8-x86_64-release E hello/0.1 (test package): Test package build folder: /tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E hello/0.1 (test package): Writing generators to /tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators E hello/0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E hello/0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E hello/0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E hello/0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E hello/0.1 (test package): CMakeToolchain generated: /tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E hello/0.1 (test package): CMakeToolchain generated: /tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/CMakeUserPresets.json E hello/0.1 (test package): Generating aggregated env files E hello/0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E hello/0.1 (test package): Calling build() E hello/0.1 (test package): Running CMake.configure() E hello/0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package" E -- Using Conan toolchain: /tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E E hello/0.1 (test package): Running CMake.build() E hello/0.1 (test package): RUN: cmake --build "/tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/src/example.cpp:1:10: fatal error: hello.h: No such file or directory E 1 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: hello/0.1 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpjbw6u9_iconans/pathwithoutspaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: hello/0.1 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _______________________ test_install_output_directories ________________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.skipif(platform.system() not in ["Linux", "Darwin"], reason="Requires Autotools") @pytest.mark.tool("autotools") def test_install_output_directories(): """ If we change the libdirs of the cpp.package, as we are doing cmake.install, the output directory for the libraries is changed """ client = TurboTestClient(path_with_spaces=False) client.run("new cmake_lib -d name=hello -d version=1.0") > client.run("create .") conans/test/functional/toolchains/gnu/autotools/test_basic.py:186: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create .', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...llo/1.0 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E hello/1.0: Exporting package recipe: /tmp/tmpaa7tolhdconans/pathwithoutspaces/conanfile.py E hello/1.0: Copied 1 '.py' file: conanfile.py E hello/1.0: Copied 1 '.txt' file: CMakeLists.txt E hello/1.0: Copied 1 '.cpp' file: hello.cpp E hello/1.0: Copied 1 '.h' file: hello.h E hello/1.0: Exported to cache folder: /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/hellod8dd8b31eb1a3/e E hello/1.0: Exported: hello/1.0#dcbfe21e5250264b26595d151796be70 (2024-04-16 13:17:43 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E hello/1.0#dcbfe21e5250264b26595d151796be70 - Cache E E ======== Computing necessary packages ======== E hello/1.0: Forced build from source E Requirements E hello/1.0#dcbfe21e5250264b26595d151796be70:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Build E E ======== Installing packages ======== E E -------- Installing package hello/1.0 (1 of 1) -------- E hello/1.0: Building from source E hello/1.0: Package hello/1.0:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E hello/1.0: Copying sources to build folder E hello/1.0: Building your package in /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b E hello/1.0: Calling generate() E hello/1.0: Generators folder: /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b/build/Release/generators E hello/1.0: CMakeToolchain generated: conan_toolchain.cmake E hello/1.0: CMakeToolchain generated: /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b/build/Release/generators/CMakePresets.json E hello/1.0: CMakeToolchain generated: /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b/CMakeUserPresets.json E hello/1.0: Generating aggregated env files E hello/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E hello/1.0: Calling build() E hello/1.0: Running CMake.configure() E hello/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b" E -- Using Conan toolchain: /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b/build/Release E E hello/1.0: Running CMake.build() E hello/1.0: RUN: cmake --build "/tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b/build/Release" -- -j4 E Scanning dependencies of target hello E [ 50%] Building CXX object CMakeFiles/hello.dir/src/hello.cpp.o E [100%] Linking CXX static library libhello.a E [100%] Built target hello E E hello/1.0: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' built E hello/1.0: Build folder /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b/build/Release E hello/1.0: Generating the package E hello/1.0: Packaging in folder /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/p E hello/1.0: Calling package() E hello/1.0: Running CMake.install() E hello/1.0: RUN: cmake --install "/tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/b/build/Release" --prefix "/tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/p/lib/libhello.a E -- Installing: /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/p/include/hello.h E E hello/1.0: package(): Packaged 1 '.a' file: libhello.a E hello/1.0: package(): Packaged 1 '.h' file: hello.h E hello/1.0: Created package revision 6b759cfa68e33601e0cb740540b06ee6 E hello/1.0: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E hello/1.0: Full package reference: hello/1.0#dcbfe21e5250264b26595d151796be70:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#6b759cfa68e33601e0cb740540b06ee6 E hello/1.0: Package folder /tmp/tmpudwwizfvconans/pathwithoutspaces/.conan2/p/b/hello7e980ae9350b6/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E hello/1.0 (test package): /tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/conanfile.py E Requirements E hello/1.0#dcbfe21e5250264b26595d151796be70 - Cache E E ======== Computing necessary packages ======== E Requirements E hello/1.0#dcbfe21e5250264b26595d151796be70:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#6b759cfa68e33601e0cb740540b06ee6 - Cache E E ======== Installing packages ======== E hello/1.0: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E hello/1.0 (test package): Test package build: build/gcc-8-x86_64-release E hello/1.0 (test package): Test package build folder: /tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E hello/1.0 (test package): Writing generators to /tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators E hello/1.0 (test package): Generator 'CMakeDeps' calling 'generate()' E hello/1.0 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E hello/1.0 (test package): Generator 'CMakeToolchain' calling 'generate()' E hello/1.0 (test package): CMakeToolchain generated: conan_toolchain.cmake E hello/1.0 (test package): CMakeToolchain generated: /tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E hello/1.0 (test package): CMakeToolchain generated: /tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/CMakeUserPresets.json E hello/1.0 (test package): Generating aggregated env files E hello/1.0 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E hello/1.0 (test package): Calling build() E hello/1.0 (test package): Running CMake.configure() E hello/1.0 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package" E -- Using Conan toolchain: /tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E E hello/1.0 (test package): Running CMake.build() E hello/1.0 (test package): RUN: cmake --build "/tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/src/example.cpp:1:10: fatal error: hello.h: No such file or directory E 1 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: hello/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpaa7tolhdconans/pathwithoutspaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: hello/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception _________________________ test_conditional_build_type __________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python def test_conditional_build_type(): # https://github.com/conan-io/conan/issues/15851 c = TestClient() # A header-only library can't be used for testing, it doesn't fail c.run("new cmake_lib -d name=pkga -d version=0.1") c.run("create . -s build_type=Debug -tf=") c.save({}, clean_first=True) c.run("new cmake_lib -d name=pkgb -d version=0.1 -d requires=pkga/0.1") conanfile = textwrap.dedent(""" from conan import ConanFile from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps class pkgbRecipe(ConanFile): name = "pkgb" version = "0.1" package_type = "static-library" settings = "os", "compiler", "build_type", "arch" exports_sources = "CMakeLists.txt", "src/*", "include/*" def layout(self): cmake_layout(self) def generate(self): deps = CMakeDeps(self) deps.generate() tc = CMakeToolchain(self) if self.settings.build_type == "Debug": tc.cache_variables["USE_PKGA"] = 1 tc.preprocessor_definitions["USE_PKGA"] = 1 tc.generate() def build(self): cmake = CMake(self) cmake.configure() cmake.build() def package(self): cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = ["pkgb"] def requirements(self): if self.settings.build_type == "Debug": self.requires("pkga/0.1") """) cmake = textwrap.dedent("""\ cmake_minimum_required(VERSION 3.15) project(pkgb CXX) add_library(pkgb src/pkgb.cpp) target_include_directories(pkgb PUBLIC include) if(USE_PKGA) find_package(pkga CONFIG REQUIRED) target_link_libraries(pkgb PRIVATE pkga::pkga) endif() set_target_properties(pkgb PROPERTIES PUBLIC_HEADER "include/pkgb.h") install(TARGETS pkgb) """) pkgb_cpp = textwrap.dedent(r""" #include #include "pkgb.h" #ifdef USE_PKGA #include "pkga.h" #endif void pkgb(){ #ifdef USE_PKGA pkga(); #endif #ifdef NDEBUG std::cout << "pkgb/0.1: Hello World Release!\n"; #else std::cout << "pkgb/0.1: Hello World Debug!\n"; #endif } """) c.save({"conanfile.py": conanfile, "CMakeLists.txt": cmake, "src/pkgb.cpp": pkgb_cpp}) > c.run("create . -s build_type=Debug -tf=") conans/test/functional/toolchains/cmake/cmakedeps/test_conditional_build_type.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -s build_type=Debug -tf=', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nanException: pkgb/0.1: Error in build() method, line 27\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -s build_type=Debug -tf= E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E pkgb/0.1: Exporting package recipe: /tmp/tmpyazt0jgmconans/path with spaces/conanfile.py E pkgb/0.1: Copied 1 '.py' file: conanfile.py E pkgb/0.1: Copied 1 '.txt' file: CMakeLists.txt E pkgb/0.1: Copied 1 '.cpp' file: pkgb.cpp E pkgb/0.1: Copied 1 '.h' file: pkgb.h E pkgb/0.1: Exported to cache folder: /tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/pkgb2fd5c00c264a8/e E pkgb/0.1: Exported: pkgb/0.1#e184a262b52821e01c7ffc6e17f077c5 (2024-04-16 13:17:45 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Debug E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E pkga/0.1#0266ca186c0ec80089d881201cc467f4 - Cache E pkgb/0.1#e184a262b52821e01c7ffc6e17f077c5 - Cache E E ======== Computing necessary packages ======== E pkgb/0.1: Forced build from source E Requirements E pkga/0.1#0266ca186c0ec80089d881201cc467f4:d80401495a08bfcdb905f855e7548a0b2f87cfe5#8ded10b8949282873e6218ac95b6e674 - Cache E pkgb/0.1#e184a262b52821e01c7ffc6e17f077c5:d8fac09f85d55139d077b4cc857e6721fa38aff8 - Build E E ======== Installing packages ======== E pkga/0.1: Already installed! (1 of 2) E E -------- Installing package pkgb/0.1 (2 of 2) -------- E pkgb/0.1: Building from source E pkgb/0.1: Package pkgb/0.1:d8fac09f85d55139d077b4cc857e6721fa38aff8 E pkgb/0.1: Copying sources to build folder E pkgb/0.1: Building your package in /tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b E pkgb/0.1: Calling generate() E pkgb/0.1: Generators folder: /tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b/build/Debug/generators E pkgb/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(pkga) E target_link_libraries(... pkga::pkga) E pkgb/0.1: CMakeToolchain generated: conan_toolchain.cmake E pkgb/0.1: CMakeToolchain generated: /tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b/build/Debug/generators/CMakePresets.json E pkgb/0.1: CMakeToolchain generated: /tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b/CMakeUserPresets.json E pkgb/0.1: Generating aggregated env files E pkgb/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E pkgb/0.1: Calling build() E pkgb/0.1: Running CMake.configure() E pkgb/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/p" -DUSE_PKGA="1" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Debug', 'type': 'STRING'}" "/tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b" E -- Using Conan toolchain: /tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b/build/Debug/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'pkga::pkga' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b/build/Debug E E pkgb/0.1: Running CMake.build() E pkgb/0.1: RUN: cmake --build "/tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b/build/Debug" -- -j4 E Scanning dependencies of target pkgb E [ 50%] Building CXX object CMakeFiles/pkgb.dir/src/pkgb.cpp.o E /tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b/src/pkgb.cpp:5:10: fatal error: pkga.h: No such file or directory E 5 | #include "pkga.h" E | ^~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/pkgb.dir/build.make:63: CMakeFiles/pkgb.dir/src/pkgb.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/pkgb.dir/all] Error 2 E make: *** [Makefile:130: all] Error 2 E E pkgb/0.1: ERROR: E Package 'd8fac09f85d55139d077b4cc857e6721fa38aff8' build failed E pkgb/0.1: WARN: Build folder /tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/b/pkgb7a4813da28d46/b/build/Debug E ERROR: pkgb/0.1: Error in build() method, line 27 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpevz9zdkdconans/path with spaces/.conan2/p/pkgb2fd5c00c264a8/e/conanfile.py", line 27, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: pkgb/0.1: Error in build() method, line 27 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ______________________ test_autotools_with_pkgconfigdeps _______________________ [gw3] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.skipif(platform.system() not in ["Linux", "Darwin"], reason="Requires Autotools") @pytest.mark.tool("autotools") def test_autotools_with_pkgconfigdeps(): client = TestClient(path_with_spaces=False) client.run("new cmake_lib -d name=hello -d version=1.0") > client.run("create .") conans/test/functional/toolchains/gnu/autotools/test_basic.py:230: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create .', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...llo/1.0 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E hello/1.0: Exporting package recipe: /tmp/tmpacpdpznzconans/pathwithoutspaces/conanfile.py E hello/1.0: Copied 1 '.py' file: conanfile.py E hello/1.0: Copied 1 '.txt' file: CMakeLists.txt E hello/1.0: Copied 1 '.cpp' file: hello.cpp E hello/1.0: Copied 1 '.h' file: hello.h E hello/1.0: Exported to cache folder: /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/hellod8dd8b31eb1a3/e E hello/1.0: Exported: hello/1.0#dcbfe21e5250264b26595d151796be70 (2024-04-16 13:17:46 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E hello/1.0#dcbfe21e5250264b26595d151796be70 - Cache E E ======== Computing necessary packages ======== E hello/1.0: Forced build from source E Requirements E hello/1.0#dcbfe21e5250264b26595d151796be70:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Build E E ======== Installing packages ======== E E -------- Installing package hello/1.0 (1 of 1) -------- E hello/1.0: Building from source E hello/1.0: Package hello/1.0:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E hello/1.0: Copying sources to build folder E hello/1.0: Building your package in /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b E hello/1.0: Calling generate() E hello/1.0: Generators folder: /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b/build/Release/generators E hello/1.0: CMakeToolchain generated: conan_toolchain.cmake E hello/1.0: CMakeToolchain generated: /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b/build/Release/generators/CMakePresets.json E hello/1.0: CMakeToolchain generated: /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b/CMakeUserPresets.json E hello/1.0: Generating aggregated env files E hello/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E hello/1.0: Calling build() E hello/1.0: Running CMake.configure() E hello/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b" E -- Using Conan toolchain: /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b/build/Release E E hello/1.0: Running CMake.build() E hello/1.0: RUN: cmake --build "/tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b/build/Release" -- -j4 E Scanning dependencies of target hello E [ 50%] Building CXX object CMakeFiles/hello.dir/src/hello.cpp.o E [100%] Linking CXX static library libhello.a E [100%] Built target hello E E hello/1.0: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' built E hello/1.0: Build folder /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b/build/Release E hello/1.0: Generating the package E hello/1.0: Packaging in folder /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/p E hello/1.0: Calling package() E hello/1.0: Running CMake.install() E hello/1.0: RUN: cmake --install "/tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/b/build/Release" --prefix "/tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/p/lib/libhello.a E -- Installing: /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/p/include/hello.h E E hello/1.0: package(): Packaged 1 '.a' file: libhello.a E hello/1.0: package(): Packaged 1 '.h' file: hello.h E hello/1.0: Created package revision 6b759cfa68e33601e0cb740540b06ee6 E hello/1.0: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E hello/1.0: Full package reference: hello/1.0#dcbfe21e5250264b26595d151796be70:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#6b759cfa68e33601e0cb740540b06ee6 E hello/1.0: Package folder /tmp/tmp_nt11yz1conans/pathwithoutspaces/.conan2/p/b/hello1b154332407ea/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E hello/1.0 (test package): /tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/conanfile.py E Requirements E hello/1.0#dcbfe21e5250264b26595d151796be70 - Cache E E ======== Computing necessary packages ======== E Requirements E hello/1.0#dcbfe21e5250264b26595d151796be70:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#6b759cfa68e33601e0cb740540b06ee6 - Cache E E ======== Installing packages ======== E hello/1.0: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E hello/1.0 (test package): Test package build: build/gcc-8-x86_64-release E hello/1.0 (test package): Test package build folder: /tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E hello/1.0 (test package): Writing generators to /tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators E hello/1.0 (test package): Generator 'CMakeDeps' calling 'generate()' E hello/1.0 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E hello/1.0 (test package): Generator 'CMakeToolchain' calling 'generate()' E hello/1.0 (test package): CMakeToolchain generated: conan_toolchain.cmake E hello/1.0 (test package): CMakeToolchain generated: /tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E hello/1.0 (test package): CMakeToolchain generated: /tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/CMakeUserPresets.json E hello/1.0 (test package): Generating aggregated env files E hello/1.0 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E hello/1.0 (test package): Calling build() E hello/1.0 (test package): Running CMake.configure() E hello/1.0 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpacpdpznzconans/pathwithoutspaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpacpdpznzconans/pathwithoutspaces/test_package" E -- Using Conan toolchain: /tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release E E hello/1.0 (test package): Running CMake.build() E hello/1.0 (test package): RUN: cmake --build "/tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/src/example.cpp:1:10: fatal error: hello.h: No such file or directory E 1 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: hello/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpacpdpznzconans/pathwithoutspaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: hello/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ________________________________ test_cmakedeps ________________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python client_weird_lib_name = @pytest.mark.tool("cmake") def test_cmakedeps(client_weird_lib_name): c = client_weird_lib_name c.save(pkg_cmake("chat", "0.1", requires=["hello/0.1"]), clean_first=True) > c.run("create . --name=chat --version=0.1") conans/test/functional/toolchains/cmake/cmakedeps/test_weird_library_names.py:66: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=chat --version=0.1', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...nanException: chat/0.1: Error in build() method, line 31\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=chat --version=0.1 E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E chat/0.1: Exporting package recipe: /tmp/tmphqjaf8xcconans/path with spaces/conanfile.py E chat/0.1: Copied 1 '.py' file: conanfile.py E chat/0.1: Copied 1 '.txt' file: CMakeLists.txt E chat/0.1: Copied 1 '.cpp' file: chat.cpp E chat/0.1: Copied 1 '.h' file: chat.h E chat/0.1: Exported to cache folder: /tmp/tmpfrt8brztconans/path with spaces/.conan2/p/chatf7005d8881231/e E chat/0.1: Exported: chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 (2024-04-16 13:17:52 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123 - Cache E hello/0.1#36ff0c2c5f8d7254f46df368145967d3 - Cache E E ======== Computing necessary packages ======== E chat/0.1: Forced build from source E Requirements E chat/0.1#5fb41ddcc6cd7381399f488f1dff7123:d0dbc0e74ae78d46a4c9ad19867229e49480069f - Build E hello/0.1#36ff0c2c5f8d7254f46df368145967d3:f4bec17cf5bb949234cd84c756060aa715eaa5ca#f45461c7e4654f0ce0e7ca7bc5ade291 - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 2) E E -------- Installing package chat/0.1 (2 of 2) -------- E chat/0.1: Building from source E chat/0.1: Package chat/0.1:d0dbc0e74ae78d46a4c9ad19867229e49480069f E chat/0.1: Copying sources to build folder E chat/0.1: Building your package in /tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b E chat/0.1: Writing generators to /tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b/build/Release/generators E chat/0.1: Generator 'CMakeToolchain' calling 'generate()' E chat/0.1: CMakeToolchain generated: conan_toolchain.cmake E chat/0.1: CMakeToolchain generated: /tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b/build/Release/generators/CMakePresets.json E chat/0.1: CMakeToolchain generated: /tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b/CMakeUserPresets.json E chat/0.1: Generator 'CMakeDeps' calling 'generate()' E chat/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E chat/0.1: Generating aggregated env files E chat/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E chat/0.1: Calling build() E chat/0.1: Running CMake.configure() E chat/0.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b" E -- Using Conan toolchain: /tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) E -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF E -- The CXX compiler identification is GNU 9.4.0 E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b/build/Release E E chat/0.1: Running CMake.build() E chat/0.1: RUN: cmake --build "/tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b/build/Release" -- -j4 E Scanning dependencies of target chat E [ 50%] Building CXX object CMakeFiles/chat.dir/src/chat.cpp.o E /tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b/src/chat.cpp:8:10: fatal error: hello.h: No such file or directory E 8 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/chat.dir/build.make:63: CMakeFiles/chat.dir/src/chat.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/chat.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E chat/0.1: ERROR: E Package 'd0dbc0e74ae78d46a4c9ad19867229e49480069f' build failed E chat/0.1: WARN: Build folder /tmp/tmpfrt8brztconans/path with spaces/.conan2/p/b/chat78423f77543d2/b/build/Release E ERROR: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmpfrt8brztconans/path with spaces/.conan2/p/chatf7005d8881231/e/conanfile.py", line 31, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: chat/0.1: Error in build() method, line 31 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ____________________________ test_cmake_virtualenv _____________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python matrix_client = @pytest.mark.tool("cmake") def test_cmake_virtualenv(matrix_client): client = matrix_client cmakewrapper = textwrap.dedent(r""" from conan import ConanFile import os from conan.tools.files import save, chdir class Pkg(ConanFile): def package(self): with chdir(self, self.package_folder): save(self, "cmake.bat", "@echo off\necho MYCMAKE WRAPPER!!\ncmake.exe %*") save(self, "cmake.sh", 'echo MYCMAKE WRAPPER!!\ncmake "$@"') os.chmod("cmake.sh", 0o777) def package_info(self): # Custom buildenv not defined by cpp_info self.buildenv_info.prepend_path("PATH", self.package_folder) """) consumer = textwrap.dedent(""" from conan import ConanFile from conan.tools.cmake import CMake class App(ConanFile): settings = "os", "arch", "compiler", "build_type" exports_sources = "CMakeLists.txt", "main.cpp" requires = "matrix/1.0" build_requires = "cmakewrapper/0.1" generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv" def build(self): cmake = CMake(self) if self.settings.os != "Windows": cmake._cmake_program = "cmake.sh" # VERY DIRTY HACK cmake.configure() cmake.build() """) cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) project(MyApp CXX) find_package(matrix) add_executable(app main.cpp) target_link_libraries(app matrix::matrix) """) client.save({"cmakewrapper/conanfile.py": cmakewrapper, "consumer/conanfile.py": consumer, "consumer/main.cpp": gen_function_cpp(name="main", includes=["matrix"], calls=["matrix"]), "consumer/CMakeLists.txt": cmakelists}, clean_first=True) client.run("create cmakewrapper --name=cmakewrapper --version=0.1") > client.run("create consumer --name=consumer --version=0.1") conans/test/functional/toolchains/env/test_complete.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create consumer --name=consumer --version=0.1', assert_error = False error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...xception: consumer/0.1: Error in build() method, line 16\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create consumer --name=consumer --version=0.1 E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E consumer/0.1: Exporting package recipe: /tmp/tmpqmqgp8o7conans/path with spaces/consumer/conanfile.py E consumer/0.1: Copied 1 '.py' file: conanfile.py E consumer/0.1: Copied 1 '.cpp' file: main.cpp E consumer/0.1: Copied 1 '.txt' file: CMakeLists.txt E consumer/0.1: Exported to cache folder: /tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/consuf6f3dc696671d/e E consumer/0.1: Exported: consumer/0.1#0cf50a2efd57e62938fe95b1cf83fd85 (2024-04-16 13:17:54 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E consumer/0.1#0cf50a2efd57e62938fe95b1cf83fd85 - Cache E matrix/1.0#0fd6ccef90970c84ccacf46c59c6cc74 - Cache E Build requirements E cmakewrapper/0.1#ac9da68b578f34ad20e434db97020ce2 - Cache E E ======== Computing necessary packages ======== E consumer/0.1: Forced build from source E Requirements E consumer/0.1#0cf50a2efd57e62938fe95b1cf83fd85:8323cfcb2e2af4a49d49774fe34e47363fa77470 - Build E matrix/1.0#0fd6ccef90970c84ccacf46c59c6cc74:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#cded365c0fba7b5de99c3aedf349bc88 - Cache E Build requirements E cmakewrapper/0.1#ac9da68b578f34ad20e434db97020ce2:da39a3ee5e6b4b0d3255bfef95601890afd80709#6cfb3c7bcf3a015aaf2bcc08146948ba - Cache E E ======== Installing packages ======== E cmakewrapper/0.1: Already installed! (1 of 3) E matrix/1.0: Already installed! (2 of 3) E E -------- Installing package consumer/0.1 (3 of 3) -------- E consumer/0.1: Building from source E consumer/0.1: Package consumer/0.1:8323cfcb2e2af4a49d49774fe34e47363fa77470 E consumer/0.1: Copying sources to build folder E consumer/0.1: Building your package in /tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/b E consumer/0.1: Writing generators to /tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/b E consumer/0.1: Generator 'CMakeDeps' calling 'generate()' E consumer/0.1: CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(matrix) E target_link_libraries(... matrix::matrix) E consumer/0.1: Generator 'CMakeToolchain' calling 'generate()' E consumer/0.1: CMakeToolchain generated: conan_toolchain.cmake E consumer/0.1: CMakeToolchain generated: /tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/b/CMakePresets.json E consumer/0.1: Generator 'VirtualBuildEnv' calling 'generate()' E consumer/0.1: Generating aggregated env files E consumer/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E consumer/0.1: Calling build() E consumer/0.1: Running CMake.configure() E consumer/0.1: RUN: cmake.sh -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/b" E MYCMAKE WRAPPER!! E -- Using Conan toolchain: /tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/b/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'matrix::matrix' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/b E E consumer/0.1: Running CMake.build() E consumer/0.1: RUN: cmake.sh --build "/tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/b" -- -j4 E MYCMAKE WRAPPER!! E Scanning dependencies of target app E [ 50%] Building CXX object CMakeFiles/app.dir/main.cpp.o E /tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/b/main.cpp:6:10: fatal error: matrix.h: No such file or directory E 6 | #include "matrix.h" E | ^~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/app.dir/build.make:63: CMakeFiles/app.dir/main.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/app.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E consumer/0.1: ERROR: E Package '8323cfcb2e2af4a49d49774fe34e47363fa77470' build failed E consumer/0.1: WARN: Build folder /tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/b/consu7a66c9277b484/b E ERROR: consumer/0.1: Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp8ukurk0tconans/path with spaces/.conan2/p/consuf6f3dc696671d/e/conanfile.py", line 16, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 95, in create E conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes) E File "/home/conan/conan/api/subapi/install.py", line 26, in install_binaries E installer.install(deps_graph, remotes, install_order=install_order) E File "/home/conan/conans/client/installer.py", line 259, in install E self._handle_package(package, install_reference, handled_count, package_count) E File "/home/conan/conans/client/installer.py", line 319, in _handle_package E self._handle_node_build(package, package_layout) E File "/home/conan/conans/client/installer.py", line 392, in _handle_node_build E pref = builder.build_package(node, pkg_layout) E File "/home/conan/conans/client/installer.py", line 161, in build_package E raise exc E File "/home/conan/conans/client/installer.py", line 154, in build_package E self._build(conanfile, pref) E File "/home/conan/conans/client/installer.py", line 103, in _build E raise exc E File "/home/conan/conans/client/installer.py", line 96, in _build E run_build_method(conanfile, self._hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: consumer/0.1: Error in build() method, line 16 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ________________________________ test_complete _________________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") def test_complete(): client = TestClient() client.run("new cmake_lib -d name=myopenssl -d version=1.0") > client.run("create . -o myopenssl/*:shared=True") conans/test/functional/toolchains/env/test_complete.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . -o myopenssl/*:shared=True', assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...ssl/1.0 (test package): Error in build() method, line 18\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . -o myopenssl/*:shared=True E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E myopenssl/1.0: Exporting package recipe: /tmp/tmp_8yc7lgzconans/path with spaces/conanfile.py E myopenssl/1.0: Copied 1 '.py' file: conanfile.py E myopenssl/1.0: Copied 1 '.txt' file: CMakeLists.txt E myopenssl/1.0: Copied 1 '.cpp' file: myopenssl.cpp E myopenssl/1.0: Copied 1 '.h' file: myopenssl.h E myopenssl/1.0: Exported to cache folder: /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/myope05e915acf1404/e E myopenssl/1.0: Exported: myopenssl/1.0#73b5a18b8e62a2432c16edb7e0ad0b79 (2024-04-16 13:17:56 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [options] E myopenssl/*:shared=True E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E myopenssl/1.0#73b5a18b8e62a2432c16edb7e0ad0b79 - Cache E E ======== Computing necessary packages ======== E myopenssl/1.0: Forced build from source E Requirements E myopenssl/1.0#73b5a18b8e62a2432c16edb7e0ad0b79:0645178f9911c96e0f11d63b451090c571726042 - Build E E ======== Installing packages ======== E E -------- Installing package myopenssl/1.0 (1 of 1) -------- E myopenssl/1.0: Building from source E myopenssl/1.0: Package myopenssl/1.0:0645178f9911c96e0f11d63b451090c571726042 E myopenssl/1.0: Copying sources to build folder E myopenssl/1.0: Building your package in /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b E myopenssl/1.0: Calling generate() E myopenssl/1.0: Generators folder: /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b/build/Release/generators E myopenssl/1.0: CMakeToolchain generated: conan_toolchain.cmake E myopenssl/1.0: CMakeToolchain generated: /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b/build/Release/generators/CMakePresets.json E myopenssl/1.0: CMakeToolchain generated: /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b/CMakeUserPresets.json E myopenssl/1.0: Generating aggregated env files E myopenssl/1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E myopenssl/1.0: Calling build() E myopenssl/1.0: Running CMake.configure() E myopenssl/1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b" E -- Using Conan toolchain: /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b/build/Release/generators/conan_toolchain.cmake E -- Conan toolchain: Setting BUILD_SHARED_LIBS = ON E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b/build/Release E E myopenssl/1.0: Running CMake.build() E myopenssl/1.0: RUN: cmake --build "/tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b/build/Release" -- -j4 E Scanning dependencies of target myopenssl E [ 50%] Building CXX object CMakeFiles/myopenssl.dir/src/myopenssl.cpp.o E [100%] Linking CXX shared library libmyopenssl.so E [100%] Built target myopenssl E E myopenssl/1.0: Package '0645178f9911c96e0f11d63b451090c571726042' built E myopenssl/1.0: Build folder /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b/build/Release E myopenssl/1.0: Generating the package E myopenssl/1.0: Packaging in folder /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/p E myopenssl/1.0: Calling package() E myopenssl/1.0: Running CMake.install() E myopenssl/1.0: RUN: cmake --install "/tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/b/build/Release" --prefix "/tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/p" E -- Install configuration: "{'value': 'Release', 'type': 'STRING'}" E -- Installing: /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/p/lib/libmyopenssl.so E -- Installing: /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/p/include/myopenssl.h E E myopenssl/1.0: package(): Packaged 1 '.so' file: libmyopenssl.so E myopenssl/1.0: package(): Packaged 1 '.h' file: myopenssl.h E myopenssl/1.0: Created package revision dfd18ac48e8b514e22d7eb50bf328fab E myopenssl/1.0: Package '0645178f9911c96e0f11d63b451090c571726042' created E myopenssl/1.0: Full package reference: myopenssl/1.0#73b5a18b8e62a2432c16edb7e0ad0b79:0645178f9911c96e0f11d63b451090c571726042#dfd18ac48e8b514e22d7eb50bf328fab E myopenssl/1.0: Package folder /tmp/tmpgfyuwp8nconans/path with spaces/.conan2/p/b/myope22535055cea2b/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E myopenssl/1.0 (test package): /tmp/tmp_8yc7lgzconans/path with spaces/test_package/conanfile.py E Requirements E myopenssl/1.0#73b5a18b8e62a2432c16edb7e0ad0b79 - Cache E E ======== Computing necessary packages ======== E Requirements E myopenssl/1.0#73b5a18b8e62a2432c16edb7e0ad0b79:0645178f9911c96e0f11d63b451090c571726042#dfd18ac48e8b514e22d7eb50bf328fab - Cache E E ======== Installing packages ======== E myopenssl/1.0: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmp_8yc7lgzconans/path with spaces/test_package/build/gcc-8-x86_64-release E myopenssl/1.0 (test package): Test package build: build/gcc-8-x86_64-release E myopenssl/1.0 (test package): Test package build folder: /tmp/tmp_8yc7lgzconans/path with spaces/test_package/build/gcc-8-x86_64-release E myopenssl/1.0 (test package): Writing generators to /tmp/tmp_8yc7lgzconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators E myopenssl/1.0 (test package): Generator 'CMakeDeps' calling 'generate()' E myopenssl/1.0 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(myopenssl) E target_link_libraries(... myopenssl::myopenssl) E myopenssl/1.0 (test package): Generator 'CMakeToolchain' calling 'generate()' E myopenssl/1.0 (test package): CMakeToolchain generated: conan_toolchain.cmake E myopenssl/1.0 (test package): CMakeToolchain generated: /tmp/tmp_8yc7lgzconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E myopenssl/1.0 (test package): CMakeToolchain generated: /tmp/tmp_8yc7lgzconans/path with spaces/test_package/CMakeUserPresets.json E myopenssl/1.0 (test package): Generating aggregated env files E myopenssl/1.0 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E myopenssl/1.0 (test package): Calling build() E myopenssl/1.0 (test package): Running CMake.configure() E myopenssl/1.0 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp_8yc7lgzconans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp_8yc7lgzconans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmp_8yc7lgzconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'myopenssl::myopenssl' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp_8yc7lgzconans/path with spaces/test_package/build/gcc-8-x86_64-release E E myopenssl/1.0 (test package): Running CMake.build() E myopenssl/1.0 (test package): RUN: cmake --build "/tmp/tmp_8yc7lgzconans/path with spaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target example E [ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o E /tmp/tmp_8yc7lgzconans/path with spaces/test_package/src/example.cpp:1:10: fatal error: myopenssl.h: No such file or directory E 1 | #include "myopenssl.h" E | ^~~~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/example.dir/build.make:63: CMakeFiles/example.dir/src/example.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/example.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: myopenssl/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp_8yc7lgzconans/path with spaces/test_package/conanfile.py", line 18, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: myopenssl/1.0 (test package): Error in build() method, line 18 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception __________________________ MesonInstall.test_install ___________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python self = @pytest.mark.tool("meson") def test_install(self): hello_cpp = gen_function_cpp(name="hello") hello_h = gen_function_h(name="hello") test_package_cpp = gen_function_cpp(name="main", includes=["hello"], calls=["hello"]) self.t.save({"conanfile.py": self._conanfile_py, "meson.build": self._meson_build, "hello.cpp": hello_cpp, "hello.h": hello_h, os.path.join("test_package", "conanfile.py"): self._test_package_conanfile_py, os.path.join("test_package", "CMakeLists.txt"): self._test_package_cmake_lists, os.path.join("test_package", "src", "test_package.cpp"): test_package_cpp}) > self.t.run("create . --name=hello --version=0.1 -c tools.compilation:verbosity=verbose") conans/test/functional/toolchains/meson/test_install.py:113: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=hello --version=0.1 -c tools.compilation:verbosity=verbose' assert_error = False, error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...llo/0.1 (test package): Error in build() method, line 20\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=hello --version=0.1 -c tools.compilation:verbosity=verbose E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E hello/0.1: Exporting package recipe: /tmp/tmppdt0rltrconans/path with spaces/conanfile.py E hello/0.1: Copied 1 '.py' file: conanfile.py E hello/0.1: Copied 1 '.cpp' file: hello.cpp E hello/0.1: Copied 1 '.build' file: meson.build E hello/0.1: Copied 1 '.h' file: hello.h E hello/0.1: Exported to cache folder: /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/hello80e657d503adf/e E hello/0.1: Exported: hello/0.1#01b5826ce4646beeedbf71a15eb051bb (2024-04-16 13:17:59 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E [conf] E tools.compilation:verbosity=verbose E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E hello/0.1#01b5826ce4646beeedbf71a15eb051bb - Cache E E ======== Computing necessary packages ======== E hello/0.1: Forced build from source E Requirements E hello/0.1#01b5826ce4646beeedbf71a15eb051bb:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 - Build E E ======== Installing packages ======== E E -------- Installing package hello/0.1 (1 of 1) -------- E hello/0.1: Building from source E hello/0.1: Package hello/0.1:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3 E hello/0.1: Copying sources to build folder E hello/0.1: Building your package in /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b E hello/0.1: Calling generate() E hello/0.1: Generators folder: /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b E hello/0.1: Generating aggregated env files E hello/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E hello/0.1: Calling build() E hello/0.1: Meson configure cmd: meson setup --native-file "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/conan_meson_native.ini" "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/build" "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b" --prefix=/ E hello/0.1: RUN: meson setup --native-file "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/conan_meson_native.ini" "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/build" "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b" --prefix=/ E The Meson build system E Version: 0.61.5 E Source dir: /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b E Build dir: /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/build E Build type: native build E Project name: tutorial E Project version: undefined E C++ compiler for the host machine: g++ (gcc 9.4.0 "g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0") E C++ linker for the host machine: g++ ld.bfd 2.34 E Host machine cpu family: x86_64 E Host machine cpu: x86_64 E Build targets in project: 1 E E tutorial undefined E E User defined options E Native files: /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/conan_meson_native.ini E prefix : / E E Found ninja-1.10.0 at /usr/bin/ninja E NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer E E hello/0.1: Meson build cmd: meson compile -C "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/build" -j4 --verbose E hello/0.1: RUN: meson compile -C "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/build" -j4 --verbose E [1/2] g++ -Ilibhello.a.p -I. -I.. -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -O3 -fPIC -MD -MQ libhello.a.p/hello.cpp.o -MF libhello.a.p/hello.cpp.o.d -o libhello.a.p/hello.cpp.o -c ../hello.cpp E [2/2] rm -f libhello.a && gcc-ar csrD libhello.a libhello.a.p/hello.cpp.o E NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer E E hello/0.1: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' built E hello/0.1: Build folder /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/build E hello/0.1: Generating the package E hello/0.1: Packaging in folder /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/p E hello/0.1: Calling package() E hello/0.1: RUN: meson install -C "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/build" --destdir "/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/p" E ninja: Entering directory `/tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/build' E ninja: no work to do. E Installing libhello.a to /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/p/lib E Installing /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/b/hello.h to /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/p/include E NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer E E hello/0.1: package(): Packaged 1 '.a' file: libhello.a E hello/0.1: package(): Packaged 1 '.h' file: hello.h E hello/0.1: Created package revision cb1a7416dbf005680a3f34ce8afefa09 E hello/0.1: Package 'ea32a68c86212b11bf50a900d3e0fb4211c8dbe3' created E hello/0.1: Full package reference: hello/0.1#01b5826ce4646beeedbf71a15eb051bb:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#cb1a7416dbf005680a3f34ce8afefa09 E hello/0.1: Package folder /tmp/tmp71t6_t36conans/path with spaces/.conan2/p/b/hello253dfe0f09d44/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E hello/0.1 (test package): /tmp/tmppdt0rltrconans/path with spaces/test_package/conanfile.py E Requirements E hello/0.1#01b5826ce4646beeedbf71a15eb051bb - Cache E E ======== Computing necessary packages ======== E Requirements E hello/0.1#01b5826ce4646beeedbf71a15eb051bb:ea32a68c86212b11bf50a900d3e0fb4211c8dbe3#cb1a7416dbf005680a3f34ce8afefa09 - Cache E E ======== Installing packages ======== E hello/0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release E hello/0.1 (test package): Test package build: build/gcc-8-x86_64-release E hello/0.1 (test package): Test package build folder: /tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release E hello/0.1 (test package): Writing generators to /tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators E hello/0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E hello/0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E hello/0.1 (test package): CMakeToolchain generated: /tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E hello/0.1 (test package): CMakeToolchain generated: /tmp/tmppdt0rltrconans/path with spaces/test_package/CMakeUserPresets.json E hello/0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E hello/0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(hello) E target_link_libraries(... hello::hello) E hello/0.1 (test package): Generating aggregated env files E hello/0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E hello/0.1 (test package): Calling build() E hello/0.1 (test package): Running CMake.configure() E hello/0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmppdt0rltrconans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmppdt0rltrconans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The CXX compiler identification is GNU 9.4.0 E -- Check for working CXX compiler: /usr/bin/c++ E -- Check for working CXX compiler: /usr/bin/c++ -- works E -- Detecting CXX compiler ABI info E -- Detecting CXX compiler ABI info - done E -- Detecting CXX compile features E -- Detecting CXX compile features - done E -- Conan: Target declared 'hello::hello' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release E E hello/0.1 (test package): Running CMake.build() E hello/0.1 (test package): RUN: cmake --build "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release" --verbose -- -j4 E /usr/share/cmake-3.15.7/bin/cmake -S"/tmp/tmppdt0rltrconans/path with spaces/test_package" -B"/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release" --check-build-system CMakeFiles/Makefile.cmake 0 E /usr/share/cmake-3.15.7/bin/cmake -E cmake_progress_start "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/CMakeFiles" "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/CMakeFiles/progress.marks" E /usr/bin/make -f CMakeFiles/Makefile2 all E make[1]: Entering directory '/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release' E /usr/bin/make -f CMakeFiles/test_package.dir/build.make CMakeFiles/test_package.dir/depend E make[2]: Entering directory '/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release' E cd "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release" && /usr/share/cmake-3.15.7/bin/cmake -E cmake_depends "Unix Makefiles" "/tmp/tmppdt0rltrconans/path with spaces/test_package" "/tmp/tmppdt0rltrconans/path with spaces/test_package" "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release" "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release" "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/CMakeFiles/test_package.dir/DependInfo.cmake" --color= E Dependee "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/CMakeFiles/test_package.dir/DependInfo.cmake" is newer than depender "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/CMakeFiles/test_package.dir/depend.internal". E Dependee "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release/CMakeFiles/test_package.dir/depend.internal". E Scanning dependencies of target test_package E make[2]: Leaving directory '/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release' E /usr/bin/make -f CMakeFiles/test_package.dir/build.make CMakeFiles/test_package.dir/build E make[2]: Entering directory '/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release' E [ 50%] Building CXX object CMakeFiles/test_package.dir/src/test_package.cpp.o E /usr/bin/c++ -m64 -o CMakeFiles/test_package.dir/src/test_package.cpp.o -c "/tmp/tmppdt0rltrconans/path with spaces/test_package/src/test_package.cpp" E make[2]: Leaving directory '/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release' E make[1]: Leaving directory '/tmp/tmppdt0rltrconans/path with spaces/test_package/build/gcc-8-x86_64-release' E /tmp/tmppdt0rltrconans/path with spaces/test_package/src/test_package.cpp:6:10: fatal error: hello.h: No such file or directory E 6 | #include "hello.h" E | ^~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/test_package.dir/build.make:63: CMakeFiles/test_package.dir/src/test_package.cpp.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/test_package.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: hello/0.1 (test package): Error in build() method, line 20 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmppdt0rltrconans/path with spaces/test_package/conanfile.py", line 20, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: hello/0.1 (test package): Error in build() method, line 20 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ________________________ MesonPkgConfigTest.test_reuse _________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python self = def test_reuse(self): self.t.run("new cmake_lib -d name=hello -d version=0.1") self.t.run("create . -tf=\"\"") app = gen_function_cpp(name="main", includes=["hello"], calls=["hello"]) # Prepare the actual consumer package self.t.save({"conanfile.py": self._conanfile_py, "meson.build": self._meson_build, "main.cpp": app}, clean_first=True) # Build in the cache self.t.run("build .") self.t.run_command(os.path.join("build", "demo")) > self.assertIn("Hello World Release!", self.t.out) E AssertionError: 'Hello World Release!' not found in 'main: Release!\n main __x86_64__ defined\n main _GLIBCXX_USE_CXX11_ABI 1\n main __cplusplus201402\n main __GNUC__9\n main __GNUC_MINOR__4\nhello/0.1: Hello World Debug!\n hello/0.1: __x86_64__ defined\n hello/0.1: _GLIBCXX_USE_CXX11_ABI 1\n hello/0.1: __cplusplus201402\n hello/0.1: __GNUC__9\n hello/0.1: __GNUC_MINOR__4\n' conans/test/functional/toolchains/meson/test_pkg_config_reuse.py:56: AssertionError _______________________________ test_subproject ________________________________ [gw0] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python @pytest.mark.tool("cmake") @pytest.mark.tool("meson") def test_subproject(): client = TestClient() test_package_c = gen_function_c(name="main", includes=["greeter"], calls=["greeter"]) client.save({"conanfile.py": _conanfile_py, "meson.build": _meson_build, "greeter.c": _greeter_c, "greeter.h": _greeter_h, os.path.join("include", "greeter.h"): _greeter_h, os.path.join("subprojects", "hello", "include", "hello.h"): _hello_h, os.path.join("subprojects", "hello", "hello.c"): _hello_c, os.path.join("subprojects", "hello", "meson.build"): _meson_subproject_build, os.path.join("subprojects", "hello", "meson_options.txt"): _meson_subproject_options, os.path.join("test_package", "conanfile.py"): _test_package_conanfile_py, os.path.join("test_package", "CMakeLists.txt"): _test_package_cmake_lists, os.path.join("test_package", "src", "test_package.c"): test_package_c}) > client.run("create . --name=greeter --version=0.1") conans/test/functional/toolchains/meson/test_subproject.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ conans/test/utils/tools.py:568: in run return self._run_cli(command_line, assert_error=assert_error) conans/test/utils/tools.py:542: in _run_cli self._handle_cli_result(command_line, assert_error=assert_error, error=error, trace=trace) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = command = 'create . --name=greeter --version=0.1', assert_error = False error = 1 trace = 'Traceback (most recent call last):\n File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter\...ter/0.1 (test package): Error in build() method, line 20\n\tcmake.build()\n\tConanException: Error 2 while executing\n' def _handle_cli_result(self, command, assert_error, error, trace=None): if (assert_error and not error) or (not assert_error and error): if assert_error: msg = " Command succeeded (failure expected): " else: msg = " Command failed (unexpectedly): " exc_message = "\n{header}\n{cmd}\n{output_header}\n{output}\n".format( header='{:=^80}'.format(msg), output_header='{:=^80}'.format(" Output: "), cmd=command, output=str(self.stderr) + str(self.stdout) + "\n" + str(self.out) ) if trace: exc_message += '{:=^80}'.format(" Traceback: ") + f"\n{trace}" > raise Exception(exc_message) E Exception: E ======================== Command failed (unexpectedly): ======================== E create . --name=greeter --version=0.1 E =================================== Output: ==================================== E E ======== Exporting recipe to the cache ======== E greeter/0.1: Exporting package recipe: /tmp/tmp399pyr_fconans/path with spaces/conanfile.py E greeter/0.1: Copied 3 '.py' files: conanfile.py, conanfile.py, conanfile.py E greeter/0.1: Copied 2 '.build' files: meson.build, meson.build E greeter/0.1: Copied 3 '.c' files: greeter.c, test_package.c, hello.c E greeter/0.1: Copied 3 '.h' files: greeter.h, hello.h, greeter.h E greeter/0.1: Copied 2 '.txt' files: CMakeLists.txt, meson_options.txt E greeter/0.1: Exported to cache folder: /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/greet1928edf8828ca/e E greeter/0.1: Exported: greeter/0.1#33eae58bba8fd27567606179da622a7d (2024-04-16 13:18:34 UTC) E E ======== Input profiles ======== E Profile host: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E Profile build: E [settings] E arch=x86_64 E build_type=Release E compiler=gcc E compiler.libcxx=libstdc++11 E compiler.version=8 E os=Linux E E E ======== Computing dependency graph ======== E Graph root E cli E Requirements E greeter/0.1#33eae58bba8fd27567606179da622a7d - Cache E E ======== Computing necessary packages ======== E greeter/0.1: Forced build from source E Requirements E greeter/0.1#33eae58bba8fd27567606179da622a7d:d5bc620d4093770ee55dafbb03a50c7c62c66707 - Build E E ======== Installing packages ======== E E -------- Installing package greeter/0.1 (1 of 1) -------- E greeter/0.1: Building from source E greeter/0.1: Package greeter/0.1:d5bc620d4093770ee55dafbb03a50c7c62c66707 E greeter/0.1: Copying sources to build folder E greeter/0.1: Building your package in /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b E greeter/0.1: Calling generate() E greeter/0.1: Generators folder: /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b E greeter/0.1: Generating aggregated env files E greeter/0.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E greeter/0.1: Calling build() E greeter/0.1: Meson configure cmd: meson setup --native-file "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/conan_meson_native.ini" "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/build" "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b" --prefix=/ E greeter/0.1: RUN: meson setup --native-file "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/conan_meson_native.ini" "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/build" "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b" --prefix=/ E The Meson build system E Version: 0.61.5 E Source dir: /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b E Build dir: /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/build E Build type: native build E Project name: greeter E Project version: undefined E C compiler for the host machine: gcc (gcc 9.4.0 "gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0") E C linker for the host machine: gcc ld.bfd 2.34 E Host machine cpu family: x86_64 E Host machine cpu: x86_64 E E Executing subproject hello E E hello| Project name: hello E hello| Project version: undefined E hello| C compiler for the host machine: gcc (gcc 9.4.0 "gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0") E hello| C linker for the host machine: gcc ld.bfd 2.34 E hello| Build targets in project: 1 E hello| Subproject hello finished. E E Build targets in project: 2 E E greeter undefined E E Subprojects E hello : YES E E User defined options E Native files: /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/conan_meson_native.ini E prefix : / E E Found ninja-1.10.0 at /usr/bin/ninja E NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer E E greeter/0.1: Meson build cmd: meson compile -C "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/build" -j4 E greeter/0.1: RUN: meson compile -C "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/build" -j4 E [1/4] Compiling C object libgreeter.a.p/greeter.c.o E [2/4] Linking static target libgreeter.a E [3/4] Compiling C object subprojects/hello/libhello.a.p/hello.c.o E [4/4] Linking static target subprojects/hello/libhello.a E NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer E E greeter/0.1: Package 'd5bc620d4093770ee55dafbb03a50c7c62c66707' built E greeter/0.1: Build folder /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/build E greeter/0.1: Generating the package E greeter/0.1: Packaging in folder /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/p E greeter/0.1: Calling package() E greeter/0.1: RUN: meson install -C "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/build" --destdir "/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/p" E ninja: Entering directory `/tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/build' E ninja: no work to do. E Installing subprojects/hello/libhello.a to /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/p/lib E Installing libgreeter.a to /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/p/lib E Installing /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/b/greeter.h to /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/p/include E NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer E E greeter/0.1: package(): Packaged 2 '.a' files: libgreeter.a, libhello.a E greeter/0.1: package(): Packaged 1 '.h' file: greeter.h E greeter/0.1: Created package revision 7e920dce9ab2ac0bb89773203baee53a E greeter/0.1: Package 'd5bc620d4093770ee55dafbb03a50c7c62c66707' created E greeter/0.1: Full package reference: greeter/0.1#33eae58bba8fd27567606179da622a7d:d5bc620d4093770ee55dafbb03a50c7c62c66707#7e920dce9ab2ac0bb89773203baee53a E greeter/0.1: Package folder /tmp/tmpmn20i8swconans/path with spaces/.conan2/p/b/greetdb9fe58d99565/p E E ======== Launching test_package ======== E E ======== Computing dependency graph ======== E Graph root E greeter/0.1 (test package): /tmp/tmp399pyr_fconans/path with spaces/test_package/conanfile.py E Requirements E greeter/0.1#33eae58bba8fd27567606179da622a7d - Cache E E ======== Computing necessary packages ======== E Requirements E greeter/0.1#33eae58bba8fd27567606179da622a7d:d5bc620d4093770ee55dafbb03a50c7c62c66707#7e920dce9ab2ac0bb89773203baee53a - Cache E E ======== Installing packages ======== E greeter/0.1: Already installed! (1 of 1) E E ======== Testing the package ======== E Removing previously existing 'test_package' build folder: /tmp/tmp399pyr_fconans/path with spaces/test_package/build/gcc-8-x86_64-release E greeter/0.1 (test package): Test package build: build/gcc-8-x86_64-release E greeter/0.1 (test package): Test package build folder: /tmp/tmp399pyr_fconans/path with spaces/test_package/build/gcc-8-x86_64-release E greeter/0.1 (test package): Writing generators to /tmp/tmp399pyr_fconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators E greeter/0.1 (test package): Generator 'CMakeToolchain' calling 'generate()' E greeter/0.1 (test package): CMakeToolchain generated: conan_toolchain.cmake E greeter/0.1 (test package): CMakeToolchain generated: /tmp/tmp399pyr_fconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/CMakePresets.json E greeter/0.1 (test package): CMakeToolchain generated: /tmp/tmp399pyr_fconans/path with spaces/test_package/CMakeUserPresets.json E greeter/0.1 (test package): Generator 'CMakeDeps' calling 'generate()' E greeter/0.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt E find_package(greeter) E target_link_libraries(... greeter::greeter) E greeter/0.1 (test package): Generating aggregated env files E greeter/0.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] E E ======== Testing the package: Building ======== E greeter/0.1 (test package): Calling build() E greeter/0.1 (test package): Running CMake.configure() E greeter/0.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/tmp/tmp399pyr_fconans/path with spaces/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="{'value': 'Release', 'type': 'STRING'}" "/tmp/tmp399pyr_fconans/path with spaces/test_package" E -- Using Conan toolchain: /tmp/tmp399pyr_fconans/path with spaces/test_package/build/gcc-8-x86_64-release/generators/conan_toolchain.cmake E -- The C compiler identification is GNU 9.4.0 E -- Check for working C compiler: /usr/bin/cc E -- Check for working C compiler: /usr/bin/cc -- works E -- Detecting C compiler ABI info E -- Detecting C compiler ABI info - done E -- Detecting C compile features E -- Detecting C compile features - done E -- Conan: Component target declared 'greeter::hello' E -- Conan: Component target declared 'greeter::greeter' E -- Configuring done E -- Generating done E -- Build files have been written to: /tmp/tmp399pyr_fconans/path with spaces/test_package/build/gcc-8-x86_64-release E E greeter/0.1 (test package): Running CMake.build() E greeter/0.1 (test package): RUN: cmake --build "/tmp/tmp399pyr_fconans/path with spaces/test_package/build/gcc-8-x86_64-release" -- -j4 E Scanning dependencies of target test_package E [ 50%] Building C object CMakeFiles/test_package.dir/src/test_package.c.o E /tmp/tmp399pyr_fconans/path with spaces/test_package/src/test_package.c:10:10: fatal error: greeter.h: No such file or directory E 10 | #include "greeter.h" E | ^~~~~~~~~~~ E compilation terminated. E make[2]: *** [CMakeFiles/test_package.dir/build.make:63: CMakeFiles/test_package.dir/src/test_package.c.o] Error 1 E make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/test_package.dir/all] Error 2 E make: *** [Makefile:84: all] Error 2 E E ERROR: greeter/0.1 (test package): Error in build() method, line 20 E cmake.build() E ConanException: Error 2 while executing E E E ================================== Traceback: ================================== E Traceback (most recent call last): E File "/home/conan/conans/errors.py", line 52, in conanfile_exception_formatter E yield E File "/home/conan/conans/client/conanfile/build.py", line 14, in run_build_method E conanfile.build() E File "/tmp/tmp399pyr_fconans/path with spaces/test_package/conanfile.py", line 20, in build E cmake.build() E File "/home/conan/conan/tools/cmake/cmake.py", line 185, in build E self._build(build_type, target, cli_args, build_tool_args, stdout=stdout, stderr=stderr) E File "/home/conan/conan/tools/cmake/cmake.py", line 164, in _build E self._conanfile.run(command, env=env, stdout=stdout, stderr=stderr) E File "/home/conan/conans/model/conan_file.py", line 342, in run E raise ConanException("Error %d while executing" % retcode) E conans.errors.ConanException: Error 2 while executing E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/home/conan/conans/test/utils/tools.py", line 531, in _run_cli E command.run(args) E File "/home/conan/conan/cli/cli.py", line 193, in run E command.run(self._conan_api, args[0][1:]) E File "/home/conan/conan/cli/command.py", line 164, in run E info = self._method(conan_api, parser, *args) E File "/home/conan/conan/cli/commands/create.py", line 119, in create E tested_python_requires=tested_python_requires, tested_graph=deps_graph) E File "/home/conan/conan/cli/commands/test.py", line 82, in run_test E test_package(conan_api, deps_graph, path) E File "/home/conan/conan/cli/commands/create.py", line 163, in test_package E conan_api.local.build(conanfile) E File "/home/conan/conan/api/subapi/local.py", line 102, in build E run_build_method(conanfile, app.hook_manager) E File "/home/conan/conans/client/conanfile/build.py", line 17, in run_build_method E raise E File "/home/conan/.pyenv/versions/3.6.15/lib/python3.6/contextlib.py", line 99, in __exit__ E self.gen.throw(type, value, traceback) E File "/home/conan/conans/errors.py", line 67, in conanfile_exception_formatter E _raise_conanfile_exc(exc) E File "/home/conan/conans/errors.py", line 49, in _raise_conanfile_exc E raise ConanException(m) E conans.errors.ConanException: greeter/0.1 (test package): Error in build() method, line 20 E cmake.build() E ConanException: Error 2 while executing conans/test/utils/tools.py:609: Exception ________ TestGitMonorepoSCMFlow.test_exports_sources_common_code_layout ________ [gw2] linux -- Python 3.6.15 /home/conan/.pyenv/versions/3.6.15/bin/python self = @pytest.mark.tool("cmake") def test_exports_sources_common_code_layout(self): """ This is a copy of test_exports_sources_common_code_layout in test_in_subfolder.py but instead of using "exports", trying to implement it with Git features """ c = TestClient() conanfile = textwrap.dedent(""" import os from conan import ConanFile from conan.tools.cmake import cmake_layout, CMake from conan.tools.files import load, copy, save, update_conandata, move_folder_contents from conan.tools.scm import Git class Pkg(ConanFile): name = "pkg" version = "0.1" settings = "os", "compiler", "build_type", "arch" generators = "CMakeToolchain" def export(self): git = Git(self) scm_url, scm_commit = git.get_url_and_commit() update_conandata(self, {"sources": {"commit": scm_commit, "url": scm_url}}) def layout(self): self.folders.root = ".." self.folders.subproject = "pkg" cmake_layout(self) def source(self): git = Git(self) sources = self.conan_data["sources"] git.clone(url=sources["url"], target=".") git.checkout(commit=sources["commit"]) # Layout is pkg/pkg/ and pkg/common/ # Final we want is pkg/ and common/ # NOTE: This abs_path is IMPORTANT to avoid the trailing "." src_folder = os.path.abspath(self.source_folder) move_folder_contents(self, src_folder, os.path.dirname(src_folder)) def build(self): cmake = CMake(self) cmake.configure() cmake.build() self.run(os.path.join(self.cpp.build.bindirs[0], "myapp")) """) cmake_include = "include(${CMAKE_CURRENT_LIST_DIR}/../common/myutils.cmake)" c.save({"pkg/conanfile.py": conanfile, "pkg/app.cpp": gen_function_cpp(name="main", includes=["../common/myheader"], preprocessor=["MYDEFINE"]), "pkg/CMakeLists.txt": gen_cmakelists(appsources=["app.cpp"], custom_content=cmake_include), "common/myutils.cmake": 'message(STATUS "MYUTILS.CMAKE!")', "common/myheader.h": '#define MYDEFINE "MYDEFINEVALUE"'}) c.init_git_repo() c.run("create pkg") assert "MYUTILS.CMAKE!" in c.out > assert "main: Release!" in c.out E AssertionError: assert 'main: Release!' in '\n======== Exporting recipe to the cache ========\npkg/0.1: Exporting package recipe: /tmp/tmpjvnp50g3conans/path wit...6d584a04cc60dd65767b\npkg/0.1: Package folder /tmp/tmpr0dc3ifbconans/path with spaces/.conan2/p/b/pkg9b2a37934c2f9/p\n' E + where '\n======== Exporting recipe to the cache ========\npkg/0.1: Exporting package recipe: /tmp/tmpjvnp50g3conans/path wit...6d584a04cc60dd65767b\npkg/0.1: Package folder /tmp/tmpr0dc3ifbconans/path with spaces/.conan2/p/b/pkg9b2a37934c2f9/p\n' = .out conans/test/functional/tools/scm/test_git.py:881: AssertionError ============================= slowest 20 durations ============================= 127.12s call conans/test/functional/toolchains/gnu/test_v2_autotools_template.py::test_autotools_lib_template 38.00s call conans/test/functional/toolchains/meson/test_v2_meson_template.py::test_meson_lib_template 34.63s call conans/test/functional/toolchains/gnu/autotools/test_basic.py::test_autotools_option_checking 33.93s call conans/test/functional/toolchains/gnu/autotools/test_basic.py::test_autotools_arguments_override 33.36s call conans/test/functional/toolchains/gnu/test_pkgconfigdeps_autotools.py::test_pkgconfigdeps_and_autotools 33.04s call conans/test/functional/toolchains/google/test_bazel.py::test_transitive_libs_consuming[True] 32.76s call conans/test/functional/toolchains/google/test_bazel.py::test_transitive_libs_consuming[False] 29.24s call conans/test/functional/toolchains/gnu/test_v2_autotools_template.py::test_autotools_exe_template 22.20s call conans/test/functional/tools/system/package_manager_test.py::test_apt_install_substitutes 19.87s call conans/test/functional/toolchains/gnu/autotools/test_crossbuild_triplet.py::test_crossbuild_triplet_from_conf 16.63s call conans/test/functional/toolchains/google/test_bazel.py::test_basic_exe[RelWithDebInfo] 15.55s call conans/test/functional/toolchains/meson/test_v2_meson_template.py::test_meson_exe_template 13.37s call conans/test/functional/layout/test_editable_cmake.py::test_editable_cmake_linux[Ninja Multi-Config] 11.92s call conans/test/functional/toolchains/google/test_bazel.py::test_basic_exe[Release] 11.47s call conans/test/functional/toolchains/google/test_bazel.py::test_basic_exe[Debug] 10.85s call conans/test/functional/toolchains/google/test_bazel.py::test_basic_exe[MinSizeRel] 8.22s call conans/test/functional/toolchains/meson/test_test.py::MesonTest::test_reuse 7.11s call conans/test/functional/toolchains/meson/test_meson.py::MesonToolchainTest::test_meson_default_dirs 6.97s call conans/test/functional/toolchains/meson/test_meson.py::MesonToolchainTest::test_definition_of_global_options 6.41s call conans/test/functional/toolchains/meson/test_pkg_config_reuse.py::MesonPkgConfigTest::test_reuse =========================== short test summary info ============================ FAILED conans/test/functional/test_local_recipes_index.py::TestLocalRecipeIndexNew::test_conan_new_local_recipes_index FAILED conans/test/functional/test_local_recipes_index.py::TestInRepo::test_in_repo FAILED conans/test/functional/command/new_test.py::test_diamonds_cmake_with_new FAILED conans/test/functional/layout/test_in_subfolder.py::test_exports_sources_common_code_layout FAILED conans/test/functional/layout/test_editable_cmake.py::test_editable_cmake_windows_folders FAILED conans/test/functional/toolchains/cmake/test_cmake.py::LinuxTest::test_toolchain_linux_0_Debug FAILED conans/test/functional/toolchains/cmake/test_cmake.py::LinuxTest::test_toolchain_linux_1_Release FAILED conans/test/functional/layout/test_editable_cmake.py::test_editable_cmake_linux[None] FAILED conans/test/functional/layout/test_editable_cmake.py::test_editable_cmake_linux[Ninja] FAILED conans/test/functional/toolchains/cmake/test_cmake.py::TestCmakeTestMethod::test_test FAILED conans/test/functional/toolchains/cmake/test_cmake_and_no_soname_flag.py::test_no_soname_flag[True] FAILED conans/test/functional/toolchains/cmake/test_cmake_and_no_soname_flag.py::test_no_soname_flag[False] FAILED conans/test/functional/toolchains/cmake/test_cmake_toolchain.py::test_install_output_directories FAILED conans/test/functional/layout/test_editable_cmake.py::test_editable_cmake_linux_exe[None] FAILED conans/test/functional/toolchains/cmake/test_cmake_toolchain.py::test_cmake_toolchain_definitions_complex_strings FAILED conans/test/functional/layout/test_editable_cmake.py::test_editable_cmake_linux_exe[Ninja] FAILED conans/test/functional/layout/test_editable_cmake_components.py::test_editable_cmake_components FAILED conans/test/functional/toolchains/cmake/test_ninja.py::test_locally_build_linux[Release-False] FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_transitive_build.py::test_error_cmakedeps_transitive_build_requires FAILED conans/test/functional/toolchains/cmake/test_v2_cmake_template.py::test_cmake_lib_template FAILED conans/test/functional/toolchains/cmake/test_v2_cmake_template.py::test_cmake_exe_template FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py::test_build_modules_from_build_context FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py::test_build_modules_and_target_from_build_context FAILED conans/test/functional/toolchains/cmake/test_shared_cmake.py::test_shared_cmake_toolchain_components FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py::test_build_modules_from_host_and_target_from_build_context FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_and_linker_flags.py::test_shared_link_flags FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py::test_build_modules_and_target_from_host_context FAILED conans/test/functional/toolchains/cmake/test_shared_cmake.py::test_shared_cmake_toolchain_test_package FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_cpp_info_link_objects FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_and_linker_flags.py::test_not_mixed_configurations FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_build_context_protobuf.py::test_not_activated_not_fail FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_system_dep FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_error_missing_build_type FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_map_imported_config FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py::test_same_names FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py::TestComponentsCMakeGenerators::test_same_name_global_target_collision FAILED conans/test/functional/toolchains/gnu/autotools/test_basic.py::test_autotools FAILED conans/test/functional/toolchains/gnu/autotools/test_basic.py::test_install_output_directories FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_conditional_build_type.py::test_conditional_build_type FAILED conans/test/functional/toolchains/gnu/autotools/test_basic.py::test_autotools_with_pkgconfigdeps FAILED conans/test/functional/toolchains/cmake/cmakedeps/test_weird_library_names.py::test_cmakedeps FAILED conans/test/functional/toolchains/env/test_complete.py::test_cmake_virtualenv FAILED conans/test/functional/toolchains/env/test_complete.py::test_complete FAILED conans/test/functional/toolchains/meson/test_install.py::MesonInstall::test_install FAILED conans/test/functional/toolchains/meson/test_pkg_config_reuse.py::MesonPkgConfigTest::test_reuse FAILED conans/test/functional/toolchains/meson/test_subproject.py::test_subproject FAILED conans/test/functional/tools/scm/test_git.py::TestGitMonorepoSCMFlow::test_exports_sources_common_code_layout ERROR conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_aggregator.py::test_aggregator ERROR conans/test/functional/toolchains/cmake/test_shared_cmake.py::test_other_client_can_execute ERROR conans/test/functional/toolchains/cmake/test_shared_cmake.py::test_other_client_can_link_cmake ERROR conans/test/functional/toolchains/cmake/test_shared_cmake.py::test_other_client_can_link_meson ERROR conans/test/functional/toolchains/cmake/test_shared_cmake.py::test_other_client_can_link_autotools ERROR conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py::test_standard_names ERROR conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py::test_custom_names ERROR conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py::test_different_namespace ERROR conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py::test_no_components ERROR conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_transitivity.py::test_shared_requires_static_build_all = 47 failed, 419 passed, 270 skipped, 2 xfailed, 10 errors in 296.72s (0:04:56) = script returned exit code 1