This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 2.95.2 can't find X11 includes
- Subject: Re: gcc 2.95.2 can't find X11 includes
- From: Doug Wyatt <dwyatt at kohlmansystems dot com>
- Date: Fri, 11 May 2001 11:40:01 -0500
- CC: gcc-help at gcc dot gnu dot org
- Organization: Kohlman Systems Research, inc.
- References: <3AFBAC7E.A523EC6C@kohlmansystems.com> <20010511065839.A24017@pc1.attglobal.net>
I guess I wasn't too clear on this... to my understanding either
-I/usr/include or -I/usr/include/X11R6 should work because Xproto.h,
for example, is in these two locations:
-r--r--r-- 1 bin bin 56454 Sep 26 1996 /usr/include/X11/Xproto.h
-r--r--r-- 1 bin bin 56454 Sep 26 1996 /usr/include/X11R6/X11/Xproto.h
The first is actually a symlink to the second:
lrwxr-xr-x 1 root sys 31 Jul 15 1997 /usr/include/X11/Xproto.h ->
/usr/include/X11R6/X11/Xproto.h
The list shown after "#include <...> search starts here:" contains
/usr/include (a default), where <X11/Xproto.h> should have been
found. This search list doesn't show /usr/include/X11R6, which it
should to my mind since I had -I/usr/include/X11R6 in XINCLUDES and
this value clearly made it onto the gcc command line generated by
the makefile.
"Frederick V. Heitkamp" <heitkamp@pc1.attglobal.net> wrote:
>
> My X11 includes are in /usr/X11R6/include/X11
> which means to you that you probably need
> -I/usr/include/X11R6/include.
> The gcc -I directive needs to point to the directory
> that has the directory X11 in it. Alternatively
> you can make a link from /usr/include/X11 to
> /usr/include/X11R6/include/X11. Anyway you need to
> take a good look at your X installations directory
> structure to see where the problem is.
>
> Fred
>
> On Fri, May 11, 2001 at 04:10:22AM -0500 or thereabouts, Doug Wyatt wrote
>> Hi,
>>
>> I'm trying to build GhostScript on HP-UX with gcc 2.95.2 and
>> I've run into a compile problem that looks like gcc isn't
>> actually searching the include directories. Probably I'm
>> just being dense (I haven't done much source compiling in
>> the last few years), but perhaps some kind soul could point
>> out something I'm missing.
>>
>> The following is an excerpt from the make output:
>>
>> gcc -v `cat ./obj/cc.tr` -O2 -Wall -Wstrict-prototypes
>> -Wmissing-declarations -Wmissing-prototypes -Wtraditional
>> -fno-builtin -fno-common -I./obj -I./src
>> -I/usr/include/X11R6 -o ./obj/gdevx.o -c ./src/gdevx.c
>> Reading specs from
>> /usr/local/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/specs
>> gcc version 2.95.2 19991024 (release)
>> /usr/local/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/cpp -lang-c -v
>> -I./obj -I./src -I/usr/include/X11R6 -D__GNUC__=2 -D__GNUC_MINOR__=95
>> -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix
>> -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__
>> -D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8 -D__PWB
>> -D__hpux -D__unix -Asystem(unix) -Asystem(hpux) -Acpu(hppa)
>> -Amachine(hppa) -D__OPTIMIZE__ -Wcast-qual -Wwrite-strings -Wall
>> -Wstrict-prototypes -Wmissing-declarations
>> -Wmissing-prototypes -Wtraditional -D__hp9000s700 -D_PA_RISC1_1
>> -D_HPUX_SOURCE -D_HIUX_SOURCE -D__STDC_EXT__ ./src/gdevx.c
>> /var/tmp/cca7xlpe.i
>> GNU CPP version 2.95.2 19991024 (release) (hppa)
>> #include "..." search starts here:
>> #include <...> search starts here:
>> obj
>> src
>> /usr/local/include
>> /usr/local/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../\
>> ../hppa1.1-hp-hpux10.20/include
>> /usr/local/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/include
>> /usr/include
>> End of search list.
>> The following default directories have been omitted from the search path:
>> /usr/local/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/../../../\
>> ../include/g++-3
>> End of omitted list.
>> In file included from ./src/gdevx.c:24:
>> src/x_.h:135: X11/Xlib.h: No such file or directory
>> src/x_.h:136: X11/Xproto.h: No such file or directory
>> src/x_.h:137: X11/Xatom.h: No such file or directory
>> src/x_.h:138: X11/Xutil.h: No such file or directory
>> src/x_.h:139: X11/Intrinsic.h: No such file or directory
>> src/x_.h:140: X11/StringDefs.h: No such file or directory
>> src/x_.h:141: X11/Shell.h: No such file or directory
>> gmake: *** [obj/gdevx.o] Error 1
>>
>>
>> I've verified that these include files exist both in /usr/include/X11R6
>> and in /usr/include and the two copies are identical. The files are
>> referenced as, for example,
>>
>> # include <X11/Xlib.h>
>>
>> I don't know if it makes any difference, but gcc was built on an HP9000
>> 700 series and I'm running this compile on an HP 800 series server.
>>
>> Can anyone give me a clue? I'm not subscribed to the list, so please
>> cc: me in any replies, though I will monitor the archive.
>>
Thanks,
Doug Wyatt