EricTheMagician / DriveFS

A google drive fuse filesystem implemented in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiling on Ubuntu Disco Dingo

sabrehagen opened this issue · comments

Here's a Dockerfile I'm using to set up DriveFS on Ubuntu Disco Dingo with

docker build -t drivefs .

FROM ubuntu:19.04

# Install build dependencies
RUN apt-get update -qq && \
  apt-get install -qq \
  cmake \
  g++ \
  git \
  fuse3 \
  libboost-all-dev \
  libfuse3-3 \
  libfuse3-dev \
  libjemalloc-dev \
  libmongoc-dev \
  mongodb

# Install DriveFS
RUN git clone https://github.com/thejinx0r/DriveFS.git && \
  cd DriveFS && \
  git submodule init && \
  git submodule update && \
  mkdir build && \
  cd build && \
  DUSE_FUSE3=1 cmake .. && \
  make -j 8

# Start the application
CMD ./DriveFS

The build log errors with

-- The CXX compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:39 (find_package_handle_standard_args)
  CMakeLists.txt:49 (find_package)


-- Configuring incomplete, errors occurred!
See also "/DriveFS/build/CMakeFiles/CMakeOutput.log".
The command '/bin/sh -c git clone https://github.com/thejinx0r/DriveFS.git &&   cd DriveFS &&   git submodule init &&   git submodule update &&   mkdir build &&   cd build &&   DUSE_FUSE3=1 cmake .. &&   make -j 8' returned a non-zero code: 1

Could you advise as to which package is missing please?

Thank you, fixed with your advice. Now I'm receiving the following error even with fuse3, libfuse3-3, libfuse3-dev available and DUSE_FUSE3=1 set. Any advice?

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for one of the modules 'fuse'
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:679 (message):
  None of the required 'fuse' found
Call Stack (most recent call first):
  CMakeLists.txt:57 (pkg_search_module)

Thank you, fixed with your advice. Now I'm receiving the following error even with fuse3, libfuse3-3, libfuse3-dev available and DUSE_FUSE3=1 set. Any advice?

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for one of the modules 'fuse'
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:679 (message):
  None of the required 'fuse' found
Call Stack (most recent call first):
  CMakeLists.txt:57 (pkg_search_module)

hello, i have fixed all dependencies by adding this lines to docker file:
RUN apt-get install -qq pkg-config
RUN apt-get install -qq libfuse-dev

But i have got many errors during compilation, usually with mongocxx

here is the part of exception:
In file included from /DriveFS/build/mongocxx/src/mongocxx/src/mongocxx/exception/private/mongoc_error.hh:19, from /DriveFS/build/mongocxx/src/mongocxx/src/mongocxx/bulk_write.cpp:22: /DriveFS/build/mongocxx/src/mongocxx/src/mongocxx/private/libmongoc.hh:58:61: warning: 'int64_t mongoc_collection_count(mongoc_collection_t*, mongoc_query_flags_t, const bson_t*, int64_t, int64_t, const mongoc_read_prefs_t*, bson_error_t*)' is deprecated: Use mongoc_collection_count_documents or mongoc_collection_estimated_document_count instead [-Wdeprecated-declarations] extern MONGOCXX_API mongocxx::test_util::mock<decltype(&mongoc_##name)>& name;

I get

-- Installing: /opt/drivefs/external/lib/cpprestsdk/cpprestsdk-targets-release.cmake
[ 48%] Completed 'cpprest'
[ 48%] Built target cpprest
make: *** [Makefile:84: all] Error 2
The command '/bin/sh -c git clone https://github.com/thejinx0r/DriveFS.git /opt/drivefs &&   cd /opt/drivefs &&   git submodule init &&   git submodule update &&   mkdir build &&   cd build &&   DUSE_FUSE3=1 cmake .. &&   make -j 8' returned a non-zero code: 2
error Command failed with exit code 2.
commented

If that helps, here is my dockerfile

FROM archlinux/base:latest

RUN pacman -Sy --noconfirm gcc make cmake pkgconf mongo-c-driver boost jemalloc fuse3 git

WORKDIR /app
ADD . .

RUN cmake -DUSE_FUSE3=1 . && make -j 8

ENTRYPOINT ["/app/DriveFS"]
CMD ["--help"]