Closed martinsson closed 9 years ago
Yes through pkg-config. But anyway it will not compile because you are using 0.12 version of nodejs which is not supported yet. I am currently working on 0.12 support but i need more spare time. I hope next week..
Thank you for your response blackbeam. We actually got it to compile but I can't tell you anything about the runtime result as we ended up using pdfutils or our immediate needs.
@blackbeam let me know if there is anyway I can help out with support for 0.12.
Main problem was to track down segfault after migration to iols/nan. 0.12 support published on npm as v0.1.9
@blackbeam awesome! It seems to run on 0.12.2, even though I get this error during npm i
:
> poppler-simple@0.1.9 preinstall /Users/marcus/workspace/calipers/node_modules/poppler-simple
> (node-gyp configure) || (exit 0)
module.js:338
throw err;
^
Error: Cannot find module 'nan'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at [eval]:1:1
at Object.exports.runInThisContext (vm.js:74:17)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:460:26)
at evalScript (node.js:431:25)
at startup (node.js:90:7)
gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/marcus/.nvm/versions/v0.12.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/Users/marcus/.nvm/versions/v0.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure"
gyp ERR! cwd /Users/marcus/workspace/calipers/node_modules/poppler-simple
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
@blackbeam I can’t get it to install properly on Ubuntu 15.04. It throws what looks similar to the one in this issue:
$ npm install poppler-simple
> poppler-simple@0.2.2 preinstall /home/borodean/docs/pplr/node_modules/poppler-simple
> ((npm install nan) && (node-gyp configure)) || (exit 0)
nan@2.1.0 node_modules/nan
> poppler-simple@0.2.2 install /home/borodean/docs/pplr/node_modules/poppler-simple
> (node-gyp rebuild) || (exit 0)
make: Entering directory '/home/borodean/docs/pplr/node_modules/poppler-simple/build'
CXX(target) Release/obj.target/poppler/src/poppler.o
In file included from ../src/poppler.cc:3:0:
../src/NodePopplerDocument.h:4:26: fatal error: GlobalParams.h: No such file ordirectory
#include <GlobalParams.h>
^
compilation terminated.
poppler.target.mk:97: recipe for target 'Release/obj.target/poppler/src/poppler.o' failed
make: *** [Release/obj.target/poppler/src/poppler.o] Error 1
make: Leaving directory '/home/borodean/docs/pplr/node_modules/poppler-simple/build'
Here are my prerequisites:
$ node --version
v0.10.40
$ iconv --version
iconv (Ubuntu GLIBC 2.21-0ubuntu4) 2.21
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.
$ apt-cache show libpoppler49
Package: libpoppler49
Priority: optional
Section: libs
Installed-Size: 2666
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Loic Minier <lool@dooz.org>
Architecture: amd64
Source: poppler
Version: 0.30.0-0ubuntu1
Depends: libc6 (>= 2.14), libfontconfig1 (>= 2.9.0), libfreetype6 (>= 2.2.1), libjpeg8 (>= 8c), liblcms2-2 (>= 2.2+git20110628), libpng12-0 (>= 1.2.13-4), libstdc++6 (>= 4.9), libtiff5 (>= 4.0.3)
Pre-Depends: multiarch-support
Suggests: poppler-data
Filename: pool/main/p/poppler/libpoppler49_0.30.0-0ubuntu1_amd64.deb
Size: 755668
MD5sum: 904c335460795024e5cb7994439db8a3
SHA1: 3a358600e4e280a3de369fb98324716d27102066
SHA256: 0496d8d269f95969d05ded19a41a2208f24aa63f10a8d2c0d841fb5a20036333
Description-en: PDF rendering library
Poppler is a PDF rendering library based on Xpdf PDF viewer.
.
This package contains the shared core library.
Description-md5: 74b6b371a9886bca4fc2c2761b5a2fec
Multi-Arch: same
Homepage: http://poppler.freedesktop.org/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 9m
Task: ubuntu-desktop, ubuntu-usb, print-server, kubuntu-desktop, kubuntu-active-desktop, kubuntu-active, edubuntu-desktop, edubuntu-usb, xubuntu-core, xubuntu-desktop, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, lubuntu-core, ubuntustudio-desktop, ubuntustudio-desktop-minimal, ubuntu-gnome-desktop, ubuntu-sdk-libs, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-mate-cloudtop
What could it be?
There is a whole bunch of libpoppler-*-dev
packages in ubuntu.
I believe that GlabalParams.h is in libpoppler-private-dev
.
I'm unable to use this library on a debian 2.8 (I also tried on an ubuntu) as the node-gyp rebuild fails because it cant find the GlobalParams.h of poppler. I don't know what to try next. In particular I don't understand how the compilation process is supposed to find GlobalParams.h. Through pkg-config somehow?
I'm using libpoppler46, version 0.26.5-6 (full apt information on the bottom)
Full output of npm install of poppler-simple
$npm install
child_process: customFds option is deprecated, use stdio instead. make: Entering directory '/xxxxxxxxxxxxxxxxxxxxxx/poppler-simple/build' CXX(target) Release/obj.target/poppler/src/poppler.o In file included from ../src/poppler.cc:2:0: ../src/NodePopplerDocument.h:4:26: erreur fatale: GlobalParams.h : Aucun fichier ou dossier de ce type
include
compilation terminée. poppler.target.mk:94: recipe for target 'Release/obj.target/poppler/src/poppler.o' failed make: *\ [Release/obj.target/poppler/src/poppler.o] Error 1 make: Leaving directory '/xxxxxxxxxxxxxxxxxxxxxx/poppler-simple/build' 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:267:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12) gyp ERR! System Linux 3.16.0-4-686-pae gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /xxxxxxxxxxxxxxxxxxxxxx/poppler-simple gyp ERR! node -v v0.12.0 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok mocha@2.2.4 node_modules/mocha ├── escape-string-regexp@1.0.2 ├── supports-color@1.2.1 ├── diff@1.0.8 ├── growl@1.8.1 ├── commander@2.3.0 ├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0) ├── debug@2.0.0 (ms@0.6.2) ├── mkdirp@0.5.0 (minimist@0.0.8) └── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)apt info
$ apt-cache show libpoppler46 Package: libpoppler46 Source: poppler Version: 0.26.5-2 Installed-Size: 2962 Maintainer: Loic Minier lool@dooz.org Architecture: i386 Depends: libc6 (>= 2.11), libfontconfig1 (>= 2.11), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libjpeg62-turbo (>= 1:1.3.1), liblcms2-2 (>= 2.2+git20110628), libopenjpeg5 (>= 1.3+dfsg), libpng12-0 (>= 1.2.13-4), libstdc++6 (>= 4.1.1), libtiff5 (>= 4.0.3) Pre-Depends: multiarch-support Recommends: poppler-data Description-fr: bibliothèque de rendu PDF Poppler est une bibliothèque de rendu PDF fondée sur l'afficheur PDF Xpdf. . Ce paquet fournit le cœur de la bibliothèque partagée. Description-md5: 74b6b371a9886bca4fc2c2761b5a2fec Multi-Arch: same Homepage: http://poppler.freedesktop.org/ Section: libs Priority: optional Filename: pool/main/p/poppler/libpoppler46_0.26.5-2_i386.deb Size: 1240166 MD5sum: 0482acbbf3939de202fbe8653867ab30 SHA1: 25ef85c62550be37015a2a54e66570b579e685d2 SHA256: 6e7cf5a0c89b5ed3fa312f17adc591c1a992d957cc57aac4404bd2e8b92b915a