0

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 tostd::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?

Community
  • 1
  • 1
cgp
  • 41,026
  • 12
  • 101
  • 131

1 Answers1

0

Sigh, I made this a lot more complicated than need be.

The binaries are freely available for download, and I suppose I could have compiled on another machine and then just downloaded them from there but I was unconsciously concerned about linking problems (or even problems referencing the kernel?), but it seems to be working fine. I usually think of getting binaries from RPMs that require root. This does not appear to have needed to be the case.

cgp
  • 41,026
  • 12
  • 101
  • 131