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

Unable to install libxmljs on windows machine #392

Closed
laksh-parab opened this issue Mar 15, 2016 · 9 comments
Closed

Unable to install libxmljs on windows machine #392

laksh-parab opened this issue Mar 15, 2016 · 9 comments

Comments

@laksh-parab
Copy link

I have the following softwares installed on my machine
Windows 10 (64 bit)
Node 4.2.6 (64 bit)
Visual Studio 2013

i am trying to install node package "libxmljs" using the following command

npm install libxmljs

but im getting the following error

libxml.lib(parser.obj) : error LNK2001: unresolved external symbol snprintf

Here is the complete stacktrace

         Creating library C:\src\mysourcecode\node_modules\libxmljs\build\Release\xmljs.lib and object C:\src\mysourcecode\node_modules\libxmljs\build\Release\xmljs.exp
    libxml.lib(parser.obj) : error LNK2001: unresolved external symbol snprintf [C:\src\mysourcecode\node_modules\libxmljs\build\xmljs.vcxproj]
    C:\src\mysourcecode\node_modules\libxmljs\build\Release\xmljs.node : fatal error LNK1120: 1 unresolved externals [C:\src\mysourcecode\node_modules\libxmljs\build\xmljs.vcxproj]
    gyp ERR! build error
    gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
    gyp ERR! stack     at emitTwo (events.js:87:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    gyp ERR! System Windows_NT 10.0.10586
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
    gyp ERR! cwd C:\src\mysourcecode\node_modules\libxmljs
    gyp ERR! node -v v4.2.6
    gyp ERR! node-gyp -v v3.0.3
    gyp ERR! not ok
    npm ERR! Windows_NT 10.0.10586
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "libxmljs"
    npm ERR! node v4.2.6
    npm ERR! npm  v2.14.12
    npm ERR! code ELIFECYCLE

    npm ERR! libxmljs@0.17.1 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the libxmljs@0.17.1 install script 'node-gyp rebuild'.
    npm ERR! This is most likely a problem with the libxmljs package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node-gyp rebuild
    npm ERR! You can get their info via:
    npm ERR!     npm owner ls libxmljs
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR!     C:\src\mysourcecode\npm-debug.log
@bmonti
Copy link

bmonti commented Mar 22, 2016

I have the same problem with windows7 64b

@Mosquito13
Copy link

Same problem here, win7 x64.

@rchipka
Copy link
Member

rchipka commented Apr 2, 2016

The problem here seems to be that the #ifdef _WIN32 conditions were removed from config.h.

@laksh-parab
Copy link
Author

@rchipka hi, is the issue #396 already merged to master?

@bc3tech
Copy link

bc3tech commented Apr 19, 2016

Same problem here, Windows 10.14295.1000

2016-04-19T17:09:10.5677417Z Binary downloaded and installed at d:\djbuildagent1\_work\5\s\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64-14\binding.node
2016-04-19T17:09:10.6302419Z npm ERR! libxmljs@0.14.3 install: `node-gyp rebuild`
2016-04-19T17:09:10.6302419Z npm ERR! Exit status 1
2016-04-19T17:09:10.6302419Z npm ERR! 
2016-04-19T17:09:10.6307412Z npm ERR! Failed at the libxmljs@0.14.3 install script.
2016-04-19T17:09:10.6307412Z npm ERR! This is most likely a problem with the libxmljs package,
2016-04-19T17:09:10.6312420Z npm ERR! not with npm itself.
2016-04-19T17:09:10.6312420Z npm ERR! Tell the author that this fails on your system:
2016-04-19T17:09:10.6317413Z npm ERR!     node-gyp rebuild
2016-04-19T17:09:10.6317413Z npm ERR! You can get their info via:
2016-04-19T17:09:10.6322418Z npm ERR!     npm owner ls libxmljs
2016-04-19T17:09:10.6322418Z npm ERR! There is likely additional logging output above.
2016-04-19T17:09:10.6332420Z npm ERR! System Windows_NT 6.3.9600
2016-04-19T17:09:10.6342418Z npm ERR! command "node" "C:\\ProgramData\\chocolatey\\lib\\npm\\tools\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp" "gulp-cordova-bump" "gulp-util" "bower" "gulp-concat" "gulp-sass" "gulp-minify-css" "gulp-rename" "shelljs"
2016-04-19T17:09:10.6342418Z npm ERR! cwd d:\djbuildagent1\_work\5\s
2016-04-19T17:09:10.6352413Z npm ERR! node -v v0.12.7
2016-04-19T17:09:10.6352413Z npm ERR! npm -v 1.4.9

@rchipka
Copy link
Member

rchipka commented Apr 19, 2016

@laksh-parab Not yet, I still need to check that node-pre-gyp downloads the uploaded binaries.

@mikowiec
Copy link

mikowiec commented Jun 11, 2016

issue observed for libxmljs@0.18
blocked issue, win 7 32
node 5.10.0

libxmljs@0.16 installed OK,
but osmosis required libxmljs@0.18

@rchipka
Copy link
Member

rchipka commented Jan 12, 2017

The snprintf issue has been fixed for a while now and it is definitely fixed in the precompiled binaries.

@rchipka rchipka closed this as completed Jan 12, 2017
bkimminich added a commit to juice-shop/juice-shop that referenced this issue Jun 5, 2018
@jfoclpf
Copy link

jfoclpf commented Jul 15, 2021

FYI that the test suite I'm using is failing on this library

npm ERR! code 1
npm ERR! path /Users/runner/work/autocosts/autocosts/node_modules/libxmljs
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --loglevel http
npm ERR! CXX(target) Release/obj.target/xmljs/src/libxmljs.o
npm ERR! Failed to execute '/Users/runner/hostedtoolcache/node/16.5.0/x64/bin/node /Users/runner/hostedtoolcache/node/16.5.0/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/runner/work/autocosts/autocosts/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/runner/work/autocosts/autocosts/node_modules/libxmljs/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download 
npm ERR! node-pre-gyp http GET https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v93-darwin-x64.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v93-darwin-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v93-darwin-x64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not found for libxmljs@0.19.7 and node@16.5.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v93-darwin-x64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.5.0 | darwin | x64
npm ERR! gyp info ok 
npm ERR! gyp http GET https://nodejs.org/download/release/v16.5.0/node-v16.5.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.5.0/node-v16.5.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.5.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.5.0/SHASUMS256.txt
npm ERR! (node:1292) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! In file included from ../src/libxmljs.cc:3:
npm ERR! In file included from /Users/runner/Library/Caches/node-gyp/16.5.0/include/node/v8.h:30:
npm ERR! /Users/runner/Library/Caches/node-gyp/16.5.0/include/node/v8-internal.h:454:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
npm ERR!             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!                                 ~~~~~^~~~~~~~~~~
npm ERR!                                      remove_cv
npm ERR! /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:697:50: note: 'remove_cv' declared here
npm ERR! template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
npm ERR!                                                  ^
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/xmljs/src/libxmljs.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/runner/hostedtoolcache/node/16.5.0/x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 19.6.0
npm ERR! gyp ERR! command "/Users/runner/hostedtoolcache/node/16.5.0/x64/bin/node" "/Users/runner/hostedtoolcache/node/16.5.0/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--loglevel=http" "--module=/Users/runner/work/autocosts/autocosts/node_modules/libxmljs/build/Release/xmljs.node" "--module_name=xmljs" "--module_path=/Users/runner/work/autocosts/autocosts/node_modules/libxmljs/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /Users/runner/work/autocosts/autocosts/node_modules/libxmljs
npm ERR! gyp ERR! node -v v16.5.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/Users/runner/hostedtoolcache/node/16.5.0/x64/bin/node /Users/runner/hostedtoolcache/node/16.5.0/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/runner/work/autocosts/autocosts/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/runner/work/autocosts/autocosts/node_modules/libxmljs/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/runner/work/autocosts/autocosts/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Darwin 19.6.0
npm ERR! node-pre-gyp ERR! command "/Users/runner/hostedtoolcache/node/16.5.0/x64/bin/node" "/Users/runner/work/autocosts/autocosts/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http"
npm ERR! node-pre-gyp ERR! cwd /Users/runner/work/autocosts/autocosts/node_modules/libxmljs
npm ERR! node-pre-gyp ERR! node -v v16.5.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/runner/.npm/_logs/2021-07-15T14_53_48_870Z-debug.log
Error: Process completed with exit code 1.

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

7 participants