Compiling mysqld with icc

For a test, I compiled mysqld 5.1 on CentOS 5.4 with Intel's icc compiler. Here is how I did it. (I may need to revisit and tweak the process.)

  • Googled for the Intel C++ compiler.
  • Downloaded an evaluation copy (for now) to a temporary directory.
  • Untarred/unzipped the tarball:
$ tar -xvzf l_cproc_p_11.1.072_intel64.tgz
  • Became root and changed to the l_cproc_p_11.1.072_intel64 directory.
  • Issued the command:
# ./install.sh
  • As I followed the prompts, it found that I needed libstdc++.so.5, so I did the following in another teminal window—not as root:
$ sudo yum install compat-libstdc++-33.x86_64
$ sudo yum install compat-libstdc++-33.i386
  • Resuming the icc install, I skipped the "optional" (?) dependencies.
  • After the installation finished (as my own user—not root):
$ source /opt/intel/Compiler/11.1/072/bin/iccvars.sh intel64
  • Then I changed to the mysql source directory and issued the command:
$ ./BUILD/compile-pentium64-icc
  • When the build completed, I issued the commands:
$ cd sql
$ sudo ./mysqld