firebird
firebird copied to clipboard
Firebird Embedded: intl subdirectory is ignored on Linux
In LibreOffice, Firebird Embedded is built using this sequence (simplified; the script is here):
./configure --without-editline --with-wire-compress=no --enable-shared --disable-static
make
The resulting DLLs (libfbclient.so, libEngine12.so, and the directory intl with libfbintl.so and fbintl.conf) are put into LibreOffice install directory (configurable). Same on Windows, except file names are respectively different (ifbclient.dll, Engine12.dll, intl/fbintl.dll, intl/fbintl.conf).
This works, except this problem: on Linux, executing CREATE TABLE mytable (c char(2) character set WIN1252) fails with
*unsuccessful metadata update *EXT_LOG *CHARACTER SET WIN1252 is not installed caused by 'CREATE TABLE mytable (c char(2) character set WIN1252)'
Firebird looks up its intl directory under /usr/local/firebird, not in the subdirectory where the main DLLs are located. Note that the same configuration works on Windows, and the DLLs directory is searched first when looking for intl.
What is our mistake? What needs to be specified or configured or moved or ... to let Linux build find its intl data?
Thank you!
This is how Linux works: https://unix.stackexchange.com/a/22999
I'm sorry, I fail to see how is this related. FB uses own mechanism to find its intl data; my short debugging shows that it calls gds__prefix, which in turn uses InitPrefix class, and fb_prefix static variable, in src/yvalve/gds.cpp. Also, src/yvalve/config/os/posix/config_root.cpp is involved there, which takes ENABLE_BINRELOC into account; and in the end, the path that is being tested is specific /usr/local/firebird/intl, not anything dynamic.
I ask to know what is the supposed mechanism in this project, what are the correct configurations at configure time or compile time or runtime.
Use --enable-binreloc in configure.
Thanks @asfernandes; unfortunately, this itself doesn't help - this in fact breaks everything, and opening FB databases fails in this mode (maybe there should be something else?).
On 7/31/24 12:46, Mike Kaganski wrote:
Thanks @asfernandes https://github.com/asfernandes; unfortunately, this itself doesn't help - this in fact breaks everything, and opening FB databases fails in this mode (maybe there should be something else?).
In addition to this try to use the following directories structure (on linux):
(LibreOffice install directory) lib libfbclient.so plugins libEngine12.so intl libfbintl.so fbintl.conf