title: How to compile node.js for CentOS 6.10 (library issues)
body: <p>I'm trying to get the newest version of node (12.1.0, at present) running on a CentOS 6.10 box.  This is a problem because the standard CentOS binaries are out of date; e.g.:</p>
  
  <pre><code>./node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ./node)
  (a number of other references like this also appear)
  </code></pre>
  
  <p>when I try to install and run the binaries, and the g++ / c++ tools are out of date.  But I've decided to try to compile from source, if I can get the tools properly aligned.</p>
  
  <p>I've gotten an updated version of the compiler tools from the CERN devtools (<a href="http://linux.web.cern.ch/linux/devtoolset" rel="nofollow noreferrer">http://linux.web.cern.ch/linux/devtoolset</a>), and seemingly have them installed properly.  What I've gotten from various places around the web is that I need to export pointers to these new libraries before doing the configure, like:</p>
  
  <pre><code>export CC=/opt/rh/devtoolset-2/root/usr/bin/gcc  
  export CPP=/opt/rh/devtoolset-2/root/usr/bin/cpp
  export CXX=/opt/rh/devtoolset-2/root/usr/bin/c++
  </code></pre>
  
  <p>These do have the updated and sufficiently modern versions, e.g., </p>
  
  <pre><code>/opt/rh/devtoolset-2/root/usr/bin/c++ --version
  c++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
  </code></pre>
  
  <p>But they don't seem to be getting into the configuration process:</p>
  
  <pre><code>[root@linux2 node-v12.1.0]# ./configure --prefix=/opt/node-12.1.0
  WARNING: C++ compiler too old, need g++ 6.3.0 or clang++ 8.0.0 (CXX=/opt/rh/devtoolset-2/root/usr/bin/c++)
  INFO: Using floating patch "tools/icu/patches/64/source/common/putil.cpp" from "tools/icu"
  INFO: Using floating patch "tools/icu/patches/64/source/i18n/dtptngen.cpp" from "tools/icu"
  WARNING: warnings were emitted in the configure phase
  INFO: configure completed successfully
  </code></pre>
  
  <p>When I cross my fingers and try to <code>make</code> anyway, I get a whole bunch of compilation results and then a bunch of errors, omitted here (for now) for brevity. </p>
  
  <p>Anyway: it's just not working.  Can anyone see what's going on here, and how I can get things right?  Thanks!</p>