Linux compiler requirement
 
 
 

To compile plug-ins and standalone applications for Maya 2011 for Linux, use the gcc compiler 4.1.2. Maya is built with this compiler under Red Hat Enterprise 4 WS (U4). Plug-ins built with any other compiler will not work because the C++ ABI (Application Binary Interface) must match between Maya and plug-ins.

Note that the compiler should be renamed with the “412” extension to avoid conflict with the default version of gcc on the system.

Unlike other platforms, on Linux we build the gcc compiler with certain options. Follow these steps to build the gcc compiler:

Download the latest errata of RHEL 4 WS U4 and the gcc 4.1.2 source tar file from http://gcc.gnu.org/install/
.
Platform Maya builds on: RHEL 4 WS with latest errata updates
 % uname -a
 Linux lnx-maya2011 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux
 binutils-2.15.92.0.2-21
Setup directories:
 % mkdir gcc412
 % cd gcc412
 % mkdir gcc-build
Extract the source files:
 % tar zxvf gcc-4.1.2.tar.gz
Configure the compiler:
 % cd gcc-build
Run the following all on 1 line:
../gcc-4.1.2/configure --prefix=/opt/gcc412 --program-suffix=412
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --disable-libunwind-exceptions
--enable-__cxa_atexit
Build the compiler:
 % make -j 2 bootstrap
Install compiler as root:
 % su root
 % make install
Note: you can make a symlink in /usr/bin to make the call to gcc easier for the
user:
 % cd /usr/bin
 % ln -s /opt/gcc412/bin/gcc412 .
 % ln -s /opt/gcc412/bin/g++412 .