Missing std::string::operator=(std::string&&)

When I try to compile

#include \n”
"#include <stdio.h>\n"
“std::string& test(std::string& s) {\n”
“s = s + s;\n”
//“std::string ss = s + s;\n”
//“s = ss;\n”
“return s;\n”

I end up with “IncrementalExecutor: calling unresolved symbol, see previous error message!”, with no previous error message. A little digging around revealed that the unresolved symbol is “_ZNSsaSEOSs”, IOW ‘std::string::operator=(std::string&&)’ – the commented out variant above compiles and works fine. What can be the reason for the missing symbol? (I am on redhat, gcc 4.8.2 if that’s relevant.)



Is this using devtoolset?

Cheers, Axel.

Yes (rhdevtoolset, but not linux.web.cern.ch/linux/devtoolset/ if that is in any way different).


We don’t support the compiler that’s part of devtoolset (rh* is just a different name for it). The reason is here: sft.its.cern.ch/jira/browse/ROOT-6207

That said: I just talked to one of the core GCC devs and we might have come up with a solution. It won’t be implemented immediately but at least we have an idea how to solve it.

For now, please build the compiler yourself or try to use the one e.g. from epel.

Cheers, Axel.

Unfortunately this is a corp/prod environment and i have no choice in which compiler to use (and not allowed to install my own). Do you know which other symbols are affected by this problem? (Is it limited to std::string/move ctors?)


All symbols not part of the native compiler’s libstdc++.

As I said - I’ll look into that, it will take a few weeks (not because of this but because of other things that keep me busy).

Cheers, Axel.

Ran into the same issue? following up to see if there is any more update?

I still did not get around to implementing this. Anyone reading this and willing to come up with a pull request for it is very welcome to ping me (also privately) to get some hints on what needs to be done.

Until then: no devtoolset, please.

Please try with at least GCC 4.8.5, this is the oldest version that we support. I believe C++11 support is not complete in older versions of GCC.

4.8.1 is feature complete for C++11; 4.8.5 was the last patch release in the 4.8 series, which is why it is a more common choice (e.g. for conda). It’s relevant for me as manylinux1 wheels have 4.8.2 and that works fine for at least the minimal subset of Cling/ROOT that I use in cppyy.

Certainly, the use of string&& which seems to have started this thread is not an issue:

>>> import cppyy
>>> a = cppyy.gbl.string("a")
>>> a.__assign__.__overload__("string&&")(cppyy.gbl.std.string("b"))