Skip to contentSkip to conversation

Question re. <linux/sizes.h> required since btrfs-progs-4.10

DISCUSSION Holger Hoffstätte 2 participants 2 messages Mar 11, 2017 – Mar 13, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi,

I'm on Gentoo and wanted to update Docker to 17.03.0, which failed when it couldn't build the btrfs driver due to a missing <linux/sizes.h>. This worked fine on another machine the other day, so I dug in and found that the only difference was an intermediate update to btrfs-progs 4.10. Sure enough: since 4.10 ctree.h includes <linux/sizes.h>, which is nowhere to be found in my package of linux-headers-4.10 (also not in 4.9).

Simply copying sizes.h from the 4.9 kernel sources made everything work, but I'm curious whether this is actually correct - hence my question whether <linux/sizes.h> _should_ actually be installed? Is this a bug with Gentoo's kernel header package or a new problem with btrfs-progs?

I don't see any good reason why sizes.h should not be installed, but wanted to verify since there are probably users of other distributions here as well. :)

Thanks,
Holger

#1 lore raw
Quoted 11 lines · Holger Hoffstätte

I'm on Gentoo and wanted to update Docker to 17.03.0, which failed when it couldn't build the btrfs driver due to a missing <linux/sizes.h>. This worked fine on another machine the other day, so I dug in and found that the only difference was an intermediate update to btrfs-progs 4.10. Sure enough: since 4.10 ctree.h includes <linux/sizes.h>, which is nowhere to be found in my package of linux-headers-4.10 (also not in 4.9).

Simply copying sizes.h from the 4.9 kernel sources made everything work, but I'm curious whether this is actually correct - hence my question whether <linux/sizes.h> _should_ actually be installed? Is this a bug with Gentoo's kernel header package or a new problem with btrfs-progs?

That's a bug in btrfs-progs, the build tests do not cover that. There's a local copy of sizes.h that's supposed to be used. The patch was ported from kernel where linus/sizes.h is present but is probably not (yet) part of the public linux-headers.

Quoted 3 lines

I don't see any good reason why sizes.h should not be installed, but wanted to verify since there are probably users of other distributions here as well. :)

The build would fail on any distro. I'll commit a fix and update the tests so this gets caught early. Thanks for the report.