Sign in Join

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

Mailing lists / fpc-pascal / 2007-02

sqldb firebird on linux can't find client lib

11 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Bisma Jayadi

Hi all,

I have a console FPC application which uses sqlDB to connect to Firebird 2, using TIBConnection, TSQLTransaction, and TSQLQuery. The application run very well on win32 (XP SP2 and FB2). Then I try to compile it on Linux (i386 FC4 and FB2), but the application failed to start with the following error:

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

I had make myself sure that both libfbclient.so and libgds.so had symlink on /usr/lib, had been registered on ldconfig, and both firebird/lib and /usr/lib directory is in the search path. Still, the error persists. :(

I believe there's no problem with the FB server itself since I can get connected to the FB server from remote machines or local acess using FB's ISQL.

Is there anything more I need to do? Or did I do something wrong? Or there are any special configs/settings for sqlDB on Linux? For any help and reply, I thank you in advance.

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

Michael Van Canneyt
to Bisma Jayadi
Bisma Jayadi wrote 9 lines
Hi all, I have a console FPC application which uses sqlDB to connect to Firebird 2, using TIBConnection, TSQLTransaction, and TSQLQuery. The application run very well on win32 (XP SP2 and FB2). Then I try to compile it on Linux (i386 FC4 and FB2), but the application failed to start with the following error: EInOutError : Can not load default Firebird clients ("libgds.so" or "libfbclient.so"). Check your installation.

Run your application under 'strace' and send me the output, please. (Zip, please, because it can be rather big)

Michael.

Bisma Jayadi
to Michael Van Canneyt
Run your application under 'strace' and send me the output, please. (Zip, please, because it can be rather big)

Done. Please check your email. I've made the program to the most simplest shape just to produce the error, so it isn't too big and hopefully easier to analyze. For the help, I thank you in advance.

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

Michael Van Canneyt
to Bisma Jayadi
Bisma Jayadi wrote 8 lines
> Run your application under 'strace' and send me the output, please. > (Zip, please, because it can be rather big) Done. Please check your email. I've made the program to the most simplest shape just to produce the error, so it isn't too big and hopefully easier to analyze. For the help, I thank you in advance. From the strace, you can see that it does find the library:

open("/usr/lib/libgds.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\271"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0555, st_size=548504, ...}) = 0 old_mmap(NULL, 585172, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)= 0xee4000 old_mmap(0xf5a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x76000) = 0xf5a000 old_mmap(0xf6a000, 36308, PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf6a000 close(3) = 0

The fact that it still reports it as 'not loaded', I conclude that the dlopen operation failed. Why this would be so I cannot say. Seems like some version incompatibility, because it again tries to load libm etc, when it has already loaded it.

Michael.

Dean Zobec
to Michael Van Canneyt

Michael Van Canneyt pravi:

Show quoted text 23 lines
On Thu, 15 Feb 2007, Bisma Jayadi wrote: >> Run your application under 'strace' and send me the output, please. >> (Zip, please, because it can be rather big) > Done. Please check your email. I've made the program to the most simplest > shape just to produce the error, so it isn't too big and hopefully easier to > analyze. For the help, I thank you in advance. >From the strace, you can see that it does find the library: open("/usr/lib/libgds.so", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\271"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0555, st_size=548504, ...}) = 0 old_mmap(NULL, 585172, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)= 0xee4000 old_mmap(0xf5a000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x76000) = 0xf5a000 old_mmap(0xf6a000, 36308, PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf6a000 close(3) = 0 The fact that it still reports it as 'not loaded', I conclude that the dlopen operation failed. Why this would be so I cannot say. Seems like some version incompatibility, because it again tries to load libm etc, when it has already loaded it.

It may be a firebird client installation problem. Last week I tried to do a client-only installation, by installing on the client machine only the relevant libs and making the softlinks as explained in the Firebird docs. But I was not able to connect with sqldb. Then I did a full Firebird install and then the connection was ok.

Dean.

Bisma Jayadi
to Michael Van Canneyt: open("/usr/lib/libgds.so", O_RDONLY) = 3 read(3,…
The fact that it still reports it as 'not loaded', I conclude that the dlopen operation failed. Why this would be so I cannot say.

Could give me some examples what things that might cause dlopen operation fail? Have you (or somebody else) tried to use sqlDB to connect to FB 2.0? Because I never had such a problem using FB 1.5. I don't really want to set back to FB 1.5 since I need FB 2.0 specific features. :(

Seems like some version incompatibility, because it again tries to load libm etc, when it has already loaded it.

Whose version? FB's version? sqlDB's version? or other libraries?

I believe this is not a matter of installation problem since I installed a full FB 2.0 super server and it works well, as I mentioned in the previous email. Or should I install the classic version?

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

Bisma Jayadi
to Michael Van Canneyt: open("/usr/lib/libgds.so", O_RDONLY) = 3 read(3,…
The fact that it still reports it as 'not loaded', I conclude that the dlopen operation failed. Why this would be so I cannot say. Seems like some version incompatibility, because it again tries to load libm etc, when it has already loaded it.

I use FB 1.5.4 and it works very well. So, I'm almost sure it's about SQLDB and FB 2.0 incompatibility, though I still don't know what things exactly cause it. SQLDB is able to load other client libraries, FPC is able to load dynamic libraries (I uses dynamic PSP in this case), FB 2.0 is working well, still wondering where's the source of the problem. I'll help to fix this but I don't where to start since I saw everything is already in the order. CMIIW. :(

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

Bisma Jayadi
to Michael Van Canneyt: open("/usr/lib/libgds.so", O_RDONLY) = 3 read(3,…
The fact that it still reports it as 'not loaded', I conclude that the dlopen operation failed. Why this would be so I cannot say.

Has found any hints about this, Michael? I'm sorry, but I had to give up on this because there are many other parts of the project which are also need to be written and finished. So I got to use FB 1.5.4 for the moment until this problem is found and fixed. :(

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

Marc Santhoff
to Bisma Jayadi
Bisma Jayadi wrote 7 lines
> The fact that it still reports it as 'not loaded', I conclude that the > dlopen operation failed. Why this would be so I cannot say. Has found any hints about this, Michael? I'm sorry, but I had to give up on this because there are many other parts of the project which are also need to be written and finished. So I got to use FB 1.5.4 for the moment until this problem is found and fixed. :(

Try recompiling the client yourself, do not use binary prepacked things.

As a last resort you could try using the libraries contained in the server package of FB and install these manually on the client.

HTH,
Marc

Unknown author
to Marc Santhoff
Try recompiling the client yourself, do not use binary prepacked things.

I did, but the problem still persists. :(

As a last resort you could try using the libraries contained in the server package of FB and install these manually on the client.

I did it as well. FYI, the client, the server, and the app is on the same machine, at least on testing stage.

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

Marc Santhoff
to Unknown author

Am Dienstag, den 20.02.2007, 23:51 +0700 schrieb

Show quoted text 9 lines
> Try recompiling the client yourself, do not use binary prepacked things. I did, but the problem still persists. :( > As a last resort you could try using the libraries contained in the > server package of FB and install these manually on the client. I did it as well. FYI, the client, the server, and the app is on the same machine, at least on testing stage.

Sounds fishy. Are you sure the access rights for the user running your app are okay (mode 755 on the libs)? Or the startup scripts for the user (.login, .profile, ...) modify the library search path?

I can't imagine anything else ... something must be different in installing client or server that stops your program from working correctly ... you've got to sort that out.

Running out of ideas,
Marc