undefined reference to `std::__cxx11::basic_string in Boost on Travis CI
You should try the adding -D_GLIBCXX_USE_CXX11_ABI=0 to the command line used to compile it, and see if this gets rid of the problem.
I think its quite possible that one or other of the g++/gcc you are calling is not version 6 ... otherwise this would be set to 1 by default iirc.
This is documented here