Skip to content

core.h not found #20921

Description

@jdalton

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)

Activity

  1. mscdex commented on May 24, 2018

    @mscdex
    Contributor

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

  2. jdalton commented on May 24, 2018

    @jdalton
    MemberAuthor

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

  3. richardlau commented on May 24, 2018

    @richardlau
    Member

    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.

  4. mscdex commented on May 24, 2018

    @mscdex
    Contributor

    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.

  5. underdarkskies commented on May 24, 2018

    @underdarkskies

    pretty big bug! pls fix asap

  6. jasnell commented on May 24, 2018

    @jasnell
    Member

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

  7. jasnell commented on May 24, 2018

    @jasnell
    Member

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

  8. jasnell commented on May 24, 2018

    @jasnell
    Member

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

  9. lokus1980 commented on May 24, 2018

    @lokus1980

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

  10. amno1 commented on May 24, 2018

    @amno1

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

  11. lokus1980 commented on May 24, 2018

    @lokus1980

    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.

  12. amno1 commented on May 24, 2018

    @amno1

    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.

  13. amno1 commented on May 24, 2018

    @amno1

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

  14. jasnell commented on May 24, 2018

    @jasnell
    Member

    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.

  15. richardlau commented on May 24, 2018

    @richardlau
    Member

    This was fixed by #20939 and released in 10.2.1.

  16. 3 remaining items

  17. idibidiart commented on May 25, 2018

    @idibidiart

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

  18. jasnell commented on May 25, 2018

    @jasnell
    Member

    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.

  19. kigawas commented on May 25, 2018

    @kigawas

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

  20. jasnell commented on May 25, 2018

    @jasnell
    Member

    Already fixed. Already released.

  21. kingjerod commented on May 25, 2018

    @kingjerod

    Hmm not showing up here and my CI keeps grabbing 10.2.0

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

  22. jasnell commented on May 25, 2018

    @jasnell
    Member
  23. Flarna commented on May 25, 2018

    @Flarna
    Member

    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.

  24. moisadoru commented on May 25, 2018

    @moisadoru

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

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

  25. pciavald commented on Jun 1, 2018

    @pciavald

    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

  26. yukap6 commented on Jan 4, 2019

    @yukap6

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

  27. added a commit that references this issue on Jan 14, 2019
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