JunSuzukiJapan / atom-keyboard-macros

MIT License
7 stars 8 forks source link

Plugin fails to install on Mac OS X 10.11 #26

Closed haberdashPI closed 6 years ago

haberdashPI commented 7 years ago

Installing this plugin results in the following error on my system:

Plugin Version: 0.10.0 Atom: 1.19.1 Mac OS X 10.11.6 Xcode 8.2.1 installed

> keyboard-layout@2.0.13 install /private/var/folders/26/45j_dp6n79gd8d8pz7zkjr7w0000gv/T/apm-install-dir-117716-8968-mxmbnc.qel6av2t9/node_modules/atom-keyboard-macros/node_modules/keyboard-layout
> node-gyp rebuild

  CXX(target) Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-mac.o
/private/var/folders/26/45j_dp6n79gd8d8pz7zkjr7w0000gv/T/apm-install-dir-117716-8968-mxmbnc.qel6av2t9
`-- (empty)

c++: error: unrecognized command line option '-stdlib=libc++'
make: *** [Release/obj.target/keyboard-layout-manager/src/keyboard-layout-manager-mac.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /private/var/folders/26/45j_dp6n79gd8d8pz7zkjr7w0000gv/T/apm-install-dir-117716-8968-mxmbnc.qel6av2t9/node_modules/atom-keyboard-macros/node_modules/keyboard-layout
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/private/var/folders/26/45j_dp6n79gd8d8pz7zkjr7w0000gv/T/apm-install-dir-117716-8968-mxmbnc.qel6av2t9/package.json'
npm WARN apm-install-dir-117716-8968-mxmbnc.qel6av2t9 No description
npm WARN apm-install-dir-117716-8968-mxmbnc.qel6av2t9 No repository field.
npm WARN apm-install-dir-117716-8968-mxmbnc.qel6av2t9 No README data
npm WARN apm-install-dir-117716-8968-mxmbnc.qel6av2t9 No license field.
npm ERR! Darwin 15.6.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/davidlittle/.atom/.apm/.apmrc" "--userconfig" "/Users/davidlittle/.atom/.apmrc" "install" "/private/var/folders/26/45j_dp6n79gd8d8pz7zkjr7w0000gv/T/d-117716-8968-8p1p07.aqt30afw29/package.tgz" "--runtime=electron" "--target=1.6.9" "--arch=x64" "--global-style"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! keyboard-layout@2.0.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keyboard-layout@2.0.13 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!     /private/var/folders/26/45j_dp6n79gd8d8pz7zkjr7w0000gv/T/apm-install-dir-117716-8968-mxmbnc.qel6av2t9/npm-debug.log
npm ERR! code 1
arthurcgusmao commented 6 years ago

I had a similar issue on Ubuntu 16.04:

> keyboard-layout@2.0.13 install /tmp/apm-install-dir-117928-24792-1l50lz5.amfhepzaor/node_modules/atom-keyboard-macros/node_modules/keyboard-layout
> node-gyp rebuild

make: Entering directory '/tmp/apm-install-dir-117928-24792-1l50lz5.amfhepzaor/node_modules/atom-keyboard-macros/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 '/tmp/apm-install-dir-117928-24792-1l50lz5.amfhepzaor/node_modules/atom-keyboard-macros/node_modules/keyboard-layout/build'
/tmp/apm-install-dir-117928-24792-1l50lz5.amfhepzaor
└── (empty)

../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 (/opt/atom/resources/app/apm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-97-generic
gyp ERR! command "/opt/atom/resources/app/apm/bin/node" "/opt/atom/resources/app/apm/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-117928-24792-1l50lz5.amfhepzaor/node_modules/atom-keyboard-macros/node_modules/keyboard-layout
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-117928-24792-1l50lz5.amfhepzaor/package.json'
npm WARN apm-install-dir-117928-24792-1l50lz5.amfhepzaor No description
npm WARN apm-install-dir-117928-24792-1l50lz5.amfhepzaor No repository field.
npm WARN apm-install-dir-117928-24792-1l50lz5.amfhepzaor No README data
npm WARN apm-install-dir-117928-24792-1l50lz5.amfhepzaor No license field.
npm ERR! Linux 4.4.0-97-generic
npm ERR! argv "/opt/atom/resources/app/apm/bin/node" "/opt/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/arthurcgusmao/.atom/.apm/.apmrc" "--userconfig" "/home/arthurcgusmao/.atom/.apmrc" "install" "/tmp/d-117928-24792-1tplqhh.nm1rc9dx6r/package.tgz" "--runtime=electron" "--target=1.6.15" "--arch=x64" "--global-style"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! keyboard-layout@2.0.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keyboard-layout@2.0.13 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!     /tmp/apm-install-dir-117928-24792-1l50lz5.amfhepzaor/npm-debug.log
npm ERR! code 1
yosider commented 6 years ago

@arthurcgusmao Installing libxkbfile-dev worked. (See atom/issues/13659)

haberdashPI commented 6 years ago

That's a very terse explanation, and I don't know exactly what it means. I have tried:

apm install libxkbfile-dev
npm install libxkbfile-dev
brew install libxkbfile-dev

and I have tried searching for libxkbfile-dev in the list of installable packages in the Settings tab of Atom. None of which revealed any package called libxkbfile-dev.

haberdashPI commented 6 years ago

Doing a little googling... it seems like xkb files are specific to the X11 system?? I'm a little confused about how that has anything to do with an extension for Atom on Mac OS X or the specific error I'm getting, which seems to be related to the command-line arguments passed to the c++ compiler...

The error that @arthurcgusmao is getting seems quite different than mine (maybe it is fixed by installing that library on Ubuntu, that makes more sense).

Also, I've now tried this on Atom 1.23.3, Mac 10.11.6, Xcode 8.2.1, again to no avail.

haberdashPI commented 6 years ago

Ah hah! Figured out my problem. Anaconda is installed in my PATH and its version of c++ was overriding xcode's version. I removed it from my path and installed this from the command line successfully.

arthurcgusmao commented 6 years ago

Thanks @yosider that worked for me in Ubuntu!