Monty Taylor wrote:
Hey jay,

Ok. Several things. First, I imagine that your original problem was that 
whatever you have in the name field needs to match the name you give to drizzle 
plugin declare. I recommend going back to load_by_default=yes and trying to 
match the names.

Names were/are identical.

Second, a don't believe that sources is comma separated. I think it's space 
separated. Third, headers don't go in sources, they go in headers. (Iirc... I 
am sitting on bart right at this moment.)

OK, fixed.

Fourth, LIBPROTO is most likely empty, since that is not a variable we set 
anywhere. LTLIBPROTOBUF is likely the var you want. You also have mismatched ( 
and }.

Thanks, fixed.

I'm not 100% sure plugin-load works at all right now... it's on my short list 
of things to fix/rework. But if do want to give it a spin, you'd need to 
provide it with an .so file. A .la file is a libtool artifact that contains 
meta info pointing to the libs.

Yes, I would have provided an .so, but could not find where one was generated anywhere...

Finally, don't forget to re-run autorun.sh after you modify plugin.ini.

K.

It seems the problem was the load_by_default= no and the libraries having a typo. Building fine nwo.

Thanks!

Jay

Monty

Jay Pipes <[email protected]> wrote:

Hi Monty,

cc'ing the list since the answers may be helpful for folks trying to develop plugins...

So, I have completed coding the new default serial event log (binlog). I am trying to create the test suite properly and am running into some issues -- likely stemming from my not understanding the autotools foo that is happening for plugins.

This is what I have in /plugin/serial_event_log/plugin.ini:

[plugin]
name=serial_event_log
title=Serial Event Log
description=Default Serial Event Log for Drizzle
load_by_default=yes
sources=serial_event_log.cc,serial_event_log.h
libadd=$(LIBPROTO}

When compiling with the above setup, I get a linker error when in the drizzled/ directory:

sql_plugin.o:(.data+0x30): undefined reference to `builtin_serial_event_log_plugin'

If I remove the line:

load_by_default=yes

from plugin.ini, then compilation works properly.
However, when I tried setting up the master.opt file in the new serial_event_log test suite, I put the following:

--plugin-dir=/home/jpipes/repos/drizzle/replication/plugin/.libs --plugin_load=libserial_event_log_plugin.la

And I get the following:

Can't open shared library '/home/jpipes/repos/drizzle/replication/plugin/.libs/libserial_event_log_plugin.la' (errno: 22 /home/jpipes/repos/drizzle/replication/plugin/.libs/libserial_event_log_plugin.la: invalid ELF header)

in the server error log.

I've tried various versions of plugin-dir, plugin_load, but can't seem to get the darn library to load.

Could you assist?

Thanks!

Jay

p.s. This is also a gentle reminder for some documentation on how to do this stuff on the wiki ;)



_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to