Comment 3 for bug 1935664

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: Please switch to fuse3

I can easily make it pass configure via

src/lxc/lxc_fuse.h:
#define FUSE_USE_VERSION 30
meson.build:
fuse_version = '3.0.0'
fuse_dep = dependency('fuse3', version: '>=' + fuse_version, required: get_option('fuse'))

But then as you'd expect the actual changes for the new API are needed.

../../src/lxc/lxc_fuse.c: In function 'lxcProcReaddir':
../../src/lxc/lxc_fuse.c:84:5: error: too few arguments to function 'filler'
   84 | filler(buf, ".", NULL, 0);
      | ^~~~~~
../../src/lxc/lxc_fuse.c:85:5: error: too few arguments to function 'filler'
   85 | filler(buf, "..", NULL, 0);
      | ^~~~~~
../../src/lxc/lxc_fuse.c:86:5: error: too few arguments to function 'filler'
   86 | filler(buf, fuse_meminfo_path + 1, NULL, 0);
      | ^~~~~~
../../src/lxc/lxc_fuse.c: At top level:
../../src/lxc/lxc_fuse.c:255:16: warning: initialization of 'int (*)(const char *, struct stat *, struct fuse_file_info *)' from incompatible pointer type 'int (*)(const char *, struct stat *)' [-Wincompatible-pointer-types]
  255 | .getattr = lxcProcGetattr,
      | ^~~~~~~~~~~~~~
../../src/lxc/lxc_fuse.c:255:16: note: (near initialization for 'lxcProcOper.getattr')
../../src/lxc/lxc_fuse.c:256:16: warning: initialization of 'int (*)(const char *, void *, int (*)(void *, const char *, const struct stat *, off_t, enum fuse_fill_dir_flags), off_t, struct fuse_file_info *, enum fuse_readdir_flags)' {aka 'int (*)(const char *, void *, int (*)(void *, const char *, const struct stat *, long int, enum fuse_fill_dir_flags), long int, struct fuse_file_info *, enum fuse_readdir_flags)'} from incompatible pointer type 'int (*)(const char *, void *, int (*)(void *, const char *, const struct stat *, off_t, enum fuse_fill_dir_flags), off_t, struct fuse_file_info *)' {aka 'int (*)(const char *, void *, int (*)(void *, const char *, const struct stat *, long int, enum fuse_fill_dir_flags), long int, struct fuse_file_info *)'} [-Wincompatible-pointer-types]
  256 | .readdir = lxcProcReaddir,
      | ^~~~~~~~~~~~~~
../../src/lxc/lxc_fuse.c:256:16: note: (near initialization for 'lxcProcOper.readdir')
../../src/lxc/lxc_fuse.c: In function 'lxcFuseDestroy':
../../src/lxc/lxc_fuse.c:264:22: warning: passing argument 1 of 'fuse_unmount' from incompatible pointer type [-Wincompatible-pointer-types]
  264 | fuse_unmount(fuse->mountpoint, fuse->ch);
      | ~~~~^~~~~~~~~~~~
      | |
      | char *
In file included from ../../src/lxc/lxc_fuse.h:26,
                 from ../../src/lxc/lxc_fuse.c:28:
/usr/include/fuse3/fuse.h:948:32: note: expected 'struct fuse *' but argument is of type 'char *'
  948 | void fuse_unmount(struct fuse *f);
      | ~~~~~~~~~~~~~^
../../src/lxc/lxc_fuse.c:264:5: error: too many arguments to function 'fuse_unmount'
  264 | fuse_unmount(fuse->mountpoint, fuse->ch);
      | ^~~~~~~~~~~~
In file included from ../../src/lxc/lxc_fuse.h:26,
                 from ../../src/lxc/lxc_fuse.c:28:
/usr/include/fuse3/fuse.h:948:6: note: declared here
  948 | void fuse_unmount(struct fuse *f);
      | ^~~~~~~~~~~~
