Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80588 - sys-apps/module-init-tools-3.1 doesn't compile with GCC 4
Summary: sys-apps/module-init-tools-3.1 doesn't compile with GCC 4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
: 80610 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-03 07:58 UTC by Radoslaw Szkodzinski
Modified: 2005-02-18 12:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Radoslaw Szkodzinski 2005-02-03 07:58:28 UTC
Info the same as earlier...

Build output:
i686-pc-linux-gnu-gcc -O2 -march=athlon-xp -pipe -I./../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_common.o obj_common.c
In file included from obj_kallsyms.c:26:
./../include/util.h:43: warning: built-in function 
Comment 1 Radoslaw Szkodzinski 2005-02-03 07:58:28 UTC
Info the same as earlier...

Build output:
i686-pc-linux-gnu-gcc -O2 -march=athlon-xp -pipe -I./../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_common.o obj_common.c
In file included from obj_kallsyms.c:26:
./../include/util.h:43: warning: built-in function log declared as non-function
In file included from obj_common.c:28:
./../include/util.h:43: warning: built-in function log declared as non-function
obj_kallsyms.c: In function obj32_kallsyms:
obj_kallsyms.c:204: error: invalid lvalue in assignment
obj_kallsyms.c:279: error: invalid lvalue in assignment
make[1]: *** [obj_kallsyms.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/module-init-tools-3.1/work/modutils-2.4.27/obj'
make: *** [all] Error 2

!!! ERROR: sys-apps/module-init-tools-3.1 failed.
!!! Function src_compile, Line 88, Exitcode 2
!!! emake modutils failed
!!! If you need support, post the topmost build error, NOT this status message.
Comment 2 SpanKY gentoo-dev 2005-02-03 08:46:18 UTC
please provide a patch to resolve the issue
Comment 3 Radoslaw Szkodzinski 2005-02-03 11:08:27 UTC
*** Bug 80610 has been marked as a duplicate of this bug. ***
Comment 4 Radoslaw Szkodzinski 2005-02-03 11:36:19 UTC
From http://debian-amd64.alioth.debian.org/patches/current/modutils_2.4.26-1.2.0.0.1.gcc4.patch

Here thy go:
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_kallsyms.c	2004-11-30 09:54:52.000000000 +0000
@@ -200,8 +200,8 @@
 
     /* Initial contents, header + one entry per input section.  No strings. */
     osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
-    a_hdr = (struct kallsyms_header *) osec->contents =
-    	xmalloc(osec->header.sh_size);
+    osec->contents = xmalloc(osec->header.sh_size);
+    a_hdr = (struct kallsyms_header *) osec->contents;
     memset(osec->contents, 0, osec->header.sh_size);
     a_hdr->size = sizeof(*a_hdr);
     a_hdr->sections = loaded;
@@ -275,8 +275,8 @@
 	a_hdr->symbol_off +
 	a_hdr->symbols*a_hdr->symbol_size +
 	strings_size - strings_left;
-    a_hdr = (struct kallsyms_header *) osec->contents =
-	xrealloc(a_hdr, a_hdr->total_size);
+    osec->contents = xrealloc(a_hdr, a_hdr->total_size);
+    a_hdr = (struct kallsyms_header *) osec->contents;
     p = (char *)a_hdr + a_hdr->symbol_off;
     memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
     free(symbols);
diff -urN ../tmp-orig/modutils-2.4.26/obj/obj_ppc.c ./obj/obj_ppc.c
--- ../tmp-orig/modutils-2.4.26/obj/obj_ppc.c	2002-03-01 00:39:06.000000000 +0000
+++ ./obj/obj_ppc.c	2004-11-30 09:55:50.000000000 +0000
@@ -255,7 +255,8 @@
   archdata_sec->header.sh_size = 0;
   sec = obj_find_section(f, "__ftr_fixup");
   if (sec) {
-    ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));
+    archdata_sec->contents = xmalloc(sizeof(*ad));
+    ad = (struct archdata *) (archdata_sec->contents);
     memset(ad, 0, sizeof(*ad));
     archdata_sec->header.sh_size = sizeof(*ad);
     ad->__start___ftr_fixup = sec->header.sh_addr;
Comment 5 Radoslaw Szkodzinski 2005-02-03 11:39:54 UTC
Nope - The full patch is needed, link above.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2005-02-05 16:21:44 UTC
Just adding a "Works for me" for the linked to patch.
Comment 7 Tony Vroon (RETIRED) gentoo-dev 2005-02-18 12:02:38 UTC
In CVS, thanks for your report. Please give the change two hours to propagate before syncing your portage tree.