Monday, December 12, 2005

Installing just the MySQL Client using icc

I started out today doing what I thought was a simple task; Install the MySQL client using Intel's compiler. In my environment, we like to install the client software so it is generally available to everyone and the server software on the actual physical box. We feel this gives us the flexibility to upgrade the servers indendently from all the programs.

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:

mkdir .libs
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[2]: *** [gen_lex_hash] Error 1
make[2]: Leaving directory `/srcpath/5.0.16/mysql-5.0.16/sql'
make[1]: *** [all-recursive] Error 1
make[1]: 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,59295,59295#msg-59295.

Update: Solution


Noons said...

Any chance of checking what's going on with the post formatting? The code lines just overlap with the rest of the rendering on the right hand sized.
Firefox 1.5 here.

Jeff Hunter said...

Yeah, I haven't really mastered the HTML and templates yet... I need to format my commands better...

Jeff Hunter said...

There, that should be a little more readable...

Anonymous said...

The configure without server line still goes way off to the right (IE6)

Jeff Hunter said...

The configure without server line still goes way off to the right (IE6)
Arrgh. This is the third time I've changed it. I wonder what's going on...

Noons said...

maybe the "--" is acting as some form of comment start and it stops any further processing of the line?

Jeff Hunter said...

Seems like every time I re-publish, the lines go long again. Arrr.