-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
field ‘timestamp’ has incomplete type error during build. #30
Comments
@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? |
For the sake of completeness, here are my errors: $ npm i v4l2camera
> v4l2camera@1.0.4 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! v4l2camera@1.0.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v4l2camera@1.0.4 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 |
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. |
It seems distribution dependent problems around linux-headers. Ubuntu-17.04's If the fix required, Or #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. |
I have this error when try to install with |
I agree with meganetaaan's fix above, it worked for me. |
Has anyone found the fix. I'm also facing the same issue. |
@bellbind Are you waiting for a PR or trying to decide on implementation? |
Is this gunna get fixed? |
It's Not merged, already requests have been sent. Plz merge or tell me some alternative PLZZZ |
I get the following error during installation.
I was able to fix it by adding
#include <time.h>
to the top ofcapture.h
The text was updated successfully, but these errors were encountered: