Why do I get a segfault after compiling correct MEX files under linux?
Christian Joensson answers: I suspect you have MATLAB 5.2.1 (R11.1) or prior and that you have a libc6 (glibc2) based linux system. Either (1) upgrade to MATLAB 6 (R12) or (2) downgrade to a libc5 based linux system or (3) use the cross-compiler mentioned in The MathWorks Tech Solution (http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_external/f24626.html). If you run a RedHat system, the solution above contains cookbook instructions for installing a libc5 cross-compiler that will happily co-exist with your regular compiler. If you run a different distribution, use the above solution as a guide, but you will need to do some hacking to get things all set up. If you can provide a detailed fix for a specific system other than the one mentioned here, please email the maintainer of this FAQ!