cling
cling copied to clipboard
Unresolved symbols when using std::future and std::async
When running the following code with the official binary cling_2020-11-05_ROOT-centos7
#include <future>
#include <thread>
std::future<int> f2 = std::async(std::launch::async, []{ return 8; });
I am receiving the following error
IncrementalExecutor::executeFunction: symbol '__emutls_v._ZSt11__once_call' unresolved while linking function '_GLOBAL__sub_I_cling_module_2'!
IncrementalExecutor::executeFunction: symbol '__emutls_v._ZSt15__once_callable' unresolved while linking function '_GLOBAL__sub_I_cling_module_2'!
I have seen certain other issues about this problem but cannot find a working solution nor the statement that this an open problem. Any help is appreciated.
I have the same problem: https://github.com/root-project/cling/issues/321 A workaround is to compile Clang with the libc++.