Jump to content
  • 0
Sign in to follow this  
anton0507

Need help with installing Ricoh R5U870 Webcam driver

Question

Hello,

 

I'm trying to compile and install Ricoh R5U870 Webcam driver for device called "Visual Communication Camera VGP-VCC3" and getting an error after execution of "make" command:

"fatal error: linux/videodev.h: No such file or directory".
Full output is:
make -C /lib/modules/4.13.0-17-generic/build M=/usr/src/r5u870-0.11.6 V=0 modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-17-generic'
  CC [M]  /usr/src/r5u870-0.11.6/r5u870.o
In file included from /usr/src/r5u870-0.11.6/r5u870.c:60:0:
/usr/src/r5u870-0.11.6/usbcam/usbcam.h:38:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
scripts/Makefile.build:309: recipe for target '/usr/src/r5u870-0.11.6/r5u870.o' failed
make[2]: *** [/usr/src/r5u870-0.11.6/r5u870.o] Error 1
Makefile:1546: recipe for target '_module_/usr/src/r5u870-0.11.6' failed
make[1]: *** [_module_/usr/src/r5u870-0.11.6] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-17-generic'
Makefile:36: recipe for target 'all' failed
make: *** [all] Error 2
 
What am I doing wrong?

Share this post


Link to post
Share on other sites

20 answers to this question

Recommended Posts

  • 0

https://duckduckgo.com/?q=%2Fusr%2Fsrc%2Fr5u870-0.11.6%2Fusbcam%2Fusbcam.h%3A38%3A28%3A+fatal+error%3A+linux%2Fvideodev.h%3A+No+such+file+or+directory+compilation+terminated.&t=hf&ia=qa

 

The first hit I got suggests at one time you might have needed to make a simlink to videodev.h. After reading some more of the comments I don't know if things have changed.

Share this post


Link to post
Share on other sites
  • 0

https://duckduckgo.com/?q=%2Fusr%2Fsrc%2Fr5u870-0.11.6%2Fusbcam%2Fusbcam.h%3A38%3A28%3A+fatal+error%3A+linux%2Fvideodev.h%3A+No+such+file+or+directory+compilation+terminated.&t=hf&ia=qa

 

The first hit I got suggests at one time you might have needed to make a simlink to videodev.h. After reading some more of the comments I don't know if things have changed.

Yes I saw this and I had executed these commands before creating the post:

sudo apt-get install libv4l-dev

cd /usr/include/linux

sudo ln -s ../libv4l1-videodev.h videodev.h

 

But as you can see in log in my post make procedure goes to '/usr/src/linux-headers-4.13.0-17-generic' directory and videodev.h (actually symlink) is located in '/usr/include/linux' directory.

Share this post


Link to post
Share on other sites
  • 0

 

cd /usr/include/linux

sudo ln -s ../libv4l1-videodev.h videodev.h

 

 

Did you have two dots in front of the slash? That would mean you start the path for the symlink in /include, not in /include/linux Check that the symlink points to the file you want:

cd /usr/include/linux
ls -l

The last command should list all symlinks with the path to the original file, including the filename.

 

Enjoy,

Charles

Share this post


Link to post
Share on other sites
  • 0

Did you have two dots in front of the slash? That would mean you start the path for the symlink in /include, not in /include/linux Check that the symlink points to the file you want:

cd /usr/include/linux
ls -l

The last command should list all symlinks with the path to the original file, including the filename.

 

Enjoy,

Charles

Excerpt from output is:

-rw-r--r-- 1 root root  81341 янв 10 00:25 videodev2.h
lrwxrwxrwx 1 root root     21 янв 21 20:30 videodev.h -> ../libv4l1-videodev.h
-rw-r--r-- 1 root root   2041 янв 10 00:25 virtio_9p.h
Edited by Charles@Bodhi
added codetags

Share this post


Link to post
Share on other sites
  • 0

I apologize if my comments to this thread are not helpful. Lacking the hardware, all I can do is search and attempt to offer search hits. Have you been to http://www.arakhne.org/ricoh/ It seems to suggest that the driver is no longer being maintained.

