Compiling native module on Travis-CI give error: expected unqualified-id before ‘using’


#1

I an working on an electron app that depends on the kerberos native module. When Travis-CI attempts to build that module, I get the error:

make: Entering directory `/home/travis/build/kalahari/mongoForge/node_modules/kerberos/build'
  CXX(target) Release/obj.target/kerberos/lib/kerberos.o
In file included from /home/travis/.electron-gyp/.node-gyp/0.36.8/src/node.h:42:0,
                 from ../lib/kerberos.h:4,
                 from ../lib/kerberos.cc:1:
/home/travis/.electron-gyp/.node-gyp/0.36.8/deps/v8/include/v8.h:336:1: error: expected unqualified-id before ‘using’
/home/travis/.electron-gyp/.node-gyp/0.36.8/deps/v8/include/v8.h:469:1: error: expected unqualified-id before ‘using’
/home/travis/.electron-gyp/.node-gyp/0.36.8/deps/v8/include/v8.h:856:1: error: expected unqualified-id before ‘using’

full output and error is here: https://travis-ci.org/kalahari/mongoForge/builds/114101629

I am following the native module compilation recipe given here: http://electron.atom.io/docs/v0.36.8/tutorial/using-native-node-modules/#the-npm-way

I am at a bit of a loss on what to look at with this issue, any pointers would be much appreciated.


#2

For anyone else who encounters this error, it is caused by an outdated C compiler: https://github.com/node-inspector/node-inspector/issues/776#issuecomment-162383014