Comments (12)
In Mac use DYLD_INSERT_LIBRARIES instead. Check README.
from mexopencv.
I also tried that before, sorry, should have posted that. When looking in the /usr/lib/ directory I only see the .dylibs
$ DYLD_INSERT_LIBRARIES=/usr/lib/libstdc++.so.6 /Applications/MATLAB_R2012a.app/bin/matlab
dyld: could not load inserted library: /usr/lib/libstdc++.so.6
from mexopencv.
The error message is saying you're trying to load incompatible libfreetype. Probably you have no problem with libstdc++. Check that your libfreetype is compatible with your opencv and that compatible version is loaded inside matlab. If not, please upgrade your libfreetype.
from mexopencv.
Everything has been updated. I'm trying to determine where the incompatibility is. I have found other people with the issue due to the libfreetype, just no solutions.
from mexopencv.
If you're using macports, just port upgrade freetype.
from mexopencv.
freetype was previously at the most recent version. Still looking into the issue.
from mexopencv.
That is interesting. I can verify that my environment (os x 10.8.2) has no issue with libavcodec + libfreetype installed via macports 2.1.3. How did you install these software? Are you using opencv package in macports or anything else?
$ otool -L /opt/local/lib/libavcodec.54.dylib
/opt/local/lib/libavcodec.54.dylib:
/opt/local/lib/libavcodec.54.dylib (compatibility version 54.0.0, current version 54.86.100)
/opt/local/lib/libavutil.52.dylib (compatibility version 52.0.0, current version 52.13.100)
/opt/local/lib/libjack.0.dylib (compatibility version 1.0.0, current version 1.28.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1187.34.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 19.0.0)
/opt/local/lib/libSDL-1.2.0.dylib (compatibility version 12.0.0, current version 12.4.0)
/opt/local/lib/libxvidcore.4.dylib (compatibility version 4.0.0, current version 4.3.0)
/opt/local/lib/libx264.128.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libvorbisenc.2.dylib (compatibility version 3.0.0, current version 3.9.0)
/opt/local/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.6.0)
/opt/local/lib/libogg.0.dylib (compatibility version 9.0.0, current version 9.0.0)
/opt/local/lib/libtheoraenc.1.dylib (compatibility version 3.0.0, current version 3.2.0)
/opt/local/lib/libtheoradec.1.dylib (compatibility version 3.0.0, current version 3.4.0)
/opt/local/lib/libspeex.1.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libschroedinger-1.0.0.dylib (compatibility version 12.0.0, current version 12.0.0)
/opt/local/lib/libopus.0.dylib (compatibility version 4.0.0, current version 4.0.0)
/opt/local/lib/libopenjpeg.1.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libmp3lame.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libmodplug.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/libfreetype.6.dylib (compatibility version 16.0.0, current version 16.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.12.0)
/System/Library/Frameworks/VideoDecodeAcceleration.framework/Versions/A/VideoDecodeAcceleration (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.8.0)
/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.7)
/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.8.0)
$ otool -L /opt/local/lib/libfreetype.6.dylib
/opt/local/lib/libfreetype.6.dylib:
/opt/local/lib/libfreetype.6.dylib (compatibility version 16.0.0, current version 16.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.7)
/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
from mexopencv.
Believe I have solved the issue. I think there was a permissions issue somewhere. Finally worked with:
$ sudo DYLD_INSERT_LIBRARIES=/opt/local/lib/libtiff.5.dylib /Applications/MATLAB_R2012a.app/bin/matlab
from mexopencv.
Hmm, launching matlab with root permission doesn't sound right. But sure, it seems like a permission issue. Good luck!
from mexopencv.
Still having the issue:
>> t = cv.BackgroundSubtractorMOG2(10,16)
Invalid MEX-file
'/Users/demarlio25/Desktop/GitHub/mexopencv/+cv/private/BackgroundSubtractorMOG2_.mexmaci64':
dlopen(/Users/demarlio25/Desktop/GitHub/mexopencv/+cv/private/BackgroundSubtractorMOG2_.mexmaci64,
1): Library not loaded: /opt/local/lib/libfreetype.6.dylib
Referenced from: /opt/local/lib/libavcodec.54.dylib
Reason: Incompatible library version: libavcodec.54.dylib requires version 16.0.0 or later,
but libfreetype.6.dylib provides version 10.0.0
I have tried opening Matlab by:
$ DYLD_INSERT_LIBRARIES=/usr/lib/libstdc++.so.6 /Applications/MATLAB_R2012a.app/bin/matlab
$ DYLD_INSERT_LIBRARIES=/opt/local/lib/libtiff.5.dylib /Applications/MATLAB_R2012a.app/bin/matlab
Also:
$ otool -L /opt/local/lib/libavcodec.54.dylib
/opt/local/lib/libavcodec.54.dylib:
/opt/local/lib/libavcodec.54.dylib (compatibility version 54.0.0, current version 54.86.100)
/opt/local/lib/libavutil.52.dylib (compatibility version 52.0.0, current version 52.13.100)
/opt/local/lib/libjack.0.dylib (compatibility version 1.0.0, current version 1.28.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1187.37.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 19.0.0)
/opt/local/lib/libSDL-1.2.0.dylib (compatibility version 12.0.0, current version 12.4.0)
/opt/local/lib/libxvidcore.4.dylib (compatibility version 4.0.0, current version 4.3.0)
/opt/local/lib/libx264.128.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libvorbisenc.2.dylib (compatibility version 3.0.0, current version 3.9.0)
/opt/local/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.6.0)
/opt/local/lib/libogg.0.dylib (compatibility version 9.0.0, current version 9.0.0)
/opt/local/lib/libtheoraenc.1.dylib (compatibility version 3.0.0, current version 3.2.0)
/opt/local/lib/libtheoradec.1.dylib (compatibility version 3.0.0, current version 3.4.0)
/opt/local/lib/libspeex.1.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libschroedinger-1.0.0.dylib (compatibility version 12.0.0, current version 12.0.0)
/opt/local/lib/libopus.0.dylib (compatibility version 4.0.0, current version 4.0.0)
/opt/local/lib/libopenjpeg.1.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libmp3lame.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libmodplug.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/libfreetype.6.dylib (compatibility version 16.0.0, current version 16.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.18.0)
/System/Library/Frameworks/VideoDecodeAcceleration.framework/Versions/A/VideoDecodeAcceleration (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.8.0)
/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.7)
/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.8.0)
$ otool -L /opt/local/lib/libfreetype.6.dylib
/opt/local/lib/libfreetype.6.dylib:
/opt/local/lib/libfreetype.6.dylib (compatibility version 16.0.0, current version 16.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.7)
/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
from mexopencv.
What would the error message say if you open matlab with this?
DYLD_INSERT_LIBRARIES=/opt/local/lib/libfreetype.6.dylib:/opt/local/lib/libtiff.5.dylib /Applications/MATLAB_R2012a.app/bin/matlab
from mexopencv.
Perfect! That works. Thanks for all the help. I now have it working on both windows and mac.
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.