Code Monkey home page Code Monkey logo

Comments (16)

sandeepmistry avatar sandeepmistry commented on August 30, 2024 1

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.

sandeepmistry avatar sandeepmistry commented on August 30, 2024

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.

facultymatt avatar facultymatt commented on August 30, 2024

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.

sandeepmistry avatar sandeepmistry commented on August 30, 2024

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.

facultymatt avatar facultymatt commented on August 30, 2024
$ 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.

facultymatt avatar facultymatt commented on August 30, 2024

Worked perfectly. Thanks for helping me through this issue.

from node-xpc-connection.

LeslieOA avatar LeslieOA commented on August 30, 2024

I'm still having the same problem.

which gcc is /usr/bin/gcc

Mac OS X 10.9.3

from node-xpc-connection.

sandeepmistry avatar sandeepmistry commented on August 30, 2024

@LeslieOA are you sure? What's the output of gcc -v?

from node-xpc-connection.

LeslieOA avatar LeslieOA commented on August 30, 2024

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.

sandeepmistry avatar sandeepmistry commented on August 30, 2024

That's the same as mine. Is your error the exact same as Matt's first comment?

from node-xpc-connection.

LeslieOA avatar LeslieOA commented on August 30, 2024

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.

sandeepmistry avatar sandeepmistry commented on August 30, 2024

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.

zdennis avatar zdennis commented on August 30, 2024

@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.

sandeepmistry avatar sandeepmistry commented on August 30, 2024

@zdennis no problem! Do you think this should be added to the read me?

from node-xpc-connection.

zdennis avatar zdennis commented on August 30, 2024

@sandeepmistry, I think that would be helpful as common thing to try before filing an issue.

from node-xpc-connection.

sandeepmistry avatar sandeepmistry commented on August 30, 2024

@zdennis done, see 4314027

from node-xpc-connection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.