Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 May 2008 14:54:31 -0400
From:      Lowell Gilbert <freebsd-stable-local@be-well.ilk.org>
To:        Dave Uhring <duhring@charter.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Buildworld Fails RELENG_7
Message-ID:  <448wy6yviw.fsf@be-well.ilk.org>
In-Reply-To: <20080519183614.GB55295@charter.net> (Dave Uhring's message of "Mon\, 19 May 2008 13\:36\:14 -0500")
References:  <20080519151739.GA50653@charter.net> <4AB77C7C-55F7-4CC3-B842-E684F6C899E3@rabson.org> <20080519163825.GA32372@charter.net> <DB8B754A-5994-4358-9F8C-93218AAEF9F4@rabson.org> <20080519165421.GA62264@charter.net> <20080519170223.GH7468@bunrab.catwhisker.org> <20080519175358.GB55020@charter.net> <20080519180201.GI7468@bunrab.catwhisker.org> <20080519183614.GB55295@charter.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Dave Uhring <duhring@charter.net> writes:

> On Mon, May 19, 2008 at 11:02:01AM -0700, David Wolfskill wrote:
>> On Mon, May 19, 2008 at 12:53:58PM -0500, Dave Uhring wrote:
>> > 
>> > I posted the relevant output from "make buildworld".  Copying the 3 new header
>> > files from /usr/src/sys/sys to /usr/include/sys solved my original problem.
>> 
>> s/solved/circumvented/
>  
> :)  Whatever, libc does build now.
>
>> freebeast(8.0-C)[52] ls -l usr/src/contrib/groff/src/devices/grodvi/*.h
>> ls: No match.
>> freebeast(8.0-C)[53] grep '#include "' usr/src/contrib/groff/src/devices/grodvi/dvi.cpp 
>> #include "driver.h"
>> #include "nonposix.h"
>> #include "paper.h"
>> freebeast(8.0-C)[54] 
>> 
>> The compilation of dvi.cpp uses
>> "-I/usr/src/gnu/usr.bin/groff/src/devices/grodvi/../../../../../../contrib/groff/src/include
>> -I/usr/src/gnu/usr.bin/groff/src/devices/grodvi/../../../src/include"
>> (among other things); I expect you will find the needed header files
>> in those directories.
>
> If a -I/some/directory is used as a CFLAG then the *include directive must read
>
> #include <driver.h>, *not* #include "driver.h".  The latter demands that the
> header file be in the same directory as the source file.

Not that it necessarily affects what you're going through, but that
last statement is incorrect.  The double quotes are (according to the
C standard) implementation defined, and gcc (like many other
compilers) will prefer the local directory for the double quotes, but
will search the entire search path if it doesn't find the file there.

It also has some really wacky command-line parameters to control which
directories are searched (by *both* #include syntaxes) down to a
ridiculously fine level.  The only use I've ever had for such things
was in cross-compile environments targeting multiple architectures in
a single build tree, and even then it isn't really necessary.

 - Lowell
-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?448wy6yviw.fsf>