[odb-users] ODB 2.5.0-b.19 available

Wolfgang Haupt haupt.wolfgang at gmail.com
Fri Jul 24 01:50:26 EDT 2020


On 23.07.20 16:32, Boris Kolpackov wrote:
> Wolfgang Haupt <haupt.wolfgang at gmail.com> writes:
>
>> Is there a build2 way to create a classic source tarball?
> It can create the source distribution which will use build2 as the
> build system but it cannot convert the build2 build system to the
> autotools build system.
>
>
>> I'm bound to a large rather complicated autotools buildsystem where the
>> easiest way is to use a tarball and `./configure`.
>> I managed to create that by pulling the source and `make dist
>> dist_prefix=/tmp/libodb-2.5.0-b.19`.
> That works only accidentally since the autotools templates (which is
> how the old make-based build system does this) are no longer maintained.
Alright, that was my guess already, thx for clarifying.
For now I'm glad it still worked :)
>
>
>> Now I wonder if that should be done using the build2 toolchain by now?
> If you cannot use build2 directly, then the next best option is probably
> to create binary packages (so instead of ./configure && make you do dpkg
> or rpm). I am not sure which distribution you are using but here are the
> instructions on how to create the .deb package for the ODB compiler (for
> the runtime libraries the steps would be similar), in case you or someone
> else finds this useful (we plan to eventually make build2 generate such
> distribution packages automatically).
>
> The below instructions are based on the approach described on this page:
>
> https://askubuntu.com/questions/474387/installing-a-directory-with-a-debian-package
>
> First build and install the ODB compiler using this configuration (instead
> of the one in the install-build2 instructions):
>
> $ bpkg create -d odb-gcc cc       \
>    config.cxx=g++                  \
>    config.cc.coptions=-O3          \
>    config.install.root=/usr        \
>    config.install.chroot=/tmp/odb
>
> With the result in /tmp/odb/, add the following DEBIAN/control file:
>
> # mkdir -p /tmp/odb/DEBIAN
> $ cat <<EOF >/tmp/odb/DEBIAN/control
> Package: odb
> Version: 2.5.0-b.19
> Architecture: amd64
> Maintainer: you at example.org
> Description: ORM for C++
>    ODB is an object-relational mapping (ORM) system for C++. It provides
>    tools, APIs, and library support that allow you to persist C++ objects
>    to a relational database (RDBMS) without having to deal with tables,
>    columns, or SQL and without manually writing any of the mapping code.
> EOF
>
> Then, from /tmp/ run:
>
> $ dpkg -b odb .
> dpkg-deb: building package 'odb' in './odb_2.5.0-b.19_amd64.deb'.
>
> You can then install/uninstall odb_2.5.0-b.19_amd64.deb using dpkg:
>
> sudo dpkg -i odb_2.5.0-b.17_amd64.deb
> sudo dpkg --purge odb
>
> The binary package should work on any machine that has the same version
> of GCC.

I bet this is useful to a bunch of guys in here, so thx again for the 
sample.
My project however, uses a self made unified depends system that will build
a large number of dependencies (probably more than 70 libs) for multiple 
platforms
(linux, windows, android, osx, etc. etc.).

If I find enough time, I'll look into what's needed to pass all the 
necessary cross compile
options to build2 and might work on initial build2 support.



More information about the odb-users mailing list