Summary: | dev-build/cmake: PROCESSOR_AFFINITY doesn't work due to unbundled libuv | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Guilherme Amadio <amadio> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | kde, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Guilherme Amadio
2020-12-09 13:20:56 UTC
Can you provide a patch? I tried the obvious --- a/Source/CTest/cmProcess.cxx 2020-12-09 15:31:06.329504850 +0100 +++ b/Source/CTest/cmProcess.cxx 2020-12-09 15:31:21.779474399 +0100 @@ -106,7 +106,6 @@ options.stdio_count = 3; // in, out and err options.exit_cb = &cmProcess::OnExitCB; options.stdio = stdio; -#if !defined(CMAKE_USE_SYSTEM_LIBUV) std::vector<char> cpumask; if (affinity && !affinity->empty()) { cpumask.resize(static_cast<size_t>(uv_cpumask_size()), 0); @@ -119,9 +118,6 @@ options.cpumask = nullptr; options.cpumask_size = 0; } -#else - static_cast<void>(affinity); -#endif status = uv_read_start(pipe_reader, &cmProcess::OnAllocateCB, &cmProcess::OnReadCB); --- EOF --- but unfortunately it failed with the error below. /tmp/portage/dev-util/cmake-3.19.1/work/cmake-3.19.1/Source/CTest/cmProcess.cxx: In member function ‘bool cmProcess::StartProcess(uv_loop_t&, std::vector<long unsigned int>*)’: /tmp/portage/dev-util/cmake-3.19.1/work/cmake-3.19.1/Source/CTest/cmProcess.cxx:111:40: error: ‘uv_cpumask_size’ was not declared in this scope cpumask.resize(static_cast<size_t>(uv_cpumask_size()), 0); ^~~~~~~~~~~~~~~ /tmp/portage/dev-util/cmake-3.19.1/work/cmake-3.19.1/Source/CTest/cmProcess.cxx:111:40: note: suggested alternative: ‘uv_req_size’ cpumask.resize(static_cast<size_t>(uv_cpumask_size()), 0); ^~~~~~~~~~~~~~~ uv_req_size /tmp/portage/dev-util/cmake-3.19.1/work/cmake-3.19.1/Source/CTest/cmProcess.cxx:115:13: error: ‘uv_process_options_t’ {aka ‘struct uv_process_options_s’} has no member named ‘cpumask’ options.cpumask = cpumask.data(); ^~~~~~~ /tmp/portage/dev-util/cmake-3.19.1/work/cmake-3.19.1/Source/CTest/cmProcess.cxx:116:13: error: ‘uv_process_options_t’ {aka ‘struct uv_process_options_s’} has no member named ‘cpumask_size’ options.cpumask_size = cpumask.size(); ^~~~~~~~~~~~ /tmp/portage/dev-util/cmake-3.19.1/work/cmake-3.19.1/Source/CTest/cmProcess.cxx:118:13: error: ‘uv_process_options_t’ {aka ‘struct uv_process_options_s’} has no member named ‘cpumask’ options.cpumask = nullptr; ^~~~~~~ /tmp/portage/dev-util/cmake-3.19.1/work/cmake-3.19.1/Source/CTest/cmProcess.cxx:119:13: error: ‘uv_process_options_t’ {aka ‘struct uv_process_options_s’} has no member named ‘cpumask_size’ options.cpumask_size = 0; ^~~~~~~~~~~~ make[2]: *** [Source/CMakeFiles/CTestLib.dir/build.make:95: Source/CMakeFiles/CTestLib.dir/CTest/cmProcess.cxx.o] Error 1 make[2]: *** Waiting for unfinished jobs.... Maybe a full patch is not that hard, but I don't have the time to fix this now. I filed the bug so I wouldn't forget about it again after running into the problem myself. If I manage to find a solution, I will post it here or just create a pull request with the fix later. |