[odb-users] Using ODB with Bazel

Boris Kolpackov boris at codesynthesis.com
Thu Mar 26 08:44:30 EDT 2015


Hi Samuel,

Samuel Littley <samuel.littley at toastwaffle.com> writes:

> "odb: error: unable to resolve ODB driver path" and "/usr/bin/odb:
> error: unable to obtain GCC plugin directory". [...]
> 
> For the first error, I assume it's referring to the libodb-xxx database
> drivers [...]

No, this error refers to the 'odb' executable. It is the compiler driver
for ODB (implemented as a GCC plugin) just like, say, g++ is a driver
for cc1plus, which is the actual C++ compiler.

The 'odb' driver needs to find its location since it uses it as a
base to search for the plugin to load. In your case, it looks for
it in PATH which doesn't work, for some reason.


> 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.

The plugin will be looked for in a directory that is relative to /usr/bin.
You didn't say what package of ODB you are using (e.g., pre-built binary
from the website, from your distribution repository, or built it yourself).
Generally, you shouldn't move the 'odb' binary around. Here is a warning
from the pre-built binary README file:

"Note also that while you can move the ODB compiler directory around, you
cannot move individual sub-directories or files inside it. For example,
copying or linking the ODB compiler executable to /usr/local/bin/ will
not work."

Boris



More information about the odb-users mailing list