EricTheMagician / DriveFS

A google drive fuse filesystem implemented in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem compiling

gpapin opened this issue · comments

Hi,
I'm trying to provide a dockerfile for people to be able to compile and run this without having to install a lot of thing on they system.
But I run into issues when trying to compile it on a docker version of alpine edge.

[ 86%] Building CXX object CMakeFiles/DriveFS.dir/src/BaseFileSystem.cpp.o
In file included from /src/src/BaseFile.cpp:5:
/src/src/../include/BaseFile.h:44:18: error: '__ino_t' does not name a type; did you mean 'ino_t'?
     inline const __ino_t & getInode() const { return attribute.st_ino; }
                  ^~~~~~~
                  ino_t
[ 89%] Building CXX object CMakeFiles/DriveFS.dir/src/FolderIO.cpp.o
[ 93%] Building CXX object CMakeFiles/DriveFS.dir/src/gdrive/FileIO.cpp.o
make[2]: *** [CMakeFiles/DriveFS.dir/build.make:89: CMakeFiles/DriveFS.dir/src/BaseFile.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /src/./include/gdrive/File.h:8,
                 from /src/src/gdrive/File.cpp:5:
/src/./include/BaseFile.h:44:18: error: '__ino_t' does not name a type; did you mean 'ino_t'?
     inline const __ino_t & getInode() const { return attribute.st_ino; }
                  ^~~~~~~
                  ino_t
In file included from /src/./include/gdrive/File.h:8,
                 from /src/./include/gdrive/Account.h:9,
                 from /src/./include/gdrive/FileIO.h:16,
                 from /src/src/gdrive/Filesystem.cpp:5:
/src/./include/BaseFile.h:44:18: error: '__ino_t' does not name a type; did you mean 'ino_t'?
     inline const __ino_t & getInode() const { return attribute.st_ino; }
                  ^~~~~~~
                  ino_t
In file included from /src/./include/gdrive/File.h:8,
                 from /src/./include/gdrive/Account.h:9,
                 from /src/src/gdrive/Account.cpp:5:
/src/./include/BaseFile.h:44:18: error: '__ino_t' does not name a type; did you mean 'ino_t'?
     inline const __ino_t & getInode() const { return attribute.st_ino; }
                  ^~~~~~~
                  ino_t
In file included from /src/./include/gdrive/File.h:8,
                 from /src/./include/gdrive/Account.h:9,
                 from /src/src/main.cpp:3:
/src/./include/BaseFile.h:44:18: error: '__ino_t' does not name a type; did you mean 'ino_t'?
     inline const __ino_t & getInode() const { return attribute.st_ino; }
                  ^~~~~~~
                  ino_t
/src/src/main.cpp: In function 'int main(int, char**)':
/src/src/main.cpp:258:54: error: too many arguments to function 'fuse_lowlevel_ops DriveFS::getOps()'
     struct fuse_lowlevel_ops ops = DriveFS::getOps({});
                                                      ^
In file included from /src/src/main.cpp:4:
/src/./include/gdrive/Filesystem.h:11:30: note: declared here
     struct fuse_lowlevel_ops getOps();
                              ^~~~~~
/src/src/gdrive/File.cpp: In constructor 'DriveFS::_Object::_Object(ino_t, bsoncxx::v_noabi::document::view)':
/src/src/gdrive/File.cpp:176:55: error: 'S_BLKSIZE' was not declared in this scope
             attribute.st_blocks = attribute.st_size / S_BLKSIZE + std::min<int64_t>(attribute.st_size % S_BLKSIZE,1);
                                                       ^~~~~~~~~
/src/src/gdrive/File.cpp: In member function 'void DriveFS::_Object::updateInode(bsoncxx::v_noabi::document::view)':
/src/src/gdrive/File.cpp:339:55: error: 'S_BLKSIZE' was not declared in this scope
             attribute.st_blocks = attribute.st_size / S_BLKSIZE + std::min<int64_t>(attribute.st_size % S_BLKSIZE,1);
                                                       ^~~~~~~~~
In file included from /src/./include/gdrive/File.h:8,
                 from /src/./include/gdrive/Account.h:9,
                 from /src/./include/gdrive/FileIO.h:16,
                 from /src/src/gdrive/FileIO.cpp:5:
/src/./include/BaseFile.h:44:18: error: '__ino_t' does not name a type; did you mean 'ino_t'?
     inline const __ino_t & getInode() const { return attribute.st_ino; }
                  ^~~~~~~
                  ino_t
make[2]: *** [CMakeFiles/DriveFS.dir/build.make:115: CMakeFiles/DriveFS.dir/src/gdrive/Filesystem.cpp.o] Error 1
make[2]: *** [CMakeFiles/DriveFS.dir/build.make:76: CMakeFiles/DriveFS.dir/src/main.cpp.o] Error 1
/src/src/gdrive/FileIO.cpp: In member function 'bool DriveFS::FileIO::checkFileExists()':
/src/src/gdrive/FileIO.cpp:674:74: error: 'using element_type = class DriveFS::_Object' {aka 'class DriveFS::_Object'} has no member named 'getInode'; did you mean 'getId'?
         const auto cursor = DriveFS::_Object::inodeToObject.find(m_file->getInode());
                                                                          ^~~~~~~~
                                                                          getId
make[2]: *** [CMakeFiles/DriveFS.dir/build.make:102: CMakeFiles/DriveFS.dir/src/gdrive/File.cpp.o] Error 1
make[2]: *** [CMakeFiles/DriveFS.dir/build.make:128: CMakeFiles/DriveFS.dir/src/gdrive/Account.cpp.o] Error 1
make[2]: *** [CMakeFiles/DriveFS.dir/build.make:193: CMakeFiles/DriveFS.dir/src/gdrive/FileIO.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:106: CMakeFiles/DriveFS.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

This distribution come with nothing so I had to load it with quite more lib than what stated on the wiki:

  • git
  • perl
  • boost-dev
  • fuse3-dev
  • jemalloc-dev
  • mongodb
  • mongodb-tools
  • libexecinfo-dev
  • build-base
  • gcc
  • abuild
  • binutils
  • cmake
  • mongo-c-driver-dev
  • libbson-dev

I must be missing something core but I struggle to find what, any clue would be appreciated.

Hi, Thanks for you push it fixed this error:

/src/src/main.cpp:258:54: error: too many arguments to function 'fuse_lowlevel_ops DriveFS::getOps()'
     struct fuse_lowlevel_ops ops = DriveFS::getOps({});

But I still get all the other ones . Maybe if you could point me to what __ino_t is I could find the package to install it on alpine.

At the end I gave up on alpine and used archlinux and apart from a ton of warning regarding mongocxx I managed to compile it.

Regarding your commit above, I ended up using struct fuse_lowlevel_ops ops = DriveFS::getOps(); instead.