Amarok, embedded MySQL and paludis: How to make it work

Amarok can use external MySQL server, but it may be annoying to set it up and also, You might like not to share Your collection outside Your home directory.

Problem is with GCC's -fPIC flag, which is required for MySQL to work properly, but should not be enabled globally.

So first, You must enable embedded flag for both dev-db/mysql and media-sound/amarok.

Next, open Your /etc/paludis/bashrc and add

case "${PN}" in
        mysql)
                export CFLAGS="$CFLAGS -fPIC -DPIC"
                export CXXFLAGS="$CFLAGS"
                ;;
esac

to enable PIC only for MySQL.

Also see Gentoo docs for PIC and amd64 problems.

Published on July 8, 2010 under english gentoo howto linux technology