mysql y matlab mex - libmysqlcppconn no encuentra glibcxx_3.4.15

I'm running ubuntu 12.04 and matlab R2012a.

Not sure what the problem is exactly, but I can build my mex file just fine. But when it is run I receive this error

Invalid MEX-file '/home/br/Documents/MATLAB/langmod/rss2mysql/mexUrl2dbSrc.mexa64':/usr/local/MATLAB/R2012a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/local/lib/libmysqlcppconn.so.5)

which I find particularly strange, becuase if I run the following in the terminal

strings /usr/local/MATLAB/R2012a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6 | grep GLIBC

Veo:

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.14
GLIBC_2.4
GLIBC_2.3.4
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH

What do i do to fix this? Any help would be appreciated.

thanks, Brian

preguntado el 31 de julio de 12 a las 14:07

1 Respuestas

This can occur because Matlab includes its own copy of the library that differs from the one you used to compile it. You can replace the symbolic link to this library so that it points to the system library against with you compiled the mex file. On my machine this would look something like this:

sudo ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16 /usr/local/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6

Ver también: /usr/lib/libstdc++.so.6: no se encontró la versión `GLIBCXX_3.4.15 '

contestado el 23 de mayo de 17 a las 13:05

i had done all of that... and despite matlab having two locations for this file, the link included in my OP and the link in your reply. Not sure whether I had missed changing one of these, but after relinking the both files to libstdc++.so.6.0.17 which supports everything needed, matlab didn't pick up on it. I tried 'rehash' but that didn't even work, but restarting matlab made it pick up on the changes. Thanks. - brneuro

Eso me ayudó. ¡Gracias! - justinblaber

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.