Compilation fails with the following errors k/openafs-1.8.13.1/include -I. -I. -pthread -D_REENTRANT -DAFS_PTHREAD_ENV -o usd_file.lo -c usd_file.c /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:46:5: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] 46 | timer_seed, | ^~~~~~~~~~ /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:46:5: note: (near initialization for ‘hc_rand_timer_method’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:46:5: error: invalid initializer /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:46:5: note: (near initialization for ‘hc_rand_timer_method.<anonymous>’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:47:5: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] 47 | timer_bytes, | ^~~~~~~~~~~ /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:47:5: note: (near initialization for ‘hc_rand_timer_method’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:47:5: error: initialization of ‘int (*)(void)’ from incompatible pointer type ‘int (*)(unsigned char *, int)’ [-Wincompatible-pointer-types] /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:47:5: note: (near initialization for ‘hc_rand_timer_method.status’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:48:5: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] 48 | timer_cleanup, | ^~~~~~~~~~~~~ /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:48:5: note: (near initialization for ‘hc_rand_timer_method’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:48:5: error: initialization of ‘int (*)(unsigned char *, int)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types] /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:48:5: note: (near initialization for ‘hc_rand_timer_method.pseudorand’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:49:5: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] 49 | timer_add, | ^~~~~~~~~ /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:49:5: note: (near initialization for ‘hc_rand_timer_method’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:49:5: error: initialization of ‘void (*)(const void *, int)’ from incompatible pointer type ‘void (*)(const void *, int, double)’ [-Wincompatible-pointer-types] /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:49:5: note: (near initialization for ‘hc_rand_timer_method.seed’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:50:5: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] 50 | timer_pseudorand, | ^~~~~~~~~~~~~~~~ /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:50:5: note: (near initialization for ‘hc_rand_timer_method’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:50:5: error: initialization of ‘void (*)(const void *, int, double)’ from incompatible pointer type ‘int (*)(unsigned char *, int)’ [-Wincompatible-pointer-types] /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:50:5: note: (near initialization for ‘hc_rand_timer_method.add’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:51:5: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init] 51 | timer_status | ^~~~~~~~~~~~ /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:51:5: note: (near initialization for ‘hc_rand_timer_method’) /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:51:5: error: initialization of ‘void (*)(void)’ from incompatible pointer type ‘int (*)(void)’ [-Wincompatible-pointer-types] /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.c:51:5: note: (near initialization for ‘hc_rand_timer_method.cleanup’) cc1: some warnings being treated as errors make[7]: *** [scripts/Makefile.build:229: /var/tmp/portage/net-fs/openafs-1.8.13.1/work/openafs-1.8.13.1/src/libafs/MODLOAD-6.12.9-gentoo-MP/rand-timer-kernel.o] Error 1
Created attachment 918335 [details] emerge.info
Created attachment 918336 [details] build.log
I was able to reproduce the problem, it's related to the kernel randomized structure support. From an upstream perspective the source file that is having problems is an "external" source that is imported into the openafs source tree and the upstream policy is that the "external" source cannot be directly modified (only refreshed from the original source). However, looking at the original source, there are updates that correct the problem and local gentoo specific patch can be created to fix this. I'll also need to validate that openafs doesn't have problems with randomized structure layouts when building the RPC calls.
Will require additional patches, some will be sent to upstream as well... will take a little bit of time to work through all the updates. Upstream openafs does have a flag to handle support for initializing structures via labels, but it's not used consistently.
I have submitted patches to upstream that will fix this problem. The changes won't make it into the next stable release (1.8.14) which is finishing up it's review cycle, but should be present in a future stable release. Until that happens, I can include the commits as gentoo patches (I'm waiting for some upstream feedback first).