[OpenAFS-devel] bug building against RedHat 7.3 new kernel: 2.4.18-5

Russ Allbery rra@stanford.edu
Sat, 22 Jun 2002 20:08:12 -0700


Joe Little <jlittle@open-it.org> writes:

> A major NFS v3 bug in RH7.3's kernel has brought about a new kernel from
> the company. At Stanford University, we build off of RedHat's release
> and distribute OpenAFS as a client. We have quickly jumped to OpenAFS
> 1.2.5, but the SRPM, which builds on kernel 2.4.18-4, fails to build on
> 2.4.18-5. It may have to do with other subtle changes in the new kernel
> (possibly scheduler changes)

I think this was already committed:

To: openafs-info@openafs.org
Subject: Re: [OpenAFS] OpenAFS 1.2.5 Won't Build Under Kernel 2.4.18-5
From: Garry Zacheiss <zacheiss@MIT.EDU>
Date: Fri, 21 Jun 2002 02:14:12 -0400

>> > ../linux/sched.h:454:15: #if with no expression
>> Looks like some of RH's patching went wrong, or they applied a broken
>> patch. I would revert to -4.

   It doesn't actually look like a broken patch; the problem is that the
2.4.18-5 version of include/linux/sched.h has a block of code that looks
like:

#if CONFIG_SMP
...
#endif

rather than using 

#ifdef CONFIG_SMP

and we #define CONFIG_SMP to an empty value in
src/config/param.i386_linux24.h (actually in all of the param headers
for all of the linux ports).   Applying the patch below lets me build
successfully for 2.4.18-5.

--- param.i386_linux24.h        2002/01/31 21:48:23     1.1.1.1
+++ param.i386_linux24.h        2002/06/21 06:10:49
@@ -30,7 +30,7 @@
  * MP to compile for Linux
  */
 #ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
 #ifndef CONFIG_X86_LOCAL_APIC
 #define CONFIG_X86_LOCAL_APIC
 #endif

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>