Update to Firebird 3.0

Michael Stahl mstahl at redhat.com
Mon Jun 13 10:39:35 UTC 2016


On 11.06.2016 14:59, Bunth Tamás wrote:
>>> Tamás, take a look at
>>>
>>> commit 290bfcd2fdb44a52943f6fdc134d2565cbb83db3
>>> Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
>>> Date:   Thu Sep 5 10:24:35 2013 +0100
>>>
>>> there used to be a commented out "check for tommath". But if firebird
>>> needs tommath, then indeed we need to add it to our externals.
>>
>> yes, Tamás needs to write some makefiles after all :)
>>
>> that will be a UnpackedTarball, possibly a ExternalProject (unless it's
>> one of those "header-only" things), possibly a Library (if it doesn't
>> build in any sane way with MSVC), probably a ExternalPackage (unless
>> it's completely statically linked).
>>
>> but we can keep it simple stick to the (above mentioned) comment and not
>> support the scenario with system tommath and bundled firebird, either
>> bundle both or take both from system.  that means we likely don't need
>> to detect "tommath" in configure, unless it's exposed somehow by
>> firebird's public headers.
> 
> There is an embedded tommath in firebird/extern/libtommath/, but
> Firebird uses this only for windows. ( in version 4.0 there is an
> option --with-builtin-tommath, which allows us to use it on Linux, but
> there is no option like that in 3.0).
> So iiuc I have to do something only for Linux (and Mac ?).

ah, interesting... so you could try to ask upstream if they would want
to consider back-porting that to their 3.x release branch, that would be
the easiest way for us :)  then we could apply the back-port patch in
UnpackedTarball_firebird.mk until the next 3.x is released.

> Firebird doesn't build on linux without an installed tommath, it
> searches for a system library. Isn't there some package manager stuff
> for libreoffice, which installs libtommath on Linux/MAC just before
> installing libreoffice?

that's only true for builds of LibreOffice as part of the distributions,
but those would use a system firebird package as well.

for TDF binary releases on GNU/Linux we can only rely on system
libraries that are available on every popular distribution that was
released after the "baseline", which is the distribution that is used to
build the TDF binary releases, and which have a proven track record of
maintaining binary compatibility (ABI).

currently TDF releases are built on RHEL (or CentOS) 6, so you can check
here what packages are available, "libtommath" isn't on the list:

ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/

> Actually I don't understand the concept of the makefiles you
> mentioned. So these UnpackedTarball, ExternalProject etc. makefiles
> would make some kind of tommath.so file(s) to instdir/program from a
> tarball, right? But than how would we force the firebird files to use
> those so files instead of searching for system libraries? With a patch
> on the firebird source?

probably tommath can be built either as a static library, or as a
dynamic library.  if it's built as dynamic library the .so/.dll/.dylib
file must be copied into instdir/program via ExternalPackage_tommath.mk,
whereas a static library can be used without copying just via
-L$(WORKDIR)/Unpacked... -lfoo.

a patch is sometimes necessary but only the last resort, because it's
generally a pain to maintain.

usually the configure script has some way to pass in parameters, usually
in the form of FOO_CFLAGS and FOO_LIBS variables that point to the
headers and libraries, which is the convention used by "pkg-config";
there are many examples in the existing externals.



More information about the LibreOffice mailing list