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

node v11 | node-gyp | libxmljs.o error npm #265

Closed
x-077 opened this issue Apr 12, 2019 · 8 comments
Closed

node v11 | node-gyp | libxmljs.o error npm #265

x-077 opened this issue Apr 12, 2019 · 8 comments

Comments

@x-077
Copy link

x-077 commented Apr 12, 2019

Hello,

There is an error during the installation of samlify on node v11 on libxmljs.o. Not sure if it was reported already.

$ npm install samlify -d
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm http fetch GET 304 https://registry.npmjs.org/samlify 252ms (from cache)
npm timing stage:loadCurrentTree Completed in 1742ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 5ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 500ms
npm http fetch GET 304 https://registry.npmjs.org/node-rsa 88ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/node-xmllint 45ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/xml 203ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/deflate-js 206ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/xmldom 204ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/xml-crypto 206ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/camelcase 208ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/xpath 208ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/libxml-xsd 210ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/node-forge 213ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/@authenio%2fxml-encryption 1137ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/async 81ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/ejs 88ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/libxmljs-mt 89ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/bindings 93ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/file-uri-to-path 190ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/asn1 70ms (from cache)
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 2353ms
npm timing stage:loadIdealTree Completed in 3067ms
npm timing stage:generateActionsToTake Completed in 64ms
npm timing audit submit Completed in 740ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 741ms
npm timing audit body Completed in 1ms
npm timing action:extract Completed in 1388ms
npm timing action:finalize Completed in 32ms
npm timing action:refresh-package-json Completed in 48ms
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle @authenio/[email protected]~preinstall: @authenio/[email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]

> [email protected] preinstall ..../core-system/node_modules/samlify
> make validator

make: Nothing to be done for `validator'.
npm timing action:preinstall Completed in 31ms
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff @authenio/[email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm timing action:build Completed in 15ms
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]

> [email protected] install ..../core-system/node_modules/libxmljs-mt
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/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   '....//core-system/node_modules/libxmljs-mt/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '..../.node-gyp/11.13.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=..../.node-gyp/11.13.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=..../.node-gyp/11.13.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=..../core-system/node_modules/libxmljs-mt',
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 make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/xmljs/src/libxmljs.o
../src/libxmljs.cc:69:17: error: no member named 'IsDead' in 'v8::V8'
    if (v8::V8::IsDead())
        ~~~~~~~~^
1 error generated.
make: *** [Release/obj.target/xmljs/src/libxmljs.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd ..../tcore-system/node_modules/libxmljs-mt
gyp ERR! node -v v11.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm info lifecycle [email protected]~install: Failed to exec install script
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle @authenio/[email protected]~install: @authenio/[email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm timing action:install Completed in 3029ms
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle @authenio/[email protected]~postinstall: @authenio/[email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm timing action:postinstall Completed in 5ms
npm timing stage:executeActions Completed in 4562ms
npm timing stage:rollbackFailedOptional Completed in 428ms
npm timing stage:runTopLevelLifecycles Completed in 10025ms
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/libxmljs-mt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ [email protected]
added 16 packages from 39 contributors and audited 6905 packages in 10.425s
found 0 vulnerabilities

npm timing npm Completed in 10786ms
npm info ok 

Thanks

@AngelMsger
Copy link
Contributor

Because the dependency libxml-xsd is not active maintained which cannot be compiled on node version higher than 10 😑.

@feugy
Copy link

feugy commented May 3, 2019

@tngan, by default, NPM is fetching optional dependencies. It simply does not complain in case they cannot be fetched (or compiled).

Could it be possible to use peer dependencies instead?

So users could have the choice to install xml-encryption, libxml-xsd or node-xmllint, without having NPM downloading (and compiling) all of them.

@vi-cat
Copy link

vi-cat commented May 8, 2019

Having this same issue... how has everyone else fixed it?

@AngelMsger
Copy link
Contributor

Having this same issue... how has everyone else fixed it?

You can just ignore it 😋. Since there is a compilation error during installation, it is only one of several optional dependencies that do not affect base functionality. It will fallback to an alternative which implemented with pure JavaScript.

@x-077
Copy link
Author

x-077 commented May 9, 2019

@tngan, by default, NPM is fetching optional dependencies. It simply does not complain in case they cannot be fetched (or compiled).

Could it be possible to use peer dependencies instead?

So users could have the choice to install xml-encryption, libxml-xsd or node-xmllint, without having NPM downloading (and compiling) all of them.

@tngan is it suitable for you to proceed like that ?

Thanks

@tngan
Copy link
Owner

tngan commented May 21, 2019

@AngelMsger @virginc @feugy @matth-c3 Let's continue the discussion in #274.

@tngan
Copy link
Owner

tngan commented Jun 23, 2019

Please try the latest v2.6.0-rc1, we have a new implementation on how to make use of validator module.

@tngan
Copy link
Owner

tngan commented Jul 7, 2019

v2.6.0 is released on npm. Feel free to reopen if needed.

@tngan tngan closed this as completed Jul 7, 2019
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

5 participants