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

Szumowski, Thomas thomas.szumowski at lmco.com
Thu Apr 26 11:11:04 EDT 2012


Boris,

Here are my results:

---------------
Option 1 - Adding to default.options:  SUCCESS

The stubs-32.h file is in the /usr/include/i386-linux-gnu/gnu directory, and adding the -I command to the default.options file worked. I was able to generate working executables from it. However, when I ran odb compiler with --trace enabled, I got an interesting output (attached). I attached it for completeness, but it doesn't affect my end. Everything still worked.



----------------
Option 2 - Compiling from source: SUCCESS

Initially I didn't have libcutl, so I downloaded, built, and installed it from http://www.codesynthesis.com/projects/libcutl/. After that it compiled fine.



Thank you for your help!


Tom Szumowski
Lockheed Martin - Advanced Technology Laboratories
Phone: (856) 792-9077
E-mail:  thomas.szumowski at lmco.com

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Thursday, April 26, 2012 9:50 AM
To: Szumowski, Thomas
Cc: odb-users at codesynthesis.com
Subject: EXTERNAL: Re: [odb-users] Can't compile simple person.hxx- gcc error in /usr/include/gnu/stubs.h

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:

-I/usr/include/i386-linux-gnu

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

Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trace.log
Type: application/octet-stream
Size: 0 bytes
Desc: trace.log
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20120426/d034350f/trace-0001.obj


More information about the odb-users mailing list