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

core.h not found #20921

Closed
jdalton opened this issue May 24, 2018 · 27 comments
Closed

core.h not found #20921

jdalton opened this issue May 24, 2018 · 27 comments

Comments

@jdalton
Copy link
Member

jdalton commented May 24, 2018

I noticed using Node 10.2.0 that the sleep package now fails to build with the following error
(it didn't fail with 10.1.0):

In file included from ../src/LoopChecker.cpp:5:
In file included from ../src/LoopChecker.hpp:3:
In file included from ../../../nan/nan.h:51:
/Users/jdalton/.node-gyp/10.2.0/include/node/node.h:53:10: fatal error: 'core.h' file not found
#include "core.h"  // NOLINT(build/include_order)
         ^~~~~~~~
1 error generated.
1 error generated.
1 error generated.
make: *** [Release/obj.target/native_metrics/src/RUsageMeter.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Release/obj.target/native_metrics/src/GCBinder.o] Error 1
make: *** [Release/obj.target/native_metrics/src/native_metrics.o] Error 1
1 error generated.
make: *** [Release/obj.target/native_metrics/src/LoopChecker.o] Error 1

The problem line appears to be

#include "core.h" // NOLINT(build/include_order)

@mscdex
Copy link
Contributor

mscdex commented May 24, 2018

My guess is that header isn't included in the headers tarball that node-gyp downloads.

@jdalton
Copy link
Member Author

jdalton commented May 24, 2018

More info: The Node core core.h reference was added as part of this commit 9349e15.

@richardlau
Copy link
Member

richardlau commented May 24, 2018

My guess is that header isn't included in the headers tarball that node-gyp downloads.

They (#20789 added others) aren't:

node/tools/install.py

Lines 161 to 192 in 5cbb905

def headers(action):
action([
'common.gypi',
'config.gypi',
'src/node.h',
'src/node_api.h',
'src/node_api_types.h',
'src/node_buffer.h',
'src/node_object_wrap.h',
'src/node_version.h',
], 'include/node/')
# Add the expfile that is created on AIX
if sys.platform.startswith('aix'):
action(['out/Release/node.exp'], 'include/node/')
subdir_files('deps/v8/include', 'include/node/', action)
if 'false' == variables.get('node_shared_libuv'):
subdir_files('deps/uv/include', 'include/node/', action)
if 'true' == variables.get('node_use_openssl') and \
'false' == variables.get('node_shared_openssl'):
subdir_files('deps/openssl/openssl/include/openssl', 'include/node/openssl/', action)
subdir_files('deps/openssl/config/archs', 'include/node/openssl/archs', action)
subdir_files('deps/openssl/config', 'include/node/openssl', action)
if 'false' == variables.get('node_shared_zlib'):
action([
'deps/zlib/zconf.h',
'deps/zlib/zlib.h',
], 'include/node/')

I'm not sure if the correct fix is to add them to the install script, or take them out of node.h and move them to node_internals.h.

@mscdex
Copy link
Contributor

mscdex commented May 24, 2018

I'm not sure if the correct fix is to add them to the install script, or take them out of node.h and move them to node_internals.h.

Probably the latter.

@underdarkskies
Copy link

pretty big bug! pls fix asap

@jasnell
Copy link
Member

jasnell commented May 24, 2018

Likely best to move the core.h reference to node_internals.h.

@jasnell
Copy link
Member

jasnell commented May 24, 2018

Actually, I take that back... fixing the install.py is likely the better choice. Investigating now.

@jasnell
Copy link
Member

jasnell commented May 24, 2018

Fix in #20925 ... once that lands a new 10.2.1 release needs to be spun up.

@lokus1980
Copy link

lokus1980 commented May 24, 2018

My npm rebuild node-sass fails in production today and cannot go live with the next version promised for today :(

@amno1
Copy link

amno1 commented May 24, 2018

Just updated to node 10.2 and have same issue with missing core.h header.

@lokus1980
Copy link

I have now updated node-sass in my project and everything started working again. Or maybe in the meantime, someone changed the version of Node on Heroku.

@amno1
Copy link

amno1 commented May 24, 2018

I just copied manually from git rep core.h into ~/node-gyp/10.2.0/include/node/, and then I also had to copy callback_scope.h and exceptions.h.

However after I did that, I got again error with include macro NODE_MODULE_X

(node::addon_register_func) (regfunc),

and my c++ module still fails to compile.

@amno1
Copy link

amno1 commented May 24, 2018

Hmm, I was able to compile with clang, but compilation with gcc fails. Everything else on my system compiles just fine with gcc :-(

@jasnell
Copy link
Member

jasnell commented May 24, 2018

Note: fix has been identified and is in review. We will be verifying the fix and if it doesn't work we can revert the commit that's at fault and revisit that change. Either one should land today and an updated release will be coming out quickly.

@richardlau
Copy link
Member

This was fixed by #20939 and released in 10.2.1.

@kingjerod
Copy link

When does a new docker image get made for 10.2.1?

@richardlau
Copy link
Member

@kingjerod I guess it's on it's way? nodejs/docker-node#759

@idibidiart
Copy link

hey good work guys but how could NodeJS be released without running basic tests to build popular native modules? how? explain!

@jasnell
Copy link
Member

jasnell commented May 25, 2018

Our regular ci runs do not currently include adequate coverage of native modules built using the tarball. We've got an issue open to fix that and we always welcome pull requests that help.

@kigawas
Copy link

kigawas commented May 25, 2018

Our CI also got brought down by this bug....Plz fix it asap 🙏

@jasnell
Copy link
Member

jasnell commented May 25, 2018

Already fixed. Already released.

@kingjerod
Copy link

Hmm not showing up here and my CI keeps grabbing 10.2.0

https://hub.docker.com/_/node/

@jasnell
Copy link
Member

jasnell commented May 25, 2018 via email

@Flarna
Copy link
Member

Flarna commented May 25, 2018

PR for official image is still open: docker-library/official-images#4394
I noticed that even after a merge there it takes some extra time till image is really available.

@moisadoru
Copy link

Here's the workaround I use until the fixed version will be available:

https://gist.github.com/moisadoru/3c894abf13474f48b5c3ce4d84a64e4e

jmcarp added a commit to cloud-gov/cg-site that referenced this issue May 25, 2018
jmcarp added a commit to cloud-gov/cg-site that referenced this issue May 25, 2018
@pciavald
Copy link

pciavald commented Jun 1, 2018

I've installed node 10.2.1 to fix the core.h issue with zeromq, but i'm running into this problem :

╭─pciavald@thinkpad-manjaro ~/Documents/iota-messenger  ‹invite*› 
╰─➤  nvm use 10.2.1
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `npm config delete prefix` or `nvm use --delete-prefix v10.2.1` to unset it.
╭─pciavald@thinkpad-manjaro ~/Documents/iota-messenger  ‹invite*› 
╰─➤  node --version                                                                                               11 ↵
v10.2.0
╭─pciavald@thinkpad-manjaro ~/Documents/iota-messenger  ‹invite*› 
╰─➤  nvm use --delete-prefix v10.2.1
╭─pciavald@thinkpad-manjaro ~/Documents/iota-messenger  ‹invite*› 
╰─➤  node --version                                                                                               11 ↵
v10.2.1
╭─pciavald@thinkpad-manjaro ~/Documents/iota-messenger  ‹invite*› 
╰─➤  yarn
[1]    24504 segmentation fault (core dumped)  yarn

same goes with npm

@yukap6
Copy link

yukap6 commented Jan 4, 2019

in my case: node 10.2 install error, but ok with node 11.6

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

No branches or pull requests