Eos: Error building DAWN-2018-02-14 on macOS

Created on 15 Mar 2018  ยท  9Comments  ยท  Source: EOSIO/eos

  1. the script mentioned in the doc ./eosio_build.sh didn't exist under the tag
  2. try using build.sh darwin or build manually, will finally failed at the step configure, the message is
-- 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/local/bin/doxygen (found version "1.8.14") found components:  doxygen dot
-- 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 /Users/x/x/x/eos/plugins/db_plugin
EOS_LIBMONGOCXX
    linked by target "db_plugin" in directory /Users/x/x/x/eos/plugins/db_plugin

any ideas on how to build it successfully from macOS ? thanks

Most helpful comment

I ran into this issue and, having resolved it, ran into another issue involving ssl. The following steps roll all the solutions together:

Install openssl and export related flags:

brew install openssl
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export LDFLAGS="-L/usr/local/opt/openssl/lib"

Make and install libbsonc and libmongoc.
See: http://mongoc.org/libmongoc/current/installing.html#building-on-mac-os-x

Make and install libbsoncxx and libmongocxx (the following instructions are a TL;DR of http://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/):

git clone https://github.com/mongodb/mongo-cxx-driver.git --branch releases/stable --depth 1
cd mongo-cxx-driver/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install

Finally, make EOS:

git clone https://github.com/eosio/eos --recursive
cd eos
git checkout DAWN-2018-02-14
git submodule update --recursive

in build.sh, find this line:
cmake ...bunch of stuff...

and change it to (all one line, no line break):
cmake -DEOS_LIBBSONCXX=/usr/local/lib/libbsoncxx.dylib -DEOS_LIBMONGOCXX=/usr/local/lib/libmongocxx.dylib ...bunch of stuff...

then:
./build.sh darwin

All 9 comments

for those not familiar with cmake, appending:

-DEOS_LIBBSONCXX=/usr/local/lib/libbsoncxx.dylib -DEOS_LIBMONGOCXX=/usr/local/lib/libmongocxx.dylib

I have got the same problem,Could someone fix it ?Here is the error log:
`CMake Error at libraries/appbase/CMakeLists.txt:59 (install):
install TARGETS given no ARCHIVE DESTINATION for static library target
"appbase".

-- Git commit revision: bcb5bf75
-- Git commit revision: bcb5bf75
-- 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
-- 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 /Users/XX/Desktop/eos/plugins/db_plugin
EOS_LIBMONGOCXX
linked by target "db_plugin" in directory /Users/XX/Desktop/eos/plugins/db_plugin

-- Configuring incomplete, errors occurred!
make: * [cmake_check_build_system] Error 1`

I have got the same problem on Ubuntu branch DAWN-2018-02-14
-- Configuring AppBase on Linux
CMake Error at libraries/appbase/CMakeLists.txt:59 (install):
install TARGETS given no ARCHIVE DESTINATION for static library target
"appbase".

-- Git commit revision: bcb5bf75
-- Git commit revision: bcb5bf75
-- Git commit revision: bcb5bf75
-- Found bsoncxx headers: /usr/local/include/bsoncxx/v_noabi
-- Found bsoncxx library: /usr/local/lib/libbsoncxx.dylib
-- Found mongocxx headers: /usr/local/include/mongocxx/v_noabi;/usr/local/include/bsoncxx/v_noabi
-- Found mongocxx library: /usr/local/lib/libmongocxx.dylib
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Doxygen not found. Contract documentation will not be generated.
-- Configuring incomplete, errors occurred!
See also "/home/liao/eos/build/CMakeFiles/CMakeOutput.log"

@arrui try adding there options to cmake

-DEOS_LIBBSONCXX=/usr/local/lib/libbsoncxx.dylib -DEOS_LIBMONGOCXX=/usr/local/lib/libmongocxx.dylib

@hsx-ljg it's not the same issue.

you are missing DOXYGEN instead of MONGO driver, please install doxygen and retry

install TARGETS given no ARCHIVE DESTINATION for static library target

This error is due to you needing to update you git submodules

$ git submodule init
$ git submodule update

I've solved this error by change CMakeList.txt file.
This error is duplicate with this:
https://github.com/EOSIO/eos/issues/1601

brew install gcc

I ran into this issue and, having resolved it, ran into another issue involving ssl. The following steps roll all the solutions together:

Install openssl and export related flags:

brew install openssl
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export LDFLAGS="-L/usr/local/opt/openssl/lib"

Make and install libbsonc and libmongoc.
See: http://mongoc.org/libmongoc/current/installing.html#building-on-mac-os-x

Make and install libbsoncxx and libmongocxx (the following instructions are a TL;DR of http://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/):

git clone https://github.com/mongodb/mongo-cxx-driver.git --branch releases/stable --depth 1
cd mongo-cxx-driver/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install

Finally, make EOS:

git clone https://github.com/eosio/eos --recursive
cd eos
git checkout DAWN-2018-02-14
git submodule update --recursive

in build.sh, find this line:
cmake ...bunch of stuff...

and change it to (all one line, no line break):
cmake -DEOS_LIBBSONCXX=/usr/local/lib/libbsoncxx.dylib -DEOS_LIBMONGOCXX=/usr/local/lib/libmongocxx.dylib ...bunch of stuff...

then:
./build.sh darwin

Was this page helpful?
0 / 5 - 0 ratings

Related issues

christola picture christola  ยท  3Comments

bezalel picture bezalel  ยท  3Comments

Npizza picture Npizza  ยท  3Comments

IvanYakimov picture IvanYakimov  ยท  3Comments

congnghebitcoin picture congnghebitcoin  ยท  3Comments