The current Matlab release, R2012b, only supports GCC 4.4 for compiling MEX functions on Linux.
On compute nodes, the installed GCC may be too old, but compiling a new version is not that hard.
The following script works for me on a Red Hat Enterprise Linux 5 machine. Note that these instructions build GCC with shared Read More →