GithubHelp home page GithubHelp logo

Comments (11)

bellbind avatar bellbind commented on July 17, 2024 2

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.

MiguelGonzalezAravena avatar MiguelGonzalezAravena commented on July 17, 2024 1

I have this error when try to install with npm i --save v4l2camera. How i can install this?

from node-v4l2camera.

troywweber7 avatar troywweber7 commented on July 17, 2024

@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.

troywweber7 avatar troywweber7 commented on July 17, 2024

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.

RichAyotte avatar RichAyotte commented on July 17, 2024

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.

baragona avatar baragona commented on July 17, 2024

I agree with meganetaaan's fix above, it worked for me.

from node-v4l2camera.

DanielWeigl avatar DanielWeigl commented on July 17, 2024

The fix got applied in e0bff49 and reverted in the very next commit
c2bb744 - I still get the same error

from node-v4l2camera.

pyn1 avatar pyn1 commented on July 17, 2024

Has anyone found the fix. I'm also facing the same issue.

from node-v4l2camera.

RichAyotte avatar RichAyotte commented on July 17, 2024

@bellbind Are you waiting for a PR or trying to decide on implementation?

from node-v4l2camera.

TomMettam avatar TomMettam commented on July 17, 2024

Is this gunna get fixed?

from node-v4l2camera.

Satyam-code143 avatar Satyam-code143 commented on July 17, 2024

It's Not merged, already requests have been sent. Plz merge or tell me some alternative PLZZZ

from node-v4l2camera.

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.