cling icon indicating copy to clipboard operation
cling copied to clipboard

Unresolved symbols when using std::future and std::async

Open mmoelle1 opened this issue 4 years ago • 1 comments

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.

mmoelle1 avatar Feb 16 '21 19:02 mmoelle1

I have the same problem: https://github.com/root-project/cling/issues/321 A workaround is to compile Clang with the libc++.

SimeonEhrig avatar Feb 22 '21 20:02 SimeonEhrig