“#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.)
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.
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?)
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.
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: