Skip to contentSkip to conversation

RH7.3 can't compile 2.6.0-test8

DISCUSSION [email protected] 5 participants 6 messages Oct 21, 2003 – Oct 22, 2003 Proc filesystem

lore
Share & tools
lore
#0 lore raw
Quoted 1 line

The Readme for 2.6.0-test6 still said that gcc 2.95 is required

test8 Changes still says gcc-2.95.3. I saw the same compile error on RedHat 7.2. I ended up using gcc-3.3.1. Later I saw this patch:

http://marc.theaimsgroup.com/?l=linux-kernel&m=106651554401143&w=2

It's supposed to fix test8 compile with gcc-2.96 for RedHat 7.x.

Signature · 2 lines
Randy Hron
http://home.earthlink.net/~rwhron/kernel/bigbox.html
#1 lore raw

Op dinsdag 21 oktober 2003 om 09:19 uur schreef [email protected] het volgende:

Quoted 8 lines
Quoted 1 line

The Readme for 2.6.0-test6 still said that gcc 2.95 is required

test8 Changes still says gcc-2.95.3. I saw the same compile error on RedHat 7.2. I ended up using gcc-3.3.1. Later I saw this patch:

http://marc.theaimsgroup.com/?l=linux-kernel&m=106651554401143&w=2

It's supposed to fix test8 compile with gcc-2.96 for RedHat 7.x.

It seems an odd fix though, the variable tty_nr is at most set once inside the function, and is inaccessible to other functions so why it should be volatile seems unclear to me. It might solve the compilation (now that I look again the original error messages mention gcc internal representation, so the suggestion of binutils at fault seems unwarranted) but that seems by accident, not by design?

Perhaps if the huge sprintf with 40+ arguments (fs/proc/array.c, line 346) amongst which several trinary operators, were to be split up into several parts, might that not solve the problem more elegantly?

Signature · 1 line
Marco Roeland
#2 lore raw

Re: [PATCH] RH7.3 can't compile 2.6.0-test8 (fs/proc/array.c)

Quoted 7 lines · On Tuesday October 21st 2003 at 15:52 uur Marco Roeland wrote:
Quoted 3 lines

http://marc.theaimsgroup.com/?l=linux-kernel&m=106651554401143&w=2

It's supposed to fix test8 compile with gcc-2.96 for RedHat 7.x.

Perhaps if the huge sprintf with 40+ arguments (fs/proc/array.c, line 346) amongst which several trinary operators, were to be split up into several parts, might that not solve the problem more elegantly?

Does this compile (and work) for any of you friendly RedHat 7.[23] users? In 2.6.0-test8 yet another argument was added to the monstrous sprintf. Perhaps this was just the droplet to overflow gcc-2.96's buckets? Here we split it into 3 distinct parts.

fs/proc/array.c renamed from fs/proc/array.c.orig +5 -5
@@ -343,9 +343,7 @@
 	read_lock(&tasklist_lock);
 	ppid = task->pid ? task->real_parent->pid : 0;
 	read_unlock(&tasklist_lock);
-	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
-%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
+	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu ",
 		task->pid,
 		task->comm,
 		state,
@@ -355,7 +353,8 @@
 		tty_nr,
 		tty_pgrp,
 		task->flags,
-		task->min_flt,
+		task->min_flt);
+	res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu ",
 		task->cmin_flt,
 		task->maj_flt,
 		task->cmaj_flt,
@@ -375,7 +374,8 @@
 		mm ? mm->start_code : 0,
 		mm ? mm->end_code : 0,
 		mm ? mm->start_stack : 0,
-		esp,
+		esp);
+	res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
 		eip,
 		/* The signal information here is obsolete.
 		 * It must be decimal for Linux 2.0 compatibility.
#3 lore raw

Re: [PATCH] RH7.3 can't compile 2.6.0-test8 (fs/proc/array.c)

Quoted 4 lines · Marco Roeland

Does this compile (and work) for any of you friendly RedHat 7.[23] users? In 2.6.0-test8 yet another argument was added to the monstrous sprintf. Perhaps this was just the droplet to overflow gcc-2.96's buckets? Here we split it into 3 distinct parts.

Works on my machine.

-Paul Larson

#4 lore raw

Re: [PATCH] RH7.3 can't compile 2.6.0-test8 (fs/proc/array.c)

In reply to Marco Roeland

In article <20031021143741.GB22633@localhost>,
Marco Roeland <[email protected]> wrote:

| On Tuesday October 21st 2003 at 15:52 uur Marco Roeland wrote:
| 
| > > http://marc.theaimsgroup.com/?l=linux-kernel&m=106651554401143&w=2
| > > 
| > > It's supposed to fix test8 compile with gcc-2.96 for RedHat 7.x.
| > 
| > Perhaps if the huge sprintf with 40+ arguments (fs/proc/array.c, line 346)
| > amongst which several trinary operators, were to be split up into several
| > parts, might that not solve the problem more elegantly?
| 
| Does this compile (and work) for any of you friendly RedHat 7.[23] users? 
| In 2.6.0-test8 yet another argument was added to the monstrous sprintf.
| Perhaps this was just the droplet to overflow gcc-2.96's buckets? Here we
| split it into 3 distinct parts.

Thank you!

Signature · 3 lines
bill davidsen <[email protected]>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
#5 lore raw

Re: [PATCH] RH7.3 can't compile 2.6.0-test8 (fs/proc/array.c)

In reply to Marco Roeland

Marco Roeland asked:

Quoted 4 lines

Does this compile (and work) for any of you friendly RedHat 7.[23] users? In 2.6.0-test8 yet another argument was added to the monstrous sprintf. Perhaps this was just the droplet to overflow gcc-2.96's buckets? Here we split it into 3 distinct parts.

It didn't help in RH 7.3.
Again the word エラー in the following excerpt means error.

fs/proc/array.c: In function `proc_pid_stat':
fs/proc/array.c:398: Unrecognizable insn:
(insn/i 1325 1690 1684 (parallel[

            (set (reg:SI 0 eax)
                (asm_operands ("") ("=a") 0[
                        (reg:DI 1 edx)
                    ]
                    [
                        (asm_input:DI ("A"))
                    ]  ("include/linux/times.h") 37))
            (set (reg:SI 1 edx)
                (asm_operands ("") ("=d") 1[
                        (reg:DI 1 edx)
                    ]
                    [
                        (asm_input:DI ("A"))
                    ]  ("include/linux/times.h") 37))
            (clobber (reg:QI 19 dirflag))
            (clobber (reg:QI 18 fpsr))
            (clobber (reg:QI 17 flags))
        ] ) -1 (insn_list 1319 (nil))
    (nil))

fs/proc/array.c:398: confused by earlier errors, bailing out make[2]: *** [fs/proc/array.o] エラー 1
make[1]: *** [fs/proc] エラー 2
make: *** [fs] エラー 2

Line 37 of include/linux/times.h is the do_div call shown below.

static inline u64 jiffies_64_to_clock_t(u64 x)
{

#if (HZ % USER_HZ)==0
        do_div(x, HZ / USER_HZ);