From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 5709 invoked from network); 10 Nov 1998 04:31:55 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 10 Nov 1998 04:31:55 -0000 Received: from mail1.digital.com (mail1.digital.com [204.123.2.50]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id XAA06954 for ; Mon, 9 Nov 1998 23:17:00 -0500 Received: from msagps.msa.dec.com (msagps.msa.dec.com [16.157.64.33]) by mail1.digital.com (8.9.1a/8.9.1/WV2.0a) with SMTP id UAA06860 for ; Mon, 9 Nov 1998 20:16:54 -0800 (PST) Received: from dogbert.msa.dec.com by msagps.msa.dec.com (5.65v3.2/1.1.10.5/18Sep98-0341PM) id AA20286; Tue, 10 Nov 1998 12:09:43 +0800 Sender: chiaws@msa.dec.com Message-Id: <3647BE4B.2DC89988@msa.dec.com> Date: Tue, 10 Nov 1998 12:17:15 +0800 From: Wai-Sun Chia Organization: Internet Business Group/NSIS X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.1.115 i586) X-Accept-Language: en Mime-Version: 1.0 To: AXP-List Subject: More Apps porting to Alpha Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To anyone who tried to build WindowMaker on Alpha-Linux and failed, just so that you feel better, you're not alone! Actually, after a couple of hours of investigation and confirmation, here's my result: Kernel: v2.1.125 Egcs: 1.1b OS: RedHat 5.1, 5.2 Apparently EGCS craps out when a variable is defined as the arch name: i.e. alpha, i386, arm, m68k, mips, ppc, sparc, sparc64 I've confirmed it with i386 and alpha. To test yourself, try to compile the following simple program: ******************** try.c ********************* #include int main() { int alpha = 1; printf("alpha = %d\n", alpha); return 0; } ************************************************ You will get a "parse error before `1'". If you change alpha to nalpha or beta or anything other than alpha, then it'll work!!! Furthermore, if you s/alpha/i386/g in an Intel Linux box, guess what? Same problem!!! Perhaps the GCC/EGCS developers think that any programmer which defines a variable with the name as "i386" ought to be shot, but "alpha" is a pretty common variable. This is especially so in the graphics world where there is such a thing as an alpha-channel: in fact if you were to do a recursive grep in the WindowMaker sources, you'd be swamped! At first, I tried to rename the alpha variables to something else one by one, after the 10th file in the first subdirectory, I gave up. I tried to be smart and put this is the WindowMaker's system header file, "wraster.h" (this is WindowMaker 0.20.2): #define alpha wmalpha And voila! WM compiles OK! albeit tons and tons of warning messages, it runs too! But the graphics (icons and colors) and totally kaput! Apparently my "smart hack" changed the semantics of the system.... :-( This is what I see our options: 1. Make sure _ALL_ apps don't use arch names as variables (if cross-platform is important) 2. Ask politely GCC/EGCS developers to kindly remove this constraint from the compilers. I haven't sent any emails to neither GCC/EGCS nor WindowMaker developers. Want to see what other people think... BTW, libpng also suffers from this "alpha" variable syndrome.... -- Wai-Sun