Here are some of the things that have caused trouble for people installing GNU C++ library.
Make sure that your GNU C++ version number is at least as high as your libg++ version number. For example, libg++ 1.22.0 requires g++ 1.22.0 or later releases.
Double-check system constants in the header files mentioned above.