-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
caffe Mattest error #3934
Comments
I am also facing the same problem. My Matlab version is 2015b. I tried to put default version of gcc as gcc-4.7 since Maltab mex support that and explicitly give gcc version gcc-5 in Makefile configuration for Caffe. Anyone able to fix this issue? |
The problem here seems to be that caffe is compiled against the system version of opencv, but linking to the matlab version when running matcaffe. I was able to fix the problem by replacing the symbolic links for libopencv_[imgproc,core,highgui].so.2.4 in MATLAB/R2015a/bin/glnxa64 with a link for the versions in /usr/lib, as those were the three used by caffe. This fix probably breaks all the other opencv library files that were not replaced, so you might want to be careful or just replace them all. |
Followed your instruction, I changed some symbolic link in
|
@duchengyao |
You can see the links when you run ls -alh. If file B is a symlink of some file A elsewhere, you'll see B -> A in the output. To create a symlink that creates a proxy for A at location B, run ln -s A B. |
@kevjshih |
@kevjshih I changed the three above mentioned symbolic links. The error remained same. There are many links to MATLAB provided libraries. Which of them to change. Is there any way to know? |
I think I determined those three libraries by reading the stack trace (it's been a while so I don't quite recall). |
Thank you so much,it helps me a lot @kevjshih It is very kind of U |
Thanks a lot @kevjshih |
Well the function name (imencode in this case) is in the stacktrace so you can pretty much throw it into a web query and see which library comes up. |
got it 👍 @kevjshih |
@kevjshih based on the error information, i change some symbol links one by one, but i still get stuck in libopencv_features2d.so.2.4 even though i have already changed its symbol links. Looking forward for your help |
@7LFB I'm not sure how much I can help. The general idea here is that you simply need to make sure the .so file being read while in MATLAB is the same as the one you originally compiled Caffe against. If it's not working, then maybe that's not the version of opencv you used? I suppose one thing you can check is whether you have opencv 3.0 install as well, and might've compiled Caffe against that instead. |
thank u a lot for your words and i have already fixed it ! @kevjshih |
@7LFB Facing the same problem. Which all links did you change? |
@Shaswat27 About 5-6 symbol links. I just follow the error information it present like this,"libopencv_features2d.so.2.4, undefined symbol". and then i modified its links one by one. |
I am also getting the same error: I am trying to run .m code to generate lmdb process as suggested in Deep Metric Learning using Lifted Structured Embedding which mexa.64 but it stops and pops the error. I also made symbolic links between the libcaffe.so.1.0.0-rc3 and libcaffe.so and libcaffe.so.1.0.0 but it didn't work out. Can anyone suggest any solution to this? |
I had the same error try using Opencv 2.4.9 for your project also do this in terminal before opening matlab: |
I am getting the below error when i issue the make mattest command I am using the following version of softwares ubuntu : 16.04 Matlab 2016a gcc and g++ 4.9 OpenCV 3.2 How to solve this issue? |
@binialias did you tried run |
It took me several days to solve this issue. I tried all the above methods, but they didn't work. Finally I replaced the opencv version from 3.3.0 to 3.2.0 and it works. |
yes i have tried that also
…On Wed, Nov 22, 2017 at 10:26 PM, Carter Bao ***@***.***> wrote:
It took me several days to solve this issue. I tried all the above
methods, but they didn't work. Finally I replaced the opencv version from
3.3.0 to 3.2.0 and it works.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3934 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AXzBOPO2KQtlMpdx9aMOHwX5KHVYyo-dks5s5FIpgaJpZM4H-cJY>
.
--
*Thanks & Regards,*
*Bini Alias.*
|
Hi @variantf @wahabaftab @binialias , My system specs
I also have the same problem, so followed the steps of others in here #3934 (comment) Here are the results I get before and after I apply your suggestion Errors I get before export LD_PRELOAD=/usr/lib/libgdal.so.1
Errors I get before export LD_PRELOAD=/usr/lib/libgdal.so.1 after export LD_PRELOAD=/usr/lib/libgdal.so.1
I also tried to change my environment variables in /etc/environment accordingly but it did not work. I would definitely want to try to switch to opencv3.2 as well, but since there are others in opencv 3.2 that facing the same problem, I see no point. |
My system specs
I have the same problem, so followed the steps of others in
Any solutions? |
@Ashutosh1995 Have you solved this problem? |
@duchengyao Error in caffe.set_mode_cpu (line 5) Error in classification_demo (line 71) |
try exporting this: Also check this link if my solution isn't working (its in another language so translate it) |
Can you please send me your mex file |
Is anyone able to upload for me a matlab caffe mex file. I am simply unable to build it |
@duchengyao |
It has worked well for me after I delete the files. You should copy the files first. |
When I make mattest,I met the follow problem. How can I solve it? Thanks a lot @kevjshih @duchengyao |
|
when I make mattest, some error happened:
And when I copy caffe_mexa64 to other path and run code
"caffe('get_init_key')"
,it also show the same error ,exceptAnd my OS is Ubuntu 15.10, so the version of g++ and gcc is 5.2.1.
what should I do?
Thanks~
The text was updated successfully, but these errors were encountered: