Building Qt 4.8.5 for Maya 2015 on Linux Overview -------- Maya uses a customized version of Nokia's Qt libraries. If you want to write Maya plug-ins which also make use of Qt you will have to build Qt from the modified source files provided in this directory and link your plug-ins against those libraries. qt-adsk-4.8.5.tgz contains the modified Qt source code, in tarred, gzipped form. adsk-qt485-patch.txt contains the customizations to the standard Qt source, in standard patch diff format. You do not need to apply the patch file as the .tgz file already contains the changes. The patch file is just provided for informational purposes. Unpack The Archive ------------------ Unpack the archive using the following command: tar xzf qt-adsk-4.8.5.tgz then step into the resulting directory: cd qt-adsk-4.8.5 OpenSSL ------- Ensure that the openssl-devel package is installed on the machine yum install openssl-devel Configure --------- To avoid problems with differences in compiler versions between Maya and Qt, Qt should be built with the same versions of the compilers as are used for building Maya plug-ins. Refer to the Maya API Guide for instructions on how to set them up. Regardless of the actual version of the compiler, though, the Qt mkspec files expect them to be called 'gcc410' and 'g++410', so you may have to set up appropriate links. For example, if Maya requires GCC version 4.1.2 and you've placed that in /opt/gcc412, as the API Guide recommends, then you would have to set up links as follows: ln -s /opt/gcc412/bin/gcc412 /usr/bin/gcc410 ln -s /opt/gcc412/bin/g++412 /usr/bin/g++410 Once the compilers are properly set up, configure the Qt build using the following command: ./configure -separate-debug-info -stl -no-rpath -no-qt3support -plugin-sql-sqlite The configuration process should end with the following message: Qt is now configured for building. Just run 'gmake'. Once everything is built, you must run 'gmake install'. Qt will be installed into /usr/local/Trolltech/Qt-4.8.5 To reconfigure, run 'gmake confclean' and 'configure'. Build ----- Build the binaries using the following command: make -j 8 >& build.log The '-j' flag instructs 'make' to use multiple processes, which can speed up the build on multicore systems. For optimal results the value after '-j' should be roughly double the number of cores on your system. Install ------- To perform the installation, make yourself superuser then execute the following command: make install By default Qt will be installed into /usr/local/Trolltech/Qt-4.8.5 Add the Qt 'bin' directory (e.g. /usr/local/Trolltech/Qt-4.8.5/bin) to the start of your path. The directory where you expanded the archive is no longer needed and may be deleted if you wish to free up the space. Build The devkit Qt Plug-ins ---------------------------- You can test your Qt installation by building the Qt plug-ins which ship with Maya's devkit. First, make sure that the 'qmake' command is in your path: which qmake If you didn't change the install location for Qt then you should get back the following: /usr/local/Trolltech/Qt-4.8.5/bin/qmake If not, then you must add /usr/local/Trolltech/Qt-4.8.5/bin to the start of your path. Maya's Qt plug-ins can be built as follows: 1) Copy Maya's devkit/plug-ins directory to some place where you have write privileges. E.g: cp -r /usr/autodesk/maya2014-x64/devkit/plug-ins ~/myPlugins 2) Move into that directory: cd ~/myPlugins 3) Execute the following command: make -f Makefile.qt 4) Clean up unneeded intermediate files: make -f Makefile.qt clean If in step 3 you get the following error message: Qt not found. Qt-based plug-ins will not be built. that means that the 'qmake' command could not be found in your path.