Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opencv breaks tensorflow and tesseract #351

Closed
slavb18 opened this issue Jul 21, 2022 · 2 comments
Closed

Opencv breaks tensorflow and tesseract #351

slavb18 opened this issue Jul 21, 2022 · 2 comments

Comments

@slavb18
Copy link

slavb18 commented Jul 21, 2022

Problem initially started here

I have separate projects rustmtcnn, rusttess, rustopencv
All fo them work idependently
But any combination with opencv fail

  • tesseract+ tensorflow: work
  • tesseract : work
  • opencv + tensorflow : error
  • opencv + tensorflow + tesseract: error

For example project rustmtcnn works, but if I add line use opencv::{self as cv, prelude::*}; to main.rs, I receive SIGSEGV :

(gdb) r
Starting program: /rustmtcnn/target/debug/rustmtcnn 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5a79a53 in google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*) () from /usr/lib/libtensorflow_framework.so.2
(gdb) bt
#0  0x00007ffff5a79a53 in google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*) () at /usr/lib/libtensorflow_framework.so.2
#1  0x00007ffff7fe1fe2 in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffec78, env=env@entry=0x7fffffffec88) at dl-init.c:72
#2  0x00007ffff7fe20e9 in call_init (env=0x7fffffffec88, argv=0x7fffffffec78, argc=1, l=<optimized out>) at dl-init.c:30
#3  _dl_init (main_map=0x7ffff7ffe180, argc=1, argv=0x7fffffffec78, env=0x7fffffffec88) at dl-init.c:119
#4  0x00007ffff7fd30ca in _dl_start_user () at /lib64/ld-linux-x86-64.so.2
#5  0x0000000000000001 in  ()
#6  0x00007fffffffee7e in  ()
#7  0x0000000000000000 in  ()
(gdb) 
  1. Operating system: OS: KUbuntu 22.04
  2. The way you installed OpenCV: package (apt-get install -y clang libclang-dev libopencv-dev)
  3. OpenCV version: 4.5.1+dfsg-5
  4. rustc version (rustc --version) rustc 1.62.0 (a8314ef7d 2022-06-27) host, rustc 1.62.0 (a8314ef7d 2022-06-27) docker
    build.log
@twistedfall
Copy link
Owner

twistedfall commented Jul 21, 2022

Hi, it's been reported previously in #260 too. I haven't managed to find out what exactly is causing this problem so far. I'll try to give it another spin. As a workaround you can try building OpenCV from source.

@slavb18
Copy link
Author

slavb18 commented Jul 22, 2022

Thank you, building OpenCV from source helped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants