Debian bug report logs - #1031 problem w/ gcc-2.7.0? Package: modules ; Reported by: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen); 131 days old . ----------------------------------------------------------------------- Message received at debian-bugs: From WI.LeidenUniv.NL!jdassen Tue Oct 10 03:14:10 1995 Return-Path: Received: from pixar.com by mongo.pixar.com with smtp (Smail3.1.28.1 #15) id m0t2bhJ-00061iC; Tue, 10 Oct 95 03:14 PDT Received: from mailhost.WI.LeidenUniv.NL (zeus128.wi.leidenuniv.nl) by pixar.com with SMTP id AA19088 (5.67b/IDA-1.5 for bruce@mongo.pixar.com); Tue, 10 Oct 1995 03:13:40 -0700 Received: from ind223c.wi.leidenuniv.nl (jdassen@ind223c [132.229.128.208]) by mailhost.WI.LeidenUniv.NL (8.6.10a/SBH-1.20.1-M) with ESMTP id LAA01715 Tue, 10 Oct 1995 11:13:58 +0100 (MET) From: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen) Organization: Leiden University, Dept. of Mathematics & Computer Science, The Netherlands Received: from (jdassen@localhost) by ind223c.wi.leidenuniv.nl (8.6.9/FHM-1.03-S) id KAA05236 Tue, 10 Oct 1995 10:13:57 GMT (MET) Message-Id: <199510101013.KAA05236@ind223c.wi.leidenuniv.nl> Subject: Re: Bug#1031: problem w/ gcc-2.7.0? To: debian-bugs@pixar.com, bruce@pixar.com Date: Tue, 10 Oct 1995 11:13:56 +0100 (MET) In-Reply-To: <9506280218.AA18565@rem.ods.com> from "David Engel" at Jun 27, 95 09:18:56 pm Return-Receipt-To: jdassen@WI.LeidenUniv.NL X-Home-Page: X-Mailer: ELM [version 2.4 PL24 (modified)] Content-Type: text Content-Length: 3330 David Engel wrote: > > Building modules-1.2.8-1 with elf-gcc 2.7.0 fails with a > > parse error: > > ... > > modprobe.c > > modprobe.c: In function `void verbose(const char * ...)': > > modprobe.c:22: parse error before `(' > > ... > > Is 'verbose' reserved in gcc 2.7.0? > > There is a missing ';' after the va_end in verbose(). The va_end > definition in gcc 2.6.3 is lax and doesn't result in an error. The > definition in gcc 2.7.0 is stricter and does result in an error. > > BTW, there is another problem with compiling modules with gcc 2.7.0. > Gcc 2.7.0 conforms to the latest ANSI C++ draft which changed the > scope of variables declared in for statements. Previously they > remained in scope until the end of the enclosing block. The now go > out of scope at the end of the for statement. There are a few places > in module.c and module2.c where variables are used after they go out > of scope. The change is to simply move the declaration before the for > statement. > > Ian M., since this problem is really with the modules package, I > believe this bug report now belongs to you. And now to Bruce. Here is a simple fix, which makes modules work with gcc-2.7.0, while keeping it working with a.out/2.6.3. -- cut me -- diff -r -u modules-1.2.8/depmod/config.c modules-1.2.8-fixed/depmod/config.c --- modules-1.2.8/depmod/config.c Wed May 31 08:47:20 1995 +++ modules-1.2.8-fixed/depmod/config.c Mon Oct 9 18:55:54 1995 @@ -398,8 +398,9 @@ */ void config_show () { + int i; PATH_TYPE *pttb = tb; - for (int i=0; itype != NULL){ printf ("path[%s]=%s\n",pttb->type,pttb->path); }else{ diff -r -u modules-1.2.8/depmod/modprobe.c modules-1.2.8-fixed/depmod/modprobe.c --- modules-1.2.8/depmod/modprobe.c Wed May 31 08:48:37 1995 +++ modules-1.2.8-fixed/depmod/modprobe.c Mon Oct 9 18:52:00 1995 @@ -18,7 +18,7 @@ va_list list; va_start (list,ctl); vprintf (ctl,list); - va_end (list) + va_end (list); fflush (stdout); } } diff -r -u modules-1.2.8/depmod/module.c modules-1.2.8-fixed/depmod/module.c --- modules-1.2.8/depmod/module.c Tue May 30 19:09:06 1995 +++ modules-1.2.8-fixed/depmod/module.c Mon Oct 9 18:53:57 1995 @@ -367,7 +367,8 @@ fprintf (fout,"%s %d\n",ptmod->name,ptmod->is_load); SYMBOL **ptpub = ptmod->pub.tb; int nbpub = ptmod->pub.nb; - for (int e=0; ename,ptsym->requis ,ptsym->defini,ptsym->vue_avant diff -r -u modules-1.2.8/depmod/module2.c modules-1.2.8-fixed/depmod/module2.c --- modules-1.2.8/depmod/module2.c Tue May 30 19:09:06 1995 +++ modules-1.2.8-fixed/depmod/module2.c Mon Oct 9 18:54:39 1995 @@ -40,8 +40,9 @@ } nberr++; }else{ + int m; if (strcmp(mod->name,dontcare)!=0){ - for (int m=0; m Received: from pixar.com by mongo.pixar.com with smtp (Smail3.1.28.1 #15) id m0sQmhL-0006KBC; Tue, 27 Jun 95 19:17 PDT Received: from istwok.ods.com by pixar.com with SMTP id AA16394 (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Tue, 27 Jun 1995 19:16:23 -0700 Received: from rem.ods.com by istwok.ods.com (4.1/SMI-4.1) id AA25923; Tue, 27 Jun 95 21:18:05 CDT Received: by rem.ods.com (4.1/SMI-4.1) id AA18565; Tue, 27 Jun 95 21:18:57 CDT From: david@rem.ods.com (David Engel) Message-Id: <9506280218.AA18565@rem.ods.com> Subject: Re: Bug#1031: problem w/ gcc-2.7.0? To: jdassen@WI.LeidenUniv.NL, imurdock@debian.org Date: Tue, 27 Jun 1995 21:18:56 -0500 (CDT) Cc: debian-bugs@pixar.com In-Reply-To: <199506220833.IAA20618@ind156a.wi.leidenuniv.nl> from "J.H.M.Dassen" at Jun 22, 95 10:33:15 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1261 > Package: elf-gcc > Version: 2.7.0 > > Building modules-1.2.8-1 with elf-gcc 2.7.0 fails with a > parse error: > ... > modprobe.c > modprobe.c: In function `void verbose(const char * ...)': > modprobe.c:22: parse error before `(' > ... > Is 'verbose' reserved in gcc 2.7.0? There is a missing ';' after the va_end in verbose(). The va_end definition in gcc 2.6.3 is lax and doesn't result in an error. The definition in gcc 2.7.0 is stricter and does result in an error. BTW, there is another problem with compiling modules with gcc 2.7.0. Gcc 2.7.0 conforms to the latest ANSI C++ draft which changed the scope of variables declared in for statements. Previously they remained in scope until the end of the enclosing block. The now go out of scope at the end of the for statement. There are a few places in module.c and module2.c where variables are used after they go out of scope. The change is to simply move the declaration before the for statement. Ian M., since this problem is really with the modules package, I believe this bug report now belongs to you. David -- David Engel Optical Data Systems, Inc. david@ods.com 1101 E. Arapaho Road (214) 234-6400 Richardson, TX 75081 ----------------------------------------------------------------------- Acknowledgement sent to david@rem.ods.com (David Engel) : Extra info received and forwarded. Full text available. ----------------------------------------------------------------------- Information forwarded to debian-devel@pixar.com : Bug#1031 ; Package elf-gcc . Full text available. ----------------------------------------------------------------------- Message received at debian-bugs: From WI.LeidenUniv.NL!jdassen Thu Jun 22 01:35:40 1995 Return-Path: Received: from pixar.com by mongo.pixar.com with smtp (Smail3.1.28.1 #15) id m0sOhjf-0005z9C; Thu, 22 Jun 95 01:35 PDT Received: from mailhost.WI.LeidenUniv.NL (zeus128.wi.leidenuniv.nl) by pixar.com with SMTP id AA09314 (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 22 Jun 1995 01:34:05 -0700 Received: from ind156a.wi.leidenuniv.nl (jdassen@ind156a [132.229.128.220]) by mailhost.WI.LeidenUniv.NL (8.6.10a/FHM-1.20-M) with ESMTP id KAA14754 for ; Thu, 22 Jun 1995 10:35:31 +0200 (MET) From: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen) Organization: Leiden University, Dept. of Mathematics & Computer Science, The Netherlands Received: from (jdassen@localhost) by ind156a.wi.leidenuniv.nl (8.6.9/FHM-1.03-S) id IAA20618 for debian-bugs@pixar.com; Thu, 22 Jun 1995 08:33:15 GMT (MET) Message-Id: <199506220833.IAA20618@ind156a.wi.leidenuniv.nl> Subject: problem w/ gcc-2.7.0? To: debian-bugs@pixar.com Date: Thu, 22 Jun 1995 10:33:15 +0200 (MDT) Return-Receipt-To: jdassen@WI.LeidenUniv.NL X-Home-Page: X-Mailer: ELM [version 2.4 PL24 (modified)] Content-Type: text Content-Length: 5783 Package: elf-gcc Version: 2.7.0 Building modules-1.2.8-1 with elf-gcc 2.7.0 fails with a parse error: -- ./debian.rules binary log (ELF, gcc 2.7.0) -- test -f stamp-build || make -f debian.rules build make[1]: Entering directory `/exp/build/zooi5/modules-1.2.8' make CC="gcc" CFLAGS="-O2" LDFLAGS="-s" make[2]: Entering directory `/exp/build/zooi5/modules-1.2.8' make[3]: Entering directory `/exp/build/zooi5/modules-1.2.8/insmod' gcc -O2 -c insmod.c -o insmod.o gcc -O2 -c load_aout.c -o load_aout.o gcc -O2 -c load_elf.c -o load_elf.o gcc -O2 -c error.c -o error.o gcc -s insmod.o load_aout.o load_elf.o error.o -o insmod cat lsmod.sh >lsmod chmod a+x lsmod for i in rmmod ksyms; do ln -sf insmod $i; done make[3]: Leaving directory `/exp/build/zooi5/modules-1.2.8/insmod' make[3]: Entering directory `/exp/build/zooi5/modules-1.2.8/genksyms' flex -l symlex.l mv lex.yy.c symlex.c gcc -c -m486 -O2 symlex.c gcc -O2 -s makecrc32.c -o makecrc32 ./makecrc32 > crc32.tab gcc -O2 -c parsesym.c -o parsesym.o gcc -O2 -N -o genksyms symlex.o parsesym.o make[3]: Leaving directory `/exp/build/zooi5/modules-1.2.8/genksyms' make[3]: Entering directory `/exp/build/zooi5/modules-1.2.8/depmod' main.c depmod.c modprobe.c modprobe.c: In function `void verbose(const char * ...)': modprobe.c:22: parse error before `(' modprobe.c: In method `int DEPEND::insmod(const char *, class NODE **, char **)': modprobe.c:305: warning: suggest parentheses around assignment used as truth value make[3]: *** [modprobe.o] Error 1 make[3]: Leaving directory `/exp/build/zooi5/modules-1.2.8/depmod' make[2]: *** [all] Error 2 make[2]: Leaving directory `/exp/build/zooi5/modules-1.2.8' make[1]: *** [build] Error 2 make[1]: Leaving directory `/exp/build/zooi5/modules-1.2.8' make: *** [binary] Error 2 -- end -- Is 'verbose' reserved in gcc 2.7.0? The a.out build w/ gcc 2.6.3. goes fine: -- ./debian.rules binary log (a.out, gcc 2.6.3) -- test -f stamp-build || make -f debian.rules build make[1]: Entering directory `/exp/build/zooi5/modules-1.2.8' make CC="gcc" CFLAGS="-O2" LDFLAGS="-s" make[2]: Entering directory `/exp/build/zooi5/modules-1.2.8' make[3]: Entering directory `/exp/build/zooi5/modules-1.2.8/insmod' gcc -O2 -c insmod.c -o insmod.o gcc -O2 -c load_aout.c -o load_aout.o gcc -O2 -c load_elf.c -o load_elf.o gcc -O2 -c error.c -o error.o gcc -s insmod.o load_aout.o load_elf.o error.o -o insmod cat lsmod.sh >lsmod chmod a+x lsmod for i in rmmod ksyms; do ln -sf insmod $i; done make[3]: Leaving directory `/exp/build/zooi5/modules-1.2.8/insmod' make[3]: Entering directory `/exp/build/zooi5/modules-1.2.8/genksyms' flex -l symlex.l mv lex.yy.c symlex.c gcc -c -m486 -O2 symlex.c gcc -O2 -s makecrc32.c -o makecrc32 ./makecrc32 > crc32.tab gcc -O2 -c parsesym.c -o parsesym.o gcc -O2 -N -o genksyms symlex.o parsesym.o make[3]: Leaving directory `/exp/build/zooi5/modules-1.2.8/genksyms' make[3]: Entering directory `/exp/build/zooi5/modules-1.2.8/depmod' main.c depmod.c modprobe.c error.c module.c module2.c symbol.c alloctxt.c str.c config.c config1.c fgets.c cc -N -s -o modprobe main.o depmod.o modprobe.o error.o module.o module2.o symbol.o alloctxt.o str.o config.o config1.o fgets.o ln -fs modprobe depmod make[3]: Leaving directory `/exp/build/zooi5/modules-1.2.8/depmod' make[2]: Leaving directory `/exp/build/zooi5/modules-1.2.8' touch stamp-build make[1]: Leaving directory `/exp/build/zooi5/modules-1.2.8' install -d -g root -m 755 -o root debian-tmp chmod g-s debian-tmp install -d -g root -m 755 -o root debian-tmp/DEBIAN install -d -g root -m 755 -o root debian-tmp/etc install -g root -m 644 -o root modules \ debian-tmp/etc/modules install -d -g root -m 755 -o root debian-tmp/etc/init.d install -g root -m 755 -o root rc.modules \ debian-tmp/etc/init.d/modules install -d -g root -m 755 -o root debian-tmp/sbin install -g root -m 755 -o root insmod/insmod \ debian-tmp/sbin/insmod ln -f debian-tmp/sbin/insmod debian-tmp/sbin/ksyms install -g root -m 755 -o root insmod/lsmod \ debian-tmp/sbin/lsmod ln -f debian-tmp/sbin/insmod debian-tmp/sbin/rmmod install -g root -m 755 -o root depmod/depmod \ debian-tmp/sbin/depmod ( cd debian-tmp/sbin && ln -s depmod modprobe ) install -d -g root -m 755 -o root debian-tmp/usr/bin install -g root -m 755 -o root genksyms/genksyms \ debian-tmp/usr/bin/genksyms install -d -g root -m 755 -o root debian-tmp/usr/man/man1 install -g root -m 644 -o root depmod/depmod.1 insmod/insmod.1 \ insmod/ksyms.1 insmod/lsmod.1 insmod/rmmod.1 debian-tmp/usr/man/man1 ( cd debian-tmp/usr/man/man1 && ln -s depmod.1 modprobe.1 ) install -d -g root -m 755 -o root debian-tmp/usr/man/man2 install -g root -m 644 -o root insmod/modules.2 \ debian-tmp/usr/man/man2 install -d -g root -m 755 -o root debian-tmp/usr/man/man5 install -g root -m 644 -o root modules.5 \ debian-tmp/usr/man/man5 install -d -g root -m 755 -o root debian-tmp/usr/man/man8 install -g root -m 644 -o root genksyms/genksyms.8 \ debian-tmp/usr/man/man8 install -d -g root -m 755 -o root debian-tmp/usr/doc/copyright install -g root -m 644 -o root debian.README \ debian-tmp/usr/doc/copyright/modules sed -e '4s/=V/1.2.8/' -e '5s/=D/1/' debian.control \ > debian-tmp/DEBIAN/control chmod 644 debian-tmp/DEBIAN/control install -g root -m 644 -o root debian.conffiles \ debian-tmp/DEBIAN/conffiles dpkg --build debian-tmp dpkg-deb: building package `modules' in `debian-tmp.deb'. mv debian-tmp.deb ../modules-1.2.8-1.deb -- end -- Regards, Ray -- LEADERSHIP A form of self-preservation exhibited by people with auto- destructive imaginations in order to ensure that when it comes to the crunch it'll be someone else's bones which go crack and not their own. - The Hipcrime Vocab by Chad C. Mulligan ----------------------------------------------------------------------- Acknowledgement sent to jdassen@WI.LeidenUniv.NL (J.H.M.Dassen) : New bug report received and forwarded. Full text available. ----------------------------------------------------------------------- Report forwarded to debian-devel@pixar.com : Bug#1031 ; Package elf-gcc . Full text available. ----------------------------------------------------------------------- Ian Jackson / iwj10@thor.cam.ac.uk , with the debian-bugs tracking mechanism This page last modified 07:43:01 GMT Wed 01 Nov