Description:
Currently libmysqld is not being compiled as a proper library, this means that you can not use it in applications like Apache or anything that might load it.
IRC log:
<brian> LenZ: You there, myself and hf are discussing an issue with binaries that may just be a build issue.
<LenZ> I'm here
<brian> Problem, the rpm's for 4.0 for the embedded library are not compiled correctly.
<brian> I am getting __builtin_new symbols in them.
<LenZ> hmm
<LenZ> so how can we get rid of this one?
<brian> strings libmysqld.a | grep builtin
<LenZ> I am not aware of any compile error - I compile the embeeded server along with the standard binary
<brian> That will tell you which binaries are bad.
<LenZ> but it does not tell my why :)
<brian> Are you compiling with -shared?
<LenZ> no
<brian> From talking to hf, the binaries he builds for himself are being compiled/linked correctly.
<brian> And he is doing it on Linux.
<LenZ> Have a look at support-files/mysql.spec.sh to see how it's compiled.
<LenZ> the embedded library is built along with the standard mysql binary, which is configured with "--disable-shared" and "-all-static" ldflags.
<brian> There must be another flag...
<LenZ> check it for yourself, the RPM spec file includes a function called BuildMySQL, which includes the common compile flags.
<brian> Yeah, I am looking at that.
<LenZ> It is being called twice, with some additional options: once for mysqld-max and for the standard mysqld
<brian> hmmm where is the client library being built?
<brian> Since it is being compiled correctly.
<LenZ> the second call builds the standard mysqld (included in MySQL-server)
<LenZ> brian: the client lib is built along with mysql-max, IIRC.
<LenZ> as it includes the --enable-shared option
<brian> Then mysqld needs to be build the same way.
<LenZ> they are being tarred up before the build restarts to create the standard mysqld
<LenZ> should the embedded library rather be built along with the shared libs?
<brian> Yes, or more to the point it needs to be build shared.
<brian> The current binary we are shipping for libmysqld can not be used with any library that will be dlopen(), so... No Apache, No perl...
<LenZ> actually, it seems like it's being built both times
<LenZ> but as the standard binary is built last, it will overwrite the first one I guess.
How to repeat:
strings libmysqld.a | grep builtin
We should probably check all versions that we are shipping to make sure that we are getting this right.
Suggested fix:
See IRC log in description.