Re: [ros-users] Compiling ROS with Ubuntu 11.04 (Natty)

Top Page
Attachments:
Message as email
+ (text/plain)
+ v4l_2.6.38.patch (text/x-patch)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: User discussions
Subject: Re: [ros-users] Compiling ROS with Ubuntu 11.04 (Natty)
I solved the issue.
Inorder to build ROS from source under Natty I just applied this
modified patch (copied it to the opencv2 folder) and added the line

SVN_PATCH = pythontest.patch v4l_2.6.38.patch

to the Makefile.

The Opencv package now builds with Natty (but i guess not with older
Ubuntu anymore ;-)

Make sure that libv4l-dev is installed.


Cheers,

Markus








On 03.05.2011 22:41, Markus Eich wrote:
> Dear all,
>
> I am facing a problem with compiling the ROS sources under Natty.
>
> While building the opencv2 package, I got the following linking error:
>
>
> ==============================
> Linking CXX static library ../../lib/libopencv_haartraining_engine.a
> [ 80%] Built target opencv_haartraining_engine
> Scanning dependencies of target opencv_createsamples
> [ 80%] Building CXX object
> modules/haartraining/CMakeFiles/opencv_createsamples.dir/createsamples.o
> Linking CXX executable ../../bin/opencv_createsamples
> ../../lib/libopencv_highgui.so.2.2.0: undefined reference to
> `cvCreateCameraCapture_V4L(int)'
> collect2: ld returned 1 exit status
> make[2]: *** [bin/opencv_createsamples] Fehler 1
> make[1]: ***
> [modules/haartraining/CMakeFiles/opencv_createsamples.dir/all] Fehler 2
> ==============================
>
> It seems it has to do with the linking of V4L. I have the lib4vl-dev
> package installed.
> According to my prior web search there seems to be the issue that V4L
> has moved out of the kernel source.
>
> Do you have any clues?
>
> Cheers,
>
> Markus
> _______________________________________________
> ros-users mailing list
>
> https://code.ros.org/mailman/listinfo/ros-users



--
Dipl. Inf. Markus Eich
Researcher

DFKI Bremen
Robotics Innovation Center
Mary-Somerville-Str. 9
28359 Bremen, Germany

Phone: +49 (0)421 17845-4105
Fax: +49 (0)421 17845-4150
E-Mail:

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3
-----------------------------------------------------------------------


Index: cap_v4l.cpp
===================================================================
--- modules/highgui/src/cap_v4l.cpp    (revision 4798)
+++ modules/highgui/src/cap_v4l.cpp    (working copy)
@@ -214,7 +214,7 @@
 #include <sys/types.h>
 #include <sys/mman.h>


-#include <linux/videodev.h>
+#include <libv4l1-videodev.h>

 #include <string.h>
 #include <stdlib.h>
Index: cap_libv4l.cpp
===================================================================
--- modules/highgui/src/cap_libv4l.cpp    (revision 4798)
+++ modules(highgui/src/cap_libv4l.cpp    (working copy)
@@ -224,7 +224,7 @@
 #include "highgui.h"
 #include "precomp.hpp"


-#if !defined WIN32 && defined HAVE_CAMV4L && defined HAVE_CAMV4L2
+#if !defined WIN32 && defined HAVE_CAMV4L2

#define CLEAR(x) memset (&(x), 0, sizeof (x))

@@ -241,7 +241,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>

-#include <linux/videodev.h>
+#include <libv4l1-videodev.h>
#include <linux/videodev2.h>

#include <libv4l1.h>