johnramsden/zectl

Build fails with ZFS 2.0.0 RCs.

dmtrbm opened this issue · 0 comments

Works with 0.8.5.

-- The C compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
Searching for required ZFS include directories
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3") 
Found pkg-config
Found zfs include directories in /usr/include/libzfs;/usr/include/libspl;/usr/include/blkid;/usr/include/uuid;/usr/include/tirpc

Searching for ZFS libraries
libzfs library found at: /usr/lib/libzfs.so
libzpool library found at: /usr/lib/libzpool.so
libzfs_core library found at: /usr/lib/libzfs_core.so
libnvpair library found at: /usr/lib/libnvpair.so
libuutil library found at: /usr/lib/libuutil.so
PLUGINS_DIRECTORY=/usr/share/zectl/libze_plugin
PLUGINS_DIRECTORY=/usr/share/zectl/libze_plugin
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/zectl/src/zectl-0.1.2
/usr/bin/cmake -S/tmp/zectl/src/zectl-0.1.2 -B/tmp/zectl/src/zectl-0.1.2 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /tmp/zectl/src/zectl-0.1.2/CMakeFiles /tmp/zectl/src/zectl-0.1.2//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/tmp/zectl/src/zectl-0.1.2'
make  -f lib/libze/CMakeFiles/libze.dir/build.make lib/libze/CMakeFiles/libze.dir/depend
make  -f lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/build.make lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/depend
make[2]: Entering directory '/tmp/zectl/src/zectl-0.1.2'
cd /tmp/zectl/src/zectl-0.1.2 && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/zectl/src/zectl-0.1.2 /tmp/zectl/src/zectl-0.1.2/lib/libze /tmp/zectl/src/zectl-0.1.2 /tmp/zectl/src/zectl-0.1.2/lib/libze /tmp/zectl/src/zectl-0.1.2/lib/libze/CMakeFiles/libze.dir/DependInfo.cmake --color=
make[2]: Entering directory '/tmp/zectl/src/zectl-0.1.2'
cd /tmp/zectl/src/zectl-0.1.2 && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/zectl/src/zectl-0.1.2 /tmp/zectl/src/zectl-0.1.2/lib/libze_plugin /tmp/zectl/src/zectl-0.1.2 /tmp/zectl/src/zectl-0.1.2/lib/libze_plugin /tmp/zectl/src/zectl-0.1.2/lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/DependInfo.cmake --color=
Dependee "/tmp/zectl/src/zectl-0.1.2/lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/DependInfo.cmake" is newer than depender "/tmp/zectl/src/zectl-0.1.2/lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/depend.internal".
Dependee "/tmp/zectl/src/zectl-0.1.2/lib/libze_plugin/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/tmp/zectl/src/zectl-0.1.2/lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/depend.internal".
Scanning dependencies of target libze_plugin_systemdboot
Dependee "/tmp/zectl/src/zectl-0.1.2/lib/libze/CMakeFiles/libze.dir/DependInfo.cmake" is newer than depender "/tmp/zectl/src/zectl-0.1.2/lib/libze/CMakeFiles/libze.dir/depend.internal".
Dependee "/tmp/zectl/src/zectl-0.1.2/lib/libze/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/tmp/zectl/src/zectl-0.1.2/lib/libze/CMakeFiles/libze.dir/depend.internal".
Scanning dependencies of target libze
make[2]: Leaving directory '/tmp/zectl/src/zectl-0.1.2'
make  -f lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/build.make lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/build
make[2]: Leaving directory '/tmp/zectl/src/zectl-0.1.2'
make  -f lib/libze/CMakeFiles/libze.dir/build.make lib/libze/CMakeFiles/libze.dir/build
make[2]: Entering directory '/tmp/zectl/src/zectl-0.1.2'
make[2]: Entering directory '/tmp/zectl/src/zectl-0.1.2'
[ 14%] Building C object lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/libze_plugin_systemdboot.c.o
[ 14%] Building C object lib/libze/CMakeFiles/libze.dir/system_linux.c.o
[ 14%] Building C object lib/libze/CMakeFiles/libze.dir/libze.c.o
cd /tmp/zectl/src/zectl-0.1.2/lib/libze_plugin && /usr/bin/cc -DBUILD_TESTING=0 -DDEBUG=0 -Dlibze_plugin_systemdboot_EXPORTS -I/tmp/zectl/src/zectl-0.1.2/include -I/usr/include/libzfs -I/usr/include/libspl -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/tirpc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fmacro-prefix-map=/tmp/zectl/src/zectl-0.1.2/= -fPIC -std=gnu11 -o CMakeFiles/libze_plugin_systemdboot.dir/libze_plugin_systemdboot.c.o -c /tmp/zectl/src/zectl-0.1.2/lib/libze_plugin/libze_plugin_systemdboot.c
cd /tmp/zectl/src/zectl-0.1.2/lib/libze && /usr/bin/cc -DBUILD_TESTING=0 -DDEBUG=0 -DPLUGINS_DIRECTORY=\"/usr/share/zectl/libze_plugin\" -Dlibze_EXPORTS -I/tmp/zectl/src/zectl-0.1.2/include -I/usr/include/libzfs -I/usr/include/libspl-I/usr/include/blkid -I/usr/include/uuid -I/usr/include/tirpc -I/tmp/zectl/src/zectl-0.1.2/lib/libze/. -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fmacro-prefix-map=/tmp/zectl/src/zectl-0.1.2/= -fPIC -std=gnu11 -o CMakeFiles/libze.dir/system_linux.c.o -c /tmp/zectl/src/zectl-0.1.2/lib/libze/system_linux.c
[ 19%] Building C object lib/libze/CMakeFiles/libze.dir/libze_bootloader.c.o
cd /tmp/zectl/src/zectl-0.1.2/lib/libze && /usr/bin/cc -DBUILD_TESTING=0 -DDEBUG=0 -DPLUGINS_DIRECTORY=\"/usr/share/zectl/libze_plugin\" -Dlibze_EXPORTS -I/tmp/zectl/src/zectl-0.1.2/include -I/usr/include/libzfs -I/usr/include/libspl-I/usr/include/blkid -I/usr/include/uuid -I/usr/include/tirpc -I/tmp/zectl/src/zectl-0.1.2/lib/libze/. -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fmacro-prefix-map=/tmp/zectl/src/zectl-0.1.2/= -fPIC -std=gnu11 -o CMakeFiles/libze.dir/libze.c.o -c /tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c
cd /tmp/zectl/src/zectl-0.1.2/lib/libze && /usr/bin/cc -DBUILD_TESTING=0 -DDEBUG=0 -DPLUGINS_DIRECTORY=\"/usr/share/zectl/libze_plugin\" -Dlibze_EXPORTS -I/tmp/zectl/src/zectl-0.1.2/include -I/usr/include/libzfs -I/usr/include/libspl-I/usr/include/blkid -I/usr/include/uuid -I/usr/include/tirpc -I/tmp/zectl/src/zectl-0.1.2/lib/libze/. -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fmacro-prefix-map=/tmp/zectl/src/zectl-0.1.2/= -fPIC -std=gnu11 -o CMakeFiles/libze.dir/libze_bootloader.c.o -c /tmp/zectl/src/zectl-0.1.2/lib/libze/libze_bootloader.c
In file included from /usr/include/libspl/sys/stat.h:29,
from /usr/include/libspl/sys/mnttab.h:35,
from /usr/include/libzfs/libzfs.h:38,
from /tmp/zectl/src/zectl-0.1.2/include/libze/libze.h:4,
from /tmp/zectl/src/zectl-0.1.2/include/libze/libze_plugin_manager.h:4,
from /tmp/zectl/src/zectl-0.1.2/include/libze_plugin/libze_plugin_systemdboot.h:4,
from /tmp/zectl/src/zectl-0.1.2/lib/libze_plugin/libze_plugin_systemdboot.c:1:
/usr/include/libspl/sys/stat.h: In function ‘fstat64_blk’:
In file included from /usr/include/libspl/sys/stat.h:29,
from /usr/include/libspl/sys/mnttab.h:35,
from /usr/include/libzfs/libzfs.h:38,
from /tmp/zectl/src/zectl-0.1.2/include/libze/libze.h:4,
from /tmp/zectl/src/zectl-0.1.2/lib/libze/libze_bootloader.c:1:
/usr/include/libspl/sys/stat.h: In function ‘fstat64_blk’:
/usr/include/libspl/sys/stat.h:43:6: error: invalid use of undefined type ‘struct stat64’
43 |  if (S_ISBLK(st->st_mode)) {
|      ^~~~~~~
/usr/include/libspl/sys/stat.h:43:6: error: invalid use of undefined type ‘struct stat64’
43 |  if (S_ISBLK(st->st_mode)) {
|      ^~~~~~~
In file included from /usr/include/libspl/sys/mnttab.h:35,
from /usr/include/libzfs/libzfs.h:38,
from /tmp/zectl/src/zectl-0.1.2/include/libze/libze.h:4,
from /tmp/zectl/src/zectl-0.1.2/lib/libze/libze_bootloader.c:1:
/usr/include/libspl/sys/stat.h:44:34: error: invalid use of undefined type ‘struct stat64’
44 |   if (ioctl(fd, BLKGETSIZE64, &st->st_size) != 0)
|                                  ^~
In file included from /usr/include/libspl/sys/mnttab.h:35,
from /usr/include/libzfs/libzfs.h:38,
from /tmp/zectl/src/zectl-0.1.2/include/libze/libze.h:4,
from /tmp/zectl/src/zectl-0.1.2/include/libze/libze_plugin_manager.h:4,
from /tmp/zectl/src/zectl-0.1.2/include/libze_plugin/libze_plugin_systemdboot.h:4,
from /tmp/zectl/src/zectl-0.1.2/lib/libze_plugin/libze_plugin_systemdboot.c:1:
/usr/include/libspl/sys/stat.h:44:34: error: invalid use of undefined type ‘struct stat64’
44 |   if (ioctl(fd, BLKGETSIZE64, &st->st_size) != 0)
|                                  ^~
make[2]: *** [lib/libze/CMakeFiles/libze.dir/build.make:108: lib/libze/CMakeFiles/libze.dir/libze_bootloader.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c: In function ‘libze_rename’:
/tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c:2646:38: error: incompatible type for argument 3 of ‘zfs_rename’
2646 |     if (zfs_rename(be_zh, new_be_ds, B_FALSE, B_FALSE) != 0) {
|                                      ^~~~~~~
|                                      |
|                                      int
In file included from /tmp/zectl/src/zectl-0.1.2/include/libze/libze.h:4,
from /tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c:6:
/usr/include/libzfs/libzfs.h:657:53: note: expected ‘renameflags_t’ {aka ‘struct renameflags’} but argument is of type ‘int’
657 | extern int zfs_rename(zfs_handle_t *, const char *, renameflags_t);
|                                                     ^~~~~~~~~~~~~
/tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c:2646:9: error: too many arguments to function ‘zfs_rename’
2646 |     if (zfs_rename(be_zh, new_be_ds, B_FALSE, B_FALSE) != 0) {
|         ^~~~~~~~~~
In file included from /tmp/zectl/src/zectl-0.1.2/include/libze/libze.h:4,
from /tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c:6:
/usr/include/libzfs/libzfs.h:657:12: note: declared here
657 | extern int zfs_rename(zfs_handle_t *, const char *, renameflags_t);
|            ^~~~~~~~~~
/tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c:2654:54: error: incompatible type for argument 3 of ‘zfs_rename’
2654 |         if (zfs_rename(be_bpool_zh, new_be_bpool_ds, B_FALSE, B_FALSE) != 0) {
|                                                      ^~~~~~~
|                                                      |
|                                                      int
In file included from /tmp/zectl/src/zectl-0.1.2/include/libze/libze.h:4,
from /tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c:6:
/usr/include/libzfs/libzfs.h:657:53: note: expected ‘renameflags_t’ {aka ‘struct renameflags’} but argument is of type ‘int’
657 | extern int zfs_rename(zfs_handle_t *, const char *, renameflags_t);
|                                                     ^~~~~~~~~~~~~
/tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c:2654:13: error: too many arguments to function ‘zfs_rename’
2654 |         if (zfs_rename(be_bpool_zh, new_be_bpool_ds, B_FALSE, B_FALSE) != 0) {
|             ^~~~~~~~~~
In file included from /tmp/zectl/src/zectl-0.1.2/include/libze/libze.h:4,
from /tmp/zectl/src/zectl-0.1.2/lib/libze/libze.c:6:
/usr/include/libzfs/libzfs.h:657:12: note: declared here
657 | extern int zfs_rename(zfs_handle_t *, const char *, renameflags_t);
|            ^~~~~~~~~~
make[2]: *** [lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/build.make:82: lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/libze_plugin_systemdboot.c.o] Error 1
make[2]: Leaving directory '/tmp/zectl/src/zectl-0.1.2'
make[1]: *** [CMakeFiles/Makefile2:200: lib/libze_plugin/CMakeFiles/libze_plugin_systemdboot.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [lib/libze/CMakeFiles/libze.dir/build.make:82: lib/libze/CMakeFiles/libze.dir/libze.c.o] Error 1
make[2]: Leaving directory '/tmp/zectl/src/zectl-0.1.2'
make[1]: *** [CMakeFiles/Makefile2:173: lib/libze/CMakeFiles/libze.dir/all] Error 2
make[1]: Leaving directory '/tmp/zectl/src/zectl-0.1.2'
make: *** [Makefile:149: all] Error 2