It seems that all linux distros use libstdc++ by default, and all GCC versions come with libstdc++. That's likely why gcc was compiling it fine but clang wasn't on Ubuntu
It works on MacOSX >mavericks, since g++ is actually clang++ and by default it used libc++
In setup.py we also had extra_compile_args=["-static-libstdc++"] which may have been colliding with libc++ at link time if we added -std=libc++ in the compiler args. So perhaps the problem is that we're using libstdc++ instead of libc++.
To standardize this:
On MacOSX, always use clang and libc++
On Linux, if Python has been compiled with clang we should use libc++ throughout. If Python has been compiled with gcc instead, we should use libc++ throughout. We should update the extra_compile_args in setup.py to reflect this.
According to this rather old thread:
g++
is actuallyclang++
and by default it usedlibc++
setup.py
we also hadextra_compile_args=["-static-libstdc++"]
which may have been colliding withlibc++
at link time if we added-std=libc++
in the compiler args. So perhaps the problem is that we're usinglibstdc++
instead oflibc++
.To standardize this:
clang
andlibc++
clang
we should uselibc++
throughout. If Python has been compiled withgcc
instead, we should uselibc++
throughout. We should update theextra_compile_args
insetup.py
to reflect this.