Commit graph

4 commits

Author SHA1 Message Date
Sergei Golubchik
45ee26699e remove redundant declarations 2011-10-04 15:01:26 +02:00
unknown
0de9a4abab MWL#74: Shared libmysqld.so library.
Switch makefiles to use libtool to build libmysqld.so, as well as all its
dependencies.

The previous MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() declaration is removed,
as it does not work well with a libtool build. Instead, plugins that need it
can specify an alternate object in MYSQL_PLUGIN_STATIC() that will be used for
embedded library. The plugin must then take care itself of compiling the
special object for embedded, rebuilding the source files previously listed in
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() with @plugin_embedded_defs@ in
CFLAGS/CXXFLAGS. The extra target @XXX_embedded_static_target@ is available
for the special object, this will be empty when --without-embedded-server.

All in-tree plugins are changed to build their static targets with libtool.
Additional plugins that want to work with libmysqld.so will need to be
similarly modified to build with libtool (or otherwise provide an -fPIC
object). Dynamically loaded plugins are not affected.

The old libraries like libmysys.a, libmyisam.a and similar libraries, which
were installed by `make install` though this is of little use, are still built
and installed to not break package scripts etc. that expect them. These
libraries are kept static to avoid introducing new .so dependencies.

The patch also fixes a handfull of duplicate symbol linker errors, where we
included some object twice during linking; these for one reason or another did
not produce errors before but caused problems on some platforms with this
patch (eg. Mac OS X linker is more strict for shared objects).

This patch only does what is necessary to build libmysqld.so. There are some
more cleanups that are possible now that we are using libtool more fully,
which could done in subsequent patches (though we may not bother as we are
switching from autotools to CMake anyway):

 - In libmysql_r/, we should be able to just link libmysys.la etc, instead of
   symlinking and re-compiling sources into the directory.

 - In libmysql/, we can similarly avoid symlinking and recompiling sources if
   we instead build a libmysys_nothread.la library with appropriate CFLAGS and
   link that.

 - In sql/, we can build a separate target libmysql_int.la with appropriate
   CFLAGS for embedded and use that in libmysqld/ instead of symlinking
   sources.

 - libmysys.a, libmyisam.a and similar libraries could be installed as .so
   also to save on code size; or alternatively could be not installed at all.


client/Makefile.am:
  Updated for using libtool
config/ac-macros/plugins.m4:
  Replace MUSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS with mechanism for plugins
  to specify alternate object for embedded.
configure.in:
  Fix linking duplicate objects related to THREAD_LOBJECTS.
dbug/Makefile.am:
  Updated for using libtool
extra/Makefile.am:
  Fix relative paths.
libmysqld/Makefile.am:
  Build libmysqld.la using libtool
libmysqld/examples/Makefile.am:
  Updated to use libtool
mysys/Makefile.am:
  Updated to use libtool.
  Fix linking duplicate objects related to THREAD_LOBJECTS.
mysys/my_uuid.c:
  Fix conflicting global mutex name by making it static.
regex/Makefile.am:
  Updated to use libtool
sql/Makefile.am:
  Updated to use libtool
sql/item_func.cc:
  Fix conflicting mutex name.
sql/mysql_priv.h:
  Fix conflicting mutex name
sql/mysqld.cc:
  Fix conflicting mutex name.
  Add missing call of my_uuid_end().
storage/archive/Makefile.am:
  Updated to use libtool
storage/archive/plug.in:
  Updated to use libtool
storage/blackhole/Makefile.am:
  Updated to use libtool
storage/blackhole/plug.in:
  Updated to use libtool
storage/csv/Makefile.am:
  Updated to use libtool
storage/csv/plug.in:
  Updated to use libtool
storage/example/Makefile.am:
  Updated to use libtool
storage/federated/Makefile.am:
  Updated to use libtool
storage/federated/plug.in:
  Updated to use libtool
storage/federatedx/Makefile.am:
  Updated to use libtool
storage/federatedx/plug.in:
  Updated to use libtool
storage/heap/Makefile.am:
  Updated to use libtool
storage/heap/plug.in:
  Updated to use libtool
storage/innobase/Makefile.am:
  Updated to use libtool
