I've compiled the 5.0.16 software using gcc about a dozen times already and other than a few simple tweaks here and there, it was a no-brainer. When I installed the client, I used gcc instead of the preferred (in my environment) icc.
I started by issuing a "make clean" to remove any builds I did before. I then changed my CC and CXX environment variables to point to the icc compiler and did:
$ configure --without-server --prefix=/usr/local/mysql_client
On my first try I encountered errors that were looking for "__cxa_pure_virtual". I googled and found this which gave me some additional things to do. Sure enough, this solved my "__cxa_pure_virtual" problem, but now I have more errors:
$ export CC=icc
$ export CXX=icc
$ export CFLAGS="-O3 -unroll2 -ip -mp -no-gcc -restrict"
$ export CXXFLAGS="-O3 -unroll2 -ip -mp -no-gcc -restrict"
and then I configure with the following options:
$ ./configure --without-server --prefix=/usr/local/mysql_client --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared --with-client-ldflags=-all-static
I then run "make clean" to clean out any failed compiles and it runs fine.
I then run just "make" and it chugs along for a while, but then exits with errors like:
icc -O3 -DDBUG_OFF -O3 -unroll2 -ip -mp -no-gcc -restrict
-o gen_lex_hash gen_lex_hash.o ../myisam/libmyisam.a
../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a
../regex/libregex.a ../strings/libmystrings.a -lz
-lpthread -lcrypt -lnsl -lm -lpthread
gen_lex_hash.o(.eh_frame+0x12): undefined reference to
make: *** [gen_lex_hash] Error 1
make: Leaving directory `/srcpath/5.0.16/mysql-5.0.16/sql'
make: *** [all-recursive] Error 1
make: Leaving directory `/srcpath/5.0.16/mysql-5.0.16'
make: *** [all] Error 2
Obviously, I'm missing a reference to __gxx_personality_v0, but where do I get that from? Maybe one of my other libaries is out of date? If anybody has any hints, I'd appreciate you sharing them at http://forums.mysql.com/read.php?11,59295,59295#msg-59295.