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

Error building nodereport #55

Closed
curtisr7 opened this issue Feb 7, 2017 · 16 comments
Closed

Error building nodereport #55

curtisr7 opened this issue Feb 7, 2017 · 16 comments
Labels

Comments

@curtisr7
Copy link

curtisr7 commented Feb 7, 2017

While running npm install against appmetrics-dash I'm getting an error [1] while building nodereport. appmetrics depends on https://github.com/hhellyer/nodereport.git#stream_output_dev

$ uname -a
Darwin rickmbp 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64

[1]

$ npm install
-
> nodereport@1.0.7 install /code/appmetrics-dash/node_modules/nodereport
> node-gyp rebuild

  CXX(target) Release/obj.target/api/src/node_report.o
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
make: *** [Release/obj.target/api/src/node_report.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 16.3.0
gyp ERR! command "/usr/local/Cellar/node/4.1.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /code/appmetrics-dash/node_modules/nodereport
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok 
npm WARN optional dep failed, continuing nodereport@1.0.7
@curtisr7
Copy link
Author

curtisr7 commented Feb 7, 2017

/cc @sam-github

@hhellyer
Copy link
Contributor

hhellyer commented Feb 8, 2017

This is probably related to issue #22 and it's fix in PR #31
What version of MacOS are you running? I'm on 10.12.3 which should be up to date. The uname -a output doesn't quite map onto the output from clang.

@richardlau
Copy link
Member

This is probably because the deployment target is set as 10.5 in Node.js v4.x: https://github.com/nodejs/node/blob/v4.x/common.gypi#L355

@richardlau
Copy link
Member

@richardlau richardlau added the bug label Feb 8, 2017
@hhellyer
Copy link
Contributor

hhellyer commented Feb 8, 2017

Ok, so the problem seems to be the change from https://github.com/nodejs/node-report/pull/31/files
Is it possible to make that conditional on the level of node (I assume we still want to build on node 4!) or should we revert it and go back to the compiler warning?

@curtisr7
Copy link
Author

curtisr7 commented Feb 8, 2017

What version of MacOS are you running?

10.12.2

@hhellyer
Copy link
Contributor

hhellyer commented Feb 8, 2017

@curtisr7 That makes sense, it looks like you should only see this if you are installing into Node 4. Have you tried with Node 6?

We might need to revisit the fix for #22.

@curtisr7
Copy link
Author

curtisr7 commented Feb 8, 2017

Have you tried with Node 6?

Node 6 works

@hhellyer
Copy link
Contributor

hhellyer commented Feb 8, 2017

I've pushed a fix, you can test it with:
npm install hhellyer/node-report#mac_node4_fix
if you want to. (It did pass CI runs on Node v4 and Node v6.)

@curtisr7
Copy link
Author

curtisr7 commented Feb 8, 2017

That won't work for me as we're using hhellyer/node-report.git#stream_output_dev

@hhellyer
Copy link
Contributor

hhellyer commented Feb 8, 2017

I could merge it onto that, the merge request for those changes is going from stream_output not my _dev branch. Let me check it won't break anyone else.

@curtisr7
Copy link
Author

curtisr7 commented Feb 8, 2017

/cc @sam-github

@rnchamberlain
Copy link
Contributor

rnchamberlain commented Feb 9, 2017

A fix for the clang: error: invalid deployment target problem has now landed in nodejs/node-report master, see #56, and is published as https://www.npmjs.com/package/node-report, v2.0.0. Thanks to @hhellyer and @richardlau

Plan is to land and publish the getReport API enhancement #48 tomorrow so appmetrics can switch their dependency from the hhellyer branch, and get the build fix as well as the new API.

@rnchamberlain
Copy link
Contributor

getReport() API enhancement #48 now released as npm https://www.npmjs.com/package/node-report v2.1.0

@rnchamberlain
Copy link
Contributor

@curtisr7 npm install https://github.com/RuntimeTools/appmetrics-dash on MacOS with Node 4 works now for me, it pulls in node-report@2.1.1.

OK to close this? thanks

@curtisr7
Copy link
Author

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants