🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52293

Re: Using gcc-2.3.1 to compile other gnu utilities

#52293
From: Andreas Manessinger
Date: Sat, 28 Nov 1992 13:46
72 lines
4684 bytes
>>>>> On 28 Nov 92 06:33:27 GMT, ccsam004@hamlet.ucdavis.edu (Brian C Hill) said:


 Brian> 	I compiled gcc-2.3.1 on our sun4's and DECstations. No users
 Brian> seem to have complained, but I have *NEVER* managed to get gcc to 
 Brian> compile another GNU utility - NEVER - there are always problems with
 Brian> header file declaration conflicts. I did fix-includes on the systems
 Brian> that called for it, I used the -traditional option and the POSIX
 Brian> option -- no matter what I do, I get errors of some kind. WHAT *AM*
 Brian> I doing wrong? Until now, I have simply used 'cc' instead, but 
 Brian> groff requires a c++ compiler (looks for g++2.2 libs by default),
 Brian> so I tried installing it with gcc (yes, I installed the g++2.2 lib
 Brian> with gcc2.3.1) without success. What *IS* going on? This is very
 Brian> frustrating.

Sorry, I can't follow your argumentation. Of course there are often
declarations in header files that don't conform to what ANSI
specified, but this is not gcc's fault. It's DEC's or SUN's. I can
mostly tell about my experiences with installing GNU utilities on
DECstations (Ultrix 4.2, 4.2a) and on RS6000 (AIX 3.1.5, 3.2.0),
because these are the architectures I consistently install everything
on. 

Over the last years I found it increasingly easy to install those
programs. The compiler I use is, whenever possible, gcc. There were
cases when it was not reasonable to use it, but normally because the
code was written in something between ANSI-C and K&R-C. This has not
happened any more since about one year. My impression is, that the
code quality in terms of portability has improved very much for most
GNU tools. A good example is `cvs'. Three years ago the README file
told, that cvs had only been testdt on the SUN and indeed I had to do
some work to get it running on VAX/Ultrix. Nowadays cvs-1.3 compiles
without any problems.

The point is: I didn't find `gcc' less reliable than vendor supplied
compilers, but even more. I use it for all installations of free
software and (because of it's excellent warnings) for all my
professional development as well. I use it even on the RS6000, where
IBM's `xlc' produces slightly better code but less warnings.

But back to possible problems. There are some typical causes.

        1. A while ago no UNIX vendor used prototypes in header files.
        So most application programmers felt encouraged to make the
        prototypes part of their program. That's wrong. Prototypes for
        calls to the operating system and it's vendor supplied
        libraries should be part of the headers below `/usr/include'
        and on most modern systems they are. So look out for wrong
        prototypes. 

        2. `-traditional' ceased to work on Ultrix I believe with the
        transition from 3.x to 4.0. Although the compiler DEC delivers
        with the system is no ANSI-C compiler, the headers use some
        ANSI features. `gcc' is very precise in what type of the
        language it implements and that's for good reasons. There are
        differences in the semantics of K&R and ANSI, so it's always
        better to know what the compiler does.

        3. Some authors encourage you to run `gcc' with options like
        `-ansi', `-Wall' or even `-pedantic'. That may be correct for
        the programs themselves, but mostly it's not for the operating
        system headers. Using no such option at all makes `gcc' more
        tolerant. 

        4. For programs that use X-Window simply install X11R5. It
        compiles with `gcc' (follow the instructions in the
        `README-X11' in the `gcc' distribution.
--
    /\            | eMail: man@magwien.gv.at (Andreas Manessinger)
   /  \ndreas     | pMail: Alserstra"se. 20/6; A-1090 Wien; Austria
  /\/\ \          | Work : Gemeinde Wien MD-ADV/Ma; Ref. EPS
 / /  \anessinger | Phone: +43 222 4039584/13, FAX: 4039584/18, Home: 9350434
Technical Details
Message-ID: <MAN.92Nov28144558@imrryr.at>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!hp4at!xs0001!news
References: <19660@ucdavis.ucdavis.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,bb8cd18d0115f1de
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-11-28 06:50:43 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!hp4at!xs0001!news
From: man@magwien.gv.at (Andreas Manessinger)
Subject: Re: Using gcc-2.3.1 to compile other gnu utilities
In-Reply-To: ccsam004@hamlet.ucdavis.edu's message of 28 Nov 92 06:33:27 GMT
Message-ID: <MAN.92Nov28144558@imrryr.at>
Lines: 72
Sender: news@xs0001.at (USENET News System)
Nntp-Posting-Host: imrryr
Organization: Gemeinde Wien, MD-ADV/Md Ref. EPS
References: <19660@ucdavis.ucdavis.edu>
Date: Sat, 28 Nov 1992 13:46:01 GMT