ktf icon indicating copy to clipboard operation
ktf copied to clipboard

Compilation issue Kernel 5.4

Open Bouliere83 opened this issue 4 years ago • 8 comments

Hi,

I was using KTF on a project with a Linux Kernel 5.3 (Ubuntu 18.04), but after passing on 5.4 (Ubuntu 20.04), the KTF Framework cannot compile. From what i saw it is due to this patch : https://github.com/torvalds/linux/commit/9adeaa226988b97bc15928e12f40a9863134467c The memcg_cache_params is not define anymore in a public header, instead is it located in a internal header. Do you have any plans to fix it?

Thanks you.

Bouliere83 avatar Jun 24 '20 08:06 Bouliere83

Yes, i met same error on Kernel 5.4 , so is it expected when can fix it ?

Yao-J avatar Aug 07 '20 09:08 Yao-J

The fix is simple but needs to be pushed; I'm working on getting that done. Hopefully should be sometime over the next few days.

alan-maguire avatar Aug 07 '20 13:08 alan-maguire

Ok that some good news, thank you.

Bouliere83 avatar Aug 07 '20 13:08 Bouliere83

finally got write access; I've pushed a bunch of changes that Knut and I authored that should hopefully resolve various compilation issues; let me know if you run into any trouble. thanks!

alan-maguire avatar Aug 10 '20 10:08 alan-maguire

Hi, alan-maguire Could you show which commit can fix this issue ? Actually, this issue is related to struct memcg_cache_params, but i can't find related fix in the commit log. The latest fix is "ktf: replace struct timespec with struct timespec64"

Yao-J avatar Aug 13 '20 06:08 Yao-J

Take a look at this commit

knuto avatar Aug 13 '20 06:08 knuto

Hi, new commit can fix this issue, but it will prompt "error: unknown warning option '-Wno-packed-bitfield-compat'" in lib/Makefile This option available on kernel 4.14 , wonder why it can't pass on 5.4 ?

Yao-J avatar Aug 17 '20 07:08 Yao-J

Are you perhaps not using gcc? The option seems present still? Anyway you can safely just remove the option from Makefile.am as KTF does not use bitfields, this is just a remains from the predecessor of KTF and should have been removed.

knuto avatar Aug 19 '20 04:08 knuto