This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Header files problem on FreeBSD


In article <36C754B9.3550FE7A@videotron.ca> you write:
>Hi,

>I was trying to compile libstdc++ v3 from the cvs source on my
>FreeBSD-2.2.8-stable machine. This system comes with gcc-2.7.2.1 out of
>the box, but I installed the FreeBSD port of egcs-1.1.1.

>Since I was experimeting problems compiling libstdc++, it has been
>suggested that my egcs setup was not proper. It seems to boil down to an
>include file problem such that when egcs was built/installed, not all
>the header files would have been built/installed.

>This leads to my question: is a full built of egcs supposed to install
>ALL the header files it needs, or will it still rely on the "native"
>system's header files to compile user programs. For example, Benjamin
>Koznik, maintainer of stdlibc++ v3, has the stddef.h header in 

>/nfs/rhino/plate/bkoz/H-x86-egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.04/include/stddef.h
>
>while on my system the only 2 versions of that file are in /usr/include
>and /usr/include/g++/std.

>Why isn't this file, and apparently some others, not built/installed
>when I build egcs ? I saw some references to fixincludes on the mailing
>list. Could it have something to do with that ?

>Thanks for any info on the subject.

Try compiling something with your ports' gcc with the -v options, you will
see which include path is used.

I don't have FreeBSD's egcs port easily available, but I'd guess it's
configuring with FREEBSD_NATIVE, which is an awfully bad idea for a port,
since it is going to hard-code /usr/include and /usr/include/g++ ONLY for
standard include paths (see gcc/config/freebsd*.h)

While this is proper for the main FreeBSD src tree (trying to duck past
Jeff, who definitely won't think it proper even then), it is the wrong
thing to do unless your compiler is already fairly well integrated with
the rest of the tools.

Also, see gcc/configure. FreeBSD does not fix header files by default, which
is only okay as long as FreeBSD maintainers run it by hand from time to time.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]