Saw some older bugs mentioning this sort of 'invalid initializer' error compiling spl, suggesting KRANDSTACK was the issue. Well, disabling that didn't work this time, but disabling grsec entirely did. After rebuilding the kernel (no other changes) spl and zfs / zfs-kmod compile and install fine.
I am still not sure what the particular grsec feature is which causes this.
@globalcitizen Thanks for opening the bug. Reviewing things on hardened is on my to do list.
I might have time to look in to this further on Wednesday or Thursday.
@globalcitizen KRANDSTACK was ages ago when i was mistaken. the option that causes problems is RANDSTRUCT. do you have that one disabled? Also, can you show more of the build.log that you're getting?
I'm on the road and the system in question is in another city. I will take a look in a day or two when I am with the machine again and try to get the log copied here.
Sorry - I ran out of time with the server and had to put it in colo today. Good luck tracking down the issue!
So this is a problem with mainline now, as CONFIG_GCC_PLUGIN_RANDSTRUCT is available since 4.13 and randomizes all structures that aren't marked with __no_randomize_layout since 4.14.
Maybe the relevant structures should be marked or the underlying issue resolved, if it can be. I don't understand much about the matter, if I'm honest, I just ran into this issue recently.
I'm working on this. I have a WIP that mostly builds. I'll be kinda busy the next few days but will hopefully push a PR soon so the buildbots can run on it.
its mostly just a matter of using designated initializers on structs with all function pointers