[Maria-developers] MariaDB 5.5 binary tarball packages and libaio
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? 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.
-----Original Message----- From: Kristian Nielsen [mailto:knielsen@knielsen-hq.org] Sent: Freitag, 25. November 2011 12:58 To: Vladislav Vaintroub Cc: maria-developers@lists.launchpad.net 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?
One option could be statically linking libaio. Now in general, static
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
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. linking libaio
statically?
Any ideas?
- Kristian.
Hi, Kristian! On Nov 25, Kristian Nielsen wrote:
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?
We can take the position that for correct integration of mariadb into OS (and in particular, using OS dynamic libraries), one needs to use native OS packages of mariadb - deb, rpm, whatever. And for tarballs all bets are off. Regards, Sergei
Hi!
"Sergei" == Sergei Golubchik <serg@askmonty.org> writes:
Sergei> Hi, Kristian! Sergei> On Nov 25, Kristian Nielsen wrote:
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?
Sergei> We can take the position that for correct integration of mariadb into OS Sergei> (and in particular, using OS dynamic libraries), one needs to use native Sergei> OS packages of mariadb - deb, rpm, whatever. And for tarballs all bets Sergei> are off. However it would be good that with tarballs we do as much static linking as possible as this makes it more likely that the binary will work. Regards, Monty
-----Original Message----- From: maria-developers- bounces+wlad=montyprogram.com@lists.launchpad.net [mailto:maria- developers-bounces+wlad=montyprogram.com@lists.launchpad.net] On Behalf Of Michael Widenius Sent: Mittwoch, 30. November 2011 20:09 To: Sergei Golubchik Cc: Kristian Nielsen; maria-developers@lists.launchpad.net Subject: Re: [Maria-developers] MariaDB 5.5 binary tarball packages and libaio
Hi!
"Sergei" == Sergei Golubchik <serg@askmonty.org> writes:
Sergei> Hi, Kristian! Sergei> On Nov 25, Kristian Nielsen wrote:
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?
Sergei> We can take the position that for correct integration of mariadb into OS Sergei> (and in particular, using OS dynamic libraries), one needs to use native Sergei> OS packages of mariadb - deb, rpm, whatever. And for tarballs all bets Sergei> are off.
However it would be good that with tarballs we do as much static linking as possible as this makes it more likely that the binary will work.
I pushed a workaround (or a hack dependent on point of view) that builds mysqld without shared libaio dependency, on Linuxes that provide static libaio (not all Linuxes have it, for example there is no static libaio on OpenSUSE). However, users of shared embedded library will still have shared libaio dependency, and users of static embedded library will need to link with either static or shared aio themselves to satisfy all dependencies . mysql_config has -laio in the link flags for embedded
Regards, Monty
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
participants (4)
-
Kristian Nielsen
-
Michael Widenius
-
Sergei Golubchik
-
Vladislav Vaintroub