Sign in Join

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

Mailing lists / fpc-pascal / 2013-11

ibase package

9 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Antonio Fortuny

Hi Folks.

I'm a little bit annoyed by a boring specification in the fpc package. When in a program I use the TIBConnection (along witha transaction and a query), the compiled program looks for the local libfbclient when establishing the connection.
So far so good. When I install the program in another Linux box, running Firebird 2.1, the program complains that
"Can not load default Firebird clients ("libfbclient.so.2.5" or "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux box uses Firebird 2.1
Is it possible to force what library should be used instead ? (as UIB does) Having a look inside the code, in ibase60 (lines 2680 and fw) library names look fixed and looks like the Firebird version should be fixed before using it.

Antonio.

Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Liberté L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner
Michael Van Canneyt
to Antonio Fortuny
Antonio Fortuny wrote 14 lines
Hi Folks. I'm a little bit annoyed by a boring specification in the fpc package. When in a program I use the TIBConnection (along witha transaction and a query), the compiled program looks for the local libfbclient when establishing the connection. So far so good. When I install the program in another Linux box, running Firebird 2.1, the program complains that "Can not load default Firebird clients ("libfbclient.so.2.5" or "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux box uses Firebird 2.1 Is it possible to force what library should be used instead ? (as UIB does) Having a look inside the code, in ibase60 (lines 2680 and fw) library names look fixed and looks like the Firebird version should be fixed before using it.

You can do 2 things:

1. use the TSQLDBLibraryLoader component from sqldblib (in trunk)

2. call

    function InitialiseIBase60(Const LibraryName : AnsiString) : integer;

with the correct library name.

Michael.

Reinier Olislagers
to Antonio Fortuny: Hi Folks. I'm a little bit annoyed by a boring specification in the fpc package. When in…
Antonio Fortuny wrote 9 lines
So far so good. When I install the program in another Linux box, running Firebird 2.1, the program complains that "Can not load default Firebird clients ("libfbclient.so.2.5" or "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux box uses Firebird 2.1 Is it possible to force what library should be used instead ? (as UIB does) Having a look inside the code, in ibase60 (lines 2680 and fw) library names look fixed and looks like the Firebird version should be fixed before using it.

TSQLDBLibraryLoader may help:

Antonio Fortuny
to Michael Van Canneyt: You can do 2 things: 1. use the TSQLDBLibraryLoader component from sqldblib (in trunk) 2.…
Michael Van Canneyt wrote 27 lines
On Mon, 18 Nov 2013, Antonio Fortuny wrote: > Hi Folks. > > I'm a little bit annoyed by a boring specification in the fpc > package. When in a program I use the TIBConnection (along witha > transaction and a query), the compiled program looks for the local > libfbclient when establishing the connection. > So far so good. When I install the program in another Linux box, > running Firebird 2.1, the program complains that > "Can not load default Firebird clients ("libfbclient.so.2.5" or > "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux box > uses Firebird 2.1 > Is it possible to force what library should be used instead ? (as UIB > does) > Having a look inside the code, in ibase60 (lines 2680 and fw) library > names look fixed and looks like the Firebird version should be fixed > before using it. You can do 2 things: 1. use the TSQLDBLibraryLoader component from sqldblib (in trunk) 2. call function InitialiseIBase60(Const LibraryName : AnsiString) : integer;

found it in ibase60dyn.pp --> ibase60.inc
before connecting to the DB:

     InitialiseIBase60('libfbclient.so');

compile on one system (OpenSuse x86_64), copy to the target system (Ubuntu x86_64)
target systemp library /usr/lib/libfbclient.so.2 copied in current directory as libfbclient.so
then run and:
An unhandled exception occurred at $00000000004B544B : EInOutError : Can not load Firebird client library "libfbclient.so". Check your installation.

any comment ?

Antonio.

