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

Invalid MEX-file #14

Open
livst opened this issue Jan 29, 2017 · 4 comments
Open

Invalid MEX-file #14

livst opened this issue Jan 29, 2017 · 4 comments

Comments

@livst
Copy link

livst commented Jan 29, 2017

Hi,

I followed the steps described in the guide and I got this error when trying to build matcaffe:

'/Realtime_Multi-Person_Pose_Estimation/caffe_demo/matlab/+caffe/private/caffe_.mexa64': /Realtime_Multi-Person_Pose_Estimation/caffe_demo/matlab/+caffe/private/caffe_.mexa64: undefined symbol: _ZN2cv11getTextSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEidiPi

Any solution?

Thank you.

@mddrill
Copy link

mddrill commented Mar 23, 2017

I am having this issue also, has anyone figured out the solution?

@Annie-Ge
Copy link

I changed some symbolic link in /bin/glnxa64 and matcaffe works well. ^_^

libopencv_core.so.2.4 -> /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4.11
libopencv_highgui.so.2.4 -> /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.11
libopencv_imgproc.so.2.4 -> /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.2.4.11

/matlab/r2016a/bin/glnxa64# mv libopencv_imgproc.so.2.4 libopencv_imgproc.so.2.4.bak
/matlab/r2016a/bin/glnxa64# mv libopencv_highgui.so.2.4 libopencv_highgui.so.2.4.bak
/matlab/r2016a/bin/glnxa64# mv libopencv_core.so.2.4 libopencv_core.so.2.4.bak

/Matlab/bin/glnxa64$ sudo ln /home/gjc/Documents/SoftInstall/opencv-2.4.11/lib/libopencv_core.so.2.4.11 libopencv_core.so.2.4

/Matlab/bin/glnxa64$ sudo ln /home/gjc/Documents/SoftInstall/opencv-2.4.11/lib/libopencv_highgui.so.2.4.11 libopencv_highgui.so.2.4

/Matlab/bin/glnxa64$ sudo ln /home/gjc/Documents/SoftInstall/opencv-2.4.11/lib/libopencv_imgproc.so.2.4.11 libopencv_imgproc.so.2.4

@aleksispi
Copy link

Inspired by annie2008hi's above post, I changed ALL symbolic links related to libopencv in a similar fashion (did not work if I only did the three suggested ones). Thus, for all libopencv files in /matlab2015a/bin/glnxa64 I did (note that I have 2.4.9 instead of 2.4.11, since that's my version):

sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_ABCD.so.2.4.9 libopencv_ABCD.so.2.4

where ABCD should be replaced by the respective libopencv names (core, highgui, ...). I did nothing more, except after the above I reran 'make clean all matcaffe'. Then it worked.

@ErikGartner
Copy link

ErikGartner commented Jan 12, 2018

Good job @aleksispi!

I basically did this. Note that I don't link to any specific system version just the current system version.

sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so libopencv_calib3d.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_contrib.so libopencv_contrib.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_core.so libopencv_core.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_features2d.so libopencv_features2d.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_flann.so libopencv_flann.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_gpu.so libopencv_gpu.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_highgui.so libopencv_highgui.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so libopencv_imgproc.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_legacy.so libopencv_legacy.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_ml.so libopencv_ml.so.2.4  
# sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_nonfree.so libopencv_nonfree.so.2.4     ## This might not exist in the default ubuntu package.
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so libopencv_objdetect.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_photo.so libopencv_photo.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_stitching.so libopencv_stitching.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_video.so libopencv_video.so.2.4
sudo ln -sfn /usr/lib/x86_64-linux-gnu/libopencv_videostab.so libopencv_videostab.so.2.4

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

5 participants