Bug 1255594
| Summary: | FTBFS: Cannot build with v8314-gyp | ||
|---|---|---|---|
| Product: | Red Hat Software Collections | Reporter: | Honza Horak <hhorak> |
| Component: | node-gyp | Assignee: | Zuzana Svetlikova <zsvetlik> |
| Status: | CLOSED ERRATA | QA Contact: | Miroslav HradĂlek <mhradile> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | nodejs010 | CC: | albert, andrew.sharpe.7.9, jkaur, jorton, kanderso, lkuprova, mhradile, zsvetlik |
| Target Milestone: | alpha | ||
| Target Release: | 2.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-05 06:25:36 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1277547 | ||
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 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.
Proposing for 2.2-Z update along with bug 1344158 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 *** Bug 1241519 has been marked as a duplicate of this bug. *** |
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