Show quoted text 6 lines
with the correct library name. Michael. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Liberté L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner
Antonio Fortuny
to Antonio Fortuny
Antonio Fortuny wrote 32 lines
Le 18/11/2013 12:19, Michael Van Canneyt a écrit : > > > On Mon, 18 Nov 2013, Antonio Fortuny wrote: > >> Hi Folks. >> >> I'm a little bit annoyed by a boring specification in the fpc >> package. When in a program I use the TIBConnection (along witha >> transaction and a query), the compiled program looks for the local >> libfbclient when establishing the connection. >> So far so good. When I install the program in another Linux box, >> running Firebird 2.1, the program complains that >> "Can not load default Firebird clients ("libfbclient.so.2.5" or >> "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux box >> uses Firebird 2.1 >> Is it possible to force what library should be used instead ? (as >> UIB does) >> Having a look inside the code, in ibase60 (lines 2680 and fw) >> library names look fixed and looks like the Firebird version should >> be fixed before using it. > > You can do 2 things: > > 1. use the TSQLDBLibraryLoader component from sqldblib (in trunk) > > 2. call > function InitialiseIBase60(Const LibraryName : AnsiString) : integer; found it in ibase60dyn.pp --> ibase60.inc before connecting to the DB: InitialiseIBase60('libfbclient.so');

changing previous line to

   InitialiseIBase60('./libfbclient.so');

works.

Thanks

Antonio.

Show quoted text 36 lines
compile on one system (OpenSuse x86_64), copy to the target system (Ubuntu x86_64) target systemp library /usr/lib/libfbclient.so.2 copied in current directory as libfbclient.so then run and: An unhandled exception occurred at $00000000004B544B : EInOutError : Can not load Firebird client library "libfbclient.so". Check your installation. any comment ? Antonio. > with the correct library name. > > Michael. > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Liberté L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Liberté L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner
Michael Van Canneyt
to Antonio Fortuny: found it in ibase60dyn.pp --> ibase60.inc before connecting to the DB:…
Antonio Fortuny wrote 42 lines
Le 18/11/2013 12:19, Michael Van Canneyt a écrit : > > > On Mon, 18 Nov 2013, Antonio Fortuny wrote: > >> Hi Folks. >> >> I'm a little bit annoyed by a boring specification in the fpc package. >> When in a program I use the TIBConnection (along witha transaction and a >> query), the compiled program looks for the local libfbclient when >> establishing the connection. >> So far so good. When I install the program in another Linux box, running >> Firebird 2.1, the program complains that >> "Can not load default Firebird clients ("libfbclient.so.2.5" or >> "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux box uses >> Firebird 2.1 >> Is it possible to force what library should be used instead ? (as UIB >> does) >> Having a look inside the code, in ibase60 (lines 2680 and fw) library >> names look fixed and looks like the Firebird version should be fixed >> before using it. > > You can do 2 things: > > 1. use the TSQLDBLibraryLoader component from sqldblib (in trunk) > > 2. call > function InitialiseIBase60(Const LibraryName : AnsiString) : integer; found it in ibase60dyn.pp --> ibase60.inc before connecting to the DB: InitialiseIBase60('libfbclient.so'); compile on one system (OpenSuse x86_64), copy to the target system (Ubuntu x86_64) target systemp library /usr/lib/libfbclient.so.2 copied in current directory as libfbclient.so then run and: An unhandled exception occurred at $00000000004B544B : EInOutError : Can not load Firebird client library "libfbclient.so". Check your installation. any comment ?

The current directory on linux is never searched.
If you want that you must add a complete path.

Michael.

