Giter Site home page Giter Site logo

编译安装的方法 about node-images HOT 7 CLOSED

zhangyuanwei avatar zhangyuanwei commented on September 17, 2024 2
编译安装的方法

from node-images.

Comments (7)

painty avatar painty commented on September 17, 2024 1

请问,Windows下如何自己编译呢?虽然有编译好的,但不适用于electron,所以想自己编译。

from node-images.

corecible avatar corecible commented on September 17, 2024

我的操作系统为debian 8
脚本中 libpng 的1.6.16已经无法下载,自己手动换成了 1.6.19。在使用node-gyp rebuild
时遇到如下问题,估计是什么问题。
obj.target/zlib/gyp/third-party/zlib/inffast.o
CC(target) Release/obj.target/zlib/gyp/third-party/zlib/inflate.o
CC(target) Release/obj.target/zlib/gyp/third-party/zlib/inftrees.o
CC(target) Release/obj.target/zlib/gyp/third-party/zlib/trees.o
CC(target) Release/obj.target/zlib/gyp/third-party/zlib/uncompr.o
CC(target) Release/obj.target/zlib/gyp/third-party/zlib/zutil.o
AR(target) Release/obj.target/gyp/gyp/zlib.a
COPY Release/zlib.a
CXX(target) Release/obj.target/binding/src/Image.o
../src/Image.cc:27:11: error: ‘v8::MaybeLocal’ has not been declared
using v8::MaybeLocal;
^
../src/Image.cc: In static member function ‘static void Image::Init(v8::Localv8::Object)’:
../src/Image.cc:65:33: error: ‘class v8::Object’ has no member named ‘GetIsolate’
Isolate isolate = exports->GetIsolate();
^
../src/Image.cc: In static member function ‘static void Image::ToBuffer(const v8::FunctionCallbackInfov8::Value&)’:
../src/Image.cc:425:25: error: ‘MaybeLocal’ was not declared in this scope
MaybeLocal maybeBuffer = node::Buffer::New(args.GetIsolate(), (size_t) length);
^
../src/Image.cc:425:42: error: expected primary-expression before ‘>’ token
MaybeLocal maybeBuffer = node::Buffer::New(args.GetIsolate(), (size_t) length);
^
../src/Image.cc:425:44: error: ‘maybeBuffer’ was not declared in this scope
MaybeLocal maybeBuffer = node::Buffer::New(args.GetIsolate(), (size_t) length);
^
../src/Image.cc: In constructor ‘Image::Image()’:
../src/Image.cc:53:78: warning: value computed is not used [-Wunused-value]
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(bc));
^
../src/Image.cc:469:5: note: in expansion of macro ‘AdjustAmountOfExternalAllocatedMemory’
AdjustAmountOfExternalAllocatedMemory(size);
^
../src/Image.cc: In destructor ‘virtual Image::~Image()’:
../src/Image.cc:53:78: warning: value computed is not used [-Wunused-value]
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(bc));
^
../src/Image.cc:479:5: note: in expansion of macro ‘AdjustAmountOfExternalAllocatedMemory’
AdjustAmountOfExternalAllocatedMemory(-size);
^
../src/Image.cc: In member function ‘ImageState PixelArray::Malloc(size_t, size_t)’:
../src/Image.cc:53:78: warning: value computed is not used [-Wunused-value]
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(bc));
^
../src/Image.cc:524:5: note: in expansion of macro ‘AdjustAmountOfExternalAllocatedMemory’
AdjustAmountOfExternalAllocatedMemory(size);
^
../src/Image.cc: In member function ‘void PixelArray::Free()’:
../src/Image.cc:53:78: warning: value computed is not used [-Wunused-value]
v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(bc));
^
../src/Image.cc:550:9: note: in expansion of macro ‘AdjustAmountOfExternalAllocatedMemory’
AdjustAmountOfExternalAllocatedMemory(-size);
^
binding.target.mk:109: recipe for target 'Release/obj.target/binding/src/Image.o' failed
make: ** [Release/obj.target/binding/src/Image.o] Error 1
make: Leaving directory '/home/yangqw/node-images/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/yangqw/nodejs/node-v0.12.7-linux-x86/lib/node_modules/node-gyp/lib/build.js:276:23)
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 Linux 3.16.0-4-686-pae
gyp ERR! command "node" "/home/yangqw/nodejs/node-v0.12.7-linux-x86/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/yangqw/node-images
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok

from node-images.

oxUnd avatar oxUnd commented on September 17, 2024

5.0 貌似接口都改了

from node-images.

corecible avatar corecible commented on September 17, 2024

有解决办法吗?

from node-images.

sdming avatar sdming commented on September 17, 2024

centos6.6上运行报错:需要安装glibc2.14,根据此文rebuild时报错

/gyp/third-party/libjpeg-turbo/jpeglib.h:902:36: error: ‘JPEG_LIB_VERSION’ undeclared (first use in this function)

from node-images.

oxUnd avatar oxUnd commented on September 17, 2024

@sdming cmake 装了么

from node-images.

sdming avatar sdming commented on September 17, 2024

@xiangshouding
已经装了,报错的信息如下

`
In file included from ../gyp/third-party/libjpeg-turbo/cdjpeg.h:17:0,
from ../gyp/third-party/libjpeg-turbo/bmp.c:33:
../gyp/third-party/libjpeg-turbo/jpeglib.h:67:1: error: unknown type name ‘JSAMPLE’
typedef JSAMPLE JSAMPROW; / ptr to one image row of pixel samples. /
^
../gyp/third-party/libjpeg-turbo/jpeglib.h:656:3: error: unknown type name ‘JSAMPLE’
JSAMPLE * sample_range_limit; /
table for fast range-limiting */
^
../gyp/third-party/libjpeg-turbo/bmp.c: In function ‘loadbmp’:
../gyp/third-party/libjpeg-turbo/jpeglib.h:899:34: error: ‘JPEG_LIB_VERSION’ undeclared (first use in this function)
jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \

`

系统信息
`
[root@centos66 node-images]# node -v
v6.9.1
[root@centos66 node-images]# npm -v
3.10.3
[root@centos66 node-images]# strings /lib64/libc.so.6 |grep GLIBC_
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_PRIVATE
[root@centos66 node-images]# rpm -qa |grep glibc
glibc-headers-2.12-1.149.el6.x86_64
glibc-common-2.12-1.149.el6.x86_64
glibc-devel-2.12-1.149.el6.x86_64
glibc-2.12-1.149.el6.x86_64
[root@centos66 node-images]# cat /proc/version
Linux version 2.6.32-504.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Oct 15 04:27:16 UTC 2014

`

from node-images.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.