The new rh-nodejs4 collection for rhel 6.6 now depends on devtoolset-3-gcc and devtoolset-3-gcc-g++ since gcc and g++ provided from repositories are too old to build nodejs. Provided version of gcc and g++: 4.4.7 Needed version of gcc and g++: >= 4.8 (https://github.com/nodejs/node/blob/v4.4.2/BUILDING.md)
Node.js and v8 shipped in new rh-nodejs4 collection use many C++11 features, not available in g++ currently present in official repositories. We decided to use devtoolset-4-gcc and devtoolset-4-gcc-c++, which are needed by Node.js to build successfully and by node-gyp during runtime to build native modules. Error output using g++ shipped in RHEL 6.6 [root@5e3f55c2089b f]# npm i contextify - > contextify.15 install /root/f/node_modules/contextify > node-gyp rebuild make: Entering directory `/root/f/node_modules/contextify/build' CXX(target) Release/obj.target/contextify/src/contextify.o In file included from ../src/contextify.cc:3: ../node_modules/nan/nan.h:43:3: error: #error This version of node/NAN/v8 requires a C++11 compiler In file included from /root/.node-gyp/4.4.2/include/node/node.h:42, from ../src/contextify.cc:1: /root/.node-gyp/4.4.2/include/node/v8.h:336: error: expected unqualified-id before ‘using’ ...
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2016:1263