lundi 1 octobre 2018

statically and dynamically linking the same library with different versions

I have a forked version of OpenCV (v2.4.8) compiled without FFMPEG as statically linked library (libopencv_core.a, libopencv_highgui.a etc) with some custom changes, I link that against my library say libsdk.so.

I am currently building sample apps over libsdk.so, these custom apps use OpenCV's highgui and core from (ap-get)package manager directly (v2.4.9 or v3.3) for opening camera and getting frames from video.

My sample application processes a video and then throws a segfault,

0x0000007fb20ca770 in av_malloc () from /usr/lib/aarch64-linux-gnu/libavutil-ffmpeg.so.54

I am using CMake to compile these libraries, I think this might be due to a symbol not getting resolved when the destructor is being called. Are there any tools to figure out what could be exactly happening. When I link the sample app to the custom-compiled opencv they work okay. This approach works on linux ubuntu x86_64, but not arm64(cross-compiled)

EDIT: I am writing this to get suggestions and feedback on what might be the issue here, currently the sample app freezes when it tries to deallocate memory. This sample app is written in C++11.

Aucun commentaire:

Enregistrer un commentaire