[odb-users] Using ODB with Bazel

Samuel Littley samuel.littley at toastwaffle.com
Wed Mar 25 13:32:16 EDT 2015


I've been trying to work out how to use ODB with Bazel (Google's open
source release of their internal build system). I've been trying to
define a rule which runs the ODB compiler to produce the -odb.{cc,h,i}
files, but keep hitting errors, namely "odb: error: unable to resolve
ODB driver path" and "/usr/bin/odb: error: unable to obtain GCC plugin
directory". I think these errors are mostly to do with how Bazel alters
the environment in an attempt to make builds reproducible.

For the first error, I assume it's referring to the libodb-xxx database
drivers (sqlite in my case), however manually adding the correct include
path (-I/usr/include/odb/sqlite) seems to have no effect.

The second error appears only when I call the binary as /usr/bin/odb as
opposed to just calling odb and letting it be resolved from the path,
but I can't see any options for odb that would let me specify where it
should look for the plugin.

Can anybody help with this? I know that Bazel is still in Alpha, and
this is all purely out of academic interest, but it would be lovely to
get this working!

Best Wishes,

Samuel Littley
samuel.littley at toastwaffle.com

Web: http://www.toastwaffle.com
Tel: 07724205781

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20150325/47a95d71/signature.pgp


More information about the odb-users mailing list