Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-12

Help getting Lazarus to work under Fedora 11 /w mySQL 5.1

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Chris Jennings

Hi All

A newbie needs help so that he can return to developing under his prefered environment - Linux.
Everything is working fine under Win XP, with the same versions of the development tools. I am actually making good headway in laying out a basic program. My past experience /w Delphi is comming back even though it has been a number of years since I worked in that environment.

I must also be able to work with mySQL 5.1 as this version is in use at a potential client and a horde of data is stored within. Thus, I have installed the ZEOSDBO components.

My Environmrnt

Fedora 11 /w all updates
fpc2.2.2-3 (Fedora rpm)
lazarus-0.9.26.2-2 (Fedora rpm)
ZeosDBO-6.6.5-stable
Zeos appears to compile properly
mysql
mysql client programs & shared libs
mysql-devlopment files
mysql libs
All of the above mySQL packages are from Fedora rpms and version 5.1.37.1

All packages are (x86_64) were available.

When I place a ZConnection (ZEOS DBO) component on a form and set all its connection parameteres correctly (database, host, user, password), I get the following error when I try to set the ZConnection's Connected value to True.

"None of the dynamic link libraries can be found. libmysqlclient.so.15 libmysqlclient.so"

These libraries are on my system under /usr/lib64/mysql

I have played with the following line in /etc/fpc.cfg to no avail

-Fl/lib;/usr/lib >> eg. -FL/lib;/usr/lib64/mysql

I have tried to recompile Lazarus although this should not matter if I am correct in believing that this file is read each time the program is initiated.

What am I doing wrong. I have to be able to do this work on a Linux system as that will be the environemnt eventually used by the system I hope to develop.

Thanks in advance

Chris

Reply by email

Mattias Gaertner
to Chris Jennings
Show quoted text 41 lines
Hi All A newbie needs help so that he can return to developing under his prefered environment - Linux. Everything is working fine under Win XP, with the same versions of the development tools. I am actually making good headway in laying out a basic program. My past experience /w Delphi is comming back even though it has been a number of years since I worked in that environment. I must also be able to work with mySQL 5.1 as this version is in use at a potential client and a horde of data is stored within. Thus, I have installed the ZEOSDBO components. My Environmrnt Fedora 11 /w all updates fpc2.2.2-3 (Fedora rpm) lazarus-0.9.26.2-2 (Fedora rpm) ZeosDBO-6.6.5-stable Zeos appears to compile properly mysql mysql client programs & shared libs mysql-devlopment files mysql libs All of the above mySQL packages are from Fedora rpms and version 5.1.37.1 All packages are (x86_64) were available. When I place a ZConnection (ZEOS DBO) component on a form and set all its connection parameteres correctly (database, host, user, password), I get the following error when I try to set the ZConnection's Connected value to True. "None of the dynamic link libraries can be found. libmysqlclient.so.15 libmysqlclient.so" These libraries are on my system under /usr/lib64/mysql I have played with the following line in /etc/fpc.cfg to no avail -Fl/lib;/usr/lib >> eg. -FL/lib;/usr/lib64/mysql

-Fl lowercase l
/lib and /usr/lib are already in the default linux linker search path.

check with

ldconfig -v | grep -i mysql

what mysql libs are installed on your system.

I have tried to recompile Lazarus although this should not matter if I am correct in believing that this file is read each time the program is initiated.

Yes.

What am I doing wrong. I have to be able to do this work on a Linux system as that will be the environemnt eventually used by the system I hope to develop.

Mattias

Reply by email

Mattias Gaertner
to Mattias Gaertner
Hi Mattias Thanks for looking into my problem.

Please use the mailing list, forum or chat, so that other users an read the solutions too.

Here are the contents of my /usr/lib64/mysql dir.

This is irrelevant.
Look at what ld can find:
ldconfig -v | grep mysql

I took a quick look at mysql50dyn and it seems it searches for 'libmysqlclient.so.15'. What unit do you use?

[...] -rwxr-xr-x 1 root root 1571784 2009-12-01 22:51 libmysqlclient.so.15

Mattias

Reply by email

Chris Jennings
to Mattias Gaertner

Thanks Mattias

I got the following return

[chris at dt1 ~]$ su -c 'ldconfig -v | grep mysql' Password:
/usr/lib64/mysql:
libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0 libmysqlclient.so.16 -> libmysqlclient.so.15 (changed) libmysqlpp.so.3 -> libmysqlpp.so.3.0.9
[chris at dt1 ~]$

and everything now works as expected. I am using the Zeos DB components as they support mySQL 5.1 whereas the native sqlDB components only support mySQL 5.0. I understand that they folks at mySQL make changes to the client libs in minor version changes (eg 5.0 to 5.1) that drive developers of client connection routines batty. I believe that the so.16 libs are for 5.1 and the so.15 libs are for 5.0

Chris

Mattias Gaertner wrote 39 lines
On Sun, 13 Dec 2009 10:46:12 -0800 Chris Jennings wrote: > Hi Mattias > > Thanks for looking into my problem. > Please use the mailing list, forum or chat, so that other users an read the solutions too. > Here are the contents of my /usr/lib64/mysql dir. > This is irrelevant. Look at what ld can find: ldconfig -v | grep mysql I took a quick look at mysql50dyn and it seems it searches for 'libmysqlclient.so.15'. What unit do you use? > [...] > -rwxr-xr-x 1 root root 1571784 2009-12-01 22:51 libmysqlclient.so.15 > Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

JoshyFun
to Chris Jennings

Hello Lazarus-List,

Sunday, December 13, 2009, 9:10:50 PM, you wrote:

CJ> and everything now works as expected. I am using the Zeos DB components CJ> as they support mySQL 5.1 whereas the native sqlDB components only CJ> support mySQL 5.0. I understand that they folks at mySQL make changes to CJ> the client libs in minor version changes (eg 5.0 to 5.1) that drive CJ> developers of client connection routines batty. I believe that the so.16 CJ> libs are for 5.1 and the so.15 libs are for 5.0

I think SQLDb also supports 5.1 as in http://bugs.freepascal.org/view.php?id=14587

http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-db/src/sqldb/mysql/mysqlconn.inc?r1=13190&r2=13781

Best regards, JoshyFun

Reply by email