Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Problem with MATLAB mex files with Ubuntu 11.04

  1. #1
    Join Date
    May 2011
    Beans
    1

    Problem with MATLAB mex files with Ubuntu 11.04

    Hi everybody.

    I just upgraded to Ubuntu 11.04 and I have a problem with a MATLAB mex file: I receive this error

    Code:
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl_c.so.2)
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl_c.so.2)
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl.so.7)
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl.so.7)
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libgmpxx.so.4)
    With 10.10, it worked perfectly. I tried to reinstall MATLAB without success. What could the problem be and how can I resolve it?

    Thank u

    Bye

  2. #2
    Join Date
    Mar 2010
    Location
    Dublin, Ireland
    Beans
    Hidden!
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    Hi and welcome to the forums!

    This thread might help you. It's due to the fact that MATLAB appears to change the path to the GLIBC libraries:

    http://uri.tl/2a

    Probably due to a newer version of GCC in 11.04
    Matt
    blog.mattrudge.net for extra helpings of geeky Ubuntu goodness
    Get the Ubuntu Weekly Newsletter

  3. #3
    Join Date
    Nov 2007
    Beans
    8

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    Matlab is picky about which compiler you use:

    http://www.mathworks.com/support/com...a/glnxa64.html
    (you can change the version in the address bar)

    I find that I have to get the right gcc 4.3 or 4.2.

    Natty dropped support for 4.3, so you probably need to compile 4.3 from source. I wasn't able to find any binary package for this or a howto. If anyone knows I'd love to avoid compiling gcc just for matlab.

  4. #4
    Join Date
    May 2011
    Location
    Norwich, UK
    Beans
    3
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    Please excuse the selfless self promotion, but I think I covered what you're looking for in my blog.

    Basically, Ubuntu in the update seemingly updates your libraries but doesnt completely remove them. Creating a link back to them seems to keep MATLAB happy

  5. #5
    Join Date
    Nov 2007
    Beans
    8

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    So I can't speak for the OP, but I did see your blog and it allowed me to run Matlab, but it does nothing for me to do with compiling mex files.

  6. #6
    Join Date
    May 2011
    Location
    Norwich, UK
    Beans
    3
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    I dont personally know about MEX files, but I imagine they use libraries just like everything else in MATLAB. Since, the Ubuntu 11 upgrade I've been having massive problems with some of my applications that previously had no problems.

    I've done another blog post about it. But it basically boiled down to MATLAB trying to use 32 bit libraries when Ubuntu (by default) gives you x64 and installing 32 bit (if you're not careful) replaces the 64 bit libraries.

    And of course the 64 ones dont work with 32 code. And the 32 doesnt want to work without the 64 present...

  7. #7
    Join Date
    May 2011
    Beans
    2
    Distro
    Ubuntu

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    Hello Ubuntu MATLAB users.

    I too observed the issue below, and I was able to reproduce it with several versions of MATLAB under Ubuntu 11.04. I have a workaround that does not require more than editing a file in your home directory:
    • Run 'mex -setup' at the command line in either bash or MATLAB and select either option
    • Edit the file ~/.matlab/mexopts.sh using your favorite text editor and change each instance of gcc to gcc-4.4; each instance of g++ to g++-4.4; each instance of gfortran to gfortran-4.4
    • Install gcc-4.4, g++-4.4, and gfortran-4.4

    Note that the gcc in Ubuntu 10.10 which worked was version 4.4.x, so this approach seems to work. I also tried installing gcc-4.3 and did not get MEX files to compile without error, so this method was most effective.

    I posted a slightly more detailed version on my new blog.


    Quote Originally Posted by doctor max View Post
    Hi everybody.

    I just upgraded to Ubuntu 11.04 and I have a problem with a MATLAB mex file: I receive this error

    Code:
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl_c.so.2)
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl_c.so.2)
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl.so.7)
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl.so.7)
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1: /usr/local/MATLAB/R2010b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libgmpxx.so.4)
    With 10.10, it worked perfectly. I tried to reinstall MATLAB without success. What could the problem be and how can I resolve it?

    Thank u

    Bye
    Last edited by dog.bytes; May 19th, 2011 at 07:34 PM.

  8. #8
    Join Date
    Oct 2010
    Beans
    3

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    I don't mean to hijack the thread, but I'm also having a problem mexing with Ubuntu 11.04 and was wondering if this is related or is a new problem. I am using Matlab 2008a and gfortran/gcc 4.4 (I receive a warning that this isn't officially supported by Matlab, but I don't think that is the cause of the message). I receive the following when I try to mex a file:

    Code:
    as: /usr/local/Matlab/R2008a/bin/glnxa64/libz.so.1: no version information available (required by /usr/lib/libbfd-2.21.0-system.20110327.so)
    /usr/bin/ld: /usr/local/Matlab/R2008a/bin/glnxa64/libz.so.1: no version information available (required by /usr/lib/libbfd-2.21.0-system.20110327.so)
    Thank you!

  9. #9
    Join Date
    May 2011
    Beans
    2
    Distro
    Ubuntu

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    Were you able to do everything in Ubuntu 10.10? If so, the issue might well be related.

  10. #10
    Join Date
    Oct 2010
    Beans
    3

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    Quote Originally Posted by dog.bytes View Post
    Were you able to do everything in Ubuntu 10.10? If so, the issue might well be related.
    Yes, sorry I should've said that. I have been able to mex things no problem with this version of Matlab with the last 4 releases of Ubuntu (9.04-10.10).

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •