eos icon indicating copy to clipboard operation
eos copied to clipboard

Eos build failed on Mac os high Sierra 10.13.1

Open misiteye opened this issue 8 years ago • 8 comments

CMake Error at plugins/db_plugin/CMakeLists.txt:21 (find_package): By not providing "Findlibbsoncxx.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "libbsoncxx", but CMake did not find one.

Could not find a package configuration file provided by "libbsoncxx" with any of the following names:

libbsoncxxConfig.cmake
libbsoncxx-config.cmake

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

-- Configuring incomplete, errors occurred! See also "/Users/yepeilun/eos/build/CMakeFiles/CMakeOutput.log". make: *** No targets specified and no makefile found. Stop.

Anyboby can help me?

misiteye avatar Jan 02 '18 06:01 misiteye

see https://github.com/EOSIO/eos/blob/DAWN-2018-02-14/plugins/db_plugin/CMakeLists.txt#L36

    # sudo apt-get install pkg-config libssl-dev libsasl2-dev
    # wget https://github.com/mongodb/mongo-c-driver/releases/download/1.8.0/mongo-c-driver-1.8.0.tar.gz
    # tar xzf mongo-c-driver-1.8.0.tar.gz
    # cd mongo-c-driver-1.8.0
    # ./configure --disable-automatic-init-and-cleanup --enable-static
    # make
    # sudo make install
    #
    # 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 ..
    # sudo make EP_mnmlstc_core
    # make
    # sudo make install
    #
    # sudo apt-get install mongodb

jolestar avatar Feb 25 '18 03:02 jolestar

Got the same problem - did the mongo-c driver and mongo-cxx driver installation manually also... I can see the mentioned libraries in my /usr/local/lib (libbsoncxx, libmongocxx) but I can't seem to find a way to point cmake to them..

I get printed status messages : "-- Found mongocxx library: EOS_LIBMONGOCXX-NOTFOUND" "-- Found bsoncxx library: EOS_LIBBSONCXX-NOTFOUND"

which leads to an error:

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

for each library.

Any suggestions?

Guy-Dvir avatar Mar 10 '18 02:03 Guy-Dvir

I tried to build the dawn-2.x branch in my Ubuntu 16.04 LTS and got this problem as well. I use latest version of GCC (7.2), Clang version 5, and installed mongodb C library version 1.9.3.

image

WendySanarwanto avatar Mar 17 '18 00:03 WendySanarwanto

brew install gcc

1109993488 avatar Mar 21 '18 14:03 1109993488

See also: https://github.com/EOSIO/eos/issues/1661#issuecomment-373920747

kkurian avatar Mar 21 '18 17:03 kkurian

For Mac OS 10.12 and higher. Proper installation of mongo-cxx-driver (libbsoncxx is included also make sure you have installed pkgconfig i.e. brew install pkgconfig)

cd ~ brew install --force pkgconfig brew unlink pkgconfig && brew link --force pkgconfig curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz tar xf mongo-c-driver-1.9.3.tar.gz rm -f mongo-c-driver-1.9.3.tar.gz cd mongo-c-driver-1.9.3 ./configure --enable-ssl=darwin --disable-automatic-init-and-cleanup --prefix=/usr/local make -j$( sysctl -in machdep.cpu.core_count ) sudo make install cd .. rm -rf mongo-c-driver-1.9.3

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 -j$( sysctl -in machdep.cpu.core_count ) sudo make install cd rm -rf mongo-cxx-driver

pacificcode avatar Mar 21 '18 17:03 pacificcode

I have tried everything. keep getting this error. I have no idea whats wrong I can't get MongoDB driver to work. I use macOS high sierra 10.13.4

`checking if compiler needs -Werror to reject unknown flags... yes

checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... no checking whether pthreads work with -pthreads... no checking whether pthreads work with -mthreads... no checking for the pthreads library -lpthread... no checking whether pthreads work with --thread-safe... no checking whether pthreads work with -mt... no checking for pthread-config... no configure: error: libbson requires pthreads on non-Windows platforms. configure: error: ./configure failed for src/libbson`

dreson4 avatar Jun 05 '18 15:06 dreson4

@dreson4 This thread is quite old and EOSIO has changed a great deal since this tread was last responded to. Im going to close this ticket but in the meantime I recommend removing your current clone of the EOSIO repo and starting fresh by running the commands below. If you still run into any issues please create a new ticket and copy and paste the entire output of the commands below into the new ticket. Thank you.

rm -rf /path/to/eos git clone https://github.com/EOSIO/eos.git --recursive git submodule update --init --recursive ./eosio_build.sh

pacificcode avatar Jun 05 '18 15:06 pacificcode