I'm trying to compile a Mex file on SuSE linux 10.1, which uses GCC 4.1.0.
The file compiles fine, but when I try to run it I get this error:
/opt/Matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version
`GCC_3.3' not found (required by /usr/lib/libstdc++.so.6).
From the documentation, it appears as though Matlab only supports GCC 3.2.3.
I suspect that my only solution is to download and compile this compiler and
then use it to compile my mex file.If you must use gcc 3.2.3, your best bet is
to first build and install gcc 3.3.6, and then use that to build gcc 3.2.3.
3.1. build and install gcc 3.3.6 first
download gcc-3.3.6.tar.bz2 to /home/max/
cd home/max
tar xjvf gcc-3.3.6.tar.bz2 # $srcdir=/home/max/gcc-3.3.6
mkdir objdir
cd objdir
$srcdir/configure --prefix=/opt/gcc-3.3.6 # or wherever
make bootstrap
su
make install
3.2 and then use gcc 3.3.6 to build gcc 3.2.3
export PATH=/opt/gcc-3.3.6/bin:$PATH
export LD_LIBRARY_PATH=/opt/gcc-3.3.6/lib:$LD_LIBRARY_PATH
mkdir objdir
cd objdir
$srcdir/configure --prefix=/opt/gcc-3.2.3 # or wherever
make bootstrap
su
make install
3.3 now, compile your mex file, before compiling do
export PATH=/opt/gcc-3.2.3/bin:$PATH
在linux下装matlab遇到的问题
When running the installation, I run across errors such as: cp: cannot stat `/devel/Arel/R14n/cdimages/unix/cdrom1/update/bin/glnxa64/*': No such file or directory Error writing to /tmp/31122tmwinstall The installer is unable to copy files to /tmp. Make sure that /tmp exists, is writable, and has at least 5 megabytes of available space. Solution: In order to install 32-bit MATLAB on a 64-bit Linux machine running Linux, it is necessary to use one of the following workarounds: 1) Download the products from our downloads site at the following URL: http://www.mathworks.com/web_downloads/ Once downloaded, start the installation script as follows: ./install -glnx86 2) If it is necessary to install from CD, run the installer as follows: ./install -glnx86 -nocp If installing products from multiple CD's, it will be necessary to stop the installation process after each CD by clicking the "Skip CD X" button (where X is the next CD number). This process will then need to be repeat for each of the CD's. 3) Copy all 3 CD's into a single directory on your local hard drive and then run the installer with the -glnx86 and -nocp flags. Note some files will be overwritten during this process. Once the installation procedure is complete, the Flexlm License Manager will have to be properly configured. To do this, go to the MATLAB root directory and run the following command: ./install_matlab 4 -glnx86 NOTE: The -glnx86 flag is required for all license manager scripts (lmstart, lmdown, lmstat, etc...) as well as for starting MATLAB.