Bug When Compiling MySQL 5.1 From Source

Jun 17, 2009 / By Gerry Narvaja

Tags: ,

I just filed a very annoying bug when trying to compile with plugin engines using the 5.1.xx source tarball.


I am trying to test SphinxSE as a plugin instead of getting it statically linked and came across an annoying bug. When using the configure --with-plugins option only once, the engine is statically linked. When using it twice, the first engine is created as a plugin, and the 2nd one is linked statically. Here are a couple of examples:./configure –prefix=/usr/local/mysql-5.1.33 –with-plugins=innobase –with-plugins=sphinx

plugin_innobase_shared_target='ha_innodb.la'   <-- plugin
plugin_sphinx_static_target='libsphinx.a'       <-- static
./configure --prefix=/usr/local/mysql-5.1.33 --with-plugins=sphinx --with-plugins=innobase
~/src/mysql-5.1.33$ egrep "plugin_(innobase|sphinx)" config.log
plugin_innobase_static_target='libinnobase.a'      <-- static
plugin_sphinx_shared_target='ha_sphinx.la'         <-- plugin


The bug is filed as Bug #45440.

Share this article

2 Responses to “Bug When Compiling MySQL 5.1 From Source”

  • Antony T Curtis says:

    All plugins, if not explicitly disabled, are built as dynamic plugins.

    What you’re experiencing there is the way how the autoconf generated script has thrown away all repeat declarations instead of merging them together.

    The with-plugins option iirc is meant to take a comma separated list.

    Also available (but a little use feature) is to define ‘feature sets’ such as the ‘max’ or ‘max-no-ndb’ feature sets.

    IMO, not really a bug: This is more like a ‘user’ error or lack of documentation about autoconf behaviour.

  • Gerry says:

    Anthony, the problem is still there if use ‘–with-plugins=innobase’ … it will compile and link it statically. It’s in the bug description. Is that also an expected behavior?

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>