This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Cannot find shared library in EZSDK

I have been attempting to setup a second system, duplicating what I have been using, on a second linux laptap running Ubuntu 10.04, and I've ran into a problem where shared libraries, .so files, are not being found.  This works fine on the first laptop.  When ruuning my app, I get:

"error loading shared libraries:  libcv.so.2, cannot open shared object file: no such file or directory"

I have confirmed that libcv.so.2 is in the targetfs/lib/ directory, so I suspect that the library search path is not correctly set. How do I fix this?  I'm using EZSDK 5.04.00.11.  It appears to boot up ok.

Update:

It appears that the problem is not the default path, that seems to be ok, but the library itself.  I rebuilt the opencv libraries and I am sudedenly getting files that Linux does not recognize as being libraries.

Lee

 

  • Lee,

           I suppose you have created the libcv.so files yourself, as these libraries are not part of EZSDK 5.04.00.11, So i doubt it is a problem with EZSDK.

           Since you have marked this works fine in your first laptop, i suspect you might have missed some steps when you do with 2nd laptop.

            Probably LD_LIBRARY_PATH needs to be modified appropriately to locate these library.

    Thanks & Regards

    Velan

  • Velan said:
    I suppose you have created the libcv.so files yourself,

    I'm attempting to build opencv 1.1.  Using the latest EZSDK, 5.04.00.11, opencv appears to build ok, but when I build my app the linker tells me that libcv is incompatible.  This was working fine and it doesn't matter whether I build shared or static.  The problem is not the library location.  Has something about the library format changed over the development of the EZSDK?

    Update:

    I figured it out.  For some unknown reason I had to change my configure args to set the g++ compiler to the arm one.

    Lee

     

  • Lee,

           I do not think it is a unknown reason. Since the target is ARM based and code (here it is OpenCV) would be running on ARM, you need to cross compile the code to ARM using Code Sourcery tool chain (Or any other vendor for that matter) .

           Probably if you had just used gcc instead of arm-none-linux-gnueabi-gcc, it would give X86 code, which is why you would have got library format issue while running on ARM.

    Thanks & Regards
    Velan

  • Velan said:

          I do not think it is a unknown reason. Since the target is ARM based and code (here it is OpenCV) would be running on ARM, you need to cross compile the code to ARM using Code Sourcery tool chain (Or any other vendor for that matter) .

           Probably if you had just used gcc instead of arm-none-linux-gnueabi-gcc, it would give X86 code, which is why you would have got library format issue while running on ARM.

    When I built opencv 1.1 back in May I used arm-none-linux-gnueabi-gcc, but for some reason when I went to rebuild opencv for the latest EZSDK 5.04.00.11 libraries, using the same configure args that I had used in May, instead of gcc configure insisted on using g++.  Simple fix, but a bit of a mystery nevertheless.

    Lee