Sign in Join

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

Mailing lists / fpc-devel / 2009-08

Firebird shared library name change

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

I noticed that on newer Ubuntu Linux systems that the name of the Firebird shared library has changed for v2.x versions of Firebird Database Server.

----------------------------------
$ ls -l /usr/lib/libfbcl*
2009-08-24 12:06 /usr/lib/libfbclient.so.2 -> libfbclient.so.2.1.1 2008-11-19 20:09 /usr/lib/libfbclient.so.2.1.1
----------------------------------

It seems the SqlDB + Firebird code only looks for 'libgds.so' and 'libfbclient.so' giving the following error at runtime...

Can not load default Firebird clients ("libgds.so" or "libfbclient.so"). Check your installation.

Is there a way we can better handle this for Firebird v2.x is SqlDB? After all, Firebird v2.x has been out for quite some time now.

Or should be simply ignore this issue in SqlDB and make it the issue of the user? This option I do not like to much.

If FBLib, this was handled by looking for newest to oldest versions of shared library. Loading was done in if..else statements.

example
    // try v2.x library first
    if not successful loading of libfbclient.so.2 then
       // else try v1.x library
       if not successful loading of libfbclient.so.1 then
         // else try basic library name - no versions
         if not successful loading of libfbclient.so then
            // now user has a real installation problem

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Joost van der Sluis
to Graeme Geldenhuys

Op maandag 24-08-2009 om 13:02 uur [tijdzone +0200], schreef Graeme Geldenhuys:

Show quoted text 11 lines
Hi, I noticed that on newer Ubuntu Linux systems that the name of the Firebird shared library has changed for v2.x versions of Firebird Database Server. ---------------------------------- $ ls -l /usr/lib/libfbcl* 2009-08-24 12:06 /usr/lib/libfbclient.so.2 -> libfbclient.so.2.1.1 2008-11-19 20:09 /usr/lib/libfbclient.so.2.1.1 ----------------------------------

Send a bug to Debian/Ubuntu/whoever makes that package.

There's no api-difference between firebird 1 and 2 clients. So this difference is bogus. Also the default Firebird-installations which you can download form the firebird-website adds the correct symlink.

Joost.

Reply by email

Desmond Coertzen
to Graeme Geldenhuys: I noticed that on newer Ubuntu Linux systems that the name of the Firebird shared library…

Hi Graeme

It seems the SqlDB + Firebird code only looks for 'libgds.so' and 'libfbclient.so' giving the following error at runtime...

With my last production experience with Firebird, libgds.so was the stubs to the old Interbase lib where Firebird derived from. libfbclient.so.x is backwards compatible to these stubs. I guess in newer releases of firebird, they are slowly but surely trying to get away from Interbase.

A firebird installation is supposed to provide symlinks for libfbclient.so and libgds.so to load the correct lib for the release. In most cases, the LD_LIBRARY_PATH environment variable is supposed to be set if you want your so's to be located automatically. It's something you need to set up yourself in most cases.

It would be nice though if fpc's api wrapper of libfbclient also allows you to set an absolute path to the API

On Mon, Aug 24, 2009 at 11:02 AM, Graeme Geldenhuys <

Show quoted text 51 lines
wrote: Hi, I noticed that on newer Ubuntu Linux systems that the name of the Firebird shared library has changed for v2.x versions of Firebird Database Server. ---------------------------------- $ ls -l /usr/lib/libfbcl* 2009-08-24 12:06 /usr/lib/libfbclient.so.2 -> libfbclient.so.2.1.1 2008-11-19 20:09 /usr/lib/libfbclient.so.2.1.1 ---------------------------------- It seems the SqlDB + Firebird code only looks for 'libgds.so' and 'libfbclient.so' giving the following error at runtime... Can not load default Firebird clients ("libgds.so" or "libfbclient.so"). Check your installation. Is there a way we can better handle this for Firebird v2.x is SqlDB? After all, Firebird v2.x has been out for quite some time now. Or should be simply ignore this issue in SqlDB and make it the issue of the user? This option I do not like to much. If FBLib, this was handled by looking for newest to oldest versions of shared library. Loading was done in if..else statements. example // try v2.x library first if not successful loading of libfbclient.so.2 then // else try v1.x library if not successful loading of libfbclient.so.1 then // else try basic library name - no versions if not successful loading of libfbclient.so then // now user has a real installation problem Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Graeme Geldenhuys
to Desmond Coertzen

2009/8/24 Desmond Coertzen :

With my last production experience with Firebird, libgds.so was the stubs to the old Interbase lib where Firebird derived from. libfbclient.so.x is

The problem is easy to fix from my side, by simply manually creating a libfbclient.so symlink to libfbclient.so.2 - which I have done, and my programs now work.

I just thought it might be nice if SqlDB+Firebird support looked for a few possible shared library names instead of _only_ looking for libfbclient.so
But reading Joost's reply, I guess the answer is no.

Doing a search on http://packages.ubuntu.com, it seems that only the 'firebird2.0-dev' and 'firebird2.1-dev' packages include the symlink libfbclient.so. The standard firebird client and server packages only install libfbclient.so.2

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Luca Olivetti
to Graeme Geldenhuys

En/na Graeme Geldenhuys ha escrit:

Show quoted text 5 lines
Doing a search on http://packages.ubuntu.com, it seems that only the 'firebird2.0-dev' and 'firebird2.1-dev' packages include the symlink libfbclient.so. The standard firebird client and server packages only install libfbclient.so.2

This is standard practice on debian, mandriva and probably other distributions.
The idea(if I'm not wrong) is that the bare .so file is only used by the linker at compile time, so you can install packages with various versions of the same library to be used by other binary packages (that only use the versioned .so file) but only develop for one (usually, but not always, the latest one) by installing just one -dev (or -devel in mandriva) package that just has the simlink to the corresponding versioned .so file, the headers and other files to be used by the linker (.a, .la I think).
So, in their view (and I cannot tell if it's right or wrong) a final program shouldn't look for the bare .so file but only depend on the versioned one. That way if you make a binary package, it usually will automatically (or manually if the packaging system isn't able to determine the dependency by analyzing the executable) depend on the correct version of the library package.

Bye

Luca

Reply by email