Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling on Ubuntu Disco Dingo #10

Open
sabrehagen opened this issue Jul 27, 2019 · 6 comments
Open

Compiling on Ubuntu Disco Dingo #10

sabrehagen opened this issue Jul 27, 2019 · 6 comments

Comments

@sabrehagen
Copy link

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?

@EricTheMagician
Copy link
Owner

EricTheMagician commented Jul 27, 2019 via email

@sabrehagen
Copy link
Author

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)

@T-REX-XP
Copy link

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;

@EricTheMagician
Copy link
Owner

EricTheMagician commented Jul 30, 2019 via email

@sabrehagen
Copy link
Author

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.

@mcadam
Copy link

mcadam commented Sep 11, 2019

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"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants