Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.js v4.1.0 rpm build fail: "IOError: [Errno 2] No such file or directory: 'deps/npm/node_modules/.bin/node-gyp'" #2839

Closed
ghost opened this issue Sep 12, 2015 · 6 comments
Labels
install Issues and PRs related to the installers. npm Issues and PRs related to the npm client dependency or the npm registry.

Comments

@ghost
Copy link

ghost commented Sep 12, 2015

git clone -b v4.1.0 ./io.js io.js-build
cd io.js-build
git log | head
    commit b4ec2c2ab8fa53fb6e8192eed0965732d56a9160
    Author: Jeremiah Senkpiel <fishrock123@rocketmail.com>
    Date:   Tue Sep 15 16:47:47 2015 -0400

        2015-09-17, Version 4.1.0 (Stable) Release

        Notable changes:

        * buffer:
          - Buffers are now created in JavaScript, rather than C++. This increases the speed of buffer creation (Trevor Norris) https://github.com/nodejs/node/pull/2866.

    ./configure --prefix=/usr/local/iojs4 --dest-cpu=x64 --dest-os=linux
    rpmdev-setuptree
    sh -x tools/rpm/rpmbuild.sh
    ...
    installing /root/rpmbuild/BUILDROOT/node-4.1.0-1.x86_64/usr/lib/node_modules/npm/node_modules/.bin/node-gyp
    Traceback (most recent call last):
      File "tools/install.py", line 213, in <module>
        run(sys.argv[:])
      File "tools/install.py", line 207, in run
        if cmd == 'install': return files(install)
      File "tools/install.py", line 148, in files
        if 'true' == variables.get('node_install_npm'): npm_files(action)
      File "tools/install.py", line 100, in npm_files
        action(paths, target_path + dirname[9:] + '/')
      File "tools/install.py", line 79, in install
        def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
      File "tools/install.py", line 79, in <lambda>
        def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
      File "tools/install.py", line 71, in try_copy
        return shutil.copy2(source_path, target_path)
      File "/usr/lib64/python2.7/shutil.py", line 130, in copy2
        copyfile(src, dst)
      File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile
        with open(src, 'rb') as fsrc:
    IOError: [Errno 2] No such file or directory: 'deps/npm/node_modules/.bin/node-gyp'
    Makefile:63: recipe for target 'install' failed
    make: *** [install] Error 1
    error: Bad exit status from /var/tmp/rpm-tmp.ifsdaG (%install)


    RPM build errors:
        Bad exit status from /var/tmp/rpm-tmp.ifsdaG (%install)

ls -al deps/npm/node_modules/.bin/node-gyp 
    lrwxrwxrwx 1 root root 27 Sep 12 10:05 deps/npm/node_modules/.bin/node-gyp -> ../node-gyp/bin/node-gyp.js*
@ghost ghost changed the title il.js v4.0.0 rpm build fail: "IOError: [Errno 2] No such file or directory: 'deps/npm/node_modules/.bin/node-gyp'" io.js v4.0.0 rpm build fail: "IOError: [Errno 2] No such file or directory: 'deps/npm/node_modules/.bin/node-gyp'" Sep 12, 2015
@bnoordhuis
Copy link
Member

/cc @othiym23 - deps/npm/node_modules/.bin/node-gyp was added in commit e79ccee but I can't tell if that was intentional or an oversight.

@bnoordhuis bnoordhuis added install Issues and PRs related to the installers. npm Issues and PRs related to the npm client dependency or the npm registry. labels Sep 12, 2015
@rvagg
Copy link
Member

rvagg commented Sep 13, 2015

if we don't want the node-gyp symlink in the repo then perhaps we should be putting it in .gitignore?

@ghost ghost changed the title io.js v4.0.0 rpm build fail: "IOError: [Errno 2] No such file or directory: 'deps/npm/node_modules/.bin/node-gyp'" io.js v4.1.0 rpm build fail: "IOError: [Errno 2] No such file or directory: 'deps/npm/node_modules/.bin/node-gyp'" Sep 17, 2015
@ghost
Copy link
Author

