← Back to team overview

maria-discuss team mailing list archive

Re: MariaDB 5.5 compile error

 

On 8/4/2012 5:56 AM, Sergei Golubchik wrote:
> Hi, Brian!
>
> It fails, precisely, because you're trying to build without clients.
> Even the original mariadb gentoo ebuild does not compile with USE=minimal.
>
> Building with -DWITHOUT_SERVER=1 is broken, it doesn't work.
>
> Depending on your needs you have different options:
>
> * Give up, install everything :)
> * Fix the build (and tell us how you did it)
> * Build everything but _install_ only the client - might be easier than
>   the previous option. Note that RPM builds can already do that - in
>   all INSTALL_FILE/etc cmake commands are tagged with an appropriate
>   category, and depending on the category different files end up in
>   different RPMs. It should be pretty easy to build everything and then
>   install only files from client categories.
> * submit a bug report (and we will fix it eventually, but we might
>   prefer to fix the installation, not compilation part - see above).
>

USE="minimal" has always built only the client and supporting libraries
in the autotools versions.
This was done without the server, so it's a bit of a regression.
I need to mimic this functionality if at all possible.

I've patched CMakeLists.txt with the following:
@@ -320,6 +320,13 @@
IF(UNIX)
ADD_SUBDIRECTORY(man)
ENDIF()
+ELSE
+ ADD_SUBDIRECTORY(client)
+ ADD_SUBDIRECTORY(sql/share)
+ ADD_SUBDIRECTORY(scripts)
+ IF(UNIX)
+ ADD_SUBDIRECTORY(man)
+ ENDIF()
ENDIF()

INCLUDE(cmake/abi_check.cmake)

This works for MySQL 5.5.25a, but fails in MariaDB 5.5.25 due to that
one line.

/var/tmp/portage/dev-db/mariadb-5.5.25/work/mysql/mysys/waiting_threads.c:196:21:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘key_WT_RESOURCE_cond’

waiting_threads.c @196 is a simple extern typedef'd declaration:

extern PSI_cond_key key_WT_RESOURCE_cond;

If I patch PSI_cond_key to "unsigned int" as the .h reference typedef
suggests, it will compile.
Is there a better way to do this so I don't have to remove the typedef
reference?

Brian


Follow ups

References