Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Problem with installation #5

Closed
baio opened this issue Sep 12, 2011 · 14 comments
Closed

Problem with installation #5

baio opened this issue Sep 12, 2011 · 14 comments

Comments

@baio
Copy link

baio commented Sep 12, 2011

Hi! I've installed jsdom but it seems not working, actually something wrong with contextify.

Ubuntu 10.10
node v0.5.5

when use npm

baio@ubuntu:~$ npm install jsdom

[email protected] preinstall /home/baio/node_modules/jsdom/node_modules/contextify
node-waf clean || true; node-waf configure build

Nothing to clean (project not configured)
Setting srcdir to : /home/baio/node_modules/jsdom/node_modules/contextify
Setting blddir to : /home/baio/node_modules/jsdom/node_modules/contextify/build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /home/baio/local/node
'configure' finished successfully (0.047s)
Waf: Entering directory /home/baio/node_modules/jsdom/node_modules/contextify/build' [1/2] cxx: src/contextify.cc -> build/Release/src/contextify_1.o [2/2] cxx_link: build/Release/src/contextify_1.o -> build/Release/contextify.node Waf: Leaving directory/home/baio/node_modules/jsdom/node_modules/contextify/build'
'build' finished successfully (0.443s)
[email protected] ./node_modules/jsdom
├── [email protected]
├── [email protected]
└── [email protected]

====ERROR WHEN RUN APP

^
Error: /home/baio/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node: undefined symbol: ev_default_loop_ptr
at Object..node (module.js:395:11)
at Module.load (module.js:315:31)

By git

baio@ubuntu:$ git clone http://github.com/tmpvar/jsdom.git
Cloning into jsdom...
remote: Counting objects: 11234, done.
remote: Compressing objects: 100% (3703/3703), done.
remote: Total 11234 (delta 7229), reused 11000 (delta 7022)
Receiving objects: 100% (11234/11234), 4.71 MiB | 1.07 MiB/s, done.
Resolving deltas: 100% (7229/7229), done.
baio@ubuntu:
$ cd jsdom
baio@ubuntu:~/jsdom$ npm link

[email protected] preinstall /home/baio/jsdom/node_modules/contextify
node-waf clean || true; node-waf configure build

Nothing to clean (project not configured)
Setting srcdir to : /home/baio/jsdom/node_modules/contextify
Setting blddir to : /home/baio/jsdom/node_modules/contextify/build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /home/baio/local/node
'configure' finished successfully (0.051s)
Waf: Entering directory /home/baio/jsdom/node_modules/contextify/build' [1/2] cxx: src/contextify.cc -> build/Release/src/contextify_1.o [2/2] cxx_link: build/Release/src/contextify_1.o -> build/Release/contextify.node Waf: Leaving directory/home/baio/jsdom/node_modules/contextify/build'
'build' finished successfully (0.445s)
[email protected] ./node_modules/request
[email protected] ./node_modules/console.log
[email protected] ./node_modules/cssom
[email protected] ./node_modules/htmlparser
[email protected] ./node_modules/nodeunit
[email protected] ./node_modules/contextify
[email protected] ./node_modules/optimist
└── [email protected]
../local/node/lib/node_modules/jsdom -> /home/baio/jsdom

====ERROR WHEN RUN APP

^
Error: Cannot find module 'jsdom'
at Function._resolveFilename (module.js:299:11)
at Function._load (module.js:245:25)

baio@ubuntu:~$ which node
/home/baio/local/node/bin/node

And I made this also :
Internal Contextify ERROR: Make sure Contextify is built with your current Node version.
To rebuild, go to the Contextify root folder and run 'node-waf distclean && node-waf configure build'.

cd node_modules/jsdom/node_modules/contextify
node-waf distclean
node-waf configure build

Contextify test also ok.

baio@ubuntu:~/node_modules/jsdom/node_modules/contextify$ nodeunit test/

contextify
...
OK: 92 assertions (79ms)

What problem could be here?
Thanks.

@brianmcd
Copy link
Owner

Error: /home/baio/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node: undefined symbol: ev_default_loop_ptr
at Object..node (module.js:395:11)
at Module.load (module.js:315:31)

That's from installing/building contextify on a different version of node than you're trying to run it on (like the error you got later on says).


Error: Cannot find module 'jsdom'
at Function._resolveFilename (module.js:299:11)
at Function._load (module.js:245:25)

If you're in the jsdom folder and trying to include jsdom, you'd want to do:

var jsdom = require('./lib/jsdom'), not require('jsdom').

Contextify test also ok.

baio@ubuntu:~/node_modules/jsdom/node_modules/contextify$ nodeunit test/

contextify
...
OK: 92 assertions (79ms)

Seems like contextify is working. I think this is an issue with the setup on your end.

@baio
Copy link
Author

baio commented Sep 14, 2011

Is the contextify 0.0.5 compatible with nodejs 0.5.5?

@brianmcd
Copy link
Owner

Yep, should work fine on 0.5.5.

@baio
Copy link
Author

baio commented Sep 15, 2011

Strange, I've dowungraded to node 0.4.11 this time all installed as expected and works sleek.

@baio
Copy link
Author

baio commented Jan 22, 2012

RRRGGGGHHH The same issue with node 0.6.8! 2 hours in row withou any result!

@brianmcd
Copy link
Owner

I just tested on node 0.6.8 and Contextify builds and passes all of the tests for me. You need to rebuild the binary if you change node versions. What issue are you seeing specifically?

@baio
Copy link
Author

baio commented Jan 22, 2012

Yep! I also build it and test it and all work fine. But when I trying to use it in node app always same issue. Error: /home/baio/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node: undefined symbol: ev_default_loop_ptr

I suppose there is some problem while module is building and linking, any guesses?

@brianmcd
Copy link
Owner

Did you rebuild the Contextify version in /home/baio/node_modules/jsdom/node_modules/contextify/? Go in there and do node-waf distclean && node-waf configure build, then run the tests to make sure everything is good, and then I think it should work. My best guess as to what's going on is that maybe you're rebuilding a different Contextify installation, not the one in jsdom's node_modules folder.

@baio
Copy link
Author

baio commented Jan 23, 2012

Actually I check it thoroughly that I rebuild necessary contextify version, even in require path I include absolute path such as
require("/home/baio/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node")

After node-waf distclean && node-waf configure build, I run tests (all ok) and then launching my node app, error persists -
Error: /home/baio/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node: undefined symbol: ev_default_loop_ptr
at Object..node (module.js:395:11)
at Module.load (module.js:315:31)

@brianmcd
Copy link
Owner

One thing is you don't want to require the .node file directly, you want to require either the contextify directory or contextify/lib/contextify, although I don't think that would cause the issue you're seeing.

@baio
Copy link
Author

baio commented Jan 23, 2012

thanks will try at home

@baio
Copy link
Author

baio commented Jan 23, 2012

neither work. ok will try capital repair - reinstall ubuntu, hehe.

@brianmcd
Copy link
Owner

If that doesn't fix your issue, please send me an e-mail and we can chat over IRC and try to figure it out.

@baio
Copy link
Author

baio commented Jan 23, 2012

Ok it's helped! Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants