BrainlessLabs / bun

Bun is a simple to use C++ Object Database, Object Relational Mapper (ORM) and key-value library
http://www.codeproject.com/Articles/1100449/Cplusplus-Object-Relational-Mapping-ORM-Eating-the
BSD 3-Clause "New" or "Revised" License
106 stars 16 forks source link

Can't compile on Ubuntu 18.04 #67

Closed mvnaz closed 4 years ago

mvnaz commented 4 years ago

Hi, I want to use this library, it looks very useful, but I can't compile it.

I have created build folder in source root and under it executed cmake .., and I got error:

-- Could NOT find Boost
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:567 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)

CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:567 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)

CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:567 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)

CMake Error at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1947 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:33 (find_package)

CMake Error at CMakeLists.txt:36 (include):
  include could not find load file:

    FindSoci

CMake Error at CMakeLists.txt:37 (find_package):
  Could not find a configuration file for package "Soci" that is compatible
  with requested version "3.2".

  The following configuration files were considered but not accepted:

    /home/mike/Downloads/soci-3.2.3/cmake/SociConfig.cmake, version: unknown

-- Configuring incomplete, errors occurred!
See also "/home/mike/Downloads/bun-master/build/CMakeFiles/CMakeOutput.log".

Then I have installed Boost, and now the error looks like this:

-- Boost version: 1.65.1
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   filesystem
--   program_options
CMake Error at CMakeLists.txt:35 (include):
  include could not find load file:

    FindSoci

CMake Error at CMakeLists.txt:36 (find_package):
  By not providing "FindSoci.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Soci", but
  CMake did not find one.

  Could not find a package configuration file provided by "Soci" (requested
  version 3.2) with any of the following names:

    SociConfig.cmake
    soci-config.cmake

  Add the installation prefix of "Soci" to CMAKE_PREFIX_PATH or set
  "Soci_DIR" to a directory containing one of the above files.  If "Soci"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "/home/mike/Downloads/bun-master/build/CMakeFiles/CMakeOutput.log".

Soci I have installed to my machine.

How to fix this problem ?

mvnaz commented 4 years ago

I have added this

set(CMAKE_MODULE_PATH /home/mike/Downloads/soci-3.2.3/cmake/modules)

to CMakeLists.txt

and then executed make command. After that bun Lib should be installed on my machine, or I have to run more commands ?

tanwar-abhi commented 1 year ago

Hi! @mvnaz were you able to resolve this issue? I am facing the same issue when trying to build, i am getting the same error in cmake i.e. "include could not find requested file: FindSoci"

I have already successfully build and installed soci but still bun is not able to find it.