mbox series

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

Message ID 20171228192721.18494-1-Adamduskett@outlook.com
Headers show
Series ODB: C++ Object-Relational Mapping (ORM): New packages. | expand

Message

Adam Duskett Dec. 28, 2017, 7:27 p.m. UTC
ODB is an open-source, cross-platform, and cross-database object-relational
mapping (ORM) system for C++. It allows you to persist C++ objects to a
relational database without having to deal with tables, columns, or SQL and
without manually writing any mapping code. ODB supports MySQL, SQLite,
PostgreSQL, Oracle, and Microsoft SQL Server relational databases as well as
C++98/03 and C++11 language standards. It also comes with optional profiles for
Boost and Qt which allow you to seamlessly use value types, containers, and
smart pointers from these libraries in your persistent C++ classes.

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

 DEVELOPERS                                         |   4 +
 package/Config.in                                  |   2 +
 package/libcutl/libcutl.hash                       |   6 +
 package/libcutl/libcutl.mk                         |  15 +
 package/libodb-pgsql/Config.in                     |  15 +
 package/libodb-pgsql/libodb-pgsql.hash             |   6 +
 package/libodb-pgsql/libodb-pgsql.mk               |  16 +
 package/libodb/Config.in                           |  12 +
 package/libodb/libodb.hash                         |   6 +
 package/libodb/libodb.mk                           |  16 +
 .../odb/0001-make-ODB-compatible-with-GCC-6.patch  | 327 +++++++++++++++++++++
 ...x-bug-in-GCC-6-input_location-translation.patch |  37 +++
 package/odb/odb.hash                               |   6 +
 package/odb/odb.mk                                 |  20 ++
 14 files changed, 488 insertions(+)
 create mode 100644 package/libcutl/libcutl.hash
 create mode 100644 package/libcutl/libcutl.mk
 create mode 100644 package/libodb-pgsql/Config.in
 create mode 100644 package/libodb-pgsql/libodb-pgsql.hash
 create mode 100644 package/libodb-pgsql/libodb-pgsql.mk
 create mode 100644 package/libodb/Config.in
 create mode 100644 package/libodb/libodb.hash
 create mode 100644 package/libodb/libodb.mk
 create mode 100644 package/odb/0001-make-ODB-compatible-with-GCC-6.patch
 create mode 100644 package/odb/0002-Fix-bug-in-GCC-6-input_location-translation.patch
 create mode 100644 package/odb/odb.hash
 create mode 100644 package/odb/odb.mk

Comments

Thomas Petazzoni April 28, 2018, 9:07 p.m. UTC | #1
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