Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Atom build fails (node-gyp rebuild error) under Ubuntu #13659

Closed
Aakash1312 opened this issue Jan 19, 2017 · 9 comments
Closed

Atom build fails (node-gyp rebuild error) under Ubuntu #13659

Aakash1312 opened this issue Jan 19, 2017 · 9 comments
Labels
beginner build-error documentation linux Issues that occur on Linux but not on other platforms. triaged

Comments

@Aakash1312
Copy link

Description

On running script/build --install I get the following error:

Node:	v6.9.4
Npm:	v3.10.5
Installing script dependencies
Installing apm
Installing modules ✗
> keyboard-layout@2.0.10 install /home/aakash/packages/atomlatest/atom/node_modules/keyboard-layout
> node-gyp rebuild

make: Entering directory '/home/aakash/packages/atomlatest/atom/node_modules/keyboard-layout/build'
  CXX(target) Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o
keyboard-layout-manager.target.mk:96: recipe for target 'Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o' failed
make: Leaving directory '/home/aakash/packages/atomlatest/atom/node_modules/keyboard-layout/build'
atom@1.15.0-dev /home/aakash/packages/atomlatest/atom
`-- (empty)


gyp WARN download NVM_IOJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use IOJS_ORG_MIRROR
gyp WARN download NVM_IOJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use IOJS_ORG_MIRROR
gyp WARN download NVM_IOJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use IOJS_ORG_MIRROR
../src/keyboard-layout-manager-linux.cc:5:37: fatal error: X11/extensions/XKBrules.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-linux.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/aakash/packages/atomlatest/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.19.0-73-generic
gyp ERR! command "/home/aakash/packages/atomlatest/atom/apm/node_modules/atom-package-manager/bin/node" "/home/aakash/packages/atomlatest/atom/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/aakash/packages/atomlatest/atom/node_modules/keyboard-layout
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm ERR! Linux 3.19.0-73-generic
npm ERR! argv "/home/aakash/packages/atomlatest/atom/apm/node_modules/atom-package-manager/bin/node" "/home/aakash/packages/atomlatest/atom/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/aakash/.atom/.apm/.apmrc" "--userconfig" "/home/aakash/.atom/.apmrc" "install" "--runtime=electron" "--target=1.3.13" "--arch=x64"
npm ERR! node v4.4.5
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! keyboard-layout@2.0.10 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keyboard-layout@2.0.10 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 keyboard-layout 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 keyboard-layout
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls keyboard-layout
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/aakash/packages/atomlatest/atom/npm-debug.log
npm ERR! code 1
child_process.js:506
    throw err;
    ^

Error: Command failed: /home/aakash/packages/atomlatest/atom/apm/node_modules/atom-package-manager/bin/apm --loglevel=error install
    at checkExecSyncError (child_process.js:483:13)
    at Object.execFileSync (child_process.js:503:13)
    at module.exports (/home/aakash/packages/atomlatest/atom/script/lib/install-atom-dependencies.js:15:16)
    at Object.<anonymous> (/home/aakash/packages/atomlatest/atom/script/bootstrap:28:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)

The package keyboard-layout is causing the problem. I installed the latest stable node version using nvm. I reinstalled node and npm several times but nothing worked.

I am using Ubuntu 15.04

@50Wliu 50Wliu added build-error linux Issues that occur on Linux but not on other platforms. labels Jan 19, 2017
@lee-dohm
Copy link
Contributor

Can you build the keyboard-layout package by itself?

@dirk-thomas
Copy link
Contributor

dirk-thomas commented Jan 28, 2017

I ran into the same problem. Installing the Debian package libxkbfile-dev worked for me. Maybe this new dependency should be documented in the build instructions?

@50Wliu
Copy link
Contributor

50Wliu commented Jan 28, 2017

Definitely.

@dirk-thomas
Copy link
Contributor

This has already been added to the docs in #12985. So this can likely be closed.

@lee-dohm
Copy link
Contributor

Thanks @dirk-thomas 😀

@audreytoskin
Copy link

Installing the libxkbfile development files also solved an issue when trying to install an Atom package on Fedora. Maybe the .deb and .rpm packages of Atom should require libxkbfile-dev or libxkbfile-devel, respectively?

@Arcanemagus
Copy link
Contributor

What package required this @terrycloth? Atom core doesn't require the development versions so that sounds like an issue with the package.

@audreytoskin
Copy link

Installing libxkb-devel was mentioned in an issue for atom-keyboard-macros, and in that comment, the poster linked this issue, so I assumed it was relevant to Atom in general.

@lock
Copy link

lock bot commented Sep 15, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Sep 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beginner build-error documentation linux Issues that occur on Linux but not on other platforms. triaged
Projects
None yet
Development

No branches or pull requests

6 participants