[Buildroot] [PATCH 0/4] ODB: C++ Object-Relational Mapping (ORM): New packages.

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat Apr 28 21:07:29 UTC 2018


Hello Adam,

On Thu, 28 Dec 2017 14:27:17 -0500, Adam Duskett wrote:

> There are three main components to use ODB (and a single dependency):
>   - libcutl: This library is ODB's only dependency.
>   - ODB: This is a compiler that takes a specially crafted c++ header file and
>   		 auto-generates a schema that works with libodb and the subsequent
>   		 libodb-database library.
>   		 
>   		 It would be used as such:
>   		 odb -d <database> --generate-query --generate-schema file.hxx
>  
>   - libodb: This package contains the common ODB runtime library. Every
>             application that includes code generated by the ODB compiler will
>             need to link to this library.
> 
>   - libodb-pgsql: This package contains the PostgreSQL ODB runtime library.
> 				  Every application that includes code generated for the
> 				  PostgreSQL database will need to link to this library.
> 
> I am only providing libodb-pgsql as that is the only one I personally need.
> There is also support for mysql, sqlite, mssql, and oracle as well.
> 
> Also boost and qt libraries are avaiable if anybody so wishes to add them.
> 
> Adam Duskett (4):
>   libcutl: new package
>   ODB: New package
>   libodb: new package
>   libodb-pgsql: new package

So, I started looking at this patch series. I found a number of
problems, mainly around licensing:

 - The libcutl license details were incomplete

 - The odb license was incorrect (it's GPL-3.0 and not MIT)

 - The libodb and libodb-pgsql license was incorrect (it's GPL-2.0 and
   not MIT)

But then, I encountered two more fundamental problems:

 (1) host-odb tries to build a gcc plugin for the host gcc, but my
     system didn't had the necessary headers and development files to
     build a gcc plugin. I had to install the gcc-plugin-devel package
     on my Fedora system.

     Since this is not guaranteed to be installed on all systems, I
     believe we should add a hidden Config.in boolean such as
     BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT, selected by host-odb (which
     would perhaps require adding a Config.in.host option for
     host-odb), and a check should be added in
     support/dependencies/dependencies.sh to verify that gcc plugins
     can be built for the host gcc. It might also be that plugin
     support doesn't exist in old gcc versions.

 (2) I was able to build libodb and libodb-pgsql without host-odb and
     host-libcutl, and I don't see in the libodb and libodb-pgsql build
     system where the gcc plugin built by host-odb or the odb compiler
     is used. Try by yourself: remove the host-odb dependency from
     libodb.mk, enable libodb and libodb-pgsql, and it will just work.

Could you look into the problems (1) and (2) ?

In order to avoid duplicating our effort, and because I also did a few
other cosmetic improvements, I put the latest version of the patches I
have at
https://git.bootlin.com/users/thomas-petazzoni/buildroot/log/?h=odb.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list