[Pkg-javascript-devel] Bug#840464: nodejs: 'npm install' command fails with compilation error in Kerberos header

Jérémy Lal kapouer at melix.org
Tue Oct 11 19:17:46 UTC 2016


2016-10-11 21:03 GMT+02:00 David L Lambert <davidl at lmert.com>:

> Package: nodejs
> Version: 0.10.29~dfsg-2
> Severity: normal
>
> Dear Maintainer,
>
> After installing packages "nodejs", "nodejs-legacy", and "libkrb5-dev",
> I still get a compilation error blocking completion of "npm install
> mongodb"...
>
> > kerberos at 0.0.21 install /home/dllamber/src/project2/
> node_modules/mongodb/node_modules/kerberos
> > (node-gyp rebuild) || (exit 0)
>
> make: Entering directory '/home/dllamber/src/project2/
> node_modules/mongodb/node_modules/kerberos/build'
>   CXX(target) Release/obj.target/kerberos/lib/kerberos.o
> In file included from ../lib/kerberos.h:9:0,
>                  from ../lib/kerberos.cc:1:
> ../node_modules/nan/nan.h:324:47: error: ‘REPLACE_INVALID_UTF8’ is not a
> member of ‘v8::String’
>    static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_
> UTF8;
>                                                ^
> kerberos.target.mk:88: recipe for target 'Release/obj.target/kerberos/lib/kerberos.o'
> failed
> make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1
> make: Leaving directory '/home/dllamber/src/project2/
> node_modules/mongodb/node_modules/kerberos/build'
> gyp ERR! build error
> gyp ERR! stack Error: `make` failed with exit code: 2
> gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/
> build.js:267:23)
> gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
> gyp ERR! stack     at Process.ChildProcess._handle.onexit
> (child_process.js:809:12)
> gyp ERR! System Linux 3.16.0-4-686-pae
> gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
> gyp ERR! cwd /home/dllamber/src/project2/node_modules/mongodb/node_
> modules/kerberos
> gyp ERR! node -v v0.10.29
> gyp ERR! node-gyp -v v0.12.2
> gyp ERR! not ok
> mongodb at 2.0.55 node_modules/mongodb
> ├── es6-promise at 2.1.1
> ├── readable-stream at 1.0.31 (inherits at 2.0.3, isarray at 0.0.1,
> string_decoder at 0.10.31, core-util-is at 1.0.2)
> ├── kerberos at 0.0.21 (nan at 2.3.5)
> └── mongodb-core at 1.2.31 (bson at 0.4.23)
>
> As per user "kathiedrt"'s comment on https://github.com/nodejs/nan/
> issues/414 ,:
>
>   "I just did a "npm -g install npm" to upgrade the debian's npm to npm's
> npm
>   and that presumably included node-gyp and that fixed it so thanks..."
>
> However, that doesn't sound like the Debian way of doing things ... ?
>
>
What's happening is that you're trying to install (and build) a nodejs
addon that
is compatible with a version of node-nan that is not compatible with the
nodejs
version in debian/jessie (0.10).
You could try to downgrade the nan module, or try to compile `kerberos`
addon
using node-nan package only (just remove node_modules/nan), but it will
probaby fail.

A quick and dirty workaround would be to apply that patch to the v8 header
/usr/include/v8.h...
--- a/include/v8.h
+++ b/include/v8.h
@@ -1153,7 +1153,8 @@
     NO_OPTIONS = 0,
     HINT_MANY_WRITES_EXPECTED = 1,
     NO_NULL_TERMINATION = 2,
-    PRESERVE_ASCII_NULL = 4
+    PRESERVE_ASCII_NULL = 4,
+    REPLACE_INVALID_UTF8 = 0
   };

Jérémy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20161011/f7d3252f/attachment.html>


More information about the Pkg-javascript-devel mailing list