Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541656 - >=net-libs/nodejs-0.11.12: build failure on prefix
Summary: >=net-libs/nodejs-0.11.12: build failure on prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Johan Bergström
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-28 14:42 UTC by Michael Schubert
Modified: 2015-05-14 03:47 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Schubert 2015-02-28 14:42:31 UTC
This is related to https://bugs.gentoo.org/show_bug.cgi?id=462703

I observe the exact opposite behaviour of the above bug on my prefix system using nodejs-0.12.0 or 0.11.5: the path to the python install script needs to be "${ED}", not "${D}" in order for nodejs to not install outside "${EPREFIX}" (instead of double prefix):


--- nodejs-0.12.0.ebuild.orig   2015-02-28 14:13:41.741287868 +0000
+++ nodejs-0.12.0.ebuild        2015-02-28 13:26:43.759516513 +0000
@@ -79,7 +79,7 @@ src_compile() {
 }
 
 src_install() {
-       "${PYTHON}" tools/install.py install "${D}" /usr
+       "${PYTHON}" tools/install.py install "${ED}" /usr
 
        use npm && dohtml -r "${ED}"/usr/lib/node_modules/npm/html/*
        rm -rf "${ED}"/usr/lib/node_modules/npm/doc "${ED}"/usr/lib/node_modules/npm/html


I tested versions <0.11 and >=0.11. In short: use "{D}" for <nodejs-0.11 and "${ED}" for >=nodejs-0.11.
Comment 1 Michael Schubert 2015-03-02 22:25:16 UTC
To elaborate (should have put this better), I tested the following versions:

0.10.36 - success with ${D}, failure with ${ED}
0.11.12 - failure with ${D}, success with ${ED}
0.11.15 - failure with ${D}, success with ${ED}
0.12.0 - failure with ${D}, success with ${ED}
Comment 2 Johan Bergström 2015-03-02 22:26:26 UTC
This is crazy :) 

Anyway, since I can't really verify I'll take your word for it. Patrick?

Also; 0.11.x should be removed asap in favour of 0.12.
Comment 3 Michael Schubert 2015-04-09 09:31:26 UTC
0.12.1 - failure with ${D}, success with ${ED}
0.12.2 - failure with ${D}, success with ${ED}
Comment 4 Johan Bergström 2015-05-11 01:53:19 UTC
Please give this a go: https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/118
Comment 5 Michael Schubert 2015-05-11 11:57:24 UTC
compiling works, installation gives the following error:

>>> Install nodejs-0.12.2-r2 into /dev/shm/portage/net-libs/nodejs-0.12.2-r2/image/ category net-libs
[...]
ln -fs out/Release/node node
${prefix}/usr/bin/python2.7 tools/install.py install '/dev/shm/portage/net-libs/nodejs-0.12.2-r2/image/${prefix}' '${prefix}/usr'
install: cannot stat '/dev/shm/portage/net-libs/nodejs-0.12.2-r2/image/${prefix}/usr/lib/node_modules/npm/html': No such file or directory

The issue here is that usr/lib/node_modules/npm is installed into a double ${prefix}.
Comment 6 Johan Bergström 2015-05-11 21:44:19 UTC
Michael, thanks for your feedback. Do you have any suggestions as how to remedy this since I don't have a prefix setup?
Comment 7 Michael Schubert 2015-05-12 12:26:53 UTC
change line:

emake install DESTDIR="${ED}"


to:

emake install DESTDIR="${ED}" PREFIX=/usr
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-05-14 03:45:47 UTC
This should be fixed since 0.12.2-r2.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-05-14 03:47:12 UTC
Sorry, -r3 here.