LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-17-2005, 03:59 PM   #1
jasonmccaul
LQ Newbie
 
Registered: Jan 2005
Distribution: Fedore Core 3
Posts: 3

Rep: Reputation: 0
Getting MySQL UDF to work on FC3 AMD64


Ive just upgraded my PC to AMD64 and FC3 (for AMD64). I use MySQL and have lots of User defined functions, on my old machine (Pent 3 Mandrake 9.1) these were easy to install, a simple comple and put the .so file in the /usr/lib dir and everything was fine.

Under FC3 a completely different story!!! Having suspected that MySQL was not compiled correctly i.e didnt have the --with-mysqld-ldflags=-rdynamic set I installed the source RPMS (3.23.58-14) and rebuilt the packages with this option set.

I then proceeded to reinstall the RPMS and build my .so file, no problems to this point everything seems to be going smoothly. I put the .so file in /usr/lib (ive also tried /usr/lib/mysql and /usr/lib64/mysql since too).

Now when I try to execute this command:
CREATE FUNCTION udf_group_price RETURNS REAL SONAME 'race_functions.so'
I always receive this error:
ERROR 1126 at line 1: Can't open shared library 'race_functions.so' (errno: 22 race_functions.so: cannot open shared object file: No such file )

Its as though it cant open the .so file or doesnt understand the format. This is the result of doing a file on it:
[root@localhost src]# file /usr/lib/race_functions.so
/usr/lib/race_functions.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

So im stumped, any ideas? is this an AMD64 related issue?

Thanks

Jason McCaul
 
Old 01-18-2005, 04:31 AM   #2
jasonmccaul
LQ Newbie
 
Registered: Jan 2005
Distribution: Fedore Core 3
Posts: 3

Original Poster
Rep: Reputation: 0
Fixed

All sorted now.

I basically uninstalled all versions of MySQL, if you install using up2date or yum or choose to install as part of the initial installationt then both the x86_64 and i386 rpms get installed which may have something to do with the probs.

I then downloaded the source and recompiled ensuring dynamic option was configured, installed these X86_64 rpms only then built my .so file, placed the so file in /usr/lib64/mysql (unstripped!!), added this dir to /etc/ld.so.conf and then edited the safe_mysqld script to export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/mysql

doing that seemed to solve the probs thankfully.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fc3 issues(Amd64) and some general qns..... GEJOE DANIEL Linux - Software 8 11-22-2005 06:52 AM
FC3 x86_64 extremely low performance with AMD64 Ru_e Linux - Laptop and Netbook 14 04-28-2005 07:00 PM
qmail problem on FC3 amd64 hfovi Fedora 4 03-30-2005 11:16 AM
FC3 Kernel (10-1.741_FC3) will not install on AMD64 ham_man Fedora - Installation 1 01-19-2005 07:32 PM
SuSE 9.1 + UDF DVD = Doesn't work? Need help! vizi0n Linux - General 1 06-24-2004 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration