[odb-users] Is ODB supported on FreeBSD platform

Boris Kolpackov boris at codesynthesis.com
Sun Mar 3 07:19:40 EST 2013


Hi Nachum,

Nachum Moshe <nachum.moshe at gmail.com> writes:

> I would like to use ODB with SQlite on FreeBSD platform. Is there any
> solution for that. Is ODB supported on this platform.

While we haven't tested ODB on FreeBSD ourselves, I don't see why
it won't work (and if there are any issues, we can always fix them).

The trickiest part will probably be building the ODB compiler itself,
for which we need a fairly recent version of GCC with plugin support.
I am not too familiar with FreeBSD but I did some research and it
appears gcc 4.6 is available as a lang/gcc port (installed as gcc46,
g++46, etc). There is also a port for DragonEgg which also requires
plugin support, so I am pretty sure the gcc build in FreeBSD has
plugin support enabled.

If all this is correct, then building the ODB compiler should be a
breeze. First build libcutl:

./configure CC=gcc46 CXX=g++46
make
make install

Then, do the same for the ODB compiler itself:

./configure CC=gcc46 CXX=g++46
make
make install

This will build the ODB compiler which will use FreeBSD's g++46 for
C++ parsing.

Once this is done, building the runtimes (libodb and libodb-sqlite)
should be straightforward. Note also that you don't have to use GCC
4.6 for runtimes (or your application). You can use the stock GCC
(or any other version, or even Clang) instead.

Let us know if you run into any issues.

Boris



More information about the odb-users mailing list