addon: got 'area.h' not found error while building #7206

Closed
Chilledheart opened this Issue Feb 28, 2014 · 5 comments

Projects

None yet

2 participants

@Chilledheart

I encounter this error while building native addons (with nan), i.e. leveldown@0.10.2

In file included from ../src/batch.cc:2:
In file included from /Users/chilledheart/.node-gyp/HEAD/src/node_buffer.h:26:
In file included from /Users/chilledheart/.node-gyp/HEAD/src/smalloc.h:27:
/Users/chilledheart/.node-gyp/HEAD/src/env.h:25:10: fatal error: 'ares.h' file not found

Details available: https://gist.github.com/Chilledheart/9265161, Similar situation with my ubuntu 12.04, hiredis(with some patches, https://github.com/Chilledheart/hiredis-node).

It didn't appear until recently (this week?). I took a glance last changes of node src to find the reason, but soon I learnt that was beyond my ability.So is there any one to find the problem in the source (or in the Nan)?

PS:
How to reproduce this
1. Grab the HEAD source (I am using 269de79), build and install it
1. Execute npm i leveldown@0.10.2
1. Enjoy
PPS:
Don't forget to set npm's nodedir attribute
npm config set nodedir whatever_the_node_source_dir_is
before install native addons with your pre-version installation of node

@indutny indutny added a commit to indutny/node that referenced this issue Feb 28, 2014
@indutny indutny smalloc: remove `env.h` include
Since `smalloc.h` is included in a `node_buffer.h`, including private
headers in it is strictly prohibited.

fix #7206
740c3a1
@indutny
Node.js Foundation member

Could you please give a try to #7210 ? Should be working fine with it (I hope).

@Chilledheart

Yes, those native addons (i.e. pg, hiredis, and leveldown) work fine with your patch indutny@740c3a1.

@indutny
Node.js Foundation member

Great, thank you!

@indutny indutny added a commit that closed this issue Mar 2, 2014
@indutny indutny smalloc: remove `env.h` include
Since `smalloc.h` is included in a `node_buffer.h`, including private
headers in it is strictly prohibited.

fix #7206
34bf6e4
@indutny indutny closed this in 34bf6e4 Mar 2, 2014
@Chilledheart

Now everything is back to order.
Thank you!

@indutny
Node.js Foundation member

You are welcome!

@tjfontaine tjfontaine added a commit to tjfontaine/node that referenced this issue Mar 4, 2014
@indutny indutny smalloc: remove `env.h` include
Since `smalloc.h` is included in a `node_buffer.h`, including private
headers in it is strictly prohibited.

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