[OpenAFS-devel] Re: Problems compiling 1.2.9-rc2 on RH 8.1 Beta5

Frank Bagehorn fba@zurich.ibm.com
Wed, 5 Mar 2003 16:54:28 +0100


I digged a bit more into the problem. It all results from certain 
functions in afs/LINUX/osi_machdep.h .
They deal with tasks and task_struct pointers.
line 65: PENDING(&t->sig->shared_pending, &t->blocked);

Looking into /usr/src/linux/include/linux/sched.h one finds that the 
task_struct sructure has no member "sig".
There is a signal variable and a signal handler variable.
line 494:    struct signal_struct *signal;
line 495:    struct sighand_struct *sighand;

I compared it to the 24.20 stock kernel. That one has a member named sig. 
So I guess I'm dealing with some
of Alan Cox' (in)famous changes to the main kernel tree; probably 2.5 
stuff that RedHat already put into their kernel.

The other error is related to the SIG_LOCK and SIG_UNLOCK functions in 
osi_machdep.h .
line 77:#define SIG_LOCK(X) spin_lock_irq(&X->sig->siglock)
line 78:#define SIG_UNLOCK(X) spin_unlock_irq(&X->sig->siglock)

In changing osi_machdep.h  as follows:
line 65:        PENDING(&t->signal->shared_pending, &t->blocked);
line 77:#define SIG_LOCK(X) spin_lock_irq(&X->sighand->siglock)
line 78:#define SIG_UNLOCK(X) spin_unlock_irq(&X->sighand->siglock)

I get 1.2.9-rc2 to compile successfully, but the resulting libafs modules 
cannot be loaded.
So the formal structure is right, but I guess now the modules try to deal 
with the wrong signals and signal handlers.
I'm no expert so I don't know what are the right changes. But maybe it's a 
better hint for you what goes wrong.

Regards
Frank

----------------------------------------------------------------------
Dr. Frank Bagehorn
IBM Zurich Research Lab.
Saeumerstr. 4
CH-8803 Rueschlikon 
Switzerland
----------------------------------------------------------------------
SMTP: fba@zurich.ibm.com
Notes: Frank Bagehorn/Zurich/IBM@IBMCH
phone: ++41 (01) 724 83 23  fax: ++41 (01) 724 89 59

Frank Bagehorn/Zurich/IBM wrote on 21.02.2003 18:11:36:

> I tried to compile 1.2.9-rc2 on the latest RH 8.1 Beta (Beta 5, 
> comes with a 2.4.20-2.48 kernel).
> Configure works well, but later on I get the following:
> 
> gcc   -O2 -fomit-frame-pointer -fno-strength-reduce -fno-strict-aliasing 

> -fno-common -pipe -march=pentium -D__KERNEL__  -DCPU=586 -DKERNEL 
> -D_KERNEL -DMODULE -DAFS_SMP -D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1  

> -I. -I../ -I/usr/src/redhat/BUILD/openafs-1.2.9-rc2/src/config -c 
> ../afs/afs_analyze.c;
> In file included from ../afs/afs_osi.h:388,
>                  from ../afs/afsincludes.h:29,
>                  from ../afs/afs_analyze.c:35:
> ../afs/osi_machdep.h: In function `_recalc_sigpending_tsk':
> ../afs/osi_machdep.h:65: structure has no member named `sig'
> In file included from ../rx/rx.h:33,
>                  from ../afs/afsincludes.h:30,
>                  from ../afs/afs_analyze.c:35:
> ../rx/rx_kmutex.h: In function `CV_WAIT':
> ../rx/rx_kmutex.h:128: structure has no member named `sig'
> ../rx/rx_kmutex.h:132: structure has no member named `sig'
> ../rx/rx_kmutex.h:137: structure has no member named `sig'
> ../rx/rx_kmutex.h:140: structure has no member named `sig'
> In file included from ../rx/rx.h:33,
>                  from ../afs/afsincludes.h:30,
>                  from ../afs/afs_analyze.c:35:
> ../rx/rx_kmutex.h: In function `CV_TIMEDWAIT':
> ../rx/rx_kmutex.h:165: structure has no member named `sig'
> ../rx/rx_kmutex.h:169: structure has no member named `sig'
> ../rx/rx_kmutex.h:174: structure has no member named `sig'
> ../rx/rx_kmutex.h:177: structure has no member named `sig'
> make[4]: *** [afs_analyze.o] Error 1

> Anyone any idea how to fix that ?
> 
> Regards
> Frank
> 
> ----------------------------------------------------------------------
> Dr. Frank Bagehorn
> IBM Zurich Research Lab.
> Saeumerstr. 4
> CH-8803 Rueschlikon 
> Switzerland
> ----------------------------------------------------------------------
> SMTP: fba@zurich.ibm.com
> Notes: Frank Bagehorn/Zurich/IBM@IBMCH
> phone: ++41 (01) 724 83 23  fax: ++41 (01) 724 89 59