Subject Re: [firebird-support] Re: Freepascal 32 bit service on debian amd64 / 64 bit firebird?
Author Konstantin Khomoutov
On Thu, 11 Jul 2013 10:15:53 +0200
John vd Waeter <j.v.d.waeter@...> wrote:

> On 11-7-2013 09:44, Philippe Makowski wrote:
> > Le 10/07/13 16:13, John vd Waeter a écrit :
> >> So I tried:
> >> - get a 32 bit libfbclient.so from another 32 bit machine.
> >> - put it in /lib/i386-linux-gnu
> >> - made a reference in /etc/ld.so.conf.d
> >> - run ldconfig
> >>
> > bad idea
> >
> >> But the ibconnection in freepascal still cannot find it.
> >> Maybe this is a freepascal question... I don't know.
> >> Is it enough to get libfbclient.so from a 32 bit machine or is
> >> does it depend on more 32 bit libraries?
> > certainly more
> >
> > you should better do something like :
> >
> > sudo dpkg --add-architecture i386
> > sudo apt-get update
> > sudo apt-get install libfbclient2:i386

[...]

> That last extension (:I386) did it to get the 32 bit library. I
> didn't know about such extension.

That's the consequence of Wheezy supporting "multi-arch" for a large
extent of its code base. It's detailed in [1] which is linked to from
the official release notes document [2] (which you're supposed to read
before upgrading or installing).

> But still "cannot load error" while starting the program.
> Could it be it finds the 64 bit libfbclient.so first and throws the
> "can not load default Firebird clients" error?

Did you undo your hacks to the dynamic linker configuration?

After undoing, try running

ldd /path/to/your/program

and see if it shows you all the libraries it needs w/o signalizing any
errors for any of them.

Also try running your program while having LD_VERBOSE or LD_DEBUG set
to something sensible in your environment (refer to the ld-linux(8)
manual page for more info) -- the linker will print you what happens at
it tries to satisfy all the dependencies to run your program.

An example to get you started:

$ LD_TRACE_LOADED_OBJECTS=1 LD_VERBOSE=1 /usr/bin/gcc