[OpenAFS] Compilation problems

Benjamin Kaduk kaduk@MIT.EDU
Wed, 25 Feb 2015 17:30:56 -0500 (EST)


On Wed, 25 Feb 2015, Kenan Avdic wrote:

> I rebuilt the kernel with GRKERNSEC_RANDSTRUCT=n and was able to
> compile. I got a new problem with linking though:
>
> make -f /usr/src/linux-3.2.65-hardened-r2/scripts/Makefile.modpost
>   scripts/mod/modpost -m  -i
> /usr/src/linux-3.2.65-hardened-r2/Module.symvers -I
> /home/xyko/openafs/openafs-git/src/libafs/MODLOAD-3.2.65-hardened-r2-MP/Module.symvers
>  -o /home/xyko/openafs/openafs-git/src/libafs/MODLOAD-3.2.65-hardened-r2-MP/Module.symvers
> -S -w  -s
> WARNING: modpost: Found 265 section mismatch(es).
> To see full details build your kernel with:
> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
>   ld -r -m elf_x86_64 -T
> /usr/src/linux-3.2.65-hardened-r2/scripts/module-common.lds --build-id
>  -o /home/xyko/openafs/openafs-git/src/libafs/MODLOAD-3.2.65-hardened-r2-MP/afspag.ko
> /home/xyko/openafs/openafs-git/src/libafs/MODLOAD-3.2.65-hardened-r2-MP/afspag.o
> /home/xyko/openafs/openafs-git/src/libafs/MODLOAD-3.2.65-hardened-r2-MP/afspag.mod.o
>   ld -r -m elf_x86_64 -T
> /usr/src/linux-3.2.65-hardened-r2/scripts/module-common.lds --build-id
>  -o /home/xyko/openafs/openafs-git/src/libafs/MODLOAD-3.2.65-hardened-r2-MP/libafs.ko
> /home/xyko/openafs/openafs-git/src/libafs/MODLOAD-3.2.65-hardened-r2-MP/libafs.o
> /home/xyko/openafs/openafs-git/src/libafs/MODLOAD-3.2.65-hardened-r2-MP/libafs.mod.o
> make[5]: Leaving directory '/usr/src/linux-3.2.65-hardened-r2'
> Error: Undefined symbols in modules
> Makefile.afs:280: recipe for target 'libafs.ko' failed
> make[4]: *** [libafs.ko] Error 1
>
> I was able to solve this by reverting
> dbdee60a83d72d38a04a0eeb2a5324cf497e57e3
> (http://gerrit.openafs.org/#change,8981). Could I get in trouble for
> that?

8981 was added mostly so that our buildbots can detect when the compiled
kernel module will be unusable (unloadable).

If you are just building for yourself, you will discover whether or not
your build works when you try to use it, so I do not think there is any
particular risk from making that change.

-Ben