Skip to content

Builds fail on Node 12 and earlier because Node 14's binding.gyp is incompatible #37

@mischnic

Description

@mischnic

prebuildify seems to always uses the latest headers, but the included gyp config file for Node 14 is incompatible with Node 12 and earlier because include/node/common.gypi checks the value of v8_enable_pointer_compression which only exists in Node 13+.

$ prebuildify --napi --strip --tag-libc
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@12.16.2 | darwin | x64
gyp info find Python using Python version 2.7.10 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/usr/local/Cellar/node@12/12.16.2_1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '.../source-map/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/Cellar/node@12/12.16.2_1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/var/folders/sr/6fx9jkvn2574qm892qch3wq00000gn/T/prebuildify/node/14.0.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/var/folders/sr/6fx9jkvn2574qm892qch3wq00000gn/T/prebuildify/node/14.0.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/Cellar/node@12/12.16.2_1/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/var/folders/sr/6fx9jkvn2574qm892qch3wq00000gn/T/prebuildify/node/14.0.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=.../source-map',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp: name 'v8_enable_pointer_compression' is not defined while evaluating condition 'v8_enable_pointer_compression == 1' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/Cellar/node@12/12.16.2_1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node@12/12.16.2_1/bin/node" "/usr/local/Cellar/node@12/12.16.2_1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--target=14.0.0" "--devdir=/var/folders/sr/6fx9jkvn2574qm892qch3wq00000gn/T/prebuildify/node" "--target_arch=x64" "--release"
gyp ERR! cwd .../source-map
gyp ERR! node -v v12.16.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

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