Bug #40336 Falcon plugin installed in wrong directory by make install
Submitted: 26 Oct 2008 21:31 Modified: 15 May 2009 17:06
Reporter: Olav Sandstå Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:6.0.7 OS:Linux (Ubuntu 8.0.4)
Assigned to: Jonathan Perkin CPU Architecture:Any

[26 Oct 2008 21:31] Olav Sandstå
Description:
When trying to load the Falcon plugin after having compiled and installed MySQL the attempt fails with the following error:

mysql> install plugin falcon soname 'ha_falcon.so';
ERROR 1126 (HY000): Can't open shared library '/home/olav/install/mysql/lib/mysql/plugin/ha_falcon.so' (errno: 22 cannot open shared object file: No such file or directory)

This error is due to the Falcon plugin not being installed in the plugin directory by make install. Instead of being in the lib/mysql/plugin directory the ha_falcon.so file is found in the lib/mysql directory.

How to repeat:
1. Download the latest 6.0.7 tar.gz sources, unzip and untar.

2. Run configure:

     ./configure --prefix=/home/olav/install/mysql

3. Compile and install:

     make
     make install

4. Start the mysql server.

5. Log on as root user using mysql

6. Try to load the Falcon storage engine:

     install plugin falcon soname 'ha_falcon.so';

Suggested fix:
The ha_falcon.so file should be located in lib/mysql/plugin after running make install
[27 Oct 2008 7:46] Sveta Smirnova
Thank you for the report.

But you have to specify --with-falcon in configure line if you want Falcon storage engine to be included. Please try with this option and inform if problem still exists.
[27 Oct 2008 19:41] Olav Sandstå
According to ./configure --help is should be possible to build Falcon both as "static" and as "dynamic". I have tried to run configure with --with-falcon. This results in Falcon being built as a static library and statically linked into mysqld.

When I run ./configure without --with-falcon my belief was that Falcon would be built as a dynamically linkable PLUGIN. This was based on the following:

1. The config.log file contains the following:

configure:49848: checking whether to use Falcon Storage Engine
configure:49881: result: plugin

2. Falcon is compiled and a dynamically loadable library is created: ha_falcon.so

3. make install installs the ha_falcon.so library file in the mysql/lib directory.

This is very similarly to what happens with InnoDB when just running ./configure. A dynamic loadable library called ha_innodb.so is compiled and installed. And I am able to load this by running:

mysql> install plugin innodb soname 'ha_innodb.so';
Query OK, 0 rows affected (4.36 sec)

The main differences between Falcon and InnoDB in this case are:

 1. ha_falcon.so gets installed in mysql/lib while ha_innodb.so is installed in mysql/lib/plugin

 2. install plugin innodb ... works but install plugin falcon ... fails.

I might be wrong but I still think that the file ha_falcon.so should be installed in mysql/lib/plugin instead of mysql/lib.
[27 Oct 2008 19:45] Olav Sandstå
Here is an overview of the dynamically loadable libraries that are installed after I have run "make install":

olav@mythos:/tmp/mysql$ find . -name "*.so"
./lib/mysql/adt_null.so
./lib/mysql/libmysqlclient.so
./lib/mysql/ha_archive.so
./lib/mysql/plugin/ha_innodb.so
./lib/mysql/plugin/libdaemon_example.so
./lib/mysql/plugin/mypluglib.so
./lib/mysql/plugin/ha_blackhole.so
./lib/mysql/plugin/ha_example.so
./lib/mysql/plugin/ha_federated.so
./lib/mysql/ha_falcon.so
./lib/mysql/libmysqlclient_r.so

To me it seems that ha_falcon.so (as well as ha_archive.so) should belong together with the other plugins in the plugin directory.
[1 Nov 2008 21:18] Sveta Smirnova
Thank you for the feedback.

Verified as described.

Workaround: mv lib/mysql/ha_falcon.* lib/mysql/plugin/
[10 Jan 2009 12:34] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/62926

2806 Jonathan Perkin	2009-01-10
      bug#40336: Falcon plugin installed in wrong directory by make install
      
      Install the archive, csv and falcon plugins into the correct directory.
[14 Feb 2009 13:00] Bugs System
Pushed into 6.0.10-alpha (revid:matthias.leich@sun.com-20090212211028-y72faag15q3z3szy) (version source revid:timothy.smith@sun.com-20090207154714-9moby68i60j14r6w) (merge vers: 6.0.10-alpha) (pib:6)
[24 Mar 2009 17:54] Jonathan Perkin
Fixed in 6.0.10, sent for documenting.
[15 May 2009 17:06] MC Brown
A note has been added to the 6.0.11 changelog: 

When building Falcon as a plugin, the plugin would be installed into the wrong directory and would fail to be located when trying to install the plugin.