Skip to content
This repository was archived by the owner on Jun 18, 2021. It is now read-only.
This repository was archived by the owner on Jun 18, 2021. It is now read-only.

Compilation error on x64 Linux with Node v6.9.1, gcc 4.8.5 #4

Closed

Description

@richardlau
-bash-4.2$ npm install

> nodereport@0.1.0 install /home/users/riclau/sandbox/github/nodereport
> node-gyp rebuild

make: Entering directory `/home/users/riclau/sandbox/github/nodereport/build'
make: Warning: File `nodereport.target.mk' has modification time 914 s in the future
  CXX(target) Release/obj.target/nodereport/src/node_report.o
../src/node_report.cc: In function âvoid nodereport::PrintSystemInformation(FILE*, v8::Isolate*)â:
../src/node_report.cc:765:27: error: expected â)â before âPRIu64â
         fprintf(fp, "%16" PRIu64, limit.rlim_cur);
                           ^
../src/node_report.cc:765:49: warning: conversion lacks type at end of format [-Wformat=]
         fprintf(fp, "%16" PRIu64, limit.rlim_cur);
                                                 ^
../src/node_report.cc:765:49: warning: too many arguments for format [-Wformat-extra-args]
../src/node_report.cc:770:27: error: expected â)â before âPRIu64â
         fprintf(fp, "%16" PRIu64 "\n", limit.rlim_max);
                           ^
../src/node_report.cc:770:54: warning: conversion lacks type at end of format [-Wformat=]
         fprintf(fp, "%16" PRIu64 "\n", limit.rlim_max);
                                                      ^
../src/node_report.cc:770:54: warning: too many arguments for format [-Wformat-extra-args]
make: *** [Release/obj.target/nodereport/src/node_report.o] Error 1
make: Leaving directory `/home/users/riclau/sandbox/github/nodereport/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/dev/shm/usenode.riclau/node-v6.9.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.10.0-327.18.2.el7.x86_64
gyp ERR! command "/dev/shm/usenode.riclau/node-v6.9.1-linux-x64/bin/node" "/dev/shm/usenode.riclau/node-v6.9.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/users/riclau/sandbox/github/nodereport
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

npm ERR! Linux 3.10.0-327.18.2.el7.x86_64
npm ERR! argv "/dev/shm/usenode.riclau/node-v6.9.1-linux-x64/bin/node" "/dev/shm/usenode.riclau/node-v6.9.1-linux-x64/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! nodereport@0.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodereport@0.1.0 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodereport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs nodereport
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls nodereport
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/users/riclau/sandbox/github/nodereport/npm-debug.log
-bash-4.2$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-bash-4.2$

Activity

  1. rnchamberlain commented on Oct 27, 2016

    @rnchamberlain
    Contributor

    Looks like some glibc implementations need __STDC_FORMAT_MACROS defined for the macros in inttypes.h to be available.

    Test fix for @richardlau available here:
    npm install rnchamberlain/nodereport#stdc_format_macros

  2. richardlau commented on Oct 27, 2016

    @richardlau
    MemberAuthor

    @rnchamberlain test fix looks good -- Compilation is successful. npm test is failing (on test 3) but that's probably a separate issue.

  3. rnchamberlain commented on Oct 28, 2016

    @rnchamberlain
    Contributor

    Thanks @richardlau, PR raised for the fix.

    Re the test failure, can you try running the tests using:
    node node_modules/nodereport/test/autorun.js --save_log
    That should save a nodereport_test.log file in the current directory with more info on the failing test. Yes probably needs a separate issue, cheers.

  4. sam-github commented on Oct 28, 2016

    @sam-github
    Contributor

    @rnchamberlain any reason npm test doesn't always specify --save_log? Its not big, and its test ephemeral output anyhow, so it wouldn't matter if it was large.

  5. rnchamberlain commented on Oct 28, 2016

    @rnchamberlain
    Contributor

    @sam-github so I thought we'd provide the tests in the published npm, and I didn't want 'npm test' to leave any files lying around. Now you've convinced me the tests should only be in the git repo I agree that flag can be always on. That's assuming that a CI or whatever would cleanup for us, if/when the tests are run in a CI.

  6. sam-github commented on Oct 28, 2016

    @sam-github
    Contributor

    I see your reasoning. Its OK, tests are allowed to touch the file system.

    And CI better clean up! Before npm test can be run, it has to do npm install, which creates lots of files (node_modules/nan, for example) that aren't in git, or in the npm package.

  7. richardlau commented on Oct 28, 2016

    @richardlau
    MemberAuthor

    @rnchamberlain Thanks. I've raised #12 for the test failure.

    btw arguments can be passed through from npm to the test script, e.g.
    npm test -- --save_log

  8. richardlau commented on Nov 1, 2016

    @richardlau
    MemberAuthor

    Fixed by #9. Will close when that change is published to npm.

  9. rnchamberlain commented on Nov 10, 2016

    @rnchamberlain
    Contributor

    published in npm - nodereport 1.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions