veeam / blksnap

Nonpersistent block device snapshot with block-level change-tracking capabilities.
GNU General Public License v2.0
84 stars 22 forks source link

VAL-6.1 and stable-v2.0 branches fails to build tools on ubuntu 23.10 #65

Closed Fantu closed 1 year ago

Fantu commented 1 year ago

Distribution

ubuntu 23.10

Architecture

amd64

Kernel version

-

Blksnap version

VAL-6.1 and stable-v2.0 branches

Bug description

In VAL-6.1 branch and stable-v2.0 on ubuntu 23.10 the tools fails to build, spotted by circleci:

VAL-6.1 https://app.circleci.com/pipelines/github/Fantu/blksnap/155/workflows/4cc1f093-e033-47e2-83ca-60b7b54c1996/jobs/835

[  4%] Building CXX object lib/blksnap/CMakeFiles/blksnap-dev.dir/Blksnap.cpp.o
cd /root/project/build/pkg/obj-x86_64-linux-gnu/lib/blksnap && /usr/bin/c++  -I/root/project/build/pkg/lib/blksnap/../../include -g -O2 -ffile-prefix-map=/root/project/build/pkg=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/root/project/build/pkg=/usr/src/blksnap-1.0.0.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -static-libstdc++ -static-libgcc -pthread -O2 -g -DNDEBUG -std=gnu++14 -MD -MT lib/blksnap/CMakeFiles/blksnap-dev.dir/Blksnap.cpp.o -MF CMakeFiles/blksnap-dev.dir/Blksnap.cpp.o.d -o CMakeFiles/blksnap-dev.dir/Blksnap.cpp.o -c /root/project/build/pkg/lib/blksnap/Blksnap.cpp
In file included from /root/project/build/pkg/lib/blksnap/Blksnap.cpp:19:
/root/project/build/pkg/lib/blksnap/../../include/blksnap/Blksnap.h:71:97: error: 'uint8_t' has not been declared
   71 |         void ReadCbtMap(struct blk_snap_dev_t dev_id, unsigned int offset, unsigned int length, uint8_t* buff);
      |                                                                                                 ^~~~~~~
/root/project/build/pkg/lib/blksnap/Blksnap.cpp:84:99: error: 'uint8_t' has not been declared
   84 | void CBlksnap::ReadCbtMap(struct blk_snap_dev_t dev_id, unsigned int offset, unsigned int length, uint8_t* buff)
      |                                                                                                   ^~~~~~~
/root/project/build/pkg/lib/blksnap/Blksnap.cpp: In member function 'void blksnap::CBlksnap::ReadCbtMap(blk_snap_dev_t, unsigned int, unsigned int, int*)':
/root/project/build/pkg/lib/blksnap/Blksnap.cpp:87:72: error: cannot convert 'int*' to '__u8*' {aka 'unsigned char*'} in initialization
   87 |       = {.dev_id = dev_id, .offset = offset, .length = length, .buff = buff};
      |                                                                        ^~~~
      |                                                                        |
      |                                                                        int*
make[3]: *** [lib/blksnap/CMakeFiles/blksnap-dev.dir/build.make:79: lib/blksnap/CMakeFiles/blksnap-dev.dir/Blksnap.cpp.o] Error 1

stable-v2.0 https://app.circleci.com/pipelines/github/Fantu/blksnap/160/workflows/ac752d26-ce03-49b9-babf-bd7130808016/jobs/852

[  9%] Building CXX object lib/blksnap/CMakeFiles/blksnap-dev.dir/TrackerCtl.cpp.o
cd /root/project/obj-x86_64-linux-gnu/lib/blksnap && /usr/bin/c++  -I/root/project/lib/blksnap/../../include -g -O2 -ffile-prefix-map=/root/project=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/root/project=/usr/src/blksnap-2.0.0.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -static-libstdc++ -static-libgcc -pthread -O2 -g -DNDEBUG -std=gnu++14 -MD -MT lib/blksnap/CMakeFiles/blksnap-dev.dir/TrackerCtl.cpp.o -MF CMakeFiles/blksnap-dev.dir/TrackerCtl.cpp.o.d -o CMakeFiles/blksnap-dev.dir/TrackerCtl.cpp.o -c /root/project/lib/blksnap/TrackerCtl.cpp
In file included from /root/project/lib/blksnap/TrackerCtl.cpp:19:
/root/project/lib/blksnap/../../include/blksnap/TrackerCtl.h:46:67: error: 'uint8_t' has not been declared
   46 |         void ReadCbtMap(unsigned int offset, unsigned int length, uint8_t* buff);
      |                                                                   ^~~~~~~
/root/project/lib/blksnap/TrackerCtl.cpp:88:72: error: 'uint8_t' has not been declared
   88 | void CTrackerCtl::ReadCbtMap(unsigned int offset, unsigned int length, uint8_t* buff)
      |                                                                        ^~~~~~~
make[3]: *** [lib/blksnap/CMakeFiles/blksnap-dev.dir/build.make:93: lib/blksnap/CMakeFiles/blksnap-dev.dir/TrackerCtl.cpp.o] Error 1

Steps to reproduce

No response

Expected behavior

No response

Additional informations

No response

SergeiShtepa commented 1 year ago

Thanks, I'll take a look at it soon.

Fantu commented 1 year ago

on stable-v2.0 build on gcc13 is fixed by https://github.com/veeam/blksnap/pull/69 (tested yestarday), what is missed fix on VAL-6.1 (and probably needed also on VAL-6.0)

I spotted also another build issue from workflow of build on other archs, workaround with https://github.com/veeam/blksnap/pull/66/commits/1810df651e90f5c2be307ec7f52d736ee6ee2d6d and more details in description of commit I think is more probable a limitation of the crosscompile tools instead an issue with all these archs (but I'm not sure)