../../src/lxc/lxc_fuse.c: In function 'lxcSetupFuse':
../../src/lxc/lxc_fuse.c:307:31: warning: passing argument 1 of 'fuse_mount' from incompatible pointer type [-Wincompatible-pointer-types]
  307 | fuse->ch = fuse_mount(fuse->mountpoint, &args);
      | ~~~~^~~~~~~~~~~~
      | |
      | char *
In file included from ../../src/lxc/lxc_fuse.h:26,
                 from ../../src/lxc/lxc_fuse.c:28:
/usr/include/fuse3/fuse.h:939:29: note: expected 'struct fuse *' but argument is of type 'char *'
  939 | int fuse_mount(struct fuse *f, const char *mountpoint);
      | ~~~~~~~~~~~~~^
../../src/lxc/lxc_fuse.c:307:45: warning: passing argument 2 of 'fuse_mount' from incompatible pointer type [-Wincompatible-pointer-types]
  307 | fuse->ch = fuse_mount(fuse->mountpoint, &args);
      | ^~~~~
      | |
      | struct fuse_args *
In file included from ../../src/lxc/lxc_fuse.h:26,
                 from ../../src/lxc/lxc_fuse.c:28:
/usr/include/fuse3/fuse.h:939:44: note: expected 'const char *' but argument is of type 'struct fuse_args *'
  939 | int fuse_mount(struct fuse *f, const char *mountpoint);
      | ~~~~~~~~~~~~^~~~~~~~~~
../../src/lxc/lxc_fuse.c:307:14: warning: assignment to 'struct fuse_chan *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  307 | fuse->ch = fuse_mount(fuse->mountpoint, &args);
      | ^
../../src/lxc/lxc_fuse.c:312:57: error: macro "fuse_new" passed 5 arguments, but takes just 4
  312 | sizeof(lxcProcOper), fuse->def);
      | ^
In file included from ../../src/lxc/lxc_fuse.h:26,
                 from ../../src/lxc/lxc_fuse.c:28:
/usr/include/fuse3/fuse.h:925: note: macro "fuse_new" defined here
  925 | #define fuse_new(args, op, size, data) fuse_new_30(args, op, size, data)
      |
../../src/lxc/lxc_fuse.c:311:18: error: 'fuse_new' undeclared (first use in this function); did you mean 'fuse_fs_new'?
  311 | fuse->fuse = fuse_new(fuse->ch, &args, &lxcProcOper,
      | ^~~~~~~~
      | fuse_fs_new
../../src/lxc/lxc_fuse.c:311:18: note: each undeclared identifier is reported only once for each function it appears in
../../src/lxc/lxc_fuse.c:314:26: warning: passing argument 1 of 'fuse_unmount' from incompatible pointer type [-Wincompatible-pointer-types]
  314 | fuse_unmount(fuse->mountpoint, fuse->ch);
      | ~~~~^~~~~~~~~~~~
      | |
      | char *
In file included from ../../src/lxc/lxc_fuse.h:26,
                 from ../../src/lxc/lxc_fuse.c:28:
/usr/include/fuse3/fuse.h:948:32: note: expected 'struct fuse *' but argument is of type 'char *'
  948 | void fuse_unmount(struct fuse *f);
      | ~~~~~~~~~~~~~^
../../src/lxc/lxc_fuse.c:314:9: error: too many arguments to function 'fuse_unmount'
  314 | fuse_unmount(fuse->mountpoint, fuse->ch);
      | ^~~~~~~~~~~~
In file included from ../../src/lxc/lxc_fuse.h:26,
                 from ../../src/lxc/lxc_fuse.c:28:
/usr/include/fuse3/fuse.h:948:6: note: declared here
  948 | void fuse_unmount(struct fuse *f);
      | ^~~~~~~~~~~~
At top level:
../../src/lxc/lxc_fuse.c:254:31: warning: 'lxcProcOper' defined but not used [-Wunused-variable]
  254 | static struct fuse_operations lxcProcOper = {
      | ^~~~~~~~~~~