Comments (6)
This error happens because there is a version mismatch between
Matlab's internal libstdc++ and the system's libstdc++ which opencv
depends on. You might be able to fix this by LD_PRELOAD variable. That
is, if the system's libstdc++ is located in /usr/lib/libstdc++.so.6,
you can launch matlab by the following command.
$ LD_PRELOAD=/usr/lib/libstdc++.so.6 matlab
Or, if you like, set an alias in your .bashrc.
alias matlab="LD_PRELOAD=/usr/lib/libstdc++.so.6
/usr/local/matlab/bin/matlab"
If you find similar error, you can try LD_PRELOAD in the same approach.
from mexopencv.
ok I found the file on my system but now matlab fails
$ LD_PRELOAD=/usr/lib/libgccpp.so.1.0.3 matlab
Segmentation fault (core dumped)
from mexopencv.
Are you sure that /usr/lib/libgccpp.so.1.0.3
is correct one? Sometimes there are different versions of the library in the system. You can check alternatives by locate libgccpp.so
command.
Also, can you try identifying what shared library is incompatible with the system? You can use ldd command to find the linked library. If there is a difference between the returned list, that is causing a problem.
In shell:
$ ldd +cv/private/CascadeClassifier_.mexa64
In matlab:
>> !ldd +cv/private/CascadeClassifier_.mexa64
from mexopencv.
$ locate libgccpp.so
/usr/lib/libgccpp.so.1
/usr/lib/libgccpp.so.1.0.3
I have tried with the other one also. matlab exits with fatal error
from mexopencv.
$ ldd mexopencv/+cv/private/CascadeClassifier_.mexa64
linux-vdso.so.1 => (0x00007fffbaffc000)
libopencv_core.so.2.3 => /usr/lib/libopencv_core.so.2.3 (0x00007f835a9be000)
libopencv_imgproc.so.2.3 => /usr/lib/libopencv_imgproc.so.2.3 (0x00007f835a58b000)
libopencv_objdetect.so.2.3 => /usr/lib/libopencv_objdetect.so.2.3 (0x00007f835a337000)
libmx.so => not found
libmex.so => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f835a036000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8359e20000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8359c03000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8359845000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f835963d000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8359426000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f835912b000)
libopencv_highgui.so.2.3 => /usr/lib/libopencv_highgui.so.2.3 (0x00007f8358eea000)
libopencv_features2d.so.2.3 => /usr/lib/libopencv_features2d.so.2.3 (0x00007f8358c16000)
libopencv_calib3d.so.2.3 => /usr/lib/libopencv_calib3d.so.2.3 (0x00007f835898c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f835afcb000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f835873c000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f8358513000)
libtiff.so.4 => /usr/lib/x86_64-linux-gnu/libtiff.so.4 (0x00007f83582b0000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007f8358059000)
libIlmImf.so.6 => /usr/lib/libIlmImf.so.6 (0x00007f8357d97000)
libHalf.so.6 => /usr/lib/libHalf.so.6 (0x00007f8357b54000)
libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007f835751a000)
libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007f8357267000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f8357018000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f8356d23000)
libavcodec.so.53 => /usr/lib/x86_64-linux-gnu/libavcodec.so.53 (0x00007f8355f15000)
libavformat.so.53 => /usr/lib/x86_64-linux-gnu/libavformat.so.53 (0x00007f8355c16000)
libavutil.so.51 => /usr/lib/x86_64-linux-gnu/libavutil.so.51 (0x00007f83559f6000)
libswscale.so.2 => /usr/lib/x86_64-linux-gnu/libswscale.so.2 (0x00007f83557af000)
libdc1394.so.22 => /usr/lib/x86_64-linux-gnu/libdc1394.so.22 (0x00007f835553c000)
libv4l1.so.0 => /usr/lib/x86_64-linux-gnu/libv4l1.so.0 (0x00007f8355336000)
libopencv_flann.so.2.3 => /usr/lib/libopencv_flann.so.2.3 (0x00007f83550d1000)
libImath.so.6 => /usr/lib/libImath.so.6 (0x00007f8354ecb000)
libIex.so.6 => /usr/lib/libIex.so.6 (0x00007f8354cab000)
libIlmThread.so.6 => /usr/lib/libIlmThread.so.6 (0x00007f8354aa4000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f8354898000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f8354563000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f835435d000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007f835413b000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f8353e7c000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007f8353c5c000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f835390d000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f83536e2000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f8353499000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f8353263000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f8353051000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f8352e47000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f8352c44000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f8352a34000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f835282b000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f8352621000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f835241d000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f835221a000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f8352011000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f8351dd4000)
libvpx.so.1 => /usr/lib/libvpx.so.1 (0x00007f8351b2f000)
libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f8351660000)
libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f8351433000)
libtheoraenc.so.1 => /usr/lib/x86_64-linux-gnu/libtheoraenc.so.1 (0x00007f83511f6000)
libtheoradec.so.1 => /usr/lib/x86_64-linux-gnu/libtheoradec.so.1 (0x00007f8350fdb000)
libspeex.so.1 => /usr/lib/x86_64-linux-gnu/libspeex.so.1 (0x00007f8350dc1000)
libschroedinger-1.0.so.0 => /usr/lib/libschroedinger-1.0.so.0 (0x00007f8350b0e000)
libgsm.so.1 => /usr/lib/libgsm.so.1 (0x00007f8350900000)
libva.so.1 => /usr/lib/x86_64-linux-gnu/libva.so.1 (0x00007f83506e9000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f83504d9000)
libraw1394.so.11 => /usr/lib/x86_64-linux-gnu/libraw1394.so.11 (0x00007f83502c9000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f83500ba000)
libv4l2.so.0 => /usr/lib/x86_64-linux-gnu/libv4l2.so.0 (0x00007f834feae000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f834fc11000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f834f9f3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f834f7ee000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f834f567000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f834f364000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f834f159000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f834ef55000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f834ed35000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f834eb19000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f834e8ee000)
libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007f834e6e7000)
liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007f834e46c000)
libv4lconvert.so.0 => /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0 (0x00007f834e1f6000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f834dff3000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f834dded000)
from mexopencv.
OK, I got it working now :) ... with LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 matlab
Thanks! for the support
from mexopencv.
Related Issues (20)
- Mexopencv using MatLab Runtime
- Using homebrew to install OpenCV==3.4.1
- windows opencv3.4.1 cmake
- Setting up mexopencv for matlab 2018b HOT 2
- No output from cv.getBuildInformation() in Octave 5.1.0
- maybe bug about the queryIdx and trainIdx
- ld: symbol(s) not found for architecture x86_64
- Invalid MEX-file : Missing dependent shared libraries
- [error 3] gcc >= 4.4 g++ >= 4.4 is installed
- v3.2.0 and xfeatures2d HOT 1
- mexopencv not compiling HOT 2
- error in setup opencv and mexopencv
- how Mac to mexopencv HOT 1
- [lib/mexopencv_features2d.o] Error 255 HOT 1
- MxArray::toMoments out of order arguments to cv::Moments
- Consider leveraging MATLAB in your CI
- MATLAB Error: Unrecognized function or variable 'FeaturesFinder_'.
- why can't I use the 'cv.detectMarkers' function???
- Hi all, I have a big problem when I am using matlab R2021a to builed mexopencv. HOT 1
- mexopencv building error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mexopencv.