gcc -Wall -shared -o ntp2timestamp.so ntp2timestamp.cc
with no errors.
Then I copy this file to /usr/local/mysql (libmysql* files are located here and /etc/ld.so.conf file contains this path as well) and execute the following under mysql:
CREATE FUNCTION ntp2timestamp RETURNS STRING SONAME "ntp2timestamp.so";
and I get an error:
ERROR 1126: Can't open shared library 'ntp2timestamp.so' (errno: 22 ntp2timestamp.so: cannot open shared object file: No such file o)
MySQL is installed from RPM and I have found that it might be configured with --with-mysqld-ldflags=-all-static instead of --withmysqld-ldflags=-rdynamic and I dought this is the problem but I ahve also found the following sentence in manual:
-- cut here --
For mysqld to be able to use UDF functions, you should con gure MySQL with --withmysqld- ldflags=-rdynamic The reason is that to on many platforms (including Linux) you can load a dynamic library (with dlopen()) from a static linked program, which you would get if you are using --with-mysqld-ldflags=-all-static If you want to Chapter 9: Extending MySQL 559 use an UDF that needs to access symbols from mysqld (like the methaphone example in `sql/udf_example.cc' that uses default_charset_info), you must link the program with -rdynamic (see man dlopen).
-- cut here --
so is it nessesary to configure it with --with-mysqld-ldflags=-rdynamic?
I'd like it to be installed from RPM rather source code, is there another workaround? Thanks in advance.
Best Regards,
-- George Chelidze
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]