Bug When Compiling MySQL 5.1 From Source

Posted in: MySQL, Technical Track

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.

Interested in working with Gerry? Schedule a tech call.

About the Author

I have been working with databases for the last 20 years. Prior to Pythian worked for MySQL for 6 years.

2 Comments. Leave new

Antony T Curtis
June 17, 2009 3:40 pm

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.


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

Your email address will not be published. Required fields are marked *