Bug #818 Compile static libmysqlclient position independent
Submitted: 9 Jul 2003 5:34 Modified: 28 Jan 2004 9:58
Reporter: Ulrich Schöbel Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:3.23.57 OS:Linux (Linux, SunOS)
Assigned to: Lenz Grimmer CPU Architecture:Any

[9 Jul 2003 5:34] Ulrich Schöbel
Description:
In order to generate a libmysqltcl.so (shared) I need to link in the libmysqlclient.a (static). The static version is needed because the target system doesn't have mysql installed and I don't want to (cannot) deliver the mysqlclient library due to wrapping constraints.

Loading libmysqltcl.so with lbmysqlclient.a linked in reports a "Relocation error...". A recompiled libmysqlclient.a generated through an enhanced Makefile (added -fPIC) linked into libmysqltcl.so loads without complains.

Please integrate the -fPIC (or apropriate) option into the configure/Makefile machinery, maybe by a "--enable-relocation" flag to configure.

This is not a high priority request, as I solved it for me. It would be very helpful to the Tcl community (and probably others, too) aiding towards mysql client development.

Thanks for your attention

Ulrich Schöbel

How to repeat:
mailto:usc@sigos.de
mailto:usus@aladyn.de

Suggested fix:
Extend configure as described above.
[5 Dec 2003 6:47] Boyd Gerber
Verified
[28 Jan 2004 9:58] Lenz Grimmer
Sorry for the late reply!

That option should already be there - try to configure MySQL with the option
"--with-pic"