MySQL on Tru64 (summary)
Didier Godefroy <[email protected]> Sat, 09 May 2009 17:53:12 +0200
| Newsgroups | gmane.os.tru64.managers |
|---|---|
| Message-ID | <C62B7388.28897%[email protected]> |
Hello fellow Tru64ers,
I'm posting my findings on MySQL v5.1.34 installation on Tru64 V5.1b.
After a lot of trial and errors, and a little bit of tweaking of switches
and some source code patching, I'm sharing what I found so others will save
time doing the same thing.
One important thing to note is that using gcc/g++ to compile MySQL causes
the binaries to generate a lot of "unaligned access" warnings, for the
deamon and the client, even the tools.
I haven't been able to get the test suite successfully so far.
When compiling with the Tru64 native cc/cxx and the right combination of
flags, it's possible to compile after having patched a source file to work
around an error on FE_TONEAREST which isn't found although HAVE_FESETROUND
was set during configure. (I haven't found out how that can happen and do
the right kind of fix)
The file I patched is sql/mysqld.cc where that error occurs:
#ifdef HAVE_FESETROUND
/* Set FPU rounding mode to "round-to-nearest" */
fesetround(FE_TONEAREST);
#endif /* HAVE_FESETROUND */
I'm sure there is a better way to fix this problem but I just patched it by
adding this before the snippet above:
#ifdef UNDEF_HAVE_FESETROUND
#undef HAVE_FESETROUND
#endif
And I added a define in the flags for UNDEF_HAVE_FESETROUND.
I used the flags as follows:
CFLAGS="-O4 -g3 -w -pthread -ansi_alias -arch host -ansi_args -fast -inline
speed -speculate all"
CXXFLAGS="-O4 -w -pthread -ansi_alias -ansi_args -fast -inline speed -arch
host -nortti -DUNDEF_HAVE_FESETROUND"
The "unaligned access" warnings all go away when using cc/cxx to compile,
and I haven't had any core dumps since either.
The test suite has too many issues and I haven't been able to fully test it.
I also used those configure switches among others:
--with-pthread
--enable-thread-safe-client
--enable-local-infile
--with-error-inject
--with-atomic-ops=smp
--with-named-thread-libs="-lpthread -lmach -lexc -lc"
--with-named-curses-libs=-lncurses
--with-mysqld-ldflags=-static
--with-big-tables
--with-mysqlmanager=no
--with-readline
--with-server-suffix=max
--without-ndb-debug
I turned off nbd and had to use my openssl instead of yassl because yassl
won't compile properly.
I also found out that using --with-fast-mutexes is also the cause of pthread
related errors with undefined identifiers which I could not solve. I'm
thinking it has something to do with the name mangling happening in
pthread.h and only on some of the identifiers, not all of them, which makes
no sense. Those errors were happening on pthread_mutex_unlock which isn't
defined while __pthread_mutex_unlock is the one that is defined in pthread.h
.
For a reason I still don't understand, the pthread_mutex_lock identifier
isn't causing that error, the only other identifier causing the same error
is pthread_mutex_destroy for the same reason, as __pthread_mutex_destroy is
actually also defined.
Anyway, I couldn't figure out why those errors were happening on those two
symbols and not the others, as they're all defined in pthread.h, so turning
off the fast mutexes was the only solution I found.
The two options below couldn't not be used as such because using openssl
instead of built-in yassl prevents their use:
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static
So I only used --with-mysqld-ldflags=-static instead.
As far as plugins are concerned, I turned off several of them and only kept
what I needed:
--with-plugins=federated,innobase \
--without-plugin-daemon_example \
--without-plugin-ftexample \
--without-plugin-archive \
--without-plugin-blackhole \
--without-plugin-example \
This sums it up for now, at least I can connect with the client and it seems
to work fine. I would like to run the full test suite, so I would like to
find fixes for that.
Cheers,
--
Didier Godefroy
mailto:[email protected]