Recent

Author Topic: Can't connect to FB database  (Read 6467 times)

terry6

  • Newbie
  • Posts: 6
Can't connect to FB database
« on: July 12, 2016, 03:21:31 pm »
Running lazarus IDE v1.6+dfsg-1  amd64

using Firebird SS 2.5.6  amd64

Flamerobin works good with fdb database and table.

when I set connection on ibconnection to True i get an error:

Can not load default Firebird Clients ("LIBFbClient.so.2.5.1" or "LibGDS.so" or "LibFEmbed.so.2.5") Check your installation.

libgds.so and libfbclient.so.2.5.6 are both located in /usr/lib64

It says it is looking for 2.5.1 and I have 2.5.6 of the libfbclient but it still should should find the libgds.

I am running lubuntu. Ubuntu 16.04 LTS  xenial
« Last Edit: July 13, 2016, 03:01:41 am by terry6 »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Can't connect to FB database
« Reply #1 on: July 13, 2016, 12:54:37 pm »
The problem seems to be at the "LIBFbClient.so.2.5.1" file.  Did you tryed to install Firebird 2.5.1?  It is possible on Ubuntu.  If it works then you have your answer.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Can't connect to FB database
« Reply #2 on: July 13, 2016, 01:45:43 pm »
Confirmed. This is a really nasty one.

First of all the libfbclient.2.5.1 is an old one. So the source needs to be adjusted to also take 2.5.6.

Second... the libgds.so should have been loaded but isn't.

I found out the libraries in /usr/lib64 are NOT used.
If you create a symlink in /usr/lib it DOES work :)

Code: [Select]
ln -s /opt/firebird/lib/libfbclient.so.2.5.6 /usr/lib/libfbclient.so.2.5.1(this creates a symlink named libfbclient.so.2.5.1 which fpc still uses to the new libfbclient.so.2.5.6)

terry6

  • Newbie
  • Posts: 6
Re: Can't connect to FB database
« Reply #3 on: July 13, 2016, 05:17:27 pm »
I don't want to know why but:

putting the libclient2.5.6 into /usr/lib as libclient2.5.1 works so I am happy.

Maybe someday the code can be straightened out but for now this seems to work.

Also: I had to put sudo on the start of the command line for the permissions to let it work.
« Last Edit: July 13, 2016, 05:27:19 pm by terry6 »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Can't connect to FB database
« Reply #4 on: July 13, 2016, 06:56:21 pm »
(...)

Second... the libgds.so should have been loaded but isn't.

I found out the libraries in /usr/lib64 are NOT used.
If you create a symlink in /usr/lib it DOES work :)

Code: [Select]
ln -s /opt/firebird/lib/libfbclient.so.2.5.6 /usr/lib/libfbclient.so.2.5.1(this creates a symlink named libfbclient.so.2.5.1 which fpc still uses to the new libfbclient.so.2.5.6)
That's not a good idea:  You're mixing 64bit and 32bit stuff.  That's not good.  And it should not work, unless libfbclient wasn't installed correctly.

[edit]
I've read again and I've realized that you are not mixing 64bit and 32bit:  the problem is that the Firebird client isn't installed correctly.  It should be at /usr/lib/, not at /opt/firebird/lib/.  Actually I don't know why it is at /opt ???

I didn't try Firebird in Ubuntu yet, but when I used it with Fedora it installed correctly.
« Last Edit: July 13, 2016, 07:00:33 pm by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Can't connect to FB database
« Reply #5 on: July 13, 2016, 07:17:56 pm »
(...)
Code: [Select]
ln -s /opt/firebird/lib/libfbclient.so.2.5.6 /usr/lib/libfbclient.so.2.5.1(this creates a symlink named libfbclient.so.2.5.1 which fpc still uses to the new libfbclient.so.2.5.6)
That's not a good idea:  You're mixing 64bit and 32bit stuff.  That's not good.  And it should not work, unless libfbclient wasn't installed correctly.
Well, it does work, perfectly.
And somehow the libraries in /usr/lib64 are not found. The default Firebird installations installs them there so I guess they are installed correctly.

But... I thought the /usr/lib IS for 64bit libraries on a 64bit OS !!
https://bbs.archlinux.org/viewtopic.php?pid=815764#p815764

Although I agree it would be better to separate 32bit and 64bit libraries it seems this is not always done and the /usr/lib is also used for 64bit libraries.


Edit: I though the libraries are always in /opt/firebird/lib/ and Firebird symlinked them to /usr/lib. (but in this case it was to /usr/lib64 for some reason)
PS. I used the tarball and used the install.sh because I was on Mint. Maybe that's the difference.
« Last Edit: July 13, 2016, 07:21:39 pm by rvk »

 

TinyPortal © 2005-2018