BenV's notes

MySQL^W MariaDB 5.5 on Slackware 11

by on May.10, 2013, under Software

One of my older (stable, works like a train) database servers still on Slackware 11 — well, heavily modified Slackware 11 😉 — is running MariaDB 5.1.something. Because I was tinkering with mysql settings I decided ‘hej, let’s see if upgrading to the latest version is a fun project!’.
Well, it sure is 😉

First of all, the newer MySQL and therefore also MariaDB versions have dumped a perfectly fine autoconf system for Cancer Make aka CMake. Well, that’s just great. There’s no cmake in Slackware 11, so I figured to grab the latest slackware cmake sources and build it myself. No big deal, except in order to use the latest slackware sources you’ll need tar with xz support. Well, while we’re at it anyway might as well build them. So I headed over to the nearest slackware repository and built myself a new xz, tar, findutils and pkgtools using the slackware 14 build scripts (slightly helped/modified to handle the absense of xz in my old system). There, now back to cmake.

Of course CMake wants to have libarchive, so grab that from the slackware sources and run the build script as well, no problem here. Finally to run through the cmake.Slackbuild script you’ll want to get rid of the –qt-gui flags in the script, or have fun compiling qt4 on slackware 11 😉
Since it’s a headless server I got rid of the useless qt interface for this package.

Well, now that we have a working cancermake we can try to build MariaDB. Or so I thought. The latest MariaDB is 5.5.30 at the moment. Untar it, and let’s see what the options are. Btw, the cmake command can be replaced if you have ccmake. ccmake is the commandline curses ‘gui’ for cmake.

root@db:/usr/src/mariadb-5.5.30# cmake . -LH | less
# Options here, and some whining about not having that fscking boost garbage.... who cares, MariaDB doesn't use boost.
root@db:/usr/src/mariadb-5.5.30# cmake . -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:STRING=Release -DNOT_FOR_DISTRIBUTION:BOOL=On -DWITH_READLINE:BOOL=ON -DWITH_SSL:STRING=system
# more garbage output here
root@db:/usr/src/mariadb-5.5.30# make VERBOSE=1
# blabla
../libmysql/libmysqlclient.a(my_addr_resolve.c.o)(.text+0x13e): In function `my_addr_resolve':
undefined reference to `bfd_demangle'

Great. That bfd_demangle garbage seems to come from binutils, which is obviously ancient. So grab the sources for the latest binutils and run the binutils.Slackbuild to find out …. that the Slackware 11 gcc version is older than your grandma too. Grrr. Fine, we’ll upgrade that as well. Meanwhile I’m starting to wonder if it wouldn’t be faster to upgrade to Slackware 14, but that would break all kinds of stuff running on that system that I really don’t feel like touching.
Anyhow, after grabbing the sources for gmp, mpfr and libmpc and heavily molesting the gcc.Slackbuild script so it wouldn’t compile more than just gcc and gcc-g++ I got myself a brand new gcc version 4.7.1. Obviously this is waiting for trouble 😉 On the plus side, binutils finally compiled without errors.

So back to MariaDB 5.5.30:

root@db:/usr/src/mariadb-5.5.30# make VERBOSE=1
# Output here
[ 8%] Building C object mysys/CMakeFiles/mysys.dir/my_context.c.o
cd /usr/src/mariadb-5.5.30/mysys && /usr/bin/gcc -DHAVE_CONFIG_H -Wall -march=i686 -fPIC -O3 -DNDEBUG -DDBUG_OFF -I/usr/src/mariadb-5.5.30/include -I/usr/src/mariadb-5.5.30
/mysys -o CMakeFiles/mysys.dir/my_context.c.o -c /usr/src/mariadb-5.5.30/mysys/my_context.c /usr/src/mariadb-5.5.30/mysys/my_context.c: Assembler messages:
/usr/src/mariadb-5.5.30/mysys/my_context.c:457: Error: CFI instruction used without previous .cfi_startproc
make[2]: *** [mysys/CMakeFiles/mysys.dir/my_context.c.o] Error 1

Say what? I’ve never heard of this error before…. and looking at the .c file shows a bunch of assembler code that I really don’t want to inspect 🙂
Google only finds some vague garbage about glibc and other stuff that’s irrelevant, so that’s the biggest reason for thise post 😉
Fortunately the mariadb-devs have an answer. I made a patch for it, here it is:
[Download not found]

Guess what: now it does compile. Yay.
Maybe I’ll even upgrade it later today, when I feel like recompiling all the other stuff that depends on libmyqsl first :p




:, , ,

Leave a Reply

You must be logged in to post a comment.