This repository was archived by the owner on Jun 18, 2021. It is now read-only.
Repository navigation
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
Copy link
Copy link
Closed
Description
-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$
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
rnchamberlain commentedon Oct 27, 2016
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_macrosrichardlau commentedon Oct 27, 2016
@rnchamberlain test fix looks good -- Compilation is successful.
npm testis failing (on test 3) but that's probably a separate issue.rnchamberlain commentedon Oct 28, 2016
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_logThat 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.
sam-github commentedon Oct 28, 2016
@rnchamberlain any reason
npm testdoesn't always specify--save_log? Its not big, and its test ephemeral output anyhow, so it wouldn't matter if it was large.rnchamberlain commentedon Oct 28, 2016
@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.
sam-github commentedon Oct 28, 2016
I see your reasoning. Its OK, tests are allowed to touch the file system.
And CI better clean up! Before
npm testcan be run, it has to donpm install, which creates lots of files (node_modules/nan, for example) that aren't in git, or in the npm package.richardlau commentedon Oct 28, 2016
@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_logrichardlau commentedon Nov 1, 2016
Fixed by #9. Will close when that change is published to npm.
rnchamberlain commentedon Nov 10, 2016
published in npm - nodereport 1.0.5