This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: maybe successful build of gcc-20020304 and gnat


On Mon, 11 Mar 2002 08:58:20 +0100
Florian Weimer <fw@deneb.enyo.de> wrote:

> scott worley <folokai@earthlink.net> writes:
> 
> > I was able to build the gcc-20020304 snapshot with GNAT by:
> 
> Mainline or branch?
> 
> > The compiler complains about cout not being defined.  Must I provide a
> > path for c++ header files?
> 
> cout is defined in namespace std, so you have to use "std::cout" (or
> "using namespace std;").

Florian,

I read through the gcc mailing list and found the announcement for gcc-20020304 snapshot.  Followed the link to the ftp site and downloaded the tar ball.  I have tried using cvs in the past, for example, used the -rgcc_ss_20020225 and cvs created two directories, gcc and gcc-20020225.  The gcc-20020225 dir didn't seem complete, no configure script.  So I decided to use the tar balls.

I've spent about a week trying to build GNAT from gcc cvs, -rgcc_latest_snapshot, or using one of the snapshot tar balls.  Since my goal was GNAT most of the problems were due to not having a 'good' pre-install of GNAT.  I tried the pre-built gnat from nyu and couldn't figure out how to set everythink up to work without conflicting with system gcc(2.95.3)

/usr/bin/gcc is gcc 2.95.3 with
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3 in ld.so.conf

nyu gnat, modified install makefile to put it in /opt/gnat
/opt/gnat/bin/gnat,gnatmake,... all point to .gnat-script which runs bin's
in /opt/gnat/bin/real/gcc,gnatmake,...
/opt/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1 didn't think to put this in ld.so.conf

PATH=/usr/bin:/usr/local/bin:...:/opt/gnat/bin
ADAC=/opt/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/gnat1

I think one problem with this setup is:
1. some build process calls gnat which knows it's real binary is /opt/gnat/bin/real/gcc (2.8.1) which is OK
2. /opt/gnat/bin/real/gcc was built to use the normal names for all the other gcc programs, linker, etc.
3. Since the path has gcc(2.95.3) first then the build fails because gcc(2.8.1) is trying to use tools from gcc(2.95.3).

gcc3's configure script would find /opt/gnat/lib/.../gnat1 OK when I had ADAC set but failed on some other gnat test because the resulting objdir/gcc/Makefile would not have any gnat build rules in it.

So from another machine running Debian(sid) I tar'd gnat-3.14p which debian modified to use differnent names, i.e. gcc -> gnatgcc.  Put this into /usr and added the /usr/lib/gcc-lib/i486.../2.95.3 to ld.so.conf and gcc3 was able to build gnat, c, c++, objc and f77.

If I understood the unix compile/link toolchain better, this would not have taken so long.

Thanks for the help.  I don't use c++, the last time was about 10 years ago and was Borland's Turbo c++.

scott
folokai@earthlink.net


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