[odb-users] Can't compile simple person.hxx- gcc error in /usr/include/gnu/stubs.h

Boris Kolpackov boris at codesynthesis.com
Thu Apr 26 09:50:10 EDT 2012

Hi Thomas,

Szumowski, Thomas <thomas.szumowski at lmco.com> writes:

> /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such 
> file or directory

I think this is caused by new Debian/Ubuntu multi-arch support. Now,
architecture-specific headers are installed into separate directories
and the Debian/Ubuntu-built GCC is configured to automatically add
them depending on the target architecture (i.e., the -m option). On
the other hand, GCC that comes with the ODB binary package is not yet
equipped to deal with that.

If I am right, then you should be able to find the stubs-32.h file
in the /usr/include/i386-linux-gnu/gnu/ directory. If that's the
case, then a simple way to resolve this error would be to add this
line to the odb-X.Y.Z-i686-linux-gnu/etc/odb/default.options file:


Let me know if this method works for you so that we can add this line
by default in future released of ODB.

Alternatively, you can build the ODB compiler from source so that it
uses the Debian/Ubuntu-built GCC. Simply get the ODB compiler source
code package (odb-X.Y.Z.tar.bz2), then do:

$ sudo apt-get install gcc-4.6-plugin-dev
$ tar xfj odb-X.Y.Z.tar.bz2
$ cd odb-X.Y.Z
$ ./configure
$ make
$ sudo make install


More information about the odb-users mailing list