![]() |
| |||
| I had a UDF that I used on a Fedora Core 5 machine, and now that I've upgraded to a Redhat 5 workstation the command line I used to compile my udf has changed. Under FC5 I could compile with: g++ -shared -fPIC -lstdc++ -I /usr/include/mysql -o udf_vec2pix.so udf_vec2pix.cc -lchealpix Under RH5 the same attempt throws off errors: [gsh@cygnus mysql-udf]$ g++ -shared -fPIC -lstdc++ -I /usr/include/mysql -o udf_vec2pix.so udf_vec2pix.cc -lchealpix /usr/bin/ld: /usr/local/lib/libchealpix.a(vec2pix_nest.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libchealpix.a: could not read symbols: Bad value collect2: ld returned 1 exit status [gsh@cygnus mysql-udf]$ I can get muck around and get it to compile via: g++ -c -fPIC -I /usr/include/mysql -o udf_vec2pix.so udf_vec2pix.cc but when I drop that in to my /lib64 directory, and try to add it I get: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1154 Server version: 5.0.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE FUNCTION vec2pix RETURNS INT SONAME 'udf_vec2pix.so'; ERROR 1126 (HY000): Can't open shared library 'udf_vec2pix.so' (errno: 22 /lib64/udf_vec2pix.so: only ET_DYN and ET_EXEC can be loaded) mysql> Can anyone offer me advice on the command that I should be using to compile my udf? |
| |||
| On Jun 10, 6:05*pm, Greg Hennessy <greg.henne...@cox.net> wrote: > I had a UDF that I used on a Fedora Core 5 machine, and now that I've > upgraded to a Redhat 5 workstation the command line I used to compile > my udf has changed. > > Under FC5 I could compile with: > g++ -shared -fPIC -lstdc++ -I /usr/include/mysql -o udf_vec2pix.so > udf_vec2pix.cc -lchealpix > > Under RH5 the same attempt throws off errors: > ... > Can anyone offer me advice on the command that I should be using to > compile my udf? Hi Greg, I'd start with a) the fine manual, b) the udf_example code and see if you can get that to build and load on RH. If so, transfer the build recipe from their Makefile. Drop me a line if you can't get anywhere. --Toby |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |