Error building atom: Archive has no symbols


#1
gcc version: 4.9.3
ar version: 2.10.90
ranlib version 2.10.90

I encounter the following error while building atom v1.16.0 from source on a CentOS 6.3 system.

Node:	v5.6.0
Npm:	v3.10.5
Installing script dependencies
Installing apm
../src/onig-string.cc: In constructor 'OnigString::OnigString(v8::Local<v8::String>)':
../src/onig-string.cc:25:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   hasMultiByteChars = (value->Length() != utf8_length_);
                                        ^
Release/obj.target/oniguruma.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/onig_scanner.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/afotedar/github/atom/script/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-431.el6.x86_64
gyp ERR! command "/home/afotedar/.nvm/versions/node/v5.6.0/bin/node" "/home/afotedar/github/atom/script/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/afotedar/github/atom/apm/node_modules/atom-package-manager/node_modules/oniguruma
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm ERR! Linux 2.6.32-431.el6.x86_64
npm ERR! argv "/home/afotedar/.nvm/versions/node/v5.6.0/bin/node" "/home/afotedar/github/atom/script/node_modules/.bin/npm" "--global-style" "--loglevel=error" "install"
npm ERR! node v5.6.0
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! oniguruma@6.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the oniguruma@6.1.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the oniguruma package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs oniguruma
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls oniguruma
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/afotedar/github/atom/apm/npm-debug.log
npm ERR! code 1
child_process.js:487
    throw err;
    ^

Error: Command failed: /home/afotedar/github/atom/script/node_modules/.bin/npm --global-style --loglevel=error install
../src/onig-string.cc: In constructor 'OnigString::OnigString(v8::Local<v8::String>)':
../src/onig-string.cc:25:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   hasMultiByteChars = (value->Length() != utf8_length_);
                                        ^
Release/obj.target/oniguruma.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/onig_scanner.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/afotedar/github/atom/script/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-431.el6.x86_64
gyp ERR! command "/home/afotedar/.nvm/versions/node/v5.6.0/bin/node" "/home/afotedar/github/atom/script/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/afotedar/github/atom/apm/node_modules/atom-package-manager/node_modules/oniguruma
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm ERR! Linux 2.6.32-431.el6.x86_64
npm ERR! argv "/home/afotedar/.nvm/versions/node/v5.6.0/bin/node" "/home/afotedar/github/atom/script/node_modules/.bin/npm" "--global-style" "--loglevel=error" "install"
npm ERR! node v5.6.0
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! oniguruma@6.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the oniguruma@6.1.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the oniguruma package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs oniguruma
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls oniguruma
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/afotedar/github/atom/apm/npm-debug.log
npm ERR! code 1

    at checkExecSyncError (child_process.js:464:13)
    at Object.execFileSync (child_process.js:484:13)
    at module.exports (/home/afotedar/github/atom/script/lib/install-apm.js:10:16)
    at Object.<anonymous> (/home/afotedar/github/atom/script/bootstrap:27:1)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)