← Back to team overview

maria-developers team mailing list archive

Re: MariaDB 5.5 binary tarball packages and libaio

 


> -----Original Message-----
> From: Kristian Nielsen [mailto:knielsen@xxxxxxxxxxxxxxx]
> Sent: Freitag, 25. November 2011 12:58
> To: Vladislav Vaintroub
> Cc: maria-developers@xxxxxxxxxxxxxxxxxxx
> Subject: MariaDB 5.5 binary tarball packages and libaio

Hi Kristian
 
> Hi Wlad,
> 
> I got some progress with Buildbot and producing binary tarball packages
for
> MariaDB 5.5, using your suggestions.
> 
> But I encountered a problem. I used -DBUILD_CONFIG=mysql-release and
> installed
> libaio-dev. But then the server fails like this:
> 
> ./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot
open
> shared object file: No such file or directory
> 
> Of course - as libaio.so must be installed by users.
> 
> I do not think it is appropriate that users need to install libaio.so to
use
> the binary tarballs (as those are supposed to work anywhere - on the other
> hand, for .deb for example we _should_ use libaio of course, and
> dependencies
> will take care that it is installed).
> So what to do? For now I've tried to build without libaio for the generic
> tarballs (-DIGNORE_AIO_CHECK=1). So binaries will work; to get aio, users
> can
> build themselves or install real packages. 
> Or do you have another idea? Do you know what MySQL does?

According to http://bugs.mysql.com/bug.php?id=60544 ,  mysqld has libaio.so
dependency, user has to install the shared library. However, I recall
libaio used to be linked statically in the past. I do not know why this has
changed. What we should do I is a good question. AIO is a good feature, it
will be pity to deliver without it . We can do it MySQL'ish way, and just
accept the dependency, or link statically,  or try to load libaio functions
at runtime and fallback to no AIO if it is not there (dynamic loading is a
technique I use extensively on Windows to workaround missing functions in
XP).  
In worst case, if  tarballs is not primary distribution media, we also can
deliver also without  it..
 
As for static linking,
http://stackoverflow.com/questions/3762057/cmake-how-to-produce-binaries-as-
static-as-possible  hints that SET(CMAKE_FIND_LIBRARY_SUFFIXES .a
${CMAKE_FIND_LIBRARY_SUFFIXES}) could be used to force FIND_LIBRARY to
lookup for static libs.

> One option could be statically linking libaio. Now in general, static
linking
> is a can of worms with many pitfalls, however for just libaio it might
work
> (libaio.so is statically linked on my Debian Wheezy). However, I am not
sure
> if this is safe in general, nor do I know how to make cmake link just
libaio
> statically?
> 
> Any ideas?
> 
>  - Kristian.



References