Architecture specific header files

Vít Ondruch vondruch at redhat.com
Tue Jun 25 13:41:47 UTC 2013


Hi,

Is there some common practice, where to place architecture specific 
header files? From output of the following command, I can't see any such 
place.


$ `gcc -print-prog-name=cc1` -v
ignoring nonexistent directory 
"/usr/lib/gcc/x86_64-redhat-linux/4.8.1/include-fixed"
ignoring nonexistent directory 
"/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
  /usr/lib/gcc/x86_64-redhat-linux/4.8.1/include
  /usr/local/include
  /usr/include
End of search list.



Actually, the "ignoring nonexistent directory 
"/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../x86_64-redhat-linux/include"" 
might be usable, but is it allowed to use it? Does it conform to FHS 
(don't think so). Shouldn't it be configured differently?

The point is, that compilation of this simple program:


$ cat > rt.c
#include "ruby.h"

int main(int argc, char **argv)
{
   return 0;
}
^D



fails:


$ gcc rt.c
In file included from /usr/include/ruby.h:33:0,
                  from rt.c:1:
/usr/include/ruby/ruby.h:24:25: fatal error: ruby/config.h: No such file 
or directory
  #include "ruby/config.h"
                          ^
compilation terminated.


This should work out of the box IMO, without any configuration or 
specification of additional paths etc. The problem is, that Ruby ships 
architecture specific config.h header which is not available in GCC's 
default search path and I am wondering how to make this work.


Thanks



Vít


More information about the devel mailing list