Bug #48461 | Error: Symbol not found: _thd_alloc_service on INSTALL PLUGIN | ||
---|---|---|---|
Submitted: | 2 Nov 2009 10:49 | Modified: | 8 Dec 2009 17:05 |
Reporter: | Paul McCullagh (Basic Quality Contributor) (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S2 (Serious) |
Version: | 5.4.4-alpha | OS: | Any |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
Tags: | install, pbxt, plugin, qc, thd_alloc_service |
[2 Nov 2009 10:49]
Paul McCullagh
[19 Nov 2009 9:14]
Sveta Smirnova
Thank you for the report. When trying to compile PBXT with today 6.0-backup sources I get error: discover_xt.cc: In function ‘bool hacked_mysql_create_table_no_lock(THD*, const char*, const char*, HA_CREATE_INFO*, Alter_info*, bool, uint)’: discover_xt.cc:1517: error: argument of type ‘char* (Statement::)()’ does not match ‘const char*’ Can you fix it or indicate revision of mysql-6.0-backup I can compile PBXT with?
[19 Nov 2009 9:38]
Sergei Golubchik
Paul, you need to link libpbxt.so with libservices.a - it provides this symbol. It's a documentation issue, thanks for bringing it up!
[8 Dec 2009 16:01]
Paul McCullagh
Hi Sergei, Thanks for the solution, but this means my Makefile.am will have to be conditional. Depending on the version of MySQL I must now link libservices.a or not. Do you have a tip how I can do this?
[8 Dec 2009 16:14]
Sergei Golubchik
automake supports conditionals. You can define it in your plug.in file in MYSQL_PLUGIN_ACTIONS. See "info automake conditional"
[8 Dec 2009 17:05]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products. Modified the 5.5 manual: http://dev.mysql.com/doc/refman/5.5/en/plugin-creating.html Edit Makefile.am, which should look something like this: #Makefile.am example for a plugin pkgplugindir=$(libdir)/mysql/plugin INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include #noinst_LTLIBRARIES= mypluglib.la pkgplugin_LTLIBRARIES= mypluglib.la mypluglib_la_SOURCES= plugin_example.c mypluglib_la_LDFLAGS= -module -rpath $(pkgplugindir) \ -L$(libdir)/mysql -lmysqlservices mypluglib_la_CFLAGS= -DMYSQL_DYNAMIC_PLUGIN Also added an entry to the 5.5.0 changelog: http://dev.mysql.com/doc/refman/5.5/en/news-5-5-0.html Dynamic plugins now need to be linked with the libmysqlservices.a library. For an example showing what Makefile.am should look like, see Section 21.2.3.3, “Creating a Plugin Library”.