runtime
runtime copied to clipboard
Build fails for //cpp_tests:support/thread_local_test
This is with git HEAD at c4262eb68366c705aec08fdc0b20b54d58dcdb19 as Apr 23. The ThreadLocal ctor is doing a resize on a vector of Entry which will have WorkerId as a field in this case and the latter doesn't have a copy ctor.
bazel test --sandbox_writable_path=$HOME/.ccache -- //cpp_tests:support/thread_local_test
DEBUG: /home/uday/tensorflow-runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
INFO: Analyzed target //cpp_tests:support/thread_local_test (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
ERROR: /home/uday/tensorflow-runtime/cpp_tests/BUILD:324:13: Compiling cpp_tests/support/thread_local_test.cc failed: (Exit 1): clang failed: error executing command /usr/lib64/ccache/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 69 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox clang failed: error executing command /usr/lib64/ccache/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 69 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
In file included from cpp_tests/support/thread_local_test.cc:19:
In file included from include/tfrt/support/thread_local.h:63:
In file included from external/llvm-project/llvm/include/llvm/ADT/STLExtras.h:19:
external/llvm-project/llvm/include/llvm/ADT/Optional.h:113:43: error: call to implicitly-deleted copy constructor of 'tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry'
::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...);
^ ~~~~~~~~~~~~~~~~~~~~~~~~
external/llvm-project/llvm/include/llvm/ADT/Optional.h:74:7: note: in instantiation of function template specialization 'llvm::optional_detail::OptionalStorage<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry, false>::emplace<const tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry &>' requested here
emplace(other.value);
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_uninitialized.h:83:8: note: in instantiation of function template specialization 'std::_Construct<llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry>, const llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> &>' requested here
std::_Construct(std::__addressof(*__cur), *__first);
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_uninitialized.h:134:2: note: in instantiation of function template specialization 'std::__uninitialized_copy<false>::__uninit_copy<const llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> *, llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> *>' requested here
__uninit_copy(__first, __last, __result);
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_uninitialized.h:289:19: note: in instantiation of function template specialization 'std::uninitialized_copy<const llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> *, llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> *>' requested here
{ return std::uninitialized_copy(__first, __last, __result); }
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_uninitialized.h:310:19: note: in instantiation of function template specialization 'std::__uninitialized_copy_a<const llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> *, llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> *, llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> >' requested here
return std::__uninitialized_copy_a
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/vector.tcc:611:10: note: in instantiation of function template specialization 'std::__uninitialized_move_if_noexcept_a<llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> *, llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> *, std::allocator<llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> > >' requested here
std::__uninitialized_move_if_noexcept_a(
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_vector.h:827:4: note: in instantiation of member function 'std::vector<llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry>, std::allocator<llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> > >::_M_default_append' requested here
_M_default_append(__new_size - size());
^
include/tfrt/support/thread_local.h:94:11: note: in instantiation of member function 'std::vector<llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry>, std::allocator<llvm::Optional<tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::Entry> > >::resize' requested here
data_.resize(capacity);
^
cpp_tests/support/thread_local_test.cc:52:21: note: in instantiation of function template specialization 'tfrt::ThreadLocal<tfrt::(anonymous namespace)::WorkerId, tfrt::(anonymous namespace)::WorkerIdGenerator>::ThreadLocal<int>' requested here
CurrentWorkerId worker_id(capacity, kInitWorkerId);
^
include/tfrt/support/thread_local.h:199:7: note: copy constructor of 'Entry' is implicitly deleted because field 'value' has a deleted copy constructor
T value;
^
cpp_tests/support/thread_local_test.cc:33:3: note: 'WorkerId' has been explicitly marked deleted here
WorkerId(const WorkerId&) = delete;
^
1 error generated.
Target //cpp_tests:support/thread_local_test failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.281s, Critical Path: 1.15s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
//cpp_tests:support/thread_local_test FAILED TO BUILD
FAILED: Build did NOT complete successfully
clang --version
clang version 10.0.1 (Red Hat 10.0.1-1.module_el8.3.0+467+cb298d5b)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin