Build Fails on Ubuntu 18.04 Node 12.3.1
See original GitHub issuesteps to reproduce:
mkdir test
cd test
nvm use stable
npm init -y
npm install node-expat
Ubuntu 18.04 Node 12.3.1 via nvm
if i nvm use lts/dubnium
the install is successful.
here is the console output (verbose):
npm info it worked if it ends with ok
npm verb cli [
npm verb cli '/home/paul/.nvm/versions/node/v12.3.1/bin/node',
npm verb cli '/home/paul/.nvm/versions/node/v12.3.1/bin/npm',
npm verb cli 'install',
npm verb cli 'node-expat',
npm verb cli '--verbose'
npm verb cli ]
npm info using npm@6.9.0
npm info using node@v12.3.1
npm verb npm-session 1bfcc92371e3008a
npm http fetch GET 304 https://registry.npmjs.org/node-expat 152ms (from cache)
npm timing stage:loadCurrentTree Completed in 174ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
npm http fetch GET 304 https://registry.npmjs.org/bindings 41ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/nan 78ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/file-uri-to-path 44ms (from cache)
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 139ms
npm timing stage:loadIdealTree Completed in 148ms
npm timing stage:generateActionsToTake Completed in 7ms
npm verb correctMkdir /home/paul/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /home/paul/.npm/_locks/staging-451c1b4308d888eb.lock for /home/paul/test/node_modules/.staging
npm timing action:extract Completed in 61ms
npm timing action:finalize Completed in 6ms
npm timing action:refresh-package-json Completed in 10ms
npm info lifecycle file-uri-to-path@1.0.0~preinstall: file-uri-to-path@1.0.0
npm info lifecycle bindings@1.5.0~preinstall: bindings@1.5.0
npm info lifecycle nan@2.14.0~preinstall: nan@2.14.0
npm info lifecycle node-expat@2.3.17~preinstall: node-expat@2.3.17
npm timing action:preinstall Completed in 1ms
npm info linkStuff file-uri-to-path@1.0.0
npm info linkStuff bindings@1.5.0
npm info linkStuff nan@2.14.0
npm info linkStuff node-expat@2.3.17
npm timing action:build Completed in 2ms
npm info lifecycle file-uri-to-path@1.0.0~install: file-uri-to-path@1.0.0
npm info lifecycle bindings@1.5.0~install: bindings@1.5.0
npm info lifecycle nan@2.14.0~install: nan@2.14.0
npm info lifecycle node-expat@2.3.17~install: node-expat@2.3.17
> node-expat@2.3.17 install /home/paul/test/node_modules/node-expat
> node-gyp rebuild
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/home/paul/.nvm/versions/node/v12.3.1/bin/node',
gyp verb cli '/home/paul/.nvm/versions/node/v12.3.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild'
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@12.3.1 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.15
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 12.3.1
gyp verb command install [ '12.3.1' ]
gyp verb install input version string "12.3.1"
gyp verb install installing version: 12.3.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 12.3.1
gyp verb build dir attempting to create "build" dir: /home/paul/test/node_modules/node-expat/build
gyp verb build dir "build" dir needed to be created? /home/paul/test/node_modules/node-expat/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /home/paul/test/node_modules/node-expat/build/config.gypi
gyp verb config.gypi checking for gypi file: /home/paul/test/node_modules/node-expat/config.gypi
gyp verb common.gypi checking for gypi file: /home/paul/test/node_modules/node-expat/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [
gyp info spawn args '/home/paul/.nvm/versions/node/v12.3.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 '/home/paul/test/node_modules/node-expat/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/paul/.nvm/versions/node/v12.3.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/paul/.node-gyp/12.3.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/paul/.node-gyp/12.3.1',
gyp info spawn args '-Dnode_gyp_dir=/home/paul/.nvm/versions/node/v12.3.1/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/paul/.node-gyp/12.3.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/paul/test/node_modules/node-expat',
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 verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /home/paul/.node-gyp/12.3.1
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/paul/test/node_modules/node-expat/build'
cc '-DNODE_GYP_MODULE_NAME=expat' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_THREADS' '-DPIC' '-DHAVE_EXPAT_CONFIG_H' '-DNDEBUG' -I/home/paul/.node-gyp/12.3.1/include/node -I/home/paul/.node-gyp/12.3.1/src -I/home/paul/.node-gyp/12.3.1/deps/openssl/config -I/home/paul/.node-gyp/12.3.1/deps/openssl/openssl/include -I/home/paul/.node-gyp/12.3.1/deps/uv/include -I/home/paul/.node-gyp/12.3.1/deps/zlib -I/home/paul/.node-gyp/12.3.1/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wno-missing-field-initializers -O3 -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/expat/deps/libexpat/lib/xmlparse.o.d.raw -c -o Release/obj.target/expat/deps/libexpat/lib/xmlparse.o ../deps/libexpat/lib/xmlparse.c
../deps/libexpat/lib/xmlparse.c: In function ‘gather_time_entropy’:
../deps/libexpat/lib/xmlparse.c:780:7: warning: variable ‘gettimeofday_res’ set but not used [-Wunused-but-set-variable]
int gettimeofday_res;
^
cc '-DNODE_GYP_MODULE_NAME=expat' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_THREADS' '-DPIC' '-DHAVE_EXPAT_CONFIG_H' '-DNDEBUG' -I/home/paul/.node-gyp/12.3.1/include/node -I/home/paul/.node-gyp/12.3.1/src -I/home/paul/.node-gyp/12.3.1/deps/openssl/config -I/home/paul/.node-gyp/12.3.1/deps/openssl/openssl/include -I/home/paul/.node-gyp/12.3.1/deps/uv/include -I/home/paul/.node-gyp/12.3.1/deps/zlib -I/home/paul/.node-gyp/12.3.1/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wno-missing-field-initializers -O3 -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/expat/deps/libexpat/lib/xmltok.o.d.raw -c -o Release/obj.target/expat/deps/libexpat/lib/xmltok.o ../deps/libexpat/lib/xmltok.c
cc '-DNODE_GYP_MODULE_NAME=expat' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_THREADS' '-DPIC' '-DHAVE_EXPAT_CONFIG_H' '-DNDEBUG' -I/home/paul/.node-gyp/12.3.1/include/node -I/home/paul/.node-gyp/12.3.1/src -I/home/paul/.node-gyp/12.3.1/deps/openssl/config -I/home/paul/.node-gyp/12.3.1/deps/openssl/openssl/include -I/home/paul/.node-gyp/12.3.1/deps/uv/include -I/home/paul/.node-gyp/12.3.1/deps/zlib -I/home/paul/.node-gyp/12.3.1/deps/v8/include -I../deps/libexpat -I../deps/libexpat/lib -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wno-missing-field-initializers -O3 -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/expat/deps/libexpat/lib/xmlrole.o.d.raw -c -o Release/obj.target/expat/deps/libexpat/lib/xmlrole.o ../deps/libexpat/lib/xmlrole.c
rm -f Release/obj.target/deps/libexpat/libexpat.a && ar crs Release/obj.target/deps/libexpat/libexpat.a Release/obj.target/expat/deps/libexpat/lib/xmlparse.o Release/obj.target/expat/deps/libexpat/lib/xmltok.o Release/obj.target/expat/deps/libexpat/lib/xmlrole.o
rm -rf "Release/libexpat.a" && cp -af "Release/obj.target/deps/libexpat/libexpat.a" "Release/libexpat.a"
g++ '-DNODE_GYP_MODULE_NAME=node_expat' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/home/paul/.node-gyp/12.3.1/include/node -I/home/paul/.node-gyp/12.3.1/src -I/home/paul/.node-gyp/12.3.1/deps/openssl/config -I/home/paul/.node-gyp/12.3.1/deps/openssl/openssl/include -I/home/paul/.node-gyp/12.3.1/deps/uv/include -I/home/paul/.node-gyp/12.3.1/deps/zlib -I/home/paul/.node-gyp/12.3.1/deps/v8/include -I../../nan -I../deps/libexpat -I../deps/libexpat/lib -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF ./Release/.deps/Release/obj.target/node_expat/node-expat.o.d.raw -c -o Release/obj.target/node_expat/node-expat.o ../node-expat.cc
../node-expat.cc:11:26: error: ‘Handle’ has not been declared
static void Initialize(Handle<Object> target)
^
../node-expat.cc:11:32: error: expected ‘,’ or ‘...’ before ‘<’ token
static void Initialize(Handle<Object> target)
^
../node-expat.cc:481:23: error: ‘Handle’ has not been declared
void Emit(int argc, Handle<Value> argv[])
^
../node-expat.cc:481:29: error: expected ‘,’ or ‘...’ before ‘<’ token
void Emit(int argc, Handle<Value> argv[])
^
../node-expat.cc: In static member function ‘static void Parser::Initialize(int)’:
../node-expat.cc:29:5: error: ‘target’ was not declared in this scope
target->Set(Nan::New("Parser").ToLocalChecked(), t->GetFunction());
^
../node-expat.cc:29:69: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
target->Set(Nan::New("Parser").ToLocalChecked(), t->GetFunction());
^
In file included from /home/paul/.node-gyp/12.3.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:5947:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^
/home/paul/.node-gyp/12.3.1/include/node/v8.h:5947:46: note: candidate expects 1 argument, 0 provided
../node-expat.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Parser::Parse(Nan::NAN_METHOD_ARGS_TYPE)’:
../node-expat.cc:98:33: error: no matching function for call to ‘v8::Value::ToString()’
str = info[0]->ToString();
^
In file included from /home/paul/.node-gyp/12.3.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2528:44: note: candidate: v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2528:44: note: candidate expects 1 argument, 0 provided
In file included from /home/paul/.node-gyp/12.3.1/include/node/v8-internal.h:14:0,
from /home/paul/.node-gyp/12.3.1/include/node/v8.h:25,
from /home/paul/.node-gyp/12.3.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2544:35: note: candidate: v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const
Local<String> ToString(Isolate* isolate) const);
^
/home/paul/.node-gyp/12.3.1/include/node/v8config.h:322:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2544:35: note: candidate expects 1 argument, 0 provided
Local<String> ToString(Isolate* isolate) const);
^
/home/paul/.node-gyp/12.3.1/include/node/v8config.h:322:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^
../node-expat.cc:103:47: error: no matching function for call to ‘v8::Value::ToObject()’
Local<Object> obj = info[0]->ToObject();
^
In file included from /home/paul/.node-gyp/12.3.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2532:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2532:44: note: candidate expects 1 argument, 0 provided
In file included from /home/paul/.node-gyp/12.3.1/include/node/v8-internal.h:14:0,
from /home/paul/.node-gyp/12.3.1/include/node/v8.h:25,
from /home/paul/.node-gyp/12.3.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2546:35: note: candidate: v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const
Local<Object> ToObject(Isolate* isolate) const);
^
/home/paul/.node-gyp/12.3.1/include/node/v8config.h:322:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2546:35: note: candidate expects 1 argument, 0 provided
Local<Object> ToObject(Isolate* isolate) const);
^
/home/paul/.node-gyp/12.3.1/include/node/v8config.h:322:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^
../node-expat.cc: In member function ‘bool Parser::parseString(v8::String&, int)’:
../node-expat.cc:124:30: error: no matching function for call to ‘v8::String::Utf8Length()’
int len = str.Utf8Length();
^
In file included from /home/paul/.node-gyp/12.3.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2678:7: note: candidate: int v8::String::Utf8Length(v8::Isolate*) const
int Utf8Length(Isolate* isolate) const;
^
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2678:7: note: candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/5/cassert:43:0,
from /home/paul/.node-gyp/12.3.1/include/node/node_object_wrap.h:26,
from ../../nan/nan.h:56,
from ../node-expat.cc:1:
../node-expat.cc:130:55: error: no matching function for call to ‘v8::String::WriteUtf8(char*, int&)’
assert(str.WriteUtf8(static_cast<char *>(buf), len) == len);
^
In file included from /home/paul/.node-gyp/12.3.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2738:7: note: candidate: int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const
int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
^
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2738:7: note: no known conversion for argument 1 from ‘char*’ to ‘v8::Isolate*’
../node-expat.cc: In static member function ‘static void Parser::StartElement(void*, const XML_Char*, const XML_Char**)’:
../node-expat.cc:301:89: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
attr->Set(Nan::New(atts1[0]).ToLocalChecked(), Nan::New(atts1[1]).ToLocalChecked());
^
In file included from /home/paul/.node-gyp/12.3.1/include/node/v8-internal.h:14:0,
from /home/paul/.node-gyp/12.3.1/include/node/v8.h:25,
from /home/paul/.node-gyp/12.3.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:3359:26: note: declared here
bool Set(Local<Value> key, Local<Value> value));
^
/home/paul/.node-gyp/12.3.1/include/node/v8config.h:322:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^
../node-expat.cc:304:5: error: ‘Handle’ was not declared in this scope
Handle<Value> argv[3] = { Nan::New("startElement").ToLocalChecked(),
^
../node-expat.cc:304:17: error: expected primary-expression before ‘>’ token
Handle<Value> argv[3] = { Nan::New("startElement").ToLocalChecked(),
^
../node-expat.cc:304:19: error: ‘argv’ was not declared in this scope
Handle<Value> argv[3] = { Nan::New("startElement").ToLocalChecked(),
^
../node-expat.cc: In static member function ‘static void Parser::EndElement(void*, const XML_Char*)’:
../node-expat.cc:317:5: error: ‘Handle’ was not declared in this scope
Handle<Value> argv[2] = { Nan::New("endElement").ToLocalChecked(), Nan::New(name).ToLocalChecked() };
^
../node-expat.cc:317:17: error: expected primary-expression before ‘>’ token
Handle<Value> argv[2] = { Nan::New("endElement").ToLocalChecked(), Nan::New(name).ToLocalChecked() };
^
../node-expat.cc:317:19: error: ‘argv’ was not declared in this scope
Handle<Value> argv[2] = { Nan::New("endElement").ToLocalChecked(), Nan::New(name).ToLocalChecked() };
^
../node-expat.cc: In static member function ‘static void Parser::StartCdata(void*)’:
../node-expat.cc:327:5: error: ‘Handle’ was not declared in this scope
Handle<Value> argv[1] = { Nan::New("startCdata").ToLocalChecked() };
^
../node-expat.cc:327:17: error: expected primary-expression before ‘>’ token
Handle<Value> argv[1] = { Nan::New("startCdata").ToLocalChecked() };
^
../node-expat.cc:327:19: error: ‘argv’ was not declared in this scope
Handle<Value> argv[1] = { Nan::New("startCdata").ToLocalChecked() };
^
../node-expat.cc: In static member function ‘static void Parser::EndCdata(void*)’:
../node-expat.cc:337:5: error: ‘Handle’ was not declared in this scope
Handle<Value> argv[1] = { Nan::New("endCdata").ToLocalChecked() };
^
../node-expat.cc:337:17: error: expected primary-expression before ‘>’ token
Handle<Value> argv[1] = { Nan::New("endCdata").ToLocalChecked() };
^
../node-expat.cc:337:19: error: ‘argv’ was not declared in this scope
Handle<Value> argv[1] = { Nan::New("endCdata").ToLocalChecked() };
^
../node-expat.cc: In static member function ‘static void Parser::Text(void*, const XML_Char*, int)’:
../node-expat.cc:348:5: error: ‘Handle’ was not declared in this scope
Handle<Value> argv[2] = { Nan::New("text").ToLocalChecked(),
^
../node-expat.cc:348:17: error: expected primary-expression before ‘>’ token
Handle<Value> argv[2] = { Nan::New("text").ToLocalChecked(),
^
../node-expat.cc:348:19: error: ‘argv’ was not declared in this scope
Handle<Value> argv[2] = { Nan::New("text").ToLocalChecked(),
^
../node-expat.cc: In static member function ‘static void Parser::ProcessingInstruction(void*, const XML_Char*, const XML_Char*)’:
../node-expat.cc:360:5: error: ‘Handle’ was not declared in this scope
Handle<Value> argv[3] = { Nan::New("processingInstruction").ToLocalChecked(),
^
../node-expat.cc:360:17: error: expected primary-expression before ‘>’ token
Handle<Value> argv[3] = { Nan::New("processingInstruction").ToLocalChecked(),
^
../node-expat.cc:360:19: error: ‘argv’ was not declared in this scope
Handle<Value> argv[3] = { Nan::New("processingInstruction").ToLocalChecked(),
^
../node-expat.cc: In static member function ‘static void Parser::Comment(void*, const XML_Char*)’:
../node-expat.cc:373:5: error: ‘Handle’ was not declared in this scope
Handle<Value> argv[2] = { Nan::New("comment").ToLocalChecked(), Nan::New(data).ToLocalChecked() };
^
../node-expat.cc:373:17: error: expected primary-expression before ‘>’ token
Handle<Value> argv[2] = { Nan::New("comment").ToLocalChecked(), Nan::New(data).ToLocalChecked() };
^
../node-expat.cc:373:19: error: ‘argv’ was not declared in this scope
Handle<Value> argv[2] = { Nan::New("comment").ToLocalChecked(), Nan::New(data).ToLocalChecked() };
^
../node-expat.cc: In static member function ‘static void Parser::XmlDecl(void*, const XML_Char*, const XML_Char*, int)’:
../node-expat.cc:395:25: error: invalid conversion from ‘v8::Local<v8::Value>*’ to ‘int’ [-fpermissive]
parser->Emit(4, argv);
^
../node-expat.cc:481:8: note: initializing argument 2 of ‘void Parser::Emit(int, int)’
void Emit(int argc, Handle<Value> argv[])
^
../node-expat.cc: In static member function ‘static void Parser::EntityDecl(void*, const XML_Char*, int, const XML_Char*, int, const XML_Char*, const XML_Char*, const XML_Char*, const XML_Char*)’:
../node-expat.cc:424:25: error: invalid conversion from ‘v8::Local<v8::Value>*’ to ‘int’ [-fpermissive]
parser->Emit(8, argv);
^
../node-expat.cc:481:8: note: initializing argument 2 of ‘void Parser::Emit(int, int)’
void Emit(int argc, Handle<Value> argv[])
^
../node-expat.cc: In static member function ‘static int Parser::UnknownEncoding(void*, const XML_Char*, XML_Encoding*)’:
../node-expat.cc:442:25: error: invalid conversion from ‘v8::Local<v8::Value>*’ to ‘int’ [-fpermissive]
parser->Emit(2, argv);
^
../node-expat.cc:481:8: note: initializing argument 2 of ‘void Parser::Emit(int, int)’
void Emit(int argc, Handle<Value> argv[])
^
../node-expat.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Parser::SetUnknownEncoding(Nan::NAN_METHOD_ARGS_TYPE)’:
../node-expat.cc:468:46: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Value> m = map->Get(Nan::New(i));
^
In file included from /home/paul/.node-gyp/12.3.1/include/node/v8-internal.h:14:0,
from /home/paul/.node-gyp/12.3.1/include/node/v8.h:25,
from /home/paul/.node-gyp/12.3.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:3412:55: note: declared here
V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
^
/home/paul/.node-gyp/12.3.1/include/node/v8config.h:322:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
declarator __attribute__((deprecated(message)))
^
../node-expat.cc:470:59: error: no matching function for call to ‘v8::Value::Int32Value()’
parser->xmlEncodingInfo->map[i] = m->Int32Value();
^
In file included from /home/paul/.node-gyp/12.3.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../node-expat.cc:1:
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2569:40: note: candidate: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
/home/paul/.node-gyp/12.3.1/include/node/v8.h:2569:40: note: candidate expects 1 argument, 0 provided
../node-expat.cc: In member function ‘void Parser::Emit(int, int)’:
../node-expat.cc:485:5: error: ‘Handle’ was not declared in this scope
Handle<Object> handle = this->handle();
^
../node-expat.cc:485:18: error: expected primary-expression before ‘>’ token
Handle<Object> handle = this->handle();
^
../node-expat.cc:486:34: error: invalid use of member function (did you forget the ‘()’ ?)
Local<Function> emit = handle->Get(Nan::New("emit").ToLocalChecked()).As<Function>();
^
../node-expat.cc:486:34: error: base operand of ‘->’ is not a pointer
../node-expat.cc:486:86: error: expected primary-expression before ‘>’ token
Local<Function> emit = handle->Get(Nan::New("emit").ToLocalChecked()).As<Function>();
^
../node-expat.cc:486:88: error: expected primary-expression before ‘)’ token
Local<Function> emit = handle->Get(Nan::New("emit").ToLocalChecked()).As<Function>();
^
../node-expat.cc:487:30: error: ‘argv’ was not declared in this scope
emit->Call(handle, argc, argv);
^
../node-expat.cc:487:34: error: invalid use of non-static member function
emit->Call(handle, argc, argv);
^
../node-expat.cc: At global scope:
../node-expat.cc:492:21: error: variable or field ‘init’ declared void
static void init (Handle<Object> target)
^
../node-expat.cc:492:21: error: ‘Handle’ was not declared in this scope
../node-expat.cc:492:34: error: expected primary-expression before ‘>’ token
static void init (Handle<Object> target)
^
../node-expat.cc:492:36: error: ‘target’ was not declared in this scope
static void init (Handle<Object> target)
^
In file included from ../../nan/nan.h:54:0,
from ../node-expat.cc:1:
../node-expat.cc:497:27: error: ‘init’ was not declared in this scope
NODE_MODULE(node_expat, init);
^
/home/paul/.node-gyp/12.3.1/include/node/node.h:556:36: note: in definition of macro ‘NODE_MODULE_X’
(node::addon_register_func) (regfunc), \
^
../node-expat.cc:497:3: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(node_expat, init);
^
node_expat.target.mk:114: recipe for target 'Release/obj.target/node_expat/node-expat.o' failed
make: *** [Release/obj.target/node_expat/node-expat.o] Error 1
make: Leaving directory '/home/paul/test/node_modules/node-expat/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/paul/.nvm/versions/node/v12.3.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.18.0-20-generic
gyp ERR! command "/home/paul/.nvm/versions/node/v12.3.1/bin/node" "/home/paul/.nvm/versions/node/v12.3.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/paul/test/node_modules/node-expat
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm verb lifecycle node-expat@2.3.17~install: unsafe-perm in lifecycle true
npm verb lifecycle node-expat@2.3.17~install: PATH: /home/paul/.nvm/versions/node/v12.3.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/paul/test/node_modules/node-expat/node_modules/.bin:/home/paul/test/node_modules/.bin:/home/paul/.nvm/versions/node/v12.3.1/bin:/home/paul/.config/composer/vendor/bin:/home/paul/bin:/usr/local/bin:/home/paul/.local/bin:/home/paul/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
npm verb lifecycle node-expat@2.3.17~install: CWD: /home/paul/test/node_modules/node-expat
npm timing audit submit Completed in 260ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 260ms
npm timing audit body Completed in 0ms
npm info lifecycle node-expat@2.3.17~install: Failed to exec install script
npm timing action:install Completed in 3611ms
npm verb unlock done using /home/paul/.npm/_locks/staging-451c1b4308d888eb.lock for /home/paul/test/node_modules/.staging
npm timing stage:rollbackFailedOptional Completed in 18ms
npm timing stage:runTopLevelLifecycles Completed in 4061ms
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.
npm verb stack Error: node-expat@2.3.17 install: `node-gyp rebuild`
npm verb stack Exit status 1
npm verb stack at EventEmitter.<anonymous> (/home/paul/.nvm/versions/node/v12.3.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
npm verb stack at EventEmitter.emit (events.js:200:13)
npm verb stack at ChildProcess.<anonymous> (/home/paul/.nvm/versions/node/v12.3.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
npm verb stack at ChildProcess.emit (events.js:200:13)
npm verb stack at maybeClose (internal/child_process.js:1021:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
npm verb pkgid node-expat@2.3.17
npm verb cwd /home/paul/test
npm verb Linux 4.18.0-20-generic
npm verb argv "/home/paul/.nvm/versions/node/v12.3.1/bin/node" "/home/paul/.nvm/versions/node/v12.3.1/bin/npm" "install" "node-expat" "--verbose"
npm verb node v12.3.1
npm verb npm v6.9.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-expat@2.3.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat@2.3.17 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm timing npm Completed in 4287ms
npm ERR! A complete log of this run can be found in:
npm ERR! /home/paul/.npm/_logs/2019-05-28T22_30_09_975Z-debug.log
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:8
Top Results From Across the Web
npm install fails on ubuntu 18.04 with error - node.js
This error appears due to node-pre-gyp . You need to install some binaries needed by it. Install node-pre-gyp and probably you will have...
Read more >Node/npm start on Ubuntu 18.04 build error with node-sass
I use NVM for managing node versions. I'm having issues with node-sass and npm. The build fails upon "npm install" and subsequently "npm...
Read more >Install Node.js 12 on Ubuntu / Debian / Linux Mint
Node.js is a powerful JavaScript runtime built on Chrome's V8 engine for building fast and scalable network applications.
Read more >How To Install Node.js & NPM on Ubuntu 18.04 {Quick Start}
It is used for building fast and scalable network applications. In addition to offering various JS modules, it is also lightweight, efficient ...
Read more >Build server infrastructure - Expo Documentation
ubuntu -18.04-jdk-11-ndk-r19c · Docker image: ubuntu:bionic-20210930 · NDK 19.2.5345600 · Node.js 16.18.1 · Yarn 1.22.17 · pnpm 7.0.0 · npm 8.19.2 · Java...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@brandonros Are you sure that #196 fixes this? I use latest node-expat 2.3.18 that includes the fix, but the build still fails on Ubuntu.
After some more testing I managed to get round the issue by updating
npm
andnode
versions:Updated
npm
to 7.13.0 (npm install -g npm
)Changed to use
node v12.22.1
(latest v12), (nvm install v12.22.1
nvm use
)rm -r node_modules/
npm i
After that the package is built and working fine!