Code Monkey home page Code Monkey logo

Comments (13)

theturtle32 avatar theturtle32 commented on June 22, 2024

I just released version 1.0.7 with a complete overhaul of the native module building process. It seems to work for me across the board. Try that and let me know how you fare.

from websocket-node.

makensi avatar makensi commented on June 22, 2024

Hi

Finally I upgrade all:

  • Node: v0.8.6
  • Xcode: v4.4.1

And I have attempted install it another time, but seems that i have same problem:

ncpro:test_server makensi$ npm install websocket --websocket:verbose 
npm WARN package.json [email protected] No README.md file found!
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket

> [email protected] install /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
> node install.js

[websocket v1.0.7] Attempting to compile native extensions.
  CXX(target) Release/obj.target/validation/src/validation.o
make: c++: No such file or directory
make: *** [Release/obj.target/validation/src/validation.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:215:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 11.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
gyp ERR! node -v v0.8.6
gyp ERR! node-gyp -v v0.6.3
gyp ERR! not ok 
[websocket v1.0.7]
    Native code compile failed!!
    On Windows, native extensions require Visual Studio and Python.
    On Unix, native extensions require Python, make and a C++ compiler.
    Start npm with --websocket:verbose to show compilation output (if any).
[email protected] node_modules/websocket

Are there extra requirements(like Windows systems) needed to compile it?

from websocket-node.

theturtle32 avatar theturtle32 commented on June 22, 2024

It looks like the "make" command can't find your C++ compiler. Have you compiled other software on the command line before?

I recommend installing Homebrew and compiling something small with that. I suspect once you have Homebrew working, this will work as well.

Homebrew can be found here: http://mxcl.github.com/homebrew/

However, as of version 1.0.7, WebSocket-Node will now still work even though the native module compilation failed. I added JavaScript fallback implementations. It won't be as fast, and it won't validate against receiving invalid UTF-8 data, but otherwise it will work just fine.

Brian

Sent from my iPhone

On Aug 14, 2012, at 12:35 PM, makensi [email protected] wrote:

Hi

Finally I upgrade all:

Node: v0.8.6
Xcode: v4.4.1
And I have attempted install it another time, but seems that i have same problem:

ncpro:test_server makensi$ npm install websocket --websocket:verbose
npm WARN package.json [email protected] No README.md file found!
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket

[email protected] install /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
node install.js

[websocket v1.0.7] Attempting to compile native extensions.
CXX(target) Release/obj.target/validation/src/validation.o
make: c++: No such file or directory
make: *** [Release/obj.target/validation/src/validation.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:215:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 11.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
gyp ERR! node -v v0.8.6
gyp ERR! node-gyp -v v0.6.3
gyp ERR! not ok
[websocket v1.0.7]
Native code compile failed!!
On Windows, native extensions require Visual Studio and Python.
On Unix, native extensions require Python, make and a C++ compiler.
Start npm with --websocket:verbose to show compilation output (if any).
[email protected] node_modules/websocket
Are there extra requirements(like Windows systems) needed to compile it?


Reply to this email directly or view it on GitHub.

from websocket-node.

GICodeWarrior avatar GICodeWarrior commented on June 22, 2024

This is an XCode configuration issue on your machine. Are you sure you have the command line tools installed?

from websocket-node.

theturtle32 avatar theturtle32 commented on June 22, 2024

Any update on this?

from websocket-node.

theturtle32 avatar theturtle32 commented on June 22, 2024

Closing, as I don't believe this to be an issue with WebSocket-Node.

from websocket-node.

makensi avatar makensi commented on June 22, 2024

Hi,

Sorry but i took several vacation days :P.

Finally, I found it. Seems that exists something wrong inside global node modules. After remove them (global node_modules directory) compilation was perfect.

ncpro:test_server makensi$ npm install websocket --websocket:verbose
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket

> [email protected] install /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
> node install.js

[websocket v1.0.7] Attempting to compile native extensions.
gyp http GET http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished
  CXX(target) Release/obj.target/xor/src/xor.o
  SOLINK_MODULE(target) Release/xor.node
  SOLINK_MODULE(target) Release/xor.node: Finished
[websocket v1.0.7] Native extension compilation successful!
[email protected] node_modules/websocket
ncpro:lysk_server makensi$ 

Thanks for all your help.

from websocket-node.

stevenshu512 avatar stevenshu512 commented on June 22, 2024

hi buddy, Can you explain what is "global node_modules directory" and how to change it ? thanks a lot!

from websocket-node.

makensi avatar makensi commented on June 22, 2024

Hi,

I thought that it was related with an one update that I did on my node installation with pkg installator. I just remove all modules under:

/usr/local/lib/node_modules

And finally I have reinstalled them; mainly gyp module which was throwing errors every websocket module built.

I hope that it will be useful for you

from websocket-node.

theturtle32 avatar theturtle32 commented on June 22, 2024

Indeed, I have not used the pkg installer for Mac OS X and instead use nvm to install node, as I expect the vast majority of other developers do as well. This is far preferable since it allows you to switch instantly between multiple versions of node to test things.

Before using nvm, I generally used Homebrew or compiled and installed from the node.js source manually, which was also quite easy to do.

from websocket-node.

stevenshu512 avatar stevenshu512 commented on June 22, 2024

Job done! Thanks for your adivse.
The Real thing that created this problem is that websocket make process can not find the offical node.js installation path.

so the officall nod.js install in /usr/local/lib and /usr/local/bin
But using nvm the author mentioned the path way is another. like this :

shao19@mac:~/nvm/V0.8.6/bin > ll
total 19656
-rwxr-xr-x 1 shao19 staff 10053684 9 5 11:08 node
-rwxr-xr-x 1 shao19 staff 355 8 8 02:56 node-waf
lrwxr-xr-x 1 shao19 staff 38 9 5 11:08 npm -> ../lib/node_modules/npm/bin/npm-cli.js

this is the whole different pathway that the websocket makefile can't not find the nod.js header file.so the issue appeared.
And I think we can solve this problem by writing the compatible makefile to adapt the offical installation path.

from websocket-node.

theturtle32 avatar theturtle32 commented on June 22, 2024

I have no idea how that could be, since the Makefile doesn't reference any paths directly at all.

https://github.com/Worlize/WebSocket-Node/blob/0a05f4ede0c2f70381ee6f0e20bcc04aefa467c0/Makefile

from websocket-node.

theturtle32 avatar theturtle32 commented on June 22, 2024

If there is a bug relating to paths, it's a bug in node-gyp, which is responsible for creating all the platform-specific artifacts required to do a native module compilation, not in websocket-node.

from websocket-node.

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.