Cxx LLVM error

I am wrapping a C++ math library (ntl) using Cxx.
After successfully wrapping a major class, I encountered llvm errors in another class.
The errors are:
LLVM ERROR: Program used external function ‘__emutls_v._symbol’ which could not be resolved!
where symbol is replaced with the function symbol.
checking the share library ( the function is not missing.
I am guessing this has to do with Thread Local Storage
NTL has the following definition:


#define NTL_THREAD_LOCAL thread_local

#ifdef __GNUC__
#define NTL_CHEAP_THREAD_LOCAL __thread
#define NTL_CHEAP_THREAD_LOCAL thread_local




which means that certain elements in this class are prefixed with __thread (which was not present in the other class I was able to wrap successfully)