PDA

View Full Version : Installing a mysql UDF on a Mac




irregardless
Dec 27, 2007, 11:57 PM
Hi

I've been running into snag after snag trying to install these mysql user-defined functions (http://mysql-udf.sourceforge.net/) (particularly the median function). My unix-fu is weak (but I'm good at following directions), so I'm not sure if my attempts are even in the right ballpark, but countless google searches haven't helped much.

These instructions (http://www.mooreds.com/wordpress/archives/000376) cover Windows and Linux, but when I try the Linux method, I run to the fact that Apple's compiler doesn't support shared libraries (or something like that). The only other clues I have to go on are here (http://mysqlblog.lenoxway.net/index.php?/archives/2-Compiling-MySQL-UDFs-on-Mac-OS-X.html) and here (http://forums.mysql.com/read.php?118,50950,66155).

But when I try them, I end up with error messages in Terminal:

Undefined symbols for architecture i386:
"__Znwm", referenced from:
_median_init in udf_median.o
"___gxx_personality_v0", referenced from:
___gxx_personality_v0$non_lazy_ptr in udf_median.o
"__ZdlPv", referenced from:
_median_deinit in udf_median.o
"_realloc", referenced from:
_median_add in udf_median.o
"_malloc", referenced from:
_median_reset in udf_median.o
"_qsort", referenced from:
_median in udf_median.o
"_free", referenced from:
_median_deinit in udf_median.o
_median_reset in udf_median.o
"_memcpy", referenced from:
_median_init in udf_median.o
ld: symbol(s) not found for architecture i386
libtool: internal link edit command failed


and

Undefined symbols:
"operator new(unsigned long)", referenced from:
_median_init in udf_median.o
"___gxx_personality_v0", referenced from:
___gxx_personality_v0$non_lazy_ptr in udf_median.o
"operator delete(void*)", referenced from:
_median_deinit in udf_median.o

respectively.

Anyone out here have a clue what's going on and can put together a hand-holding guide on how I can get this function installed?

I'm running Leopard and I have the developer tools installed. I'm hoping to be able to do this through MAMP, but I can use the built-in server if necessary.

Much obliged. :)