Package: odb
Version: 2.4.0-6
Tags: patch

Problem:
ODB compiler fails with many “db pragma xxxxx is not associated with a 
declaration“ when building a project that also relies on boost.

This is a partial output:

[  7%] Generating core-schema-sqlite.cxx, core-schema-pgsql.cxx
/home/abauer/build/leosac/src/core/auth/User.hpp:154:12: error: db pragma 'id' 
is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:154:15: error: db pragma 
'auto' is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:160:12: error: db pragma 
'unique' is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:161:12: error: db pragma 
'not_null' is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:162:12: error: db pragma 
'type' is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:162:12: error: db pragma 
'type' is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:165:12: error: db pragma 
'type' is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:165:12: error: db pragma 
'type' is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:172:12: error: db pragma 
'value_not_null' is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:172:12: error: db pragma 
'value_not_null' is not associated with a declaration
/home/abauer/build/leosac/src/core/auth/User.hpp:172:27: error: db pragma 
'inverse' is not associated with a declaration

Full output can be found here:
https://github.com/leosac/leosac/issues/98

How to reproduce:
Using gcc >= 6, attempt to build a project which uses odb and boost. For 
example, https://github.com/leosac/leosac.

I have been able to reproduce this on both amd64 Debian Stretch and Raspbian 
Stretch armv6 & armv7.  

Background:
Further investigation into this issue revealed that it had already been 
reported to the odb project and has already been fixed:
https://www.codesynthesis.com/pipermail/odb-users/2016-December/003584.html

The attached patch was pulled from the odb srpm in the Fedora rawhide repo.  

The latest debian package in testing, 2.4.0-6, already has patches applied 
relating to the use of gcc 6. I verified this patch is not one of them.

After incorporating this patch into a locally built odb deb package, the leosac 
project no longer fails in the manner described in issue #98.

My assumption is that, if this patch is approved, it will eventually make it to 
the Raspbian repositories on its own. If this assumption is incorrect, I’d 
appreciate it if someone would let me know.
  

Reply via email to