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

demo error: /sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found #63

Closed
arasharchor opened this issue Jan 22, 2016 · 7 comments

Comments

@arasharchor
Copy link

Hi,

I'm goint to see the faster rcnn demo, but I'm getting the following error:

Invalid MEX-file '/BS/CNN_Image_Prior/work/caffe/matlab/+caffe/private/caffe_.mexa64':
/usr/lib/matlab-8.6/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found
(required by /BS/CNN_Image_Prior/work/caffe/matlab/+caffe/private/caffe_.mexa64)

but by following information there is 3.4.20 one.

$ls /usr/lib/x86_64-linux-gnu/libstdc++.so.6*
/usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20

$strings /usr/lib/matlab-8.6/sys/os/glnxa64/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

how make GLIBCXX_3.4.20 here?

is the problem of mex? shall I make it again?
I received an error when "make matcaffe". error was regarding version of g++ claiming that 4.9.2 is not supported and 4.7 is supported. is this problem due to this issue?
if I change gcc to 4.7 and making caffe again, the problem is solved?
any help or advice is appreciated :)

$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBC_2.3
GLIBC_2.2.5
GLIBC_2.14
GLIBC_2.18
GLIBC_2.17
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH

@naoto0804
Copy link

Maybe this issue on caffe is helpful to you.
BVLC/caffe#827
In my case, export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 solved the error.

@Achilles-96
Copy link

@naoto0804
I did export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6. I launched matlab from same terminal. Still the same error. Is there any othere way by which we have to add environment variables.

@AzmHmd
Copy link

AzmHmd commented Dec 13, 2016

@smajida @Achilles-96 Did you solve it?

if not go to here

@arasharchor
Copy link
Author

arasharchor commented Aug 29, 2017

yes it was solved. you have to change gcc and g++ version to be compatible.

LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21" matlab

@xuefeng-cvr
Copy link

yes,this page helps me to solve the problem.
My environment is
gcc 4.7
matlab 2016a
opencv 3.4.1

@SarKerson
Copy link

Thanks! This helpd me out!

@arasharchor
Copy link
Author

if adding your own libstdc library does not work, you can add MATLAB's libstdc version to Makefile.config file below MATLAB_DIR.

LD_PRELOAD := /usr/local/MATLAB/R2018a/sys/os/glnxa64/libstdc++.so.6

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

6 participants