Subject | Problem to create a real embedded connection, with Firebird 3.0.3 |
---|---|
Author | |
Post date | 2019-04-05T17:49:02Z |
Hello
I've written a Lazarus application (project1) under Ubuntu 18.04 with Firebird 3.0 embedded (this is a development workstation, on which I installed a Firebird server).
It connects well from the IDE Lazarus (without Firebird server and without fbquard being loaded. But, /usr/lib/x86_64-linux-gnu/firebird/3.0/plugins/libEngine12.so is loaded). I'm glad: yippee.
Now, I plan to make a simple embedded installation package for a client.
So I put all the files that were supposed to be necessary next to my executable's directory (and others, out of concern), like this:
1°) I have put in the project directory, all the files (these are the files to deliver, and others just in case...) like this:
/home/.../dir_project_num1/
|-- database.fdb
|-- project1 (application)
|
|
|-- databases.conf
|-- fbintl.conf
|-- fbtrace.conf
|-- firebird.conf
|-- plugins.conf
|-- firebird.msg
|-- @... (symlink "soft" towards @....2)
|-- @....2 (symlink "soft" towards libfbclient.so.3.0.3)
|-- libfbclient.so.3.0.3 (true librairy)
|
└--/intl/
| |-- fbintl.conf
| |-- libfbintl.so
|•
|
└--/plugins/
| |-- libEngine12.so
| |-- libfbtrace.so
|•
|
•
2°) I've modified the file /home/guepard/SauveWinE_etc/a_projetsLaz/dir_project_num1/firebird.conf by adding:
- RootDirectory=/home/guepard/SauveWinE_etc/a_projetsLaz/dir_project_num1
- DatabaseAccess = Full
- ExternalFileAccess = Full
- UdfAccess = Full
- Providers = Engine12
- ServerMode = Classic
3°) I added environment variables to indicate where the Firebird libraries are (in my directory):
- FBLIB=/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1
- FIREBIRD=/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1
- LD_LIBRARY_PATH=/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1:/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1/plugins:/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1/intl
4°) I've renamed the directory /usr/lib/x86_64-linux-gnu/firebird/3.0: I want to simulate a customer that has not installed a Firebird 3 server. So, I've renamed the directory /usr/lib/x86_64-linux-gnu/firebird/3.0/... to /usr/lib/x86_64-linux-gnu/firebird/6.0/... hoping to force to specifically load the libraries that are in my application's directory.
==> the connection refuses to be established at run-time :-( .
The application absolutely wants to use the following SOs:
- /usr/lib/x86_64-linu-gnu/firebird/3.0/plugins/libEngine12.so (??!)
- /usr/lib/x86_64-linu-gnu/firebird/3.0/plugins/libfbtrace.so (??!)
- /usr/lib/x86_64-linu-gnu/firebird/3.0/intl/libfbint.so (??!)
- /home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1/libfbclient.so.3.0.3 ( :-D )
Why do global variables seem to be useless, since the connection doesn't want to load the indicated Firebird's "embedded" SOs, which are in my application's directory?
nb: I tried dynamically loading the SOs of my directory before opening the connection, But the connection refuses to be established whith those!!?
I would really appreciate some help.
Regards,
Eric
I've written a Lazarus application (project1) under Ubuntu 18.04 with Firebird 3.0 embedded (this is a development workstation, on which I installed a Firebird server).
It connects well from the IDE Lazarus (without Firebird server and without fbquard being loaded. But, /usr/lib/x86_64-linux-gnu/firebird/3.0/plugins/libEngine12.so is loaded). I'm glad: yippee.
Now, I plan to make a simple embedded installation package for a client.
So I put all the files that were supposed to be necessary next to my executable's directory (and others, out of concern), like this:
1°) I have put in the project directory, all the files (these are the files to deliver, and others just in case...) like this:
/home/.../dir_project_num1/
|-- database.fdb
|-- project1 (application)
|
|
|-- databases.conf
|-- fbintl.conf
|-- fbtrace.conf
|-- firebird.conf
|-- plugins.conf
|-- firebird.msg
|-- @... (symlink "soft" towards @....2)
|-- @....2 (symlink "soft" towards libfbclient.so.3.0.3)
|-- libfbclient.so.3.0.3 (true librairy)
|
└--/intl/
| |-- fbintl.conf
| |-- libfbintl.so
|•
|
└--/plugins/
| |-- libEngine12.so
| |-- libfbtrace.so
|•
|
•
2°) I've modified the file /home/guepard/SauveWinE_etc/a_projetsLaz/dir_project_num1/firebird.conf by adding:
- RootDirectory=/home/guepard/SauveWinE_etc/a_projetsLaz/dir_project_num1
- DatabaseAccess = Full
- ExternalFileAccess = Full
- UdfAccess = Full
- Providers = Engine12
- ServerMode = Classic
3°) I added environment variables to indicate where the Firebird libraries are (in my directory):
- FBLIB=/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1
- FIREBIRD=/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1
- LD_LIBRARY_PATH=/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1:/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1/plugins:/home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1/intl
4°) I've renamed the directory /usr/lib/x86_64-linux-gnu/firebird/3.0: I want to simulate a customer that has not installed a Firebird 3 server. So, I've renamed the directory /usr/lib/x86_64-linux-gnu/firebird/3.0/... to /usr/lib/x86_64-linux-gnu/firebird/6.0/... hoping to force to specifically load the libraries that are in my application's directory.
==> the connection refuses to be established at run-time :-( .
The application absolutely wants to use the following SOs:
- /usr/lib/x86_64-linu-gnu/firebird/3.0/plugins/libEngine12.so (??!)
- /usr/lib/x86_64-linu-gnu/firebird/3.0/plugins/libfbtrace.so (??!)
- /usr/lib/x86_64-linu-gnu/firebird/3.0/intl/libfbint.so (??!)
- /home/guepard/SauveWinE_etc/a_projectLaz/dir_project_num1/libfbclient.so.3.0.3 ( :-D )
Why do global variables seem to be useless, since the connection doesn't want to load the indicated Firebird's "embedded" SOs, which are in my application's directory?
nb: I tried dynamically loading the SOs of my directory before opening the connection, But the connection refuses to be established whith those!!?
I would really appreciate some help.
Regards,
Eric