Antonio Fortuny
to Michael Van Canneyt
Michael Van Canneyt wrote 50 lines
On Mon, 18 Nov 2013, Antonio Fortuny wrote: > > Le 18/11/2013 12:19, Michael Van Canneyt a écrit : >> >> >> On Mon, 18 Nov 2013, Antonio Fortuny wrote: >> >>> Hi Folks. >>> >>> I'm a little bit annoyed by a boring specification in the fpc >>> package. When in a program I use the TIBConnection (along witha >>> transaction and a query), the compiled program looks for the local >>> libfbclient when establishing the connection. >>> So far so good. When I install the program in another Linux box, >>> running Firebird 2.1, the program complains that >>> "Can not load default Firebird clients ("libfbclient.so.2.5" or >>> "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux >>> box uses Firebird 2.1 >>> Is it possible to force what library should be used instead ? (as >>> UIB does) >>> Having a look inside the code, in ibase60 (lines 2680 and fw) >>> library names look fixed and looks like the Firebird version should >>> be fixed before using it. >> >> You can do 2 things: >> >> 1. use the TSQLDBLibraryLoader component from sqldblib (in trunk) >> >> 2. call >> function InitialiseIBase60(Const LibraryName : AnsiString) : >> integer; > found it in ibase60dyn.pp --> ibase60.inc > before connecting to the DB: > InitialiseIBase60('libfbclient.so'); > compile on one system (OpenSuse x86_64), copy to the target system > (Ubuntu x86_64) > target systemp library /usr/lib/libfbclient.so.2 copied in current > directory as libfbclient.so > then run and: > An unhandled exception occurred at $00000000004B544B : > EInOutError : Can not load Firebird client library "libfbclient.so". > Check your installation. > > any comment ? The current directory on linux is never searched. If you want that you must add a complete path.

Yep, I did find it myself 8-)
Thanks anyway Michael.

Show quoted text 7 lines
Michael. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Liberté L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner
Tony Whyman
to Antonio Fortuny: changing previous line to InitialiseIBase60('./libfbclient.so'); works. Thanks Antonio.…

Antonio,

Be careful on Ubuntu (as with all Debian) you only get libfbclient.so installed when you also have the development package (firebird-dev) installed. Better to load the libfbclient.so.2 library which gets installed with the libfclient2 package.

Regards

Tony Whyman
MWA Software

Antonio Fortuny wrote 96 lines
Le 18/11/2013 13:08, Antonio Fortuny a écrit : > > Le 18/11/2013 12:19, Michael Van Canneyt a écrit : >> >> >> On Mon, 18 Nov 2013, Antonio Fortuny wrote: >> >>> Hi Folks. >>> >>> I'm a little bit annoyed by a boring specification in the fpc >>> package. When in a program I use the TIBConnection (along witha >>> transaction and a query), the compiled program looks for the local >>> libfbclient when establishing the connection. >>> So far so good. When I install the program in another Linux box, >>> running Firebird 2.1, the program complains that >>> "Can not load default Firebird clients ("libfbclient.so.2.5" or >>> "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux >>> box uses Firebird 2.1 >>> Is it possible to force what library should be used instead ? (as >>> UIB does) >>> Having a look inside the code, in ibase60 (lines 2680 and fw) >>> library names look fixed and looks like the Firebird version should >>> be fixed before using it. >> >> You can do 2 things: >> >> 1. use the TSQLDBLibraryLoader component from sqldblib (in trunk) >> >> 2. call >> function InitialiseIBase60(Const LibraryName : AnsiString) : >> integer; > found it in ibase60dyn.pp --> ibase60.inc > before connecting to the DB: > InitialiseIBase60('libfbclient.so'); changing previous line to InitialiseIBase60('./libfbclient.so'); works. Thanks Antonio. > compile on one system (OpenSuse x86_64), copy to the target system > (Ubuntu x86_64) > target systemp library /usr/lib/libfbclient.so.2 copied in current > directory as libfbclient.so > then run and: > An unhandled exception occurred at $00000000004B544B : > EInOutError : Can not load Firebird client library "libfbclient.so". > Check your installation. > > any comment ? > > Antonio. > >> with the correct library name. >> >> Michael. >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > -- > Sita Software > *Antonio Fortuny* > Senior Software engineer > > 220, avenue de la Liberté > L-4602 Niederkorn > Tel.: +352 58 00 93 - 93 > www.sitasoftware.lu <http://www.sitasoftware.lu> > Your IT Partner > > > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Liberté L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Antonio Fortuny
to Tony Whyman
Tony Whyman wrote 6 lines
Antonio, Be careful on Ubuntu (as with all Debian) you only get libfbclient.so installed when you also have the development package (firebird-dev) installed. Better to load the libfbclient.so.2 library which gets installed with the libfclient2 package.

Right, I've noticed it. For the time being, I've only copied the original Firebird library fblclient.so.2 to local fbclient.so. Anyway, I'm happy because the program works independently of the current FB library. On the other hand, we are used to install and work with FB since years and the library problem is well known. But because I'm also concerned with Linux application development (mainly services and libraries ;-) ) installation team still forgets to install native client FB librarie. Thans for focusing my attention on this operational problem.

Antonio.

Show quoted text 109 lines
Regards Tony Whyman MWA Software On 18/11/13 12:11, Antonio Fortuny wrote: > > Le 18/11/2013 13:08, Antonio Fortuny a écrit : >> >> Le 18/11/2013 12:19, Michael Van Canneyt a écrit : >>> >>> >>> On Mon, 18 Nov 2013, Antonio Fortuny wrote: >>> >>>> Hi Folks. >>>> >>>> I'm a little bit annoyed by a boring specification in the fpc >>>> package. When in a program I use the TIBConnection (along witha >>>> transaction and a query), the compiled program looks for the local >>>> libfbclient when establishing the connection. >>>> So far so good. When I install the program in another Linux box, >>>> running Firebird 2.1, the program complains that >>>> "Can not load default Firebird clients ("libfbclient.so.2.5" or >>>> "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux >>>> box uses Firebird 2.1 >>>> Is it possible to force what library should be used instead ? (as >>>> UIB does) >>>> Having a look inside the code, in ibase60 (lines 2680 and fw) >>>> library names look fixed and looks like the Firebird version >>>> should be fixed before using it. >>> >>> You can do 2 things: >>> >>> 1. use the TSQLDBLibraryLoader component from sqldblib (in trunk) >>> >>> 2. call >>> function InitialiseIBase60(Const LibraryName : AnsiString) : >>> integer; >> found it in ibase60dyn.pp --> ibase60.inc >> before connecting to the DB: >> InitialiseIBase60('libfbclient.so'); > changing previous line to > InitialiseIBase60('./libfbclient.so'); > works. > > Thanks > > Antonio. > >> compile on one system (OpenSuse x86_64), copy to the target system >> (Ubuntu x86_64) >> target systemp library /usr/lib/libfbclient.so.2 copied in current >> directory as libfbclient.so >> then run and: >> An unhandled exception occurred at $00000000004B544B : >> EInOutError : Can not load Firebird client library "libfbclient.so". >> Check your installation. >> >> any comment ? >> >> Antonio. >> >>> with the correct library name. >>> >>> Michael. >>> _______________________________________________ >>> fpc-pascal maillist - >>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> >> -- >> Sita Software >> *Antonio Fortuny* >> Senior Software engineer >> >> 220, avenue de la Liberté >> L-4602 Niederkorn >> Tel.: +352 58 00 93 - 93 >> www.sitasoftware.lu <http://www.sitasoftware.lu> >> Your IT Partner >> >> >> >> _______________________________________________ >> fpc-pascal maillist >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > -- > Sita Software > *Antonio Fortuny* > Senior Software engineer > > 220, avenue de la Liberté > L-4602 Niederkorn > Tel.: +352 58 00 93 - 93 > www.sitasoftware.lu <http://www.sitasoftware.lu> > Your IT Partner > > > > _______________________________________________ > fpc-pascal maillist > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Liberté L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner