Zygo / bees

Best-Effort Extent-Same, a btrfs dedupe agent
GNU General Public License v3.0
625 stars 56 forks source link

Build error: flexible array member 'fiemap::fm_extents' not at end of 'struct crucible::Fiemap' #238

Closed kdave closed 1 year ago

kdave commented 1 year ago

One more (top git commit 5040303f5067ac266b274a448, build log and build environment is at https://build.opensuse.org/package/live_build_log/home:dsterba:branches:filesystems/bees/openSUSE_Tumbleweed/x86_64):

[   25s] g++ -Wall -Wextra -Werror -O3 -I../include -D_FILE_OFFSET_BITS=64 -std=c++11 -Wold-style-cast -Wno-missing-field-initializers  -o process.o -c process.cc
[   25s] In file included from ../include/crucible/fs.h:14,
[   25s]                  from fs.cc:1:
[   25s] /usr/include/linux/fiemap.h:37:30: error: flexible array member 'fiemap::fm_extents' not at end of 'struct crucible::Fiemap'
[   25s]    37 |         struct fiemap_extent fm_extents[]; /* array of mapped extents (out) */
[   25s]       |                              ^~~~~~~~~~
[   25s] ../include/crucible/fs.h:157:38: note: next member 'std::vector<crucible::FiemapExtent> crucible::Fiemap::m_extents' declared here
[   25s]   157 |                 vector<FiemapExtent> m_extents;
[   25s]       |                                      ^~~~~~~~~
[   25s] ../include/crucible/fs.h:146:16: note: in the definition of 'struct crucible::Fiemap'
[   25s]   146 |         struct Fiemap : public fiemap {
[   25s]       |                ^~~~~~
[   25s] In file included from ../include/crucible/fs.h:14,
[   25s]                  from extentwalker.cc:5:
[   25s] /usr/include/linux/fiemap.h:37:30: error: flexible array member 'fiemap::fm_extents' not at end of 'struct crucible::Fiemap'
[   25s]    37 |         struct fiemap_extent fm_extents[]; /* array of mapped extents (out) */
[   25s]       |                              ^~~~~~~~~~
[   25s] ../include/crucible/fs.h:157:38: note: next member 'std::vector<crucible::FiemapExtent> crucible::Fiemap::m_extents' declared here
[   25s]   157 |                 vector<FiemapExtent> m_extents;
[   25s]       |                                      ^~~~~~~~~
[   25s] ../include/crucible/fs.h:146:16: note: in the definition of 'struct crucible::Fiemap'
[   25s]   146 |         struct Fiemap : public fiemap {
[   25s]       |                ^~~~~~
Zygo commented 1 year ago

Fixed in 972721016b6db2814c911c112f769669ceeb3a05

trofi commented 1 year ago

The patch does not apply as is against latest 0.7.2 release. Given that more and more distributions package linux-headers-6 WDYT of releasing bees version that contains the fix?