twistedfall / opencv-rust

Rust bindings for OpenCV 3 & 4
MIT License
1.86k stars 144 forks source link

Building 0.92.0 on Linux Mint => Memory not found #587

Closed ambs closed 2 weeks ago

ambs commented 2 weeks ago
  1. Operating system

Linux Mint (bookworm/sid)

  1. The way you installed OpenCV: package, official binary distribution, manual compilation, etc.

Using apt and official package version

  1. OpenCV version

OpenCV 4.5.4

  1. rustc version (rustc --version

1.79.0

  1. Attach the full output of the following command from your project directory: (log.txt)

Extra:

$ find /usr/ -name memory.h
/usr/include/memory.h
...

$ clang --version
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Thanks for any help. By the way, newbie on Rust, so, lost on the how to debug the build system

ambs commented 2 weeks ago

Ok, this post helped me: https://stackoverflow.com/questions/26333823/clang-doesnt-see-basic-headers

Basically:

clang -v
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12                  # <========
Candidate multilib: .;@m64
Selected multilib: .;@m64

I was missing libstdc++-12-dev in the system. Installing it solved everything.