I did find https://modelrail.otenko.com/vaio-ux/r5u870-for-v4l2-linux-kernel-3-13 that offers a slightly updated version to work with some 3.x kernels. You may be fighting an extraordinary uphill battle getting that webcam working with a new kernel. This http://tinyurl.com/y9hh6kcm also talks about the driver and some 3.x kernels. The posts I have found are from 2+ years ago. It really seems the issue is the kernel is changing and the driver isn't interacting correctly. The 3rd link above does mention trying the r5u87x driver and firmware with your model of camera. You may need to get the updated driver, if it is still available from the dropbox link(I wouldn't hold my breath).

 

I don't understand why the third link will not become a link. 

https://forum.peppermintos.com/index.php?topic=198.0

There doesn't seem to be anything evil about it. I thought I would try a tinyurl to get the forum to link it. No dice.

Share this post


Link to post
Share on other sites
  • 0

Not sure make will interpret the ../ correctly. Can you try deleting the symlink and create a new one  with the full path?

cd /usr/include/linux
sudo ln -s /usr/include/libv4l1-videodev.h videodev.h

Enjoy,

Charles

Share this post


Link to post
Share on other sites
  • 0

Not sure make will interpret the ../ correctly. Can you try deleting the symlink and create a new one  with the full path?

cd /usr/include/linux
sudo ln -s /usr/include/libv4l1-videodev.h videodev.h

Enjoy,

Charles

I recreated the link but result is same.

 

 

I apologize if my comments to this thread are not helpful. Lacking the hardware, all I can do is search and attempt to offer search hits. Have you been to http://www.arakhne.org/ricoh/ It seems to suggest that the driver is no longer being maintained.

I did find https://modelrail.otenko.com/vaio-ux/r5u870-for-v4l2-linux-kernel-3-13 that offers a slightly updated version to work with some 3.x kernels. You may be fighting an extraordinary uphill battle getting that webcam working with a new kernel. This http://tinyurl.com/y9hh6kcm also talks about the driver and some 3.x kernels. The posts I have found are from 2+ years ago. It really seems the issue is the kernel is changing and the driver isn't interacting correctly. The 3rd link above does mention trying the r5u87x driver and firmware with your model of camera. You may need to get the updated driver, if it is still available from the dropbox link(I wouldn't hold my breath).

 

I don't understand why the third link will not become a link. 

https://forum.peppermintos.com/index.php?topic=198.0

There doesn't seem to be anything evil about it. I thought I would try a tinyurl to get the forum to link it. No dice.

Before Bodhi linux I've tried ordinary Ubuntu and webcam was working even without additional drivers (but there was another problems with ubuntu). Maybe there is some way to transplant driver from Ubuntu to Bodhi?

Share this post


Link to post
Share on other sites
  • 0

Honestly, my wild @$$ guess would be that Ubuntu includes the firmware and was using the r5u87x driver instead of the r5u870 driver. Just a guess though.

Share this post


Link to post
Share on other sites
  • 0

Honestly, my wild @$$ guess would be that Ubuntu includes the firmware and was using the r5u87x driver instead of the r5u870 driver. Just a guess though.

r5u87x does not support WDM webcam.

Share this post


Link to post
Share on other sites
  • 0

 

r5u87x does not support WDM webcam.

 

I read that. I also read the peppermint forum post with the person actually having a VCC3 camera and making use of the r5u87x driver. Worst case you install it and the firmware and you crash your system. Likely worst case is the driver doesn't work. Also, what version of Ubuntu were you running with the camera being recognized? 11? 12? It seems the driver may not work with the newer kernels anyway.

Share this post


Link to post
Share on other sites
  • 0

I read that. I also read the peppermint forum post with the person actually having a VCC3 camera and making use of the r5u87x driver. Worst case you install it and the firmware and you crash your system. Likely worst case is the driver doesn't work. Also, what version of Ubuntu were you running with the camera being recognized? 11? 12? It seems the driver may not work with the newer kernels anyway.

No, that was one of recent versions 16 or even 17. Is it possible to run Ubuntu from USB flash then determine which driver it use then grab it to Bodhi? Also patched version of r5u87x is not available now.

Share this post


Link to post
Share on other sites
  • 0

Bodhi is based on 16.04 xenial. If it works there it should work here too, but you might need to get an older kernel as Bodhi 4.4.0 ships with a 4.13.0 kernel where ubuntu 16.04 had 4.4.0 kernel iirc.

 

How old is that computer? You might test the Bodhi 4.4.0 legacy and see if it works there.

 

Enjoy,

Charles

Share this post


Link to post
Share on other sites
  • 0

Computer is about 10 years old, but it is Vaio 490UX - ultra mobile PC, so it is unique in some measure.

 

I agree, but current kernels are designed for modern hardware, so the legacy ISO could have advantages in your case.

Share this post


Link to post
Share on other sites
  • 0

Is it normal that the make process is "Entering directory '/usr/src/linux-headers-4.13.0-17-generic'" when it work but the link to videodev.h file is located in /usr/include/linux? Maybe this step is not concerned with kernel version?

Share this post


Link to post
Share on other sites
  • 0

I could be totally wrong. I am fairly sure that the /usr/include/linux/ directory is actually a symlink to the current kernel. I would imagine the make process uses wildcards to actually "Enter" the current kernel headers directory as there is probably no symlink for that directory.

Mind you, this is all guessing/muddled memory on my part.

Share this post


Link to post
Share on other sites
  • 0

Hmm, /usr/include/linux is a real directory, not a symlink.

The linux directory in /usr/src/linux-headers-4.13.0-17-generic/include/ however is a symlink. 

Make gets directed to the directory /usr/src/linux-headers-4.13.0-17/include/linux that also is a real directory. The videodev.h is obviously not present in that directory, but you might put a symlink to the needed file there:

sudo ln -s /usr/include/libv4l1-videodev.h /usr/src/linux-headers-4.13.0-17/include/linux/videodev.h
 

Enjoy,

Charles

Share this post


Link to post
Share on other sites
  • 0

Hmm, /usr/include/linux is a real directory, not a symlink.

The linux directory in /usr/src/linux-headers-4.13.0-17-generic/include/ however is a symlink. 

Make gets directed to the directory /usr/src/linux-headers-4.13.0-17/include/linux that also is a real directory. The videodev.h is obviously not present in that directory, but you might put a symlink to the needed file there:

sudo ln -s /usr/include/libv4l1-videodev.h /usr/src/linux-headers-4.13.0-17/include/linux/videodev.h
 

Enjoy,

Charles

Thanks, it worked, but now I have another error:

In file included from ./include/linux/videodev.h:13:0,
                 from /usr/src/r5u870-0.11.6/usbcam/usbcam.h:38,
                 from /usr/src/r5u870-0.11.6/r5u870.c:60:
/usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:9:26: error: no include path in which to search for stdint.h

Share this post


Link to post
Share on other sites
  • 0

A search produced https://github.com/umlaeute/v4l2loopback/issues/129

As the post/replies are a bit greek to me, it seems there might be an issue with kernel headers. Maybe a mismatch?

https://stackoverflow.com/questions/4236827/error-no-include-path-in-which-to-search-for-stdio-h

Seems like cross-compiling might also cause issues if you have your $PATH set wrong.

Share this post


Link to post
Share on other sites
  • 0

Well, I had no issues compiling the driver on a virtual machine.

 

Facts:

Using Bodhi 4.4.0 Legacy with a 32 bit kernel: 3.16.0-4-586 (non-PAE, thus limited to

Downloaded the zip file from HERE

Before compiling you need to install build-essential

The linux-headers are present by default.

make and make install produced no errors whatever.

My webcam is a different type so I can't test it for real, or judge the video quality.

 

Enjoy,

Charles

 

Read THIS, it was about the most recent thing I found offering a solution.

Edited by Charles@Bodhi
Added a reference site

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×