[OpenAFS-devel] RH 7.1 spec file: archlist

Derek Atkins warlord@MIT.EDU
25 Jul 2001 13:33:55 -0400


I found the bug...  If you look, you will see code that says:

    for ar in $archlist ; do
	if [ "$ar" = "$arch" ]; then
	    PrintDefine "__BOOT_KERNEL_$ar" "1" ifn,def,end $file
	else
	    PrintDefine "__BOOT_KERNEL_$ar" "" und $file	# undef
        fi
    done

This should really read:

    for ar in $archlist ; do
	if [ "$ar" = "$arch" ]; then
	    PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
	else
	    PrintDefine "__MODULE_KERNEL_$ar" "" und $file	# undef
        fi
    done


Sigh, this is my fault.  Thank you for pointing this out.  Apply this
patch and try again :)

-derek

Rudolph T Maceyko <rtm@cert.org> writes:

> I'm hacking on the spec file a bit this week, and plan to submit some
> patches.  (More on those later...)
> 
> In the meantime, I'm trying to deal with the fact that building from
> the source RPM takes ages, and happened to notice that it *tries* to
> build a module for all of the architectures specified in $archlist, but
> it actually builds the same module for each of them!
> 
> This is from the openafs-kernel-1.1.1 RPM (straight from openafs.org):
> 
> $ pwd
> /usr/vice/etc/modload
> $ md5sum *.o | sort
> 1c7d991de1682fb242bd014ff15df96e  libafs-2.4.2-2-athlon.o
> 1c7d991de1682fb242bd014ff15df96e  libafs-2.4.2-2-i386.o
> 1c7d991de1682fb242bd014ff15df96e  libafs-2.4.2-2-i586.o
> 1c7d991de1682fb242bd014ff15df96e  libafs-2.4.2-2-i686.o
> 7cc3eaaf13f12cda8fbdb0237e3544ee  libafs-2.4.3-12-athlon.o
> 7cc3eaaf13f12cda8fbdb0237e3544ee  libafs-2.4.3-12-i386.o
> 7cc3eaaf13f12cda8fbdb0237e3544ee  libafs-2.4.3-12-i586.o
> 7cc3eaaf13f12cda8fbdb0237e3544ee  libafs-2.4.3-12-i686.o
> a85f91c3669333a27df52d4cca16aa03  libafs-2.4.2-2-athlon.mp.o
> a85f91c3669333a27df52d4cca16aa03  libafs-2.4.2-2-i386.mp.o
> a85f91c3669333a27df52d4cca16aa03  libafs-2.4.2-2-i586.mp.o
> a85f91c3669333a27df52d4cca16aa03  libafs-2.4.2-2-i686.mp.o
> ed438c2fec7bda25c3e9db0001327417  libafs-2.4.3-12-athlon.mp.o
> ed438c2fec7bda25c3e9db0001327417  libafs-2.4.3-12-i386.mp.o
> ed438c2fec7bda25c3e9db0001327417  libafs-2.4.3-12-i586.mp.o
> ed438c2fec7bda25c3e9db0001327417  libafs-2.4.3-12-i686.mp.o
> 
> Of 16 total files there are really only 4 distinct files.  Shouldn't
> they be different?  The same thing happens when I build from the source
> RPM.
> 
> Note that the only thing that differs from one compilation to the next
> is the name of the output module:
> 
> > 	for arch in $archlist ; do
> > 
> > 	    PrintRedhatKernelFix $arch $mp src/config/redhat-fix.h
> > 
> > 	    make only_libafs LOCAL_SMP_DEF=-DREDHAT_FIX \
> > 		LINUX_MODULE_NAME="-$arch" MPS=$mp
> > 	done
> 
> What's the right thing to do here?  Certainly not to build the same
> modules four times over...  :-)  If there are no architecture-specific
> optimizations, then just build them all for i386...
> 
> -Rudy
> 
> PS: 
> 
> $ rpm -qa | egrep -i 'kernel|gcc|egcs|redhat-release' | sort
> gcc-2.96-85
> gcc-c++-2.96-85
> gcc-g77-2.96-85
> kernel-2.4.3-12
> kernel-doc-2.4.3-12
> kernel-headers-2.4.3-12
> kernel-source-2.4.3-12
> openafs-kernel-1.1.1-24.1
> openafs-kernel-source-1.1.1-24.1
> redhat-release-7.1-1
> 
> I had the kernel-headers & kernel-source installed for 2.4.2-2, but
> each build already takes long enough so I've left that out until I'm
> done making changes to the spec file...
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available