creatale / node-dv

A node.js library for processing and understanding scanned documents
Other
340 stars 72 forks source link

Compilation failed on Arch Linux #36

Open denysvitali opened 8 years ago

denysvitali commented 8 years ago

When npm installing node-dv with node v6.1.0, node-gyp v3.3.1 and Arch Linux the installation fails

  AR(target) Release/obj.target/deps/zxing/zxing.a
  COPY Release/zxing.a
  CXX(target) Release/obj.target/dvBinding/src/image.o
In file included from ../src/image.h:13:0,
                 from ../src/image.cc:9:
../../nan/nan.h:602:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^~~~~~~~~~~~~~~~~~
../../nan/nan.h:602:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback
       ^~
../../nan/nan.h:603:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^~~~~~~~~~~~~~
../../nan/nan.h:608:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^~~~~~~~~~~~~~~~~~
../../nan/nan.h:608:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback) {
       ^~
../../nan/nan.h:613:20: error: variable or field ‘AddGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback
                    ^~~~~~~~~~~~~~~~~~
../../nan/nan.h:613:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback
       ^~
../../nan/nan.h:614:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^~~~~~~~~~~~~~
../../nan/nan.h:619:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^~~~~~~~~~~~~~~~~~
../../nan/nan.h:619:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback) {
       ^~
dvBinding.target.mk:143: recipe for target 'Release/obj.target/dvBinding/src/image.o' failed
make: *** [Release/obj.target/dvBinding/src/image.o] Error 1
make: Leaving directory '/home/dvitali/Documents/docscanner/node_modules/dv/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.5.0-rc4-mainline
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/dvitali/Documents/docscanner/node_modules/dv
gyp ERR! node -v v6.1.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
/home/dvitali/Documents/docscanner
`-- (empty)
diegoperini commented 8 years ago

Same issue on Ubuntu 14.04 LTS in an AWS EC2 instance.

System info:

Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)

Error:

  CXX(target) Release/obj.target/libzxing/deps/zxing/core/src/zxing/qrcode/detector/FinderPatternFinder.o
  CXX(target) Release/obj.target/libzxing/deps/zxing/core/src/zxing/qrcode/detector/FinderPatternInfo.o
  AR(target) Release/obj.target/deps/zxing/zxing.a
  COPY Release/zxing.a
  CXX(target) Release/obj.target/dvBinding/src/image.o
In file included from ../src/image.h:13:0,
                 from ../src/image.cc:9:
../../nan/nan.h:602:20: error: variable or field 'AddGCEpilogueCallback' declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^
../../nan/nan.h:602:7: error: 'GCEpilogueCallback' is not a member of 'v8::Isolate'
       v8::Isolate::GCEpilogueCallback callback
       ^
../../nan/nan.h:603:18: error: expected primary-expression before 'gc_type_filter'
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../../nan/nan.h:608:20: error: variable or field 'RemoveGCEpilogueCallback' declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^
../../nan/nan.h:608:7: error: 'GCEpilogueCallback' is not a member of 'v8::Isolate'
       v8::Isolate::GCEpilogueCallback callback) {
       ^
../../nan/nan.h:613:20: error: variable or field 'AddGCPrologueCallback' declared void
       v8::Isolate::GCPrologueCallback callback
                    ^
../../nan/nan.h:613:7: error: 'GCPrologueCallback' is not a member of 'v8::Isolate'
       v8::Isolate::GCPrologueCallback callback
       ^
../../nan/nan.h:614:18: error: expected primary-expression before 'gc_type_filter'
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../../nan/nan.h:619:20: error: variable or field 'RemoveGCPrologueCallback' declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^
../../nan/nan.h:619:7: error: 'GCPrologueCallback' is not a member of 'v8::Isolate'
       v8::Isolate::GCPrologueCallback callback) {
       ^
make: *** [Release/obj.target/dvBinding/src/image.o] Error 1
make: Leaving directory `/banqo/node_modules/dv/build'
gyp ERR! build error
3g0r commented 8 years ago

cat /etc/linuxmint/info

RELEASE=17.3
CODENAME=rosa
EDITION="MATE 64-bit"
DESCRIPTION="Linux Mint 17.3 Rosa"
DESKTOP=MATE
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_rosa_mate_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_rosa_mate.php
USER_GUIDE_URL=help:linuxmint
GRUB_TITLE=Linux Mint 17.3 MATE 64-bit

uname -a

Linux bathyscaphe 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

node -v6.2.2 npm -v3.9.5 gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

npm install dv
....................
....................
COPY Release/zxing.a
  CXX(target) Release/obj.target/dvBinding/src/image.o
In file included from ../src/image.h:13:0,
                 from ../src/image.cc:9:
../../nan/nan.h:602:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^
../../nan/nan.h:602:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback
       ^
../../nan/nan.h:603:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../../nan/nan.h:608:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^
../../nan/nan.h:608:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback) {
       ^
../../nan/nan.h:613:20: error: variable or field ‘AddGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback
                    ^
../../nan/nan.h:613:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback
       ^
../../nan/nan.h:614:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../../nan/nan.h:619:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^
../../nan/nan.h:619:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback) {
       ^
make: *** [Release/obj.target/dvBinding/src/image.o]
tjohnman commented 7 years ago

Having the same problem on an Amazon EC2 instance. npm 5.0.3 node 7.9.0 gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) Linux 4.9.27-14.31.amzn1.x86_64