Comments (11)
It seems distribution dependent problems around linux-headers.
Ubuntu-17.04's videodev2.h
includes <sys/time.h>
not libc's <time.h>
above.
The videodev2.h
also uses struct timeval
not in the libc <time.h>
.
If the fix required, #include <sys/time.h>
would be valid.
Or <linux/time.h>
would be better if:
#include <stdio.h>
#include <sys/time.h>
int main() {
printf("timespec: %zu\n", sizeof (struct timespec));
printf("timeval: %zu\n", sizeof (struct timeval));
return 0;
}
and
#include <stdio.h>
#include <linux/time.h>
int main() {
printf("timespec: %zu\n", sizeof (struct timespec));
printf("timeval: %zu\n", sizeof (struct timeval));
return 0;
}
would be different in some platforms.
from node-v4l2camera.
I have this error when try to install with npm i --save v4l2camera
. How i can install this?
from node-v4l2camera.
@RichAyotte it doesn't seem your like change has been pulled in yet. Can you recommend which of the forks one ought to use? Or is progress on this npm module at a standstill?
from node-v4l2camera.
For the sake of completeness, here are my errors:
$ npm i v4l2camera
> [email protected] install /home/troyw/code-local/experiments/v4l2camera/node_modules/v4l2camera
> node-gyp rebuild
make: Entering directory '/home/troyw/code-local/experiments/v4l2camera/node_modules/v4l2camera/build'
CC(target) Release/obj.target/v4l2camera/capture.o
In file included from ../capture.h:7:0,
from ../capture.c:1:
/usr/include/linux/videodev2.h:2190:20: error: field ‘timestamp’ has incomplete type
struct timespec timestamp;
^~~~~~~~~
v4l2camera.target.mk:112: recipe for target 'Release/obj.target/v4l2camera/capture.o' failed
make: *** [Release/obj.target/v4l2camera/capture.o] Error 1
make: Leaving directory '/home/troyw/code-local/experiments/v4l2camera/node_modules/v4l2camera/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/troyw/.nvm/versions/node/v7.10.0/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:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.10.0-24-generic
gyp ERR! command "/home/troyw/.nvm/versions/node/v7.10.0/bin/node" "/home/troyw/.nvm/versions/node/v7.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/troyw/code-local/experiments/v4l2camera/node_modules/v4l2camera
gyp ERR! node -v v7.10.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/troyw/code-local/experiments/v4l2camera/package.json'
npm WARN v4l2camera No description
npm WARN v4l2camera No repository field.
npm WARN v4l2camera No README data
npm WARN v4l2camera No license field.
npm ERR! Linux 4.10.0-24-generic
npm ERR! argv "/home/troyw/.nvm/versions/node/v7.10.0/bin/node" "/home/troyw/.nvm/versions/node/v7.10.0/bin/npm" "i" "v4l2camera"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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 v4l2camera 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 v4l2camera
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls v4l2camera
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/troyw/.npm/_logs/2017-06-26T20_54_17_262Z-debug.log
from node-v4l2camera.
I reported the issue but didn't submit a PR. The fix is simple though, just add #include <time.h> to the top of capture.h.
from node-v4l2camera.
I agree with meganetaaan's fix above, it worked for me.
from node-v4l2camera.
The fix got applied in e0bff49 and reverted in the very next commit
c2bb744 - I still get the same error
from node-v4l2camera.
Has anyone found the fix. I'm also facing the same issue.
from node-v4l2camera.
@bellbind Are you waiting for a PR or trying to decide on implementation?
from node-v4l2camera.
Is this gunna get fixed?
from node-v4l2camera.
It's Not merged, already requests have been sent. Plz merge or tell me some alternative PLZZZ
from node-v4l2camera.
Related Issues (20)
- Apply Getter/Setter to config
- The jpg data is not readable on Mac HOT 4
- Error on cam.stop(); HOT 3
- missing controls? HOT 9
- Capturing images in setInterval? HOT 1
- frameRaw() access often in the middle of a frame HOT 2
- multiple camera access? HOT 1
- Cant install on OS X EI Capitan HOT 1
- core dump when running `examples/capture-via-yuyv.js` HOT 4
- Native Error when re-sarting camera HOT 1
- Force camera to change format
- npm install on Raspberry Pi not working HOT 2
- Does this work with YUYV formats? HOT 2
- GCC 6.3, need to remove parameters HOT 1
- Bug: will always have error message "camera format [YUYV] is not supported" because check is wrong
- Installation fails with Node.js 10 HOT 7
- "Fatal error in ../deps/v8/src/objects.cc, line 3577" when cam.stop HOT 3
- Camera warm-up frame buffer?
- errors about ioctl
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-v4l2camera.