modutils: FTBFS with gcc-4.0: invalid lvalue in assignment

Bug #15336 reported by Debian Bug Importer
6
Affects Status Importance Assigned to Milestone
gcc-4.0 (Debian)
Fix Released
Unknown
gcc-4.0 (Ubuntu)
Fix Released
High
Charles Majola

Bug Description

Automatically imported from Debian bug report #282672 http://bugs.debian.org/282672

Revision history for this message
In , LaMont Jones (lamont) wrote : Re: Bug#282672: modutils: FTBFS with gcc-4.0: invalid lvalue in assignment

On Tue, Nov 23, 2004 at 07:38:53PM +0100, Andreas Jochens wrote:
> -static int errors;
> +static int _errors;

Variables beginning with _ are reserved for "the implementation".
You're suggesting that I create problems for myself down the road.

Which leads to the question of why gcc-4.0 is polluting the namespace.

lamont

Revision history for this message
In , Andreas Jochens (aj-andaco) wrote :

On 04-Nov-23 11:53, LaMont Jones wrote:
> On Tue, Nov 23, 2004 at 07:38:53PM +0100, Andreas Jochens wrote:
> > -static int errors;
> > +static int _errors;
>
> Variables beginning with _ are reserved for "the implementation".
> You're suggesting that I create problems for myself down the road.
>
> Which leads to the question of why gcc-4.0 is polluting the namespace.

Yes, this is strange. Perhaps this is a bug in gcc-4.0. I did not yet
investigate this further.

Regards
Andreas Jochens

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #282672 http://bugs.debian.org/282672

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (4.1 KiB)

Message-Id: <email address hidden>
Date: Tue, 23 Nov 2004 19:38:53 +0100
From: Andreas Jochens <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: modutils: FTBFS with gcc-4.0: invalid lvalue in assignment

Package: modutils
Severity: normal
Tags: patch

When building 'modutils' with gcc-4.0 I get the following error:

gcc -g -O2 -I../../../obj/../include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DCONFIG_ROOT_CHECK_OFF=0 -DCOMMON_3264 -DELF_MACHINE_H='"elf_i386.h"' -DARCH_i386 -DONLY_32 -c -o obj_kallsyms.o ../../../obj/obj_kallsyms.c
In file included from ../../../obj/obj_kallsyms.c:26:
../../../obj/../include/util.h:42: warning: built-in function 'log' declared as non-function
../../../obj/obj_kallsyms.c: In function 'obj32_kallsyms':
../../../obj/obj_kallsyms.c:204: error: invalid lvalue in assignment
../../../obj/obj_kallsyms.c:279: error: invalid lvalue in assignment
make[2]: *** [obj_kallsyms.o] Error 1
make[2]: Leaving directory `/modutils-2.4.26/debian/build/obj'

With the attached patch 'modutils' can be compiled using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/modutils-2.4.26/depmod/depmod.c ./depmod/depmod.c
--- ../tmp-orig/modutils-2.4.26/depmod/depmod.c 2003-03-23 02:34:28.000000000 +0000
+++ ./depmod/depmod.c 2004-11-23 18:32:04.459866296 +0000
@@ -1133,7 +1133,7 @@

   for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) {
    if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0)
- ((char *)ksym->name) += 8;
+ ksym->name = ((char *)ksym->name) + 8;
    assert(n_syms < MAX_MAP_SYM);
    symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0);
   }
diff -urN ../tmp-orig/modutils-2.4.26/genksyms/genksyms.c ./genksyms/genksyms.c
--- ../tmp-orig/modutils-2.4.26/genksyms/genksyms.c 2002-03-01 00:39:06.000000000 +0000
+++ ./genksyms/genksyms.c 2004-11-23 18:31:25.779746568 +0000
@@ -45,7 +45,7 @@
 int flag_debug, flag_dump_defs, flag_warnings;
 int checksum_version = 1, kernel_version = version(2,0,0);

-static int errors;
+static int _errors;
 static int nsyms;

 static struct symbol *expansion_trail;
@@ -458,7 +458,7 @@
       va_end(args);
       putc('\n', stderr);

- errors++;
+ _errors++;
     }
 }

@@ -476,7 +476,7 @@
       va_end(args);
       putc('\n', stderr);

- errors++;
+ _errors++;
     }
 }

@@ -597,5 +597,5 @@
        nsyms, HASH_BUCKETS, (double)nsyms / (double)HASH_BUCKETS);
     }

- return errors != 0;
+ return _errors != 0;
 }
diff -urN ../tmp-orig/modutils-2.4.26/insmod/insmod.c ./insmod/insmod.c
--- ../tmp-orig/modutils-2.4.26/insmod/insmod.c 2003-10-27 02:34:46.000000000 +0000
+++ ./insmod/insmod.c 2004-11-23 17:52:48.000000000 +0000
@@ -275,7 +275,7 @@
   if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
    gplonly_seen = 1;
    if (gpl)
- ((char *)s->name) += 8;
+ s->name = ((char *)s->name) + 8;
    else
     continue;
   }
diff -urN ../tmp-orig/modutils-2.4.26/obj/obj_kallsyms.c ./obj/obj_kallsyms.c
--- ../tmp-orig/modutils-2.4.26/obj/obj_kallsyms.c 2002-03-01 00:39:06.000000000 +0000
+++ ./obj/obj_kalls...

Read more...

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 23 Nov 2004 11:53:16 -0700
From: LaMont Jones <email address hidden>
To: Andreas Jochens <email address hidden>, <email address hidden>
Subject: Re: Bug#282672: modutils: FTBFS with gcc-4.0: invalid lvalue in assignment

On Tue, Nov 23, 2004 at 07:38:53PM +0100, Andreas Jochens wrote:
> -static int errors;
> +static int _errors;

Variables beginning with _ are reserved for "the implementation".
You're suggesting that I create problems for myself down the road.

Which leads to the question of why gcc-4.0 is polluting the namespace.

lamont

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 23 Nov 2004 20:08:17 +0100
From: Andreas Jochens <email address hidden>
To: LaMont Jones <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#282672: modutils: FTBFS with gcc-4.0: invalid lvalue in assignment

On 04-Nov-23 11:53, LaMont Jones wrote:
> On Tue, Nov 23, 2004 at 07:38:53PM +0100, Andreas Jochens wrote:
> > -static int errors;
> > +static int _errors;
>
> Variables beginning with _ are reserved for "the implementation".
> You're suggesting that I create problems for myself down the road.
>
> Which leads to the question of why gcc-4.0 is polluting the namespace.

Yes, this is strange. Perhaps this is a bug in gcc-4.0. I did not yet
investigate this further.

Regards
Andreas Jochens

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

AS reported in the bug and by lamont, this seems to be a bug in gcc-4.0

Revision history for this message
In , LaMont Jones (lamont) wrote : Bug#282672: fixed in modutils 2.4.27.0-1
Download full text (8.3 KiB)

Source: modutils
Source-Version: 2.4.27.0-1

We believe that the bug you reported is fixed in the latest version of
modutils, which is due to be installed in the Debian FTP archive:

modutils-basic_2.4.27.0-1_i386.udeb
  to pool/main/m/modutils/modutils-basic_2.4.27.0-1_i386.udeb
modutils-full_2.4.27.0-1_i386.udeb
  to pool/main/m/modutils/modutils-full_2.4.27.0-1_i386.udeb
modutils_2.4.27.0-1.diff.gz
  to pool/main/m/modutils/modutils_2.4.27.0-1.diff.gz
modutils_2.4.27.0-1.dsc
  to pool/main/m/modutils/modutils_2.4.27.0-1.dsc
modutils_2.4.27.0-1_i386.deb
  to pool/main/m/modutils/modutils_2.4.27.0-1_i386.deb
modutils_2.4.27.0.orig.tar.gz
  to pool/main/m/modutils/modutils_2.4.27.0.orig.tar.gz

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
LaMont Jones <email address hidden> (supplier of updated modutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 13 Apr 2005 15:38:16 -0600
Source: modutils
Binary: modutils-full modutils-basic modutils
Architecture: i386 source
Version: 2.4.27.0-1
Distribution: unstable
Urgency: low
Maintainer: LaMont Jones <email address hidden>
Changed-By: LaMont Jones <email address hidden>
Description:
 modutils - Linux module utilities
 modutils-basic - Basic Linux module utilities for debian-installer
 modutils-full - More complete Linux module utilities for debian-installer
Closes: 41801 54967 54999 69754 70557 76209 90486 110732 116162 118647 132401 140776 146819 150423 150423 150423 159708 160454 165098 166531 166713 166943 173746 173938 174181 194502 203578 206205 210516 215855 219206 220382 225087 228031 228258 228258 228688 230020 243681 253508 262941 262941 263224 267112 272581 282672 284960
Changes:
 modutils (2.4.27.0-1) unstable; urgency=low
 .
   * New upstream version. Sadly, a different orig.tar.gz was uploaded
     to experimental, so this gets to be 2.4.27.0.
     - Ambiguous or invalid backslash in insmod.8. Eric S. Raymond.
     - Move alias loop check higher up. Sergey Vlasov.
     - Correct alias for pg, it is a char, not block device. Sergey Vlasov.
     - obj-arm plt/got bugfix. Thomas Fleischmann.
     - Only default to combined i386 if the user has x86_64 ELF headers.
     - Update INSTALL and README.
     - Reorder configure.in to move tests that require gcc to after gcc is
       defined.
   * Fix confusing warning at startup. Closes: #228258
   * acknowledge NMU. Closes: #284960, #262941
   * Fix left-hand casts in assginments. Closes: #282672
 .
   Changes from Javier Fernandez-Sanguino Pen~a <email address hidden>:
     [util/alias.h]
     . Included RedHat's patch that modifies the behaviour of
       modprobe for some systems that do not provide a floppy disk
       (like s390, powerpc...)
     . Up...

Read more...

Revision history for this message
In , LaMont Jones (lamont) wrote : Bug#282672: fixed in modutils 2.4.27.0-2

Source: modutils
Source-Version: 2.4.27.0-2

We believe that the bug you reported is fixed in the latest version of
modutils, which is due to be installed in the Debian FTP archive:

modutils-basic_2.4.27.0-2_i386.udeb
  to pool/main/m/modutils/modutils-basic_2.4.27.0-2_i386.udeb
modutils-full_2.4.27.0-2_i386.udeb
  to pool/main/m/modutils/modutils-full_2.4.27.0-2_i386.udeb
modutils_2.4.27.0-2.diff.gz
  to pool/main/m/modutils/modutils_2.4.27.0-2.diff.gz
modutils_2.4.27.0-2.dsc
  to pool/main/m/modutils/modutils_2.4.27.0-2.dsc
modutils_2.4.27.0-2_i386.deb
  to pool/main/m/modutils/modutils_2.4.27.0-2_i386.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
LaMont Jones <email address hidden> (supplier of updated modutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 20 Apr 2005 23:29:32 -0600
Source: modutils
Binary: modutils-full modutils-basic modutils
Architecture: i386 source
Version: 2.4.27.0-2
Distribution: unstable
Urgency: low
Maintainer: LaMont Jones <email address hidden>
Changed-By: LaMont Jones <email address hidden>
Description:
 modutils - Linux module utilities
 modutils-basic - Basic Linux module utilities for debian-installer
 modutils-full - More complete Linux module utilities for debian-installer
Closes: 282672
Changes:
 modutils (2.4.27.0-2) unstable; urgency=low
 .
   * gcc-4.0 fixes. Closes: #282672
Files:
 428389ffa5fd13471b630fec1f399437 52828 debian-installer extra modutils-basic_2.4.27.0-2_i386.udeb
 44ed5a6ea4c6b226ec70c54dd7dfa86f 235416 base required modutils_2.4.27.0-2_i386.deb
 5fd8fcb903cb1d8c4b4e27db551992e7 37586 base required modutils_2.4.27.0-2.diff.gz
 759b67958ce7bc65961bafe061791862 634 base required modutils_2.4.27.0-2.dsc
 f326f87fcd21a0feb51869bfde935728 85898 debian-installer extra modutils-full_2.4.27.0-2_i386.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCZzsIzN/kmwoKyScRAiHHAKCA/9lHR8cj2u8FAqclC6Vhqo3mngCeMwR6
h/0L4b3hKm7DniO6+ipThWM=
=IgiO
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (8.5 KiB)

Message-Id: <email address hidden>
Date: Thu, 14 Apr 2005 10:02:11 -0400
From: LaMont Jones <email address hidden>
To: <email address hidden>
Subject: Bug#282672: fixed in modutils 2.4.27.0-1

Source: modutils
Source-Version: 2.4.27.0-1

We believe that the bug you reported is fixed in the latest version of
modutils, which is due to be installed in the Debian FTP archive:

modutils-basic_2.4.27.0-1_i386.udeb
  to pool/main/m/modutils/modutils-basic_2.4.27.0-1_i386.udeb
modutils-full_2.4.27.0-1_i386.udeb
  to pool/main/m/modutils/modutils-full_2.4.27.0-1_i386.udeb
modutils_2.4.27.0-1.diff.gz
  to pool/main/m/modutils/modutils_2.4.27.0-1.diff.gz
modutils_2.4.27.0-1.dsc
  to pool/main/m/modutils/modutils_2.4.27.0-1.dsc
modutils_2.4.27.0-1_i386.deb
  to pool/main/m/modutils/modutils_2.4.27.0-1_i386.deb
modutils_2.4.27.0.orig.tar.gz
  to pool/main/m/modutils/modutils_2.4.27.0.orig.tar.gz

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
LaMont Jones <email address hidden> (supplier of updated modutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 13 Apr 2005 15:38:16 -0600
Source: modutils
Binary: modutils-full modutils-basic modutils
Architecture: i386 source
Version: 2.4.27.0-1
Distribution: unstable
Urgency: low
Maintainer: LaMont Jones <email address hidden>
Changed-By: LaMont Jones <email address hidden>
Description:
 modutils - Linux module utilities
 modutils-basic - Basic Linux module utilities for debian-installer
 modutils-full - More complete Linux module utilities for debian-installer
Closes: 41801 54967 54999 69754 70557 76209 90486 110732 116162 118647 132401 140776 146819 150423 150423 150423 159708 160454 165098 166531 166713 166943 173746 173938 174181 194502 203578 206205 210516 215855 219206 220382 225087 228031 228258 228258 228688 230020 243681 253508 262941 262941 263224 267112 272581 282672 284960
Changes:
 modutils (2.4.27.0-1) unstable; urgency=low
 .
   * New upstream version. Sadly, a different orig.tar.gz was uploaded
     to experimental, so this gets to be 2.4.27.0.
     - Ambiguous or invalid backslash in insmod.8. Eric S. Raymond.
     - Move alias loop check higher up. Sergey Vlasov.
     - Correct alias for pg, it is a char, not block device. Sergey Vlasov.
     - obj-arm plt/got bugfix. Thomas Fleischmann.
     - Only default to combined i386 if the user has x86_64 ELF headers.
     - Update INSTALL and README.
     - Reorder configure.in to move tests that require gcc to after gcc is
       defined.
   * Fix confusing warning at startup. Closes: #228258
   * acknowledge NMU. Closes: #284960, #262941
   * Fix left-hand casts in assginments. Closes: #282672
 .
   Changes from Javier Fernandez-Sanguino Pen...

Read more...

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Thu, 21 Apr 2005 01:47:08 -0400
From: LaMont Jones <email address hidden>
To: <email address hidden>
Subject: Bug#282672: fixed in modutils 2.4.27.0-2

Source: modutils
Source-Version: 2.4.27.0-2

We believe that the bug you reported is fixed in the latest version of
modutils, which is due to be installed in the Debian FTP archive:

modutils-basic_2.4.27.0-2_i386.udeb
  to pool/main/m/modutils/modutils-basic_2.4.27.0-2_i386.udeb
modutils-full_2.4.27.0-2_i386.udeb
  to pool/main/m/modutils/modutils-full_2.4.27.0-2_i386.udeb
modutils_2.4.27.0-2.diff.gz
  to pool/main/m/modutils/modutils_2.4.27.0-2.diff.gz
modutils_2.4.27.0-2.dsc
  to pool/main/m/modutils/modutils_2.4.27.0-2.dsc
modutils_2.4.27.0-2_i386.deb
  to pool/main/m/modutils/modutils_2.4.27.0-2_i386.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
LaMont Jones <email address hidden> (supplier of updated modutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 20 Apr 2005 23:29:32 -0600
Source: modutils
Binary: modutils-full modutils-basic modutils
Architecture: i386 source
Version: 2.4.27.0-2
Distribution: unstable
Urgency: low
Maintainer: LaMont Jones <email address hidden>
Changed-By: LaMont Jones <email address hidden>
Description:
 modutils - Linux module utilities
 modutils-basic - Basic Linux module utilities for debian-installer
 modutils-full - More complete Linux module utilities for debian-installer
Closes: 282672
Changes:
 modutils (2.4.27.0-2) unstable; urgency=low
 .
   * gcc-4.0 fixes. Closes: #282672
Files:
 428389ffa5fd13471b630fec1f399437 52828 debian-installer extra modutils-basic_2.4.27.0-2_i386.udeb
 44ed5a6ea4c6b226ec70c54dd7dfa86f 235416 base required modutils_2.4.27.0-2_i386.deb
 5fd8fcb903cb1d8c4b4e27db551992e7 37586 base required modutils_2.4.27.0-2.diff.gz
 759b67958ce7bc65961bafe061791862 634 base required modutils_2.4.27.0-2.dsc
 f326f87fcd21a0feb51869bfde935728 85898 debian-installer extra modutils-full_2.4.27.0-2_i386.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCZzsIzN/kmwoKyScRAiHHAKCA/9lHR8cj2u8FAqclC6Vhqo3mngCeMwR6
h/0L4b3hKm7DniO6+ipThWM=
=IgiO
-----END PGP SIGNATURE-----

Revision history for this message
Charles Majola (chmj) wrote :

Fixed in new version

Changed in gcc-4.0:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.