Compile of OpenCV 3.1 for Raspberry Pi fails

Sysprogs forums Forums VisualGDB Compile of OpenCV 3.1 for Raspberry Pi fails

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #7474
    David
    Participant

    Hi – I’m trying to run the “Cross-compiling OpenCV 3 for Raspberry Pi 2” tutorial.  I have followed all of the steps up to the compile step. The compile fails with the following output:

    1> In file included from C:/Test/OpenCV3.X/opencv-3.1.0/opencv-3.1.0/3rdparty/libtiff/tiffio.hxx:34:0,
    1> from C:/Test/OpenCV3.X/opencv-3.1.0/opencv-3.1.0/3rdparty/libtiff/tif_stream.cxx:31:
    1>c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\iostream(38,28): fatal error : bits/c++config.h: No such file or directory
    1> #include <bits/c++config.h>
    1> ^
    1> compilation terminated.

    So, iostream  line 38 failed because “bits/c++config.h” was not found:

    #include <bits/c++config.h>

    I checked and c++config.h  exists and resides in “c:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\include\arm-Linux-gnueabihf\c++\4.9\bits”.

    It seems like a Library path for “c:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\include\arm-Linux-gnueabihf\c++\4.9” is missing in the CMake configuration but I’m not sure.

    Could you help me resolve this?

    I’m running a trial of VisualGDB on a Windows 10 laptop running Visual Studio 2015 Community Edition and a Raspberry Pi 2+  running Jessie.

    Thanks!

    David

    #7482
    support
    Keymaster

    Hi,

    There was a bug in our latest Raspberry Pi toolchain. Please re-download the toolchain from http://gnutoolchains.com/raspberry/

    #7596
    Daniel
    Participant

    Hi, I am also trying to run the same tutorial with OpenCV 3.1 and Visual Studio 2015.  I succeeded so far -until step 22: checking the box “Configure IntelliSense based on CFLAGS dumped by Cmake” and then rebuilding the project does not work for me. -Resulting in 23 Clang IntelliSense Errors. It would be great if there is a solution for the issue.

    By the way: thanks a lot for providing such step-by-step tutorials!

    #7601
    support
    Keymaster

    Hi,

    The IntelliSense errors do not actually stop the build. Can you double-check whether the build succeeds? You can use the Output window to see what exactly happens there.

    #7620
    Daniel
    Participant

    Hi,

    Right- the build succeeds. So I tried to go on with the other steps. But  when I press F5 the first time- two not in the tutorial described popup windows occur: the first one asks for building OpenCV again- because it is obsolete. The next one asks for a Path of an executable. In the window is also said the parameters can be changed later- so I filled in nothing. I then get the Error message: “Debugging failed. Debugging could not be started due to the following error: Invalid deployment path /tmp/ for project OpenCV3-Debug. Please correct your settings. The deployment path should include the file name.”

    I also tried to find the settings- but all my attempts did not work.- The second window unfortunately does not popup again- when I try to Debug again…  Is there anything I can try?

    Thanks

    Daniel

    #7621
    Daniel
    Participant

    I also tried the following: to upload the executable manually and simply run it. Then another error occurs: “Error while loading shared libraries: libopencv_videostab.so.3.1: cannot open object file: No such file or directory”

    I found a hint in another forum: ” Just had to add the following line to .bashrc export LD_LIBRARY_PATH=”/usr/local/lib” ” – under the topic Missing  Shared Library. But it does not work for me.

    #7630
    support
    Keymaster

    Hi,

    Have you managed to upload the built OpenCV to your Raspberry Pi (step 11 of the tutorial)? Was libopencv_videostab.so.3.1 among the built files? Is the directory where it was copied among the ones in LD_LIBRARY_PATH?

    #7631
    Daniel
    Participant

    Hi,

    yes thank you for the help- there seems to be a weird problem with the SmarTTY- folder upload: I was sure that I made step 11- but then I checked it again and the files from the OpenCV installation directory were lost. It is weird because I tried to copy it again with SmarTTY – and it does not work- although I connected as the standard user pi (with root access). Also the sd-card LED (for read/write acces from the raspberry pi) glows during the process- so I expected that it worked- and never checked it. What worked for me is to create another working directory ( /inst), uploading the files to that folder (with SmaTTY) and then to copy the content manually (from the command line) to the corresponding folders.

    Then I tried again to run the demo on the pi (after changing the file permissions)- and it worked!

    Makes me wondering if I have to change any raspberry pi preferences- because of the issue with the debugging I mentioned above…

    Thanks again!

     

    #7637
    support
    Keymaster

    Hi,

    Thanks for pointing that out, we will improve the SmarTTY logic for handling upload errors in the next release.

    Regarding the debugging error, do you mean the “Invalid deployment path” one? If yes, what exactly are the deployment paths you set for both projects?

    #7665
    sei
    Participant

    I am running an evaluation of GDB and trying to cross compile opencv3.1 for the Raspberry Pi on a Windows 10, 64bit machine using Visual Studio 2015 Community Edition.  cmake is version 3.4.3

    I have successfully followed the camera test tutorial so the Visual Studio/VisualGDB installation seems to be alright.

    The errors occur when trying to build at step 8 – ABI info seems to be the problem.
    1> — The CXX compiler identification is GNU 4.9.2
    1> — The C compiler identification is GNU 4.9.2
    1> — Check for working CXX compiler: C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf-g++.exe
    1> — Check for working CXX compiler: C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf-g++.exe — works
    1> — Detecting CXX compiler ABI info
    1> — Detecting CXX compiler ABI info – failed
    1> — Detecting CXX compile features
    1> — Detecting CXX compile features – done
    1> — Check for working C compiler: C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf-gcc.exe
    1> — Check for working C compiler: C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf-gcc.exe — works
    1> — Detecting C compiler ABI info
    1> — Detecting C compiler ABI info – failed
    1> — Detecting C compile features
    1> — Detecting C compile features – done
    1> CMake Error at CMakeLists.txt:107 (message):
    1> CMake fails to deterimine the bitness of target platform.
    1>
    1> Please check your CMake and compiler installation. If you are crosscompiling then ensure that your CMake toolchain file correctly sets the compiler details.

     

     

    #7674
    support
    Keymaster

    Hi,

    This looks like either CMake or the toolchain is corrupt. Please try re-downloading and re-installing both of them.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.