Comments (16)
Even though you have the Xcode command line tools installed, you're using the MacPort gcc.
On my Mac:
$ which gcc
/usr/bin/gcc
Try setting the path, just before npm install:
export PATH=/usr/bin:$PATH
This should switch you back to using the Apple gcc for the rest on the terminal session.
from node-xpc-connection.
Could you compare these two files:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOS 10.9.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSUserNotification.h
/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h
I don't have the second one on my Mac, I think your system is using it in the build when the first one should be used. We could verify Xcode-select is setup correctly:
xcode-select -p
xcode-select -v
the output on my Mac is:
/Applications/Xcode.app/Contents/Developer
xcode-select version 2333.
from node-xpc-connection.
OK, the two files are the same contents EXCEPT the path for my file is above and your path is below
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSUserNotification.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOS 10.9.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSUserNotification.h
This looks good
xcode-select -p
xcode-select -v
/Applications/Xcode.app/Contents/Developer
xcode-select version 2333.
from node-xpc-connection.
Ok, that's the path I have as well (I accidentally replaced the X).
Hmm, might be a compiler issue then?
What's the output of gcc -v
?
gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix
from node-xpc-connection.
$ gcc -v
Using built-in specs.
Target: i686-apple-darwin12
Configured with: /opt/local/var/macports/build/_opt_mports_dports_lang_apple-gcc42/apple-gcc42/work/objroot/src/configure --disable-checking --prefix=/opt/local --mandir=/opt/local/share/man --enable-languages=c,c++,objc,obj-c++ --libexecdir=/opt/local/libexec/apple-gcc42 --libdir=/opt/local/lib/apple-gcc42 --includedir=/opt/local/include/apple-gcc42 --program-suffix=-apple-4.2 --with-system-zlib --disable-nls --with-slibdir=/usr/lib --build=x86_64-apple-darwin12 --enable-werror-always --program-prefix=i686-apple-darwin12- --host=x86_64-apple-darwin12 --target=i686-apple-darwin12 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42 5666.3_13)
from node-xpc-connection.
Worked perfectly. Thanks for helping me through this issue.
from node-xpc-connection.
I'm still having the same problem.
which gcc is /usr/bin/gcc
Mac OS X 10.9.3
from node-xpc-connection.
@LeslieOA are you sure? What's the output of gcc -v
?
from node-xpc-connection.
Hey Sandeep.
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix
from node-xpc-connection.
That's the same as mine. Is your error the exact same as Matt's first comment?
from node-xpc-connection.
Not exactly, but it does seem xpc-connection related.
Here's where things go south (sorry for pasting nth lines of output):
> [email protected] install /Library/WebServer/Documents/r&d/bluetooth/node-bluetooth/node_modules/noble/node_modules/xpc-connection
> node-gyp rebuild
CXX(target) Release/obj.target/binding/src/XpcConnection.o
cc1plus: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
make: *** [Release/obj.target/binding/src/XpcConnection.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Library/WebServer/Documents/r&d/bluetooth/node-bluetooth/node_modules/noble/node_modules/xpc-connection
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the xpc-connection 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 their info via:
npm ERR! npm owner ls xpc-connection
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "xpc-connection@~0.0.3"
npm ERR! cwd /Library/WebServer/Documents/r&d/bluetooth/node-bluetooth/node_modules/noble
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Library/WebServer/Documents/r&d/bluetooth/node-bluetooth/node_modules/noble/npm-debug.log
npm ERR! not ok code 0
noble install: done
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the noble package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls noble
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "noble" "--save"
npm ERR! cwd /Library/WebServer/Documents/r&d/bluetooth/node-bluetooth
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Library/WebServer/Documents/r&d/bluetooth/node-bluetooth/npm-debug.log
npm ERR! not ok code 0
from node-xpc-connection.
Ok, it's the same as: stormboy/node-zbee#4 (comment)
What does your path look like? (echo $PATH
) The default on mine is:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
from node-xpc-connection.
@sandeepmistry, your last comment about the path cleaned this up for me. My $PATH is quite abused, resetting it to yours resolved an issue I had today on Yosemite. Thank you.
from node-xpc-connection.
@zdennis no problem! Do you think this should be added to the read me?
from node-xpc-connection.
@sandeepmistry, I think that would be helpful as common thing to try before filing an issue.
from node-xpc-connection.
from node-xpc-connection.
Related Issues (20)
- Node v4 node-gyp rebuild fails HOT 2
- Clone of this repo fails to build Node 0.12 / 4.2.3, node-gyp 3.2.1, gcc HOT 2
- Error when installing xpc-connection on OSX El Capitan HOT 1
- Build Failure with node v6 HOT 5
- nwjs crash when require('noble') HOT 3
- Keeps process open HOT 1
- npm install compiler errors HOT 4
- node version error when working with electron HOT 4
- JXCore fails to run Noble HOT 1
- xpc-connection install issue on mac HOT 1
- nan dependency HOT 1
- symbolic link pointing to itself OSX 10.12.6 HOT 1
- Module installation fails on Mac (macOS 10.13.4) after upgrade to node v10.0.0 and npm v6.0.0 HOT 23
- xpc-connection issue HOT 1
- Install fails on macOS 10.14 and node 6 HOT 4
- Install fails on OSX node v11.1.0 HOT 1
- xpc-connection refuses to install HOT 12
- Fails to build Mac OS HOT 1
- crash with exception in libuv's threadpool.c on OS X Mavericks 10.9.5 HOT 10
- 0.1.4 build fails when building for nw 0.8.6 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-xpc-connection.