ubuntu eos build error
Hello.
The following error occurred during EOS processing :
-- Found bsoncxx headers: /usr/local/include/bsoncxx/v_noabi -- Found bsoncxx library: EOS_LIBBSONCXX-NOTFOUND -- Found mongocxx headers: /usr/local/include/mongocxx/v_noabi;/usr/local/include/bsoncxx/v_noabi -- Found mongocxx library: EOS_LIBMONGOCXX-NOTFOUND -- Doxygen found. Contract documentation will be generated. CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: EOS_LIBBSONCXX linked by target "db_plugin" in directory /home/shin/eos/plugins/db_plugin EOS_LIBMONGOCXX linked by target "db_plugin" in directory /home/shin/eos/plugins/db_plugin
-- Configuring incomplete, errors occurred! See also "/home/shin/eos/CMakeFiles/CMakeOutput.log".
Is there a good solution?
Are you compiling source code from git checkout DAWN-2018-02-14?
Check out https://github.com/EOSIO/eos/blob/master/plugins/mongo_db_plugin/CMakeLists.txt. You need to modify your plugins/db_plugin/CMakeList.txt accordingly like the following:
# The *.cmake package files provided by mongo-cxx-driver don't give us the
# absolute path to the libraries, which is needed whenever they are not
# installed in system-known locations. CMake requires the absolute paths
# in target_link_libraries() since we are builiding an archive and the
# link step for all executables using this archive must include the
# mongo-cxx-driver libraries libmongocxx and libbsoncxx.
find_package(libbsoncxx REQUIRED)
message(STATUS "Found bsoncxx headers: ${LIBBSONCXX_INCLUDE_DIRS}")
# mongo-cxx-driver 3.2 release altered LIBBSONCXX_LIBRARIES semantics. Instead of library names,
# it now hold library paths.
if((LIBBSONCXX_VERSION_MAJOR LESS 3) OR ((LIBBSONCXX_VERSION_MAJOR EQUAL 3) AND (LIBBSONCXX_VERSION_MINOR LESS 2)))
find_library(EOS_LIBBSONCXX ${LIBBSONCXX_LIBRARIES}
PATHS ${LIBBSONCXX_LIBRARY_DIRS} NO_DEFAULT_PATH)
else()
set(EOS_LIBBSONCXX ${LIBBSONCXX_LIBRARIES})
endif()
message(STATUS "Found bsoncxx library: ${EOS_LIBBSONCXX}")
find_package(libmongocxx REQUIRED)
message(STATUS "Found mongocxx headers: ${LIBMONGOCXX_INCLUDE_DIRS}")
# mongo-cxx-driver 3.2 release altered LIBBSONCXX_LIBRARIES semantics. Instead of library names,
# it now hold library paths.
if((LIBMONGOCXX_VERSION_MAJOR LESS 3) OR ((LIBMONGOCXX_VERSION_MAJOR EQUAL 3) AND (LIBMONGOCXX_VERSION_MINOR LESS 2)))
find_library(EOS_LIBMONGOCXX ${LIBMONGOCXX_LIBRARIES}
PATHS ${LIBMONGOCXX_LIBRARY_DIRS} NO_DEFAULT_PATH)
else()
set(EOS_LIBMONGOCXX ${LIBMONGOCXX_LIBRARIES})
endif()
message(STATUS "Found mongocxx library: ${EOS_LIBMONGOCXX}")
add_definitions(-DMONGODB)
Builds on our nightly build of Ubuntu.
I was able to reproduce on the DAWN-2018-02-14 tag. The issue is resolved on the dawn-2.x branch. I'd suggest using that instead of the DAWN-2018-02-14 tag.
the same problem in DAWN-2018-02-14 tag:
-- Found Git: /usr/bin/git (found version "2.15.1")
-- Git commit revision: bcb5bf75
-- Git commit revision: bcb5bf75
-- Found Intl: /usr/include
-- Git commit revision: bcb5bf75
-- Found bsoncxx headers: /usr/local/include/bsoncxx/v_noabi
-- Found bsoncxx library: EOS_LIBBSONCXX-NOTFOUND
-- Found mongocxx headers: /usr/local/include/mongocxx/v_noabi;/usr/local/include/bsoncxx/v_noabi
-- Found mongocxx library: EOS_LIBMONGOCXX-NOTFOUND
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11")
-- Doxygen found. Contract documentation will be generated.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
EOS_LIBBSONCXX
linked by target "db_plugin" in directory /home/xzt/bk/eos/plugins/db_plugin
EOS_LIBMONGOCXX
linked by target "db_plugin" in directory /home/xzt/bk/eos/plugins/db_plugin
I run ./build.sh ubuntu full, so confuse.