jannikMetzner / opencv-feature-tracker

Automatically exported from code.google.com/p/opencv-feature-tracker
0 stars 0 forks source link

Failed compilation using new version of OpenCV #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. obtain the latest_tested version of OpenCV 
https://code.ros.org/svn/opencv/tags/latest_tested_snapshot
2. Configure using Cmake
3. compile in a the build directory

What is the expected output? What do you see instead?
Error, clearly a wrong call to a modified function in OpenCV

CMakeFiles/BlobTrackPedestrian.dir/src/featuretrack/feature_grouper_dfs_visitor.
cpp.o
In file included from /usr/include/c++/4.4/backward/hash_set:60,
                 from /usr/include/boost/pending/container_traits.hpp:23,
                 from /usr/include/boost/graph/detail/adjacency_list.hpp:31,
                 from /usr/include/boost/graph/adjacency_list.hpp:324,
                 from /home/ali/Documents/Code/opencv-feature-tracker/include/feature_grouper_dfs_visitor.h:43,
                 from /home/ali/Documents/Code/opencv-feature-tracker/src/featuretrack/feature_grouper_dfs_visitor.cpp:1:
/usr/include/c++/4.4/backward/backward_warning.h:28: warning: #warning This 
file includes at least one deprecated or antiquated header which may be removed 
without further notice at a future date. Please use a non-deprecated interface 
with equivalent functionality instead. For a listing of replacement headers and 
interfaces, consult the file backward_warning.h. To disable this warning use 
-Wno-deprecated.
[ 27%] Building CXX object 
CMakeFiles/BlobTrackPedestrian.dir/src/featuretrack/feature_grouper_visualizer.c
pp.o
In file included from /usr/include/c++/4.4/backward/hash_set:60,
                 from /usr/include/boost/pending/container_traits.hpp:23,
                 from /usr/include/boost/graph/detail/adjacency_list.hpp:31,
                 from /usr/include/boost/graph/adjacency_list.hpp:324,
                 from /home/ali/Documents/Code/opencv-feature-tracker/include/SaunierSayed_feature_grouping.h:48,
                 from /home/ali/Documents/Code/opencv-feature-tracker/include/feature_grouper_visualizer.h:50,
                 from /home/ali/Documents/Code/opencv-feature-tracker/src/featuretrack/feature_grouper_visualizer.cpp:52:
/usr/include/c++/4.4/backward/backward_warning.h:28: warning: #warning This 
file includes at least one deprecated or antiquated header which may be removed 
without further notice at a future date. Please use a non-deprecated interface 
with equivalent functionality instead. For a listing of replacement headers and 
interfaces, consult the file backward_warning.h. To disable this warning use 
-Wno-deprecated.
/home/ali/Documents/builds/opencv-stable/include/highgui.hpp: In constructor 
‘SaunierSayed::FeatureGrouperVisualizer::FeatureGrouperVisualizer(cv::Mat, 
SaunierSayed::TrackManager*)’:
/home/ali/Documents/builds/opencv-stable/include/highgui.hpp:53: error: too few 
arguments to function ‘void cv::namedWindow(const std::string&, int)’
/home/ali/Documents/Code/opencv-feature-tracker/src/featuretrack/feature_grouper
_visualizer.cpp:64: error: at this point in file
make[2]: *** 
[CMakeFiles/BlobTrackPedestrian.dir/src/featuretrack/feature_grouper_visualizer.
cpp.o] Error 1
make[1]: *** [CMakeFiles/BlobTrackPedestrian.dir/all] Error 2
make: *** [all] Error 2
ali@Ali:~/Documents/builds/tracking_build$ 

What version of the product are you using? On what operating system?
Ubuntu 10.10

Please provide any additional information below.
Functions findpackage in CMakeList do not work. I had to manually specify the 
paths.

Original issue reported on code.google.com by karim.jo...@gmail.com on 9 Jan 2011 at 9:02

GoogleCodeExporter commented 9 years ago
Can you post your CMakeList variable OpenCV_DIR?

Original comment by dattan...@gmail.com on 9 Jan 2011 at 10:06

GoogleCodeExporter commented 9 years ago

Original comment by dattan...@gmail.com on 9 Jan 2011 at 10:06

GoogleCodeExporter commented 9 years ago
It appears that the code in 
https://code.ros.org/svn/opencv/tags/latest_tested_snapshot as of today does 
not have the modules folder. This suggests that the latest snapshot might not 
be updated to the new OpenCV 2.2 version.

I have tested compiling this project source against the OpenCV SVN source and 
it compiles correctly without any compilation error.

Ali, can you try using the OpenCV SVN? Or perhaps OpenCV 2.2?

Original comment by dattan...@gmail.com on 9 Jan 2011 at 10:43

GoogleCodeExporter commented 9 years ago

Original comment by dattan...@gmail.com on 9 Jan 2011 at 10:43

GoogleCodeExporter commented 9 years ago
Thanks for the quick comment.

I am not sure what you mean by OpenCV SVN. I obtain both the trunk version and 
the latest_tested versions using svn.

OpenCV 2.2 trunk simply does not configure on my machine using cmake. I tried 
on another machines and got the same error. I am using Ubuntu 10.10. So I gave 
up on using the trunk vesion for the moment.

Is it possible to read the highgui.hpp on the latest version (trunk or 
latest_tested) you have and compare it to the function call in the project 
cv::namedWindow. Do you think the difference in the number of arguments is why 
my compilation crashes.

http://stackoverflow.com/questions/4609069/opencv-2-2-windows-xp-mingw-build-cra
shes-on-namedwindow-imshow

Original comment by karim.jo...@gmail.com on 9 Jan 2011 at 11:11

