From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20312 invoked from network); 31 Jan 2000 22:41:33 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Jan 2000 22:41:33 -0000 Received: (qmail 17885 invoked by alias); 31 Jan 2000 22:41:09 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2898 Received: (qmail 17877 invoked from network); 31 Jan 2000 22:41:09 -0000 Date: Mon, 31 Jan 2000 23:40:42 +0100 From: Stefan Berglund To: zsh Users Subject: Re: Problem compiling on Sun SPARC 5 Message-ID: <20000131234042.A8335@dd.chalmers.se> Mail-Followup-To: zsh Users References: <000401bf6c36$26f6b740$450000c0@ken-moorley> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <000401bf6c36$26f6b740$450000c0@ken-moorley>; from kmoorley@cms.aust.com on Tue, Feb 01, 2000 at 08:57:22AM +1100 On Tue, Feb 01, 2000 at 08:57:22AM +1100, Ken Moorley wrote: > Can anyone help with the following compile error:- > > Solaris 2.6 on SPARCstation 5 > > gcc version 2.7.2.3 A tad old... These problems _might_ come from that the compiler is built with a older version of the OS. I have seen strange things with old gcc and newer versions of Solaris than it was built with. gcc is up at version 2.95.2 so it is time to upgrade anyway ;) If you don't want to build from source visit www.sunfreeware.com and grab a prebuilt solaris-package. > gcc -c -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -Wall > -Wno-implicit -Wmissing-prototypes -O2 -o builtin.o builtin.c > In file included from /usr/include/sys/wait.h:24, > from system.h:232, > from zsh.mdh:6, > from builtin.c:30: > /usr/include/sys/resource.h:148: warning: `struct rlimit64' declared inside > parameter list > /usr/include/sys/resource.h:148: warning: its scope is only this definition > or declaration, > /usr/include/sys/resource.h:148: warning: which is probably not what you > want. > /usr/include/sys/resource.h:149: warning: `struct rlimit64' declared inside > parameter list I looked at this include file and I don't see any problems with it unless struct rlimit64 is never declared. That might happen if _LARGEFILE64_SOURCE isn't defined as it should be and that _FILE_OFFSET_BITS is defined to 64. If this is the case the first encounter of struct rlimit64 is inside the prototypes at line 148 and 149 which makes the warnings understandable. This is probably not your real problem anyway. > builtin.c: In function `bin_cd': > builtin.c:714: invalid operands to binary != This is where it chokes, the rest is just warnings. It complains about that != haven't got valid operands, that is something that returns a value. This implies a bug/typo in the source, but I find that unlikely as most people here is probably compiling the same sources with gcc so it should have surfaced earlier. Look at line 714 in builtin.c and see if you can see what it's trying to do. BTW. which version did you try to compile? -- Stefan Berglund | sbl@dd.chalmers.se System Administrator @dd.chalmers.se | Tel: +46 31 772 32 43 Chalmers University of Technology, Engineering Physics ------------------------------------ Life - the ultimate practical joke | pgp key available from keyservers