From 7cd9a8cf29034869c67c39ee5e57da0cff8c8013 Mon Sep 17 00:00:00 2001 From: MArton Tatai Date: Tue, 20 Aug 2013 17:15:27 +0100 Subject: [PATCH] fix for two errors fPIC and dynamic plugin paremeter 1, fPIC was required in order to make the compilation work on my computer. It might be because it's a 64 bit system and as I understand http://stackoverflow.com/questions/5311515/gcc-fpic-option should do no harm, it makes the program code work memory address independently. 2, Included -DMYSQL_DYNAMIC_PLUGIN gcc paremeter as it has been pointed out by Roland Bouman on http://dev.mysql.com/tech-resources/articles/mysql_i_s_plugins_part1-2.html (to make the "magic" work). --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dbeb729..567178b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ LIBDIR=/usr/lib install: - gcc -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so + gcc -DMYSQL_DYNAMIC_PLUGIN -fPIC -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so