kiran-g / node-mjpeg-streamer

Mjpeg streamer with v4l2 as camera interface
Other
5 stars 2 forks source link

common.o build failed #3

Closed gregfutia closed 7 years ago

gregfutia commented 7 years ago

$ npm install mjpeg-streamer --save

jpeg@2.0.0 install /var/lib/cloud9/Projects/VideoServer/node_modules/jpeg
node-gyp configure build

make: Entering directory '/var/lib/cloud9/Projects/VideoServer/node_modules/jpeg/build' CXX(target) Release/obj.target/jpeg/src/common.o In file included from /root/.node-gyp/0.12.18/include/node/node.h:61:0, from ../src/common.h:4, from ../src/common.cpp:3: /root/.node-gyp/0.12.18/include/node/v8.h: In function ‘v8::Handlev8::Value ErrorException(const char)’: /root/.node-gyp/0.12.18/include/node/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../src/common.cpp:10:17: error: within this context HandleScope scope; ^ ../src/common.cpp:11:29: error: ‘New’ is not a member of ‘v8::String’ return Exception::Error(String::New(msg)); ^ In file included from /root/.node-gyp/0.12.18/include/node/node.h:61:0, from ../src/common.h:4, from ../src/common.cpp:3: /root/.node-gyp/0.12.18/include/node/v8.h: In function ‘v8::Handlev8::Value VException(const char)’: /root/.node-gyp/0.12.18/include/node/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../src/common.cpp:16:17: error: within this context HandleScope scope; ^ ../src/common.cpp:17:46: error: ‘ThrowException’ was not declared in this scope return ThrowException(ErrorException(msg)); ^ ../src/common.cpp: In function ‘v8::Handlev8::Value ErrorException(const char)’: ../src/common.cpp:12:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../src/common.cpp: In function ‘v8::Handlev8::Value VException(const char)’: ../src/common.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ jpeg.target.mk:90: recipe for target 'Release/obj.target/jpeg/src/common.o' failed make: *** [Release/obj.target/jpeg/src/common.o] Error 1 make: Leaving directory '/var/lib/cloud9/Projects/VideoServer/node_modules/jpeg/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:276:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1078:12) gyp ERR! System Linux 4.4.9-ti-r25 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" gyp ERR! cwd /var/lib/cloud9/Projects/VideoServer/node_modules/jpeg gyp ERR! node -v v0.12.18 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok videoserver@1.0.0 /var/lib/cloud9/Projects/VideoServer

├── fluent-ffmpeg@2.1.0 extraneous └── livecam@0.2.0 extraneous

npm WARN videoserver@1.0.0 No repository field. npm ERR! Linux 4.4.9-ti-r25 npm ERR! argv "node" "/usr/local/bin/npm" "install" "mjpeg-streamer" "--save" npm ERR! node v0.12.18 npm ERR! npm v3.8.2 npm ERR! code ELIFECYCLE

npm ERR! jpeg@2.0.0 install: node-gyp configure build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the jpeg@2.0.0 install script 'node-gyp configure build'. 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 jpeg package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp configure build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs jpeg npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls jpeg npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /var/lib/cloud9/Projects/VideoServer/npm-debug.log

npm-debug.log.txt

kiran-geon commented 7 years ago

@CTCHunter1 ,

This looks like an issue in the dependency module 'jpeg'. Please try installing it independently by following the method suggested there.

./src/common.cpp:11:29: error: ‘New’ is not a member of ‘v8::String’

My guess is that this might be a version mismatch issue. Unfortunately I am not in a position to try to recreate this. So please try my suggestion above and let me know how it goes.

kiran-geon commented 7 years ago

https://github.com/pkrumins/node-png/issues/50 https://gist.github.com/vird/83609093ff63887cb3d7

gregfutia commented 7 years ago

The issue is in the node jpeg dependency. It needs a patch for changes from 0.10 to latest versions of node. I opened this as issue 26 on the node-jpeg package.

kiran-geon commented 7 years ago

@CTCHunter1 I will go ahead and close this issue then. Btw I am curious to know how/why you are using "mjpeg-streamer". Please let me know if you don't mind.

gregfutia commented 7 years ago

I'm trying to use it it to stream a webcam from a beaglebone black. I never actually got it to work because of the node-jpeg issue I encountered.

However, I was able to code up something similar using gstreamer as the jpeg feed. Here is an example I came up with to do that..

kiran-geon commented 7 years ago

The reason I created this project was to stream MJPEG from an Ambarella https://www.ambarella.com/ SOC custom board. My client suggested me to use Node.js, but I couldn't find a node module for it. Even though I didnt use node.js to implement the mjpeg-streamer (due to memory limit), I felt like this was an opportunity to contribute to open-source. For that client project, I was able to partially implement the mjpeg-streamer in C using the libmicrohttpd https://www.gnu.org/software/libmicrohttpd/ library. But it had some limits. Btw, libmicrohttpd https://www.gnu.org/software/libmicrohttpd/ is pretty good if you want to include web-server capability to you application.

For your purpose ffmpeg might be a simpler option.

On Wed, Jan 18, 2017 at 11:13 PM, Gregory Futia notifications@github.com wrote:

I'm trying to use it it to stream a webcam from a beaglebone black. I never actually got it to work because of the node-jpeg issue I encountered.

However, I was able to code up something similar using gstreamer as the jpeg feed. Here is an example I came up with to do that. https://github.com/dturing/node-gstreamer-superficial/tree/master/examples/m-jpeg-streamer .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kiran-geon/node-mjpeg-streamer/issues/3#issuecomment-273546524, or mute the thread https://github.com/notifications/unsubscribe-auth/AKPs79MTIugh4mwxlo3qp2nRRDwRQKZzks5rTk8qgaJpZM4Lfm48 .

-- https://www.linkedin.com/in/kiran-g-2a63b147?trk=nav_responsive_tab_profile_pic

gregfutia commented 7 years ago

My first goal was to do a live compressed (h.264) web feed to a browser. I've had some mixed success getting this to work with node as the web server.

I guess the original way to m-jpeg is mjpeg-streamer which can run a http server streaming to stream it onto a webport. The C code for http.c is pretty similar to what you implemented in node.js.

I'll keetp the libmicrohttpd in mind, although I'm starting to like node more and more.

The input stream in my gstreamer example can be changed to bring in video from almost anywhere and turn it into m-jpeg. Now if I could only get it into a mp4 that's playable in a browser.

kiran-geon commented 7 years ago

I think you should try HLS instead of MJPEG

On Thu, Jan 19, 2017 at 1:29 AM, Gregory Futia notifications@github.com wrote:

My first goal was to do a live compressed (h.264) web feed to a browser. I've had some mixed success getting this to work with node as the web server.

I guess the original way to m-jpeg is mjpeg-streamer https://github.com/jacksonliam/mjpg-streamer which can run a http server streaming to stream it onto a webport. The C code for http.c is pretty similar to what you implemented in node.js.

The input stream in my gstreamer example can be changed to bring in video from almost anywhere and turn it into m-jpeg. Now if I could only get it into a mp4 that's playable in a browser.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kiran-geon/node-mjpeg-streamer/issues/3#issuecomment-273584083, or mute the thread https://github.com/notifications/unsubscribe-auth/AKPs77wYcTdMnuM-_xnAIwXC_hqaGBhCks5rTm8HgaJpZM4Lfm48 .

-- https://www.linkedin.com/in/kiran-g-2a63b147?trk=nav_responsive_tab_profile_pic

kiran-geon commented 7 years ago

Closing as invalid