Re: UDF on AMD64
Well that was easy. After reading your response I went back and used gcc -fPIC -c xxx.cc gcc -shared -o xxx.so xxx.o and all was well again. Thanks for your help..again. Ollie Dan Nelson said: In the last episode (Dec 11), Ollie Gallardo said: I'm back with another question. I tried to compile my UDF with the gcc on my Opteron system and I got errors. Errors: /usr/lib64/gcc-lib/amd64-mandrake-linux- gnu/3.3.1/../../../../lib64/crt1.o(.text+0x21): In function `_start': ../sysdeps/x86_64/elf/start.S:92: undefined reference to `main' What is your gcc line? The above error indicates that you are trying to build an executable. UDFs must be shared object files. http://www.mysql.com/doc/en/UDF_compiling.html -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] --- Ollie Gallardo Support Services Inc 2 Professional Dr Ste 212 Gaithersburg MD 20879 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
UDF on AMD64
Hi, I just recently built myself a dual Opteron system and installed mysql for AMD64 on it. I previously ran my databases on regular 32 bit systems and had my UDF working fine. The UDF is written in C. Before I try and install the UDF on the new system should I recompile it using AMD64 libraries? Thanks, Ollie --- Ollie Gallardo Support Services Inc 2 Professional Dr Ste 212 Gaithersburg MD 20879 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: UDF on AMD64
In the last episode (Dec 11), Ollie Gallardo said: I just recently built myself a dual Opteron system and installed mysql for AMD64 on it. I previously ran my databases on regular 32 bit systems and had my UDF working fine. The UDF is written in C. Before I try and install the UDF on the new system should I recompile it using AMD64 libraries? Yes; UDFs are native machine binaries, and I doubt a 32-bit UDF .so would even load into a 64-bit mysqld. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: UDF on AMD64
Thanks Dan. I will get to it then. Dan Nelson said: In the last episode (Dec 11), Ollie Gallardo said: I just recently built myself a dual Opteron system and installed mysql for AMD64 on it. I previously ran my databases on regular 32 bit systems and had my UDF working fine. The UDF is written in C. Before I try and install the UDF on the new system should I recompile it using AMD64 libraries? Yes; UDFs are native machine binaries, and I doubt a 32-bit UDF .so would even load into a 64-bit mysqld. -- Dan Nelson [EMAIL PROTECTED] --- Ollie Gallardo Support Services Inc 2 Professional Dr Ste 212 Gaithersburg MD 20879 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: UDF on AMD64
I'm back with another question. I tried to compile my UDF with the gcc on my Opteron system and I got errors. Errors: /usr/lib64/gcc-lib/amd64-mandrake-linux-gnu/3.3.1/../../../../lib64/crt1.o(.text+0x21): In function `_start': ../sysdeps/x86_64/elf/start.S:92: undefined reference to `main' /root/tmp/ccY5pYQZ.o(.text+0x1a9): In function `DIST': : undefined reference to `sin' /root/tmp/ccY5pYQZ.o(.text+0x1c6): In function `DIST': : undefined reference to `sin' /root/tmp/ccY5pYQZ.o(.text+0x1ec): In function `DIST': : undefined reference to `cos' /root/tmp/ccY5pYQZ.o(.text+0x209): In function `DIST': : undefined reference to `cos' /root/tmp/ccY5pYQZ.o(.text+0x249): In function `DIST': : undefined reference to `cos' /root/tmp/ccY5pYQZ.o(.text+0x29a): In function `DIST': : undefined reference to `sqrt' /root/tmp/ccY5pYQZ.o(.text+0x2a4): In function `DIST': : undefined reference to `atan' /root/tmp/ccY5pYQZ.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status Here are my header includes. #ifdef STANDARD #include stdio.h #include string.h #else #include my_global.h #include my_sys.h #endif #include math.h #include mysql.h #include m_ctype.h #include m_string.h I can't paste the rest of the code. Sorry. Is there special coding I need to do for AMD64 when writing a UDF? Maybe someone can point me to a sample UDF that compiled on AMD64. Thanks, Ollie Dan Nelson said: In the last episode (Dec 11), Ollie Gallardo said: I just recently built myself a dual Opteron system and installed mysql for AMD64 on it. I previously ran my databases on regular 32 bit systems and had my UDF working fine. The UDF is written in C. Before I try and install the UDF on the new system should I recompile it using AMD64 libraries? Yes; UDFs are native machine binaries, and I doubt a 32-bit UDF .so would even load into a 64-bit mysqld. -- Dan Nelson [EMAIL PROTECTED] --- Ollie Gallardo Support Services Inc 2 Professional Dr Ste 212 Gaithersburg MD 20879 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: UDF on AMD64
In the last episode (Dec 11), Ollie Gallardo said: I'm back with another question. I tried to compile my UDF with the gcc on my Opteron system and I got errors. Errors: /usr/lib64/gcc-lib/amd64-mandrake-linux-gnu/3.3.1/../../../../lib64/crt1.o(.text+0x21): In function `_start': ../sysdeps/x86_64/elf/start.S:92: undefined reference to `main' What is your gcc line? The above error indicates that you are trying to build an executable. UDFs must be shared object files. http://www.mysql.com/doc/en/UDF_compiling.html -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]