Bug #35743 Dynamic plugins fail to load on i5/OS
Submitted: 1 Apr 2008 15:42 Modified: 29 Sep 2008 17:37
Reporter: Tim Clark Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.1.23 OS:Other (i5/OS v5r4)
Assigned to: Kent Boortz CPU Architecture:Any
Tags: plugin, rtld, unresolved symbol

[1 Apr 2008 15:42] Tim Clark
Attempting to install a dynamic plugin on i5/OS causes the following error:

mysql> install plugin example soname "ha_example.so"; 
ERROR 1126 (HY000): Can't open shared library '/usr/local/mysql-5.1.23-rc-i5os-p
ower-32bit/lib/ha_example.so' (errno: 8 rtld: 0712-001 Symbol clone__7handlerFP1
1st_mem_root was referenced
      from module /usr/local/mysql-5.1.23-rc-i5os-power-32bi)

This looks similar to Bug #30296, in that the symbols in the mysqld executable are not exported by default. The dynamic plugin depends on some of the symbols defined in mysqld, but dump -Tv mysqld reveals no exported symbols.

This bug may also affect AIX, since i5/OS PASE and AIX have a common loader.

How to repeat:
install plugin example soname "ha_example.so"; 

Suggested fix:
One possible fix is to set LDFLAGS="-Wl,-bexpall" when building mysqld.
[3 Apr 2008 15:29] Kyle Joiner
verified on support i5.
[27 Aug 2008 17:32] Tim Clark
In order to resolve to all of the symbols (including those preceded by an underscore "_" (e.g. _hash_init), expfull must be specified instead of expall.

This can be done with the following configure option:

This affects plugins which rely on some internal functions (like _hash_init, as indicated above.)
[29 Sep 2008 14:51] Kent Boortz
The build scripts were changed to provide the flag "-Wl,-bexpfull" to the
linker to include also symbols that are prefixed with an underscore.
The flag will be used for the 5.0.72, 5.1.29 and 6.0.8 builds.
[29 Sep 2008 17:37] Paul Dubois
Noted in 5.0.72, 5.1.29, 6.0.8 changelogs.

Dynamic plugins failed to load on i5/OS.