Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348609 - net-libs/nodejs should not use an internal version of dev-lang/v8 libraries
Summary: net-libs/nodejs should not use an internal version of dev-lang/v8 libraries
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-13 12:40 UTC by redneb
Modified: 2011-01-06 10:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build failure with --shared-v8 (net-libs:nodejs-0.3.1:20110105-162849.log,52.55 KB, text/plain)
2011-01-05 17:08 UTC, Paweł Hajdan, Jr. (RETIRED)
Details
experimental v8 patch (v8-nodejs-compat-r0.patch,705 bytes, text/plain)
2011-01-05 17:11 UTC, Paweł Hajdan, Jr. (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description redneb 2010-12-13 12:40:55 UTC
The nodejs distribution includes the v8 engine so you don't need v8 to be installed separately. If net-libs/nodejs is emerged with --nodeps it seems to work just fine. Is there any other reason why dev-lang/v8 is pulled in as a dependency?

Reproducible: Always

Steps to Reproduce:
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-14 16:31:18 UTC
Because Gentoo policy says that packages bringing their own copies of software available elsewhere are behaving badly - if you have v8 already installed, then nodejs shouldn't install or use its own copy. If you have some evidence that nodejs uses its own copy /despite/ dev-lang/v8 being installed, then please reopen this bug report.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-14 16:32:19 UTC
For more information, see [1].


[1] https://bugs.gentoo.org/buglist.cgi?quicksearch=ALL+internal+copy
Comment 3 redneb 2010-12-14 18:32:56 UTC
I emerged net-libs/nodejs-0.2.5 and it pulled in dev-lang/v8-2.4.9.14. But, node -e 'process.versions.v8' returns "2.3.8" not 2.4.9.14. Furthermore, according to ldd, /usr/bin/node does not use /usr/lib/libv8.so*. Finally, as I mentioned above, removing dev-lang/v8-2.4.9.14 does not seem to affect node.

In order to use the system v8, node must be configured with "--shared-v8". It would also be nice if there was a USE flag controlling whether "--shared-v8" is set or not. Of course the default could be to use the system v8 as per gentoo's policies.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-15 01:10:31 UTC
CC'ing dev-lang/v8 maintainers for good measure.
Comment 5 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-01-05 17:08:58 UTC
Created attachment 258951 [details]
build failure with --shared-v8

It's not trivial, because the build fails with shared v8.
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-01-05 17:10:31 UTC
However, the root cause of the problem seems to be on v8 side (those "missing symbols" aren't exported). nodejs internally builds with visibility=default (vs. visibility=hidden), but I think we can do better than that. I'm going to consult upstream before making the changes in our tree though.
Comment 7 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-01-05 17:11:00 UTC
Created attachment 258953 [details]
experimental v8 patch
Comment 8 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-01-05 17:18:25 UTC
Discussion with upstream: http://groups.google.com/group/v8-users/browse_thread/thread/8be60b3c1c887b4c
Comment 9 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-01-06 10:14:43 UTC
Should be fixed in nodejs-0.3.1-r1, and the patch has already been applied upstream. Thank you for the report.