Cannot find libpng and libjpg when building OpenCV using tutorial

Sysprogs forums Forums VisualGDB Cannot find libpng and libjpg when building OpenCV using tutorial

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21906
    kennethone
    Participant

    Hello, I’m following the tutorials to build an OpenCV app for raspberry Pi

     

    https://visualgdb.com/tutorials/raspberry/opencv/build/

    https://visualgdb.com/tutorials/raspberry/opencv/camera/

     

    OpenCV is building,

    There was a couple of errors, and I had to comment out in Math.h in raspberry pi toolchain, because they were duplicate declarations.

    //using std::isinf;
    //using std::isnan;

    And I had to move the 3rdparty folder from C:\opencv\sources to C:\opencv\sources\VisualGDB\Debug

    Before I moved this, I was getting some errors

     

     

    The error I’m getting while running my Test project using OpenCV is:

    /home/pi/Test: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory

     

    I cannot find the libpng.so libjpeg.so and other 3rd party libraries anywhere in the build. I do have all the libopencv_*.so files

    How can I build the 3rd part library files?

     

    Here is a full pastebin of my compilation results

     

    http://batman.gyptis.org/zerobin/?81b3da2ed71835f6#Cjf/s2wNGQYNJYL+elrCjuscnIV/T1V8cxuBfDCmbyk=

    • This topic was modified 5 years, 6 months ago by kennethone.
    #21908
    kennethone
    Participant

    Ok I found that Libpng resides in /usr/lib/arm-Linux-gnueabihf/ but I only had libpng.12.so so I copied it to libpng16.so.16, probably wont use it, not a big deal

    The new errors I’m get

    /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_dnn.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib/libopencv_dnn.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_ml.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib/libopencv_ml.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_objdetect.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /lib/libopencv_objdetect.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_shape.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_stitching.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib/libopencv_stitching.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_superres.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_videostab.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_calib3d.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib/libopencv_calib3d.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_features2d.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_flann.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib/libopencv_flann.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_photo.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_video.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_videoio.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib/libopencv_videoio.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libpng16.so.16: version `PNG16_0' not found (required by /lib/libopencv_imgcodecs.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_imgcodecs.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib/libopencv_imgcodecs.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_imgproc.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /lib/libopencv_core.so.3.4)
     /home/pi/LightBar: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /lib/libopencv_core.so.3.4)
    Child exited with status 1
    GDBserver exiting

    What is missing here?

    • This reply was modified 5 years, 6 months ago by support. Reason: formatting
    #21912
    support
    Keymaster

    Hi,

    Most likely your cross-toolchain is out-of-sync with the target SD card image. Please ensure you are using a compatible toolchain/SD image combo (see this page for supported versions).

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