[Openmp-dev] Openmp Win32 build failed for KF_TRACE
Churbanov, Andrey via Openmp-dev
openmp-dev at lists.llvm.org
Tue Jan 26 15:01:38 PST 2021
Thanks for reporting the problem.
I’ve poster patch https://reviews.llvm.org/D95485 with the fix.
Regards,
Andrey
From: Openmp-dev <openmp-dev-bounces at lists.llvm.org> On Behalf Of Joseph Shen via Openmp-dev
Sent: Tuesday, January 26, 2021 4:36 PM
To: openmp-dev at lists.llvm.org
Subject: [Openmp-dev] Openmp Win32 build failed for KF_TRACE
Hi, Openmp devs:
When I compiled Openmp with clang-cl(self-build-from-v11.01), three errors were triggered by the compiler.
These errors all happened in KF_TRACE, for printf the flag value with type std::atomic<unsigned int>
but using unnecessary `flag->get() then get pointer value`; and for the second error, printf used format
%d for unsigned value.
Patch is given in the attached file, and the compile error message is listed below.
Thanks for your hard work.
Joseph Shen.
--------------------------------------------------------------------------------------------------------------------------------
[1/2] Building CXX object projects\openmp\runtime\src\CMakeFiles\omp.dir\z_Windows_NT_util.cpp.obj
FAILED: projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Windows_NT_util.cpp.obj
T:\llvm_dist_s6\bin\clang-cl.exe .... -c -- T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp
---- ERROR 1 ---
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(384,38): error: call to deleted constructor of 'std::atomic<unsigned int>'
th_gtid, flag->get(), *(flag->get())));
^~~~~~~~~~~~~~
T:\llvm-project-11.0.1.src\openmp\runtime\src/kmp_debug.h(103,24): note: expanded from macro 'KF_TRACE'
__kmp_debug_printf x; \
^
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(446,3): note: in instantiation of function template specialization '__kmp_suspend_template<kmp_flag_32>' requested here
__kmp_suspend_template(th_gtid, flag);
^
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(2165,5): note: 'atomic' has been explicitly marked deleted here
atomic(const atomic&) = delete;
^
---- ERROR 2 ---
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(244,41): error: call to deleted constructor of 'std::atomic<unsigned int>'
flag->get(), old_f, *(flag->get())));
^~~~~~~~~~~~~~
T:\llvm-project-11.0.1.src\openmp\runtime\src/kmp_debug.h(103,24): note: expanded from macro 'KF_TRACE'
__kmp_debug_printf x; \
^
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(414,9): note: in instantiation of function template specialization '__kmp_win32_cond_wait<kmp_flag_32>' requested here
__kmp_win32_cond_wait(&th->th.th_suspend_cv, &th->th.th_suspend_mx, th,
^
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(446,3): note: in instantiation of function template specialization '__kmp_suspend_template<kmp_flag_32>' requested here
__kmp_suspend_template(th_gtid, flag);
^
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(2165,5): note: 'atomic' has been explicitly marked deleted here
atomic(const atomic&) = delete;
^
---- ERROR 3 ---
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(491,62): error: call to deleted constructor of 'std::atomic<unsigned int>'
gtid, target_gtid, flag->get(), old_spin, *(flag->get())));
^~~~~~~~~~~~~~
T:\llvm-project-11.0.1.src\openmp\runtime\src/kmp_debug.h(103,24): note: expanded from macro 'KF_TRACE'
__kmp_debug_printf x; \
^
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(2165,5): note: 'atomic' has been explicitly marked deleted here
atomic(const atomic&) = delete;
^
8 warnings and 3 errors generated.
ninja: build stopped: subcommand failed.
--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20210126/9c6b5470/attachment.html>
More information about the Openmp-dev
mailing list