Firebird 4 has invalid libtomcrypt.so?

78 views
Skip to first unread message

Attila Molnár

unread,
Jan 11, 2024, 9:05:50 AM1/11/24
to firebird-devel
Hi *!

When IBX try to load "../FB40/lib/libfbclient.so.4.0.4" with Lazarus/IBX I get an error
"/home/amolnar/Programs/GDB3sBR/FB30/../FB40/lib/../lib/libtomcrypt.so.1: file too short"

Firebird-4.0.4.3010-0.amd64.tar.gz from the official download.
(I did not run the install.sh, just extracted the package to FB40 folder. I want to ship FB with my program and use in embedded.)

Using Firebird-3.0.11.33703-0.amd64.tar.gz with Lazarus/IBX works fine.
(after apt-get libtommath1)

What is the issue? It the libtomcrypt.so.1.0.1 really wrong in the package?
size : 393 008 byte
SHA256: 23DF9B90D01F0C03BF208FC411DF5F1AAA86A619B381C8169CA70C5EED4E47FD

Thank You!

Tony Whyman

unread,
Jan 11, 2024, 11:15:51 AM1/11/24
to firebir...@googlegroups.com

If you are putting Firebird in a non-standard location (which I often do when testing), it is usually a good idea to set the FIREBIRD environment variable to the installation root, and the LD_LIBRARY_PATH environment varibable to $FIREBIRD/lib. Have you done this? If not then try doing this.

--
You received this message because you are subscribed to the Google Groups "firebird-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebird-devel/7f03a2b0-1c2d-4524-8580-43863296cebfn%40googlegroups.com.

Vlad Khorsun

unread,
Jan 11, 2024, 11:44:36 AM1/11/24
to firebir...@googlegroups.com
11.01.2024 16:05, Attila Molnár:
> Hi *!
>
> When IBX try to load "../FB40/lib/libfbclient.so.4.0.4" with Lazarus/IBX I get an error
> "/home/amolnar/Programs/GDB3sBR/FB30/../FB40/lib/../lib/libtomcrypt.so.1: file too short"

Is it a link or regular file ?

Regards,
Vlad

Alex Peshkoff

unread,
Jan 11, 2024, 12:47:36 PM1/11/24
to firebir...@googlegroups.com
This must be a link (to libtomcrypt.so.1.0.1) but what happens actually
I can't know. In out package:

# ldd libtomcrypt.so.1
        linux-vdso.so.1 (0x00007ffcb4d62000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f1d5e027000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f1d5e53b000)

ie. libtomcrypt.so.1 is correct ELF.


Attila Molnár

unread,
Jan 15, 2024, 5:38:34 AM1/15/24
to firebird-devel
I can't set the environment variable, because I use many other embedded and service Firebirds on the machine.

Dimitry Sibiryakov

unread,
Jan 15, 2024, 5:39:43 AM1/15/24
to firebir...@googlegroups.com
Attila Molnár wrote 15.01.2024 11:38:
> I can't set the environment variable, because I use many other embedded and
> service Firebirds on the machine.

It can be done programmatically in your application.

--
WBR, SD.

Attila Molnár

unread,
Jan 15, 2024, 5:41:38 AM1/15/24
to firebird-devel
I replaced the libtomcrypt.so.1 link in FB40/lib to the actual libtomcrypt.so.1.0.1 file, and now it works as expected.

Attila Molnár

unread,
Jan 15, 2024, 5:42:51 AM1/15/24
to firebird-devel
Nope, on Linux setting the environment variabe is not possible. Linux does not allow it, so there is no function for it in Lazarus/Free Pascal.

Virgo Pärna

unread,
Jan 15, 2024, 5:43:11 AM1/15/24
to firebir...@googlegroups.com
Very basic way to do it for specific command is (works in bash):
FIREBIRD=/path/to/firebird /program/to/be/executed


--
Virgo Pärna
Gaiasoft OÜ
vi...@gaiasoft.ee

Tony Whyman

unread,
Jan 15, 2024, 5:45:38 AM1/15/24
to firebir...@googlegroups.com

It is the client program that needs to have the env vars set, including the case where Firebird runs in embedded mode. Before you invoke the program:

1. From a command line shell

export FIREBIRD=/home/amolnar/Programs/GDB3sBR/FB30/../FB40

export LD_LIBRARY_PATH=$FIREBIRD/lib

2. From the Lazarus IDE

Select Run->Run Parameters and click on the "Environment" tab

Add the two environment variable separately (and without the export) to the list of "User Overrides"

In both cases, I would give the full absolute path.

Dimitry Sibiryakov

unread,
Jan 15, 2024, 5:46:25 AM1/15/24
to firebir...@googlegroups.com
Attila Molnár wrote 15.01.2024 11:42:
> Nope, on Linux setting the environment variabe is not possible. Linux does not
> allow it, so there is no function for it in Lazarus/Free Pascal.

Lazarus can call C functions and there is
https://man7.org/linux/man-pages/man3/setenv.3.html

--
WBR, SD.

Dimitry Sibiryakov

unread,
Jan 15, 2024, 5:48:44 AM1/15/24
to firebir...@googlegroups.com

Vlad Khorsun

unread,
Jan 15, 2024, 5:16:23 PM1/15/24
to firebir...@googlegroups.com
15.01.2024 12:41, Attila Molnár:
> I replaced the libtomcrypt.so.1 link in FB40/lib to the actual libtomcrypt.so.1.0.1 file, and now it works as expected.

I guess, when you unpack archive, the file type for libtomcrypt.so.1 was lost and
what should be soft link became a regular file. The correct fix for this issue would
be to re-create soft link, I believe. And check why the problem happens at all.

Regards,
Vlad
Reply all
Reply to author
Forward
0 new messages