GoogleCodeExporter commented 9 years ago
By OpenCV SVN I mean the trunk version. I believe that the latest revision in 
OpenCV causes a CMake problem. Try revision 4407 until they fix it.

Original comment by dattan...@gmail.com on 9 Jan 2011 at 11:14

GoogleCodeExporter commented 9 years ago
Thanks, I will try in a couple of hours.

By the way, I had to manually specify the paths to boost, gflag, gtests 
libraries and include folders in the CMakeList. Cmake could not locate these 
libraries automatically as it reads.

Original comment by karim.jo...@gmail.com on 9 Jan 2011 at 11:24

GoogleCodeExporter commented 9 years ago
Under my Ubuntu 10.10, it works automatically. How did you install these 
libraries?

Original comment by dattan...@gmail.com on 10 Jan 2011 at 12:33

GoogleCodeExporter commented 9 years ago
I got OpenCV revision 4407
$svn checkout -r 4407 https://code.ros.org/svn/opencv/trunk

I got boost using apt-get. I compiled boost libraries using ./bjam and copied 
the "serialization" and "graph" libraries to /usr/lib

I copied the gtest include directory to /usr/local/include and CMake could not 
see it. So I copied each *.hpp file to this directory. Eventually it worked.

Can you tell me how you installed these libraries?

I compiled and it went passed the previous error but still crashed. I think it 
cannot find gtest header files.

Original comment by karim.jo...@gmail.com on 10 Jan 2011 at 1:54

GoogleCodeExporter commented 9 years ago
sudo apt-get install libboost-dev libgtest-dev

For gflags, I download the source, then ./configure;make;sudo make install

Original comment by dattan...@gmail.com on 10 Jan 2011 at 2:01

GoogleCodeExporter commented 9 years ago
I did not know you can get libgtest using apt-get. I downloaded the source and 
compiled it using CMake then copied. How did you get the binaries of boost? did 
you build it using bjam?

Original comment by karim.jo...@gmail.com on 10 Jan 2011 at 2:26

GoogleCodeExporter commented 9 years ago
It compiled with me. I suggest you add the following: OpenCV version you used 
for development. Mention how to get libgtest and how to compile the binaries of 
boost. Otherwise, it is fine now. I will post other issues.

Original comment by karim.jo...@gmail.com on 10 Jan 2011 at 2:48

GoogleCodeExporter commented 9 years ago
Compilation Error:

Linking CXX executable RunAllTests
CMakeFiles/RunAllTests.dir/tests/test_blob_detector.cpp.o: In function 
`testing::Message::GetString() const':
test_blob_detector.cpp:(.text._ZNK7testing7Message9GetStringEv[testing::Message:
:GetString() const]+0x19): undefined reference to 
`testing::internal::StrStreamToString(std::basic_stringstream<char, 
std::char_traits<char>, std::allocator<char> >*)'
collect2: ld returned 1 exit status
make[2]: *** [RunAllTests] Error 1
make[1]: *** [CMakeFiles/RunAllTests.dir/all] Error 2
make: *** [all] Error 2

Related OpenCV CMake:

Extracting svn version, please wait...
SVNVERSION:  svn:4413
Detected version of GNU GCC: 44 (404)
checking for module 'gstreamer-app-0.10'
  package 'gstreamer-app-0.10' not found
checking for module 'gstreamer-video-0.10'
  package 'gstreamer-video-0.10' not found
IPP detected: 
Could NOT find Doxygen  (missing:  DOXYGEN_EXECUTABLE)
Parsing 'cvconfig.h.cmake'

General configuration for opencv 2.2.0 =====================================

    Built as dynamic libs?:    ON
    Compiler:                  
    C++ flags (Release):         -Wall -pthread -march=i686 -ffunction-sections  -O3 -DNDEBUG  -fomit-frame-pointer -O3 -ffast-math -msse -msse2 -mfpmath=387 -DNDEBUG 
    C++ flags (Debug):           -Wall -pthread -march=i686 -ffunction-sections  -g  -O0 -ggdb3 -DDEBUG -D_DEBUG 
    Linker flags (Release):     
    Linker flags (Debug):       

  GUI: 
    GTK+ 2.x:                  1
    GThread:                   1

  Image I/O: 
    JPEG:                      TRUE
    PNG:                       TRUE
    TIFF:                      TRUE
    JPEG 2000:                 TRUE
    OpenEXR:                   NO

  Video I/O: 
    DC1394 1.x:                
    DC1394 2.x:                1
    FFMPEG:                    1
      codec:                   1
      format:                  1
      util:                    1
      swscale:                 1
      gentoo-style:            1
    GStreamer:                 0
    UniCap:                    FALSE
    PvAPI:                     
    V4L/V4L2:                  Using libv4l
    Xine:                      FALSE

  Interfaces: 
    Python:                    ON
    Python interpreter:        /usr/bin/python2.6
    Python numpy:              NO (Python interface will not cover OpenCV 2.x API)
    Use IPP:                   NO
    Use TBB:                   NO
    Use Cuda:                  No
    Use Eigen2:                NO

  Documentation: 
    Build PDF                  NO
    Doxygen HTMLs              NO

    Install path:              /usr/local

    cvconfig.h is in:          /home/leaders/Documents/builds/opencv-svn
-----------------------------------------------------------------

Configuring done

Original comment by karim.jo...@gmail.com on 11 Jan 2011 at 5:42

GoogleCodeExporter commented 9 years ago
The compilation error is related to your installation of gtest. Please check 
that gtest is installed correctly by running the examples which can be 
downloaded from google-test website

Original comment by dattan...@gmail.com on 11 Jan 2011 at 5:46