Bug 1255594 - FTBFS: Cannot build with v8314-gyp
Summary: FTBFS: Cannot build with v8314-gyp
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: node-gyp
Version: nodejs010
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: alpha
: 2.1
Assignee: Zuzana Svetlikova
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
: 1241519 (view as bug list)
Depends On:
Blocks: 1277547
TreeView+ depends on / blocked
 
Reported: 2015-08-21 04:46 UTC by Honza Horak
Modified: 2019-11-14 06:54 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A previous patch to the nodejs010-node-gyp RPM package introduced a bug, which caused the node-gyp module to work incorrectly. As a consequence, users were unable to install or build native Node.js modules. A new patch has been applied, the node-gyp module now works as expected, and it no longer affects other modules
Clone Of:
Environment:
Last Closed: 2016-07-05 06:25:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1380 0 normal SHIPPED_LIVE Moderate: nodejs010-node-gyp and nodejs010-nodejs-qs security and bug fix update 2016-07-05 10:25:12 UTC

Description Honza Horak 2015-08-21 04:46:19 UTC
Description of problem:
after removing nodejs-gyp, the package is trying to build with v8314-gyp, but since configure.js clears PYTHONPATH, the gyp python module is not found.

Version-Release number of selected component (if applicable):
nodejs010-node-gyp-1.0.2-3.el7
nodejs010-node-gyp-1.0.2-3.el6

How reproducible:
everytime

Steps to Reproduce:
1. try to rebuild nodejs010-nodejs-bson package

Actual results:
gyp info spawn argsTraceback (most recent call last):
   '-Goutput_dir=.' ]
  File "/opt/rh/v8314/root/usr/bin/gyp", line 15, in <module>
    import gyp

Expected results:
package builds successfully

Additional info:
found during centos rebuild:
https://cbs.centos.org/koji/taskinfo?taskID=24459

Comment 1 andrew.sharpe.7.9 2015-09-19 06:00:17 UTC
Working around the path issue by commenting the line that overwrites PYTHONPATH in configure.js reveals further issues, such as

gyp: error: no such option: --no-parallel


One workaround is to install a newer version of node-gyp using npm, so it seems we're needing an update to the packaged node-gyp to alleviate this issue.  The PYTHONPATH workaround is not required with the newer node-gyp.

The version of node-gyp I have from RPMs (via software collections) is nodejs010-node-gyp-1.0.2-3.el6.noarch.  The version installed by npm is 3.0.3

Comment 3 ashahugian 2015-12-16 15:52:26 UTC
I am hitting the same issue with nodejs010-2.1-3.el6.x86_64 and nodejs010-node-gyp-1.0.2-3.el6.noarch.

The original node-gyp comes with bundled gyp inside it; which is expected to be located in node-gyp/gyp/pylib and the config.js file overrides the PYTHONPATH. When the RPM provided gyp wrapper is called it takes no measures to readjust the PYTHONPATH and the RPM provided node-gyp doesn't have gyp/pylib directory at all; resulting in errors.

The simplest workaround that I have found is to edit /opt/rh/v8314/root/usr/bin/gyp and add line right after the import sys:

sys.path.append("/opt/rh/v8314/root/usr/lib/python2.6/site-packages")

The above path is where the RPM supplied gyp is located which completely fixes the issue.

Without this fix npm install for any packages that have addons is effectively broken.

Comment 5 Joe Orton 2016-06-14 09:53:45 UTC
Proposing for 2.2-Z update along with bug 1344158

Comment 9 errata-xmlrpc 2016-07-05 06:25:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2016:1380

Comment 10 Zuzana Svetlikova 2016-07-13 07:48:23 UTC
*** Bug 1241519 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.