storage/innobase/plug.in.disabled:
  Updated to use libtool
storage/innodb_plugin/Makefile.am:
  Updated to use libtool
storage/maria/CMakeLists.txt:
  Fix linking duplicate object in maria_dump_log, causes failure on Mac OS X
storage/maria/Makefile.am:
  Updated to use libtool
  Fix linking duplicate object in maria_dump_log, causes link failure on Mac OS X
storage/maria/ma_loghandler.c:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/ma_loghandler.h:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/maria_dump_log.c:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/plug.in:
  Updated to use libtool
storage/myisam/Makefile.am:
  Updated to use libtool
storage/myisam/plug.in:
  Updated to use libtool
storage/myisammrg/Makefile.am:
  Updated to use libtool
storage/myisammrg/plug.in:
  Updated to use libtool
storage/pbxt/plug.in:
  Updated to use libtool
storage/pbxt/src/Makefile.am:
  Updated to use libtool
storage/xtradb/Makefile.am:
  Updated to use libtool
storage/xtradb/plug.in:
  Updated to use libtool
strings/Makefile.am:
  Updated to use libtool
unittest/unit.pl:
  Don't attempt to run libtool internal files as unit tests.
vio/Makefile.am:
  Updated to use libtool
2010-11-17 13:24:20 +01:00
unknown
fe68583216 bug #23369 (Embedded library can't be linked)
Problem is that some files moved to storage/*/ still are dependent
on sql/ code (usually use members of THD structure)
that can get different being compiled with another #define-s
Code added to recompile these for the embedded server


config/ac-macros/plugins.m4:
  macros added to check if the storage has sql/ - dependent code
libmysqld/Makefile.am:
  symlink files from storage/*/ needed to be recompiled
  with EMBEDDED_LIBRARY
storage/federated/plug.in:
  ha_federated.cc uses THD structure
storage/heap/plug.in:
  ha_heap.cc uses THD structure
storage/innobase/plug.in:
  ha_innodb.cc uses THD structure
storage/myisam/plug.in:
  ha_myisam.cc uses THD structure
storage/myisammrg/plug.in:
  ha_myisammrg.cc uses THD structure
2006-10-18 17:03:37 +05:00
unknown
b470b3ab87 Major changes are plug.in files created for almost all storage engines. A few stray BDB references removed.
storage/blackhole/plug.in:
  BitKeeper file /home/brian/mysql/arch-5.1/storage/blackhole/plug.in
storage/heap/plug.in:
  BitKeeper file /home/brian/mysql/arch-5.1/storage/heap/plug.in
storage/myisam/plug.in:
  BitKeeper file /home/brian/mysql/arch-5.1/storage/myisam/plug.in
storage/myisammrg/plug.in:
  BitKeeper file /home/brian/mysql/arch-5.1/storage/myisammrg/plug.in
storage/federated/ha_federated.h:
  Rename: sql/ha_federated.h -> storage/federated/ha_federated.h
BUILD/FINISH.sh:
  Stray BDB reference
BUILD/autorun.sh:
  Stray bdb reference
BUILD/compile-alpha-cxx:
  Stray bdb reference
BUILD/compile-alpha-debug:
  Stray bdb reference
BUILD/compile-dist:
  Stray BDB Reference
BUILD/compile-ia64-debug-max:
  Stray BDB reference
configure.in:
  All plugin code is now in plug.in files. Few tricky exceptions left.
sql/CMakeLists.txt:
  Removed federated references
sql/Makefile.am:
  Removed federated references
sql/mysql_priv.h:
  stray bdb reference
storage/example/ha_example.cc:
  Enabled all of mysql include
storage/federated/ha_federated.cc:
  Added plugin defs
storage/csv/plug.in:
  New BitKeeper file ``storage/csv/plug.in''
storage/federated/Makefile.am:
  New BitKeeper file ``storage/federated/Makefile.am''
storage/federated/plug.in:
  New BitKeeper file ``storage/federated/plug.in''
storage/innobase/plug.in:
  New BitKeeper file ``storage/innobase/plug.in''
storage/ndb/plug.in:
  New BitKeeper file ``storage/ndb/plug.in''
2006-08-18 21:19:19 -07:00