Re: [Maria-developers] Maria binary builds
Michael Widenius <michael.widenius@gmail.com> writes:
Hi!
"Kristian" == Kristian Nielsen <knielsen@knielsen-hq.org> writes:
<cut>
Kristian> I am still not sure whether generic (.tar.gz) binaries should be build Kristian> statically (and to what extend).
The benefit of building them staticly are:
Unfortunately, the issue is more complex than just this. A fully static binary will not work at all in a number of scenarios. A fully static binary is obtained by linking everything statically, including libc. However, linking libc statically creates a number of problems if mysqld tries to load additional .so files when it is run. The additional .so files then use a different version of libc than the one mysqld code uses, which does not work. This gives problem loading plugins (like UDFs), and on many systems causes problems even without loading any plugins, as libc loads .so files itself (notably for NSS, domain name resolution). There are a number of bugs on this on bugs.mysql.com. Currently, I'm linking libc dynamically to avoid these problems (I believe/hope that glibc binary compatibility has become fairly good by now). I'm linking libz statically (bundled version) as well as libgcc as this shouldn't cause similar problems. And compiling with `gcc` instead of `g++` to avoid linking libstc++ at all. All mariadb code is linked statically as well, of course. I checked, and this seems to be the same that is done in the Sun/MySQL generic binaries these days. - Kristian.
participants (1)
-
Kristian Nielsen