Recent

Author Topic: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so  (Read 12408 times)

JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« on: February 02, 2011, 09:28:21 am »
Hi,

I have this commandline program in FP that connects to a FB 1.5 server on the same machine.

It runs fine on a couple of 32 bit debian machines.

Now I have installed FB 1.5.6 on a AMD64 debian machine.
The firebird server runs ok, but the ib_connection says "Cannot load default firebird clients ("libgds.so or libfbclient.so").

The libraries are there, the symlinks too. ISQL works ok on this server, so the clientlib is ok I think.

Is there a problem using ib_connection on a 64 bit machine?

tia!
John

JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
Re: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« Reply #1 on: February 02, 2011, 01:49:45 pm »
I read something in bugtracker archive id 13047 about adding pthreads in uses clause,
tried that in the uses clause of the project, but had no effect. Error is the same.

Should it maybe be put elsewhere?

John

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« Reply #2 on: February 02, 2011, 03:24:32 pm »
Hello

Is Firebird 32 bits with libfbclient 32 bits?
Is Freepascal 32 bits? Version?

Compile this console project, maybe this show more info about the error.
Code: [Select]
program project1;
{$mode objfpc}{$H+}
uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes,dl
  { you can add units after this };
var buffer:string;
begin
dlopen(pchar('libfbclient.so'),RTLD_LAZY);
buffer:=dlerror;
writeln(buffer);
end.
                

JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
Re: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« Reply #3 on: February 02, 2011, 03:49:36 pm »
Hi,

tnx for responding!

Firebird = 1.5.6 (32 bits)
libfbclient is accompanying the server binaries, so 32 bit also.
Freepascal is 32 bits (2.4.0)

project1 says:

libfbclient.so: cannot open shared object file: No such file or directory

In PATH there is ...:/opt/firebird/lib:...
in opt/firebird/lib there symlink libfbclient.so
this symlink points to symlink libfbclient.so.1.5.6
which points to the actual lib in the same dir.

beats me why project1 cannot find it.

Even if I put a copy of the so in the same directory as project1 the same error appears?

johnl




JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
Re: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« Reply #4 on: February 02, 2011, 03:58:22 pm »
if I have it searching for './libfbclient.so' there is nothing, no error printed.

Maybe the path is not used?

John

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« Reply #5 on: February 02, 2011, 05:44:52 pm »
"Maybe the path is not used?"
Maybe

Try copy libfbclient.* to /lib directory (or symlink points to symlink libfbclient.so.1.5.6)

JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
Re: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« Reply #6 on: February 02, 2011, 07:20:33 pm »
>> Try copy libfbclient.* to /lib directory (or symlink points to symlink libfbclient.so.1.5.6)

Same error.

Weird... the path is really not used I guess...



JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
[SOLVED] Re: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« Reply #7 on: February 03, 2011, 08:29:39 am »

Ok, the PATH from the profile is not used.

Adding the directory to /etc/ld.so.config did the trick!

john

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: [SOLVED] Re: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« Reply #8 on: January 18, 2012, 12:12:58 pm »

Ok, the PATH from the profile is not used.

Adding the directory to /etc/ld.so.config did the trick!

john

What does it mean? how do I do?
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Debian AMD64 - IB_Connection - Cannot locate libfbclient.so
« Reply #9 on: January 18, 2012, 04:04:52 pm »
There's a difference between the executable search path and library search path in Linux.

The executable search path (the PATH environment variable) determines where the system will look for applications such as df, fdisk, fpc etc, if you don't specify the full path to the application.

The library path is the path where the system looks for shared libraries (mostly/always .so files, the equivalent of Windows .dll files).
This is configured in /etc/ld.so.config (and e.g. the files under /etc/ld.so.config.d).
On  my Debian machine:
Code: [Select]
cat /etc/ld.so.conf.d/libc.conf
# libc default configuration
/usr/local/lib
So you could add a new file /etc/ld.so.conf.d/firebird.conf
with e.g.
Code: [Select]
# xinyiman: added Firebird libraries so we can use them
# of course, edit according to location of firebird .so files on your system
/opt/firebird/lib
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018