I'm having an issue compiling NodeJS 4.2.3 (any version that requires c++ 4.8 and above) I've done the following:
- Compiled gcc4.8 (because gcc is 4.4 by default on CentOS 6
- Set the CXX option to point to the updated compiler
- Added the MPC, GMP and MPFR libraries via the LD_LIBRARY_PATH,
But I'm still getting the following error:
gtest-test-part.cc:(.text.startup._GLOBAL__sub_I__ZN7testing14TestPartResult14ExtractSummaryEPKc+0xa): undefined reference to
std::ios_base::Init::Init()' gtest-test-part.cc:(.text.startup._GLOBAL__sub_I__ZN7testing14TestPartResult14ExtractSummaryEPKc+0x1a): undefined reference to
std::ios_base::Init::~Init()' collect2: error: ld returned 1 exit status
So, I see the following gcc undefined reference to `std::ios_base::Init::Init()', but I'm not sure how to get that added, if it is at all possible, or if I'm supposed to add the library to the LD_LIBRARY_PATH? I also saw this, but I don't have root (legacy systems not part of our cloud) so I can't apply all the advice given.
What is the correct way to get nodejs to compile with gcc4.8 compiled via source?