[ROOT] GCC-3.0, include paths, ROOT build system, oh my!

From: Brett Viren (bv@bnl.gov)
Date: Fri Jul 13 2001 - 20:13:20 MEST


Hi.

I just built ROOT from CVS as of today with gcc/g++/g77/libstdc++ v3.0
on a Debian x86 system.

I had a problem involving include files.  In particular while
compiling TGLKernel.cxx:

 g++ -O2 -pipe -Wall -fPIC -Iinclude  -I/usr/include -o gl/src/TGLKernel.o -c gl/src/TGLKernel.cxx
 In file included from /usr/include/g++-v3/bits/fpos.h:40,
                  from /usr/include/g++-v3/bits/std_iosfwd.h:41,
                  from /usr/include/g++-v3/iosfwd:31,
                  from include/TObject.h:45,
                  from include/TNamed.h:26,
                  from include/TVirtualX.h:28,
                  from gl/src/TGLKernel.cxx:23:
 /usr/include/g++-v3/bits/std_cwchar.h:42:24: wchar.h: No such file or directory


The problem line (std_cwchar.h:42) is this:

	#include_next <wchar.h>

According to "Inheritance and Header Files" in the GNU C pre processor
info page this "#include_next" directive (which is news to me) tells
CPP to include the file found by checking all -I directives after the
one which found the current file.

Since -I/usr/include is explicitly put on the command line, it is
checked before the internal -I directives and, evidently, not checked
again.

This -I/usr/include directive is inserted in the compile line by the 

	OPENGLINCDIR   := /usr/include

line in config/Makefile.config (generated by configure).  When I
remove it the compilation succeeds, but GL support is skipped.  If I
do something like:

	OPENGLINCDIR   := /bogus/path

compilation succeeds, includeing GL support.


I'm not sure of a good way to handle this.  Maybe a "--with-opengl"
option to "configure" which turns on GL support but doesn't add an
include path directive (leaving that to "--with-opengl-incdir").

It is currently the case, but I could see this same problem happening
in any of the ROOT packages where a standard system include path is
inserted in the command line.

-Brett.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:52 MET