<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-10-11 21:03 GMT+02:00 David L Lambert <span dir="ltr"><<a href="mailto:davidl@lmert.com" target="_blank">davidl@lmert.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Package: nodejs<br>
Version: 0.10.29~dfsg-2<br>
Severity: normal<br>
<br>
Dear Maintainer,<br>
<br>
After installing packages "nodejs", "nodejs-legacy", and "libkrb5-dev",<br>
I still get a compilation error blocking completion of "npm install mongodb"...<br>
<br>
> kerberos@0.0.21 install /home/dllamber/src/project2/<wbr>node_modules/mongodb/node_<wbr>modules/kerberos<br>
> (node-gyp rebuild) || (exit 0)<br>
<br>
make: Entering directory '/home/dllamber/src/project2/<wbr>node_modules/mongodb/node_<wbr>modules/kerberos/build'<br>
  CXX(target) Release/obj.target/kerberos/<wbr>lib/kerberos.o<br>
In file included from ../lib/kerberos.h:9:0,<br>
                 from ../lib/kerberos.cc:1:<br>
../node_modules/nan/nan.h:324:<wbr>47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’<br>
   static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_<wbr>UTF8;<br>
                                               ^<br>
<a href="http://kerberos.target.mk:88" rel="noreferrer" target="_blank">kerberos.target.mk:88</a>: recipe for target 'Release/obj.target/kerberos/<wbr>lib/kerberos.o' failed<br>
make: *** [Release/obj.target/kerberos/<wbr>lib/kerberos.o] Error 1<br>
make: Leaving directory '/home/dllamber/src/project2/<wbr>node_modules/mongodb/node_<wbr>modules/kerberos/build'<br>
gyp ERR! build error<br>
gyp ERR! stack Error: `make` failed with exit code: 2<br>
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/<wbr>build.js:267:23)<br>
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)<br>
gyp ERR! stack     at Process.ChildProcess._handle.<wbr>onexit (child_process.js:809:12)<br>
gyp ERR! System Linux 3.16.0-4-686-pae<br>
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"<br>
gyp ERR! cwd /home/dllamber/src/project2/<wbr>node_modules/mongodb/node_<wbr>modules/kerberos<br>
gyp ERR! node -v v0.10.29<br>
gyp ERR! node-gyp -v v0.12.2<br>
gyp ERR! not ok<br>
mongodb@2.0.55 node_modules/mongodb<br>
├── es6-promise@2.1.1<br>
├── readable-stream@1.0.31 (inherits@2.0.3, isarray@0.0.1, string_decoder@0.10.31, core-util-is@1.0.2)<br>
├── kerberos@0.0.21 (nan@2.3.5)<br>
└── mongodb-core@1.2.31 (bson@0.4.23)<br>
<br>
As per user "kathiedrt"'s comment on <a href="https://github.com/nodejs/nan/issues/414" rel="noreferrer" target="_blank">https://github.com/nodejs/nan/<wbr>issues/414</a> ,:<br>
<br>
  "I just did a "npm -g install npm" to upgrade the debian's npm to npm's npm<br>
  and that presumably included node-gyp and that fixed it so thanks..."<br>
<br>
However, that doesn't sound like the Debian way of doing things ... ?<br><br></blockquote><div><br></div><div>What's happening is that you're trying to install (and build) a nodejs addon that</div><div>is compatible with a version of node-nan that is not compatible with the nodejs</div><div>version in debian/jessie (0.10).</div><div>You could try to downgrade the nan module, or try to compile `kerberos` addon</div><div>using node-nan package only (just remove node_modules/nan), but it will</div><div>probaby fail. </div><div><br></div><div>A quick and dirty workaround would be to apply that patch to the v8 header /usr/include/v8.h...</div><div><div>--- a/include/v8.h</div><div>+++ b/include/v8.h</div><div>@@ -1153,7 +1153,8 @@</div><div>     NO_OPTIONS = 0,</div><div>     HINT_MANY_WRITES_EXPECTED = 1,</div><div>     NO_NULL_TERMINATION = 2,</div><div>-    PRESERVE_ASCII_NULL = 4</div><div>+    PRESERVE_ASCII_NULL = 4,</div><div>+    REPLACE_INVALID_UTF8 = 0</div><div>   };</div></div><div> </div></div>Jérémy</div></div>