coconitro / node-pdflib Goto Github PK
View Code? Open in Web Editor NEWThis is a ffi wrapper for pdflib (http://pdflib.com) for use with node.js.
This is a ffi wrapper for pdflib (http://pdflib.com) for use with node.js.
The static lib needs to be converted to a dylib, but
fails with Error:
g++ -fpic -shared -Wl,-all_load libpdf.a -Wl -o libpdf.dylib
g++: error: unrecognized command line option ‘-Wl’
npm install pdflib
[email protected] install /home/parallels/myPDFlib/node_modules/ffi
node-gyp rebuild
make: Entering directory `/home/parallels/myPDFlib/node_modules/ffi/build'
CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
CC(target) Release/obj.target/ffi/deps/libffi/src/types.o
CC(target) Release/obj.target/ffi/deps/libffi/src/raw_api.o
CC(target) Release/obj.target/ffi/deps/libffi/src/java_raw_api.o
CC(target) Release/obj.target/ffi/deps/libffi/src/closures.o
../deps/libffi/src/closures.c: In function ‘dlmmap_locked’:
../deps/libffi/src/closures.c:421:17: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate (execfd, offset);
^
../deps/libffi/src/closures.c:433:17: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate (execfd, offset);
^
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi.o
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi64.o
../deps/libffi/src/x86/ffi64.c: In function ‘classify_argument’:
../deps/libffi/src/x86/ffi64.c:181:18: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
FFI_ASSERT (0);
^
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/unix64.o
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/sysv.o
AR(target) Release/obj.target/deps/libffi/libffi.a
COPY Release/libffi.a
CXX(target) Release/obj.target/ffi_bindings/src/ffi.o
In file included from ../src/ffi.cc:3:0:
../src/ffi.h:3:0: warning: "__STDC_LIMIT_MACROS" redefined [enabled by default]
#define __STDC_LIMIT_MACROS true
^
In file included from /home/parallels/.node-gyp/6.1.0/include/node/v8.h:19:0,
from /home/parallels/.node-gyp/6.1.0/include/node/node.h:42,
from ../src/ffi.cc:1:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:5:0: note: this is the location of the previous definition
^
In file included from ../src/ffi.h:18:0,
from ../src/ffi.cc:3:
../../nan/nan.h:324:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local&)’
NAN_INLINE v8::Local NanEnsureHandleOrPersistent(const v8::Local &val) {
^
../../nan/nan.h:319:17: error: ‘template v8::Handle Nan::imp::NanEnsureHandleOrPersistent(v8::Handle&)’ previously declared here
v8::Handle NanEnsureHandleOrPersistent(const v8::Handle &val) {
^
../../nan/nan.h:344:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureLocal(v8::Handle&)’
NAN_INLINE v8::Local NanEnsureLocal(const v8::Handle &val) {
^
../../nan/nan.h:334:27: error: ‘template v8::Local Nan::imp::NanEnsureLocal(const v8::Local&)’ previously declared here
NAN_INLINE v8::Local NanEnsureLocal(const v8::Local &val) {
^
../../nan/nan.h:560:20: error: variable or field ‘NanAddGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback
^
../../nan/nan.h:560:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback
^
../../nan/nan.h:561:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../../nan/nan.h:566:20: error: variable or field ‘NanRemoveGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback) {
^
../../nan/nan.h:566:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback) {
^
../../nan/nan.h:571:20: error: variable or field ‘NanAddGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback
^
../../nan/nan.h:571:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback
^
../../nan/nan.h:572:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../../nan/nan.h:577:20: error: variable or field ‘NanRemoveGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback) {
^
../../nan/nan.h:577:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback) {
^
../../nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../../nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(char*, size_t, int)’:
../../nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:768:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
In file included from ../src/ffi.cc:2:0:
/home/parallels/.node-gyp/6.1.0/include/node/node_buffer.h:46:40: error: initializing argument 2 of ‘v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate*, char*, size_t)’ [-fpermissive]
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../src/ffi.h:18:0,
from ../src/ffi.cc:3:
../../nan/nan.h:768:67: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((char*)data), ((size_t)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanBufferUse(char*, uint32_t)’:
../../nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
../src/ffi.cc: In function ‘v8::Handlev8::Value WrapPointer(char*, size_t)’:
../src/ffi.cc:25:63: error: no matching function for call to ‘NanNewBufferHandle(char*&, size_t&, void (&)(char*, void*), void*&)’
NanNewBufferHandle(ptr, length, wrap_pointer_cb, user_data)
^
../../nan/nan.h:483:68: note: in definition of macro ‘NanEscapeScope’
^
../src/ffi.cc:25:63: note: candidates are:
NanNewBufferHandle(ptr, length, wrap_pointer_cb, user_data)
^
../../nan/nan.h:483:68: note: in definition of macro ‘NanEscapeScope’
^
../../nan/nan.h:754:36: note: v8::Localv8::Object NanNewBufferHandle(char*, size_t, int)
NAN_INLINE v8::Localv8::Object NanNewBufferHandle (
^
../../nan/nan.h:754:36: note: candidate expects 3 arguments, 4 provided
../../nan/nan.h:764:36: note: v8::Localv8::Object NanNewBufferHandle(const char*, uint32_t)
NAN_INLINE v8::Localv8::Object NanNewBufferHandle (
^
../../nan/nan.h:764:36: note: candidate expects 2 arguments, 4 provided
../../nan/nan.h:771:36: note: v8::Localv8::Object NanNewBufferHandle(uint32_t)
NAN_INLINE v8::Localv8::Object NanNewBufferHandle (uint32_t size) {
^
../../nan/nan.h:771:36: note: candidate expects 1 argument, 4 provided
../src/ffi.cc: In static member function ‘static void FFI::FinishAsyncFFICall(uv_work_t*)’:
../src/ffi.cc:387:29: warning: ‘void node::FatalException(const v8::TryCatch&)’ is deprecated (declared at /home/parallels/.node-gyp/6.1.0/include/node/node.h:301): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
FatalException(try_catch);
^
../src/ffi.cc: In function ‘v8::Handlev8::Value WrapPointer(char*, size_t)’:
../src/ffi.cc:27:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [Release/obj.target/ffi_bindings/src/ffi.o] Error 1
make: Leaving directory/home/parallels/myPDFlib/node_modules/ffi/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 3.13.0-34-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/parallels/myPDFlib/node_modules/ffi
gyp ERR! node -v v6.1.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/parallels/myPDFlib/package.json'
npm WARN myPDFlib No description
npm WARN myPDFlib No repository field.
npm WARN myPDFlib No README data
npm WARN myPDFlib No license field.
npm ERR! Linux 3.13.0-34-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "pdflib"
npm ERR! node v6.1.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ffi 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 information on how to open an issue for this project with:
npm ERR! npm bugs ffi
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ffi
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/parallels/myPDFlib/npm-debug.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.