From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 22777 invoked from network); 24 Sep 1998 15:46:36 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 24 Sep 1998 15:46:36 -0000 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id LAA15937 for ; Thu, 24 Sep 1998 11:46:54 -0400 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id JAA11620 for axp-list@redhat.com; Thu, 24 Sep 1998 09:46:14 -0600 From: Michal Jaegermann Message-Id: <199809241546.JAA11620@ellpspace.math.ualberta.ca> Subject: Re: imake/xmkmf on rh5.1 alpha, egcs1.1b To: axp-list@redhat.com Date: Thu, 24 Sep 1998 09:46:14 -0600 (MDT) In-Reply-To: from "Jeff Sturm" at Sep 24, 98 09:36:39 am Content-Type: text Jeff Sturm wrote: > > On Thu, 24 Sep 1998, Jochen Kuepper wrote: > > IIRC, only X11 needs /lib/cpp. > > OK, that's fine for systems with gcc, what about the others? > > There have been many packages which depend on /lib/cpp, not many are > still around (PostgreSQL still does, IIRC). AFAIK having /lib/cpp as a link to on of copies of a preprocessor which I happen to have around (one with every C compiler :-) serves the goal admirably. If this link does not exist then, for example, you will not see your host name in xdm login window. If you have some macros or defines in your ~/.Xdefaults they will be not preprocessed (this seems to be buggy in places anyway and you can force an explicit preprocessor with options to xrdb); and so on, and so on.... I indeed noticed that this link vanished, for some reason or another, on one of my Intel boxes after a Red Hat update. Maybe this was the problem Charles orignally had with xmkmf and vnc sources? Honestly, I used xmkmf on Alpha on multiple occasions, not only for vnc, and never noticed troubles he described. '/lib/cpp' is not a script calling 'gcc -E' on any of boxes I have around. An advantage of a script over this link is that you pick up a preprocessor from a compiler you are using as opposed to 'this preprocessor always'. So far I do not think that this matters. A disadvantage is that you have to be **really** careful how you write that script to make sure that all possible preprocessor flags they can show up are passed down by gcc to a preprocessor called. A trivial 'gcc -E $1', or even 'gcc -E $@', ***will not*** do!! Various programs expect, for example, that '-traditional' flag is present. With simple '#define THIS' only this does not matter. If something plays more complicated preprocessor games and you forgot to pass that flag, or maybe another, you will be for nasty surprises. Calls to cpp may be hidden inside of programs and you may not even be aware of them. 'xdm' provides an example. Michal