ghost commented Sep 21, 2015

build of release v3.3.1 now exhibits the same FAIL as reported with 4.0.0 & 4.1.0.

...
IOError: [Errno 2] No such file or directory: 'deps/npm/node_modules/.bin/node-gyp'
Makefile:63: recipe for target 'install' failed


make: *** [install] Error 1

build v.3.3.0, still completes without error.

@bnoordhuis
Copy link
Member

What happens when we git rm -fr deps/npm/node_modules/.bin and add it to the top-level .gitignore? I think npm doesn't actually need the .bin directory and a quick local test seems to confirm that.

@ghost
Copy link
Author

ghost commented Sep 22, 2015

@bnoordhuis

This builds OK (not sure what to make of the pcregrep warnings ...)

cd io.js-build
    commit b4ec2c2ab8fa53fb6e8192eed0965732d56a9160
    Author: Jeremiah Senkpiel <fishrock123@rocketmail.com>
    Date:   Tue Sep 15 16:47:47 2015 -0400

        2015-09-17, Version 4.1.0 (Stable) Release

        Notable changes:

        * buffer:
          - Buffers are now created in JavaScript, rather than C++. This increases the speed of buffer creation (Trevor Norris) https://github.com/nodejs/node/pull/2866.

git rm -fr deps/npm/node_modules/.bin
echo "deps/npm/node_modules/.bin" > .gitignore

./configure ...
patch -p0 < ../iojs-openssl-rpath.patch
rpmdev-setuptree
sh -x tools/rpm/rpmbuild.sh
    ...
    pcregrep: check the --buffer-size option
    pcregrep: line 30 of file /root/rpmbuild/BUILDROOT/node-4.1.0-1.x86_64/usr/lib/node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js is too long for the internal buffer
    ...
    pcregrep: check the --buffer-size option
    pcregrep: line 96 of file /root/rpmbuild/BUILDROOT/node-4.1.0-1.x86_64/usr/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js is too long for the internal buffer
    ...
    Wrote: /root/rpmbuild/SRPMS/node-4.1.0-1.src.rpm
    Wrote: /root/rpmbuild/RPMS/x86_64/node-4.1.0-1.x86_64.rpm
    Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.QXTYSJ
    + umask 022
    + cd /root/rpmbuild/BUILD
    + cd node-4.1.0
    + /usr/bin/rm -rf /root/rpmbuild/BUILDROOT/node-4.1.0-1.x86_64
    + rm -rf filelists

rpm -Uvh /root/rpmbuild/RPMS/x86_64/node-4.1.0-1.x86_64.rpm
...
node -v && npm -v && node-gyp -v
    v4.1.0
    3.3.4
    v3.0.3

@bnoordhuis
Copy link
Member

#3004

bnoordhuis added a commit to bnoordhuis/io.js that referenced this issue Sep 24, 2015
The .bin/ directory in deps/npm/node_modules seens to have been an
accidental check-in in commit e79ccee ("npm: upgrade to v2.1.18").
It causes trouble for distro packagers so delete it and blacklist it.

Fixes: nodejs#2839
PR-URL: nodejs#3004
Reviewed-By: Kat Marchán <kzm@sykosomatic.org>
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
bnoordhuis added a commit that referenced this issue Sep 25, 2015
The .bin/ directory in deps/npm/node_modules seens to have been an
accidental check-in in commit e79ccee ("npm: upgrade to v2.1.18").
It causes trouble for distro packagers so delete it and blacklist it.

Fixes: #2839
PR-URL: #3004
Reviewed-By: Kat Marchán <kzm@sykosomatic.org>
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install Issues and PRs related to the installers. npm Issues and PRs related to the npm client dependency or the npm registry.
Projects
None yet
Development

No branches or pull requests

2 participants