Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Fails to find boost, while cmake-modules provides FindBoost.cmake; also fails to find jsoncpp #4537

Open
yurivict opened this issue Sep 22, 2017 · 10 comments
Labels

Comments

@yurivict
Copy link

It fails:

CMake Error at CMakeLists.txt:97 (find_package):
  Could not find a package configuration file provided by "Boost" with any of
  the following names:

    BoostConfig.cmake
    boost-config.cmake

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

while the file /usr/local/share/cmake/Modules/FindBoost.cmake exists. You should just use cmake-modules.

@moneroexamples
Copy link
Contributor

What OS do you use?

@yurivict
Copy link
Author

FreeBSD

@sizeofvoid
Copy link

Try to drop the CONFIG option.

@yurivict
Copy link
Author

yurivict commented Oct 8, 2017

@sizeofvoid I didn't set any config options.

@sizeofvoid
Copy link

@yurivict
Copy link
Author

yurivict commented Oct 8, 2017

Now it can't find jsoncpp:

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

    jsoncppConfig.cmake
    jsoncpp-config.cmake

jsoncpp-1.8.1 provides jsoncpp.pc

# pkg info -l jsoncpp | grep pc
	/usr/local/libdata/pkgconfig/jsoncpp.pc

You are searching for a wrong .pc file.

@yurivict yurivict changed the title Fails to find boost, while cmake-modules provides FindBoost.cmake Fails to find boost, while cmake-modules provides FindBoost.cmake; also searched for jsoncpp's .pc using a wrong name Oct 8, 2017
@sizeofvoid
Copy link

find_package() is looking for CMake Modules and not *.pc files. jsoncpp doesn't offer any CMake modules. I think cpp-ethereum needs libjson-rpc-cpp which offers FindJsoncpp.cmake. cpp-ethereum` CMake builds environment hides all that information. Not really package maintainer friendly.

@yurivict yurivict changed the title Fails to find boost, while cmake-modules provides FindBoost.cmake; also searched for jsoncpp's .pc using a wrong name Fails to find boost, while cmake-modules provides FindBoost.cmake; also fails to find jsoncpp Oct 9, 2017
@gumb0 gumb0 added the build label Jan 22, 2018
@axic axic added build and removed build labels Jan 24, 2018
@jason-tilley
Copy link

jason-tilley commented Feb 9, 2018

I have the same problem on a Mac. Removing CONFIG from the find_package(Boost) call gets me past the Boost problem. I installed libjson-rpc-cpp, but I still get the same jsoncpp error as yurivict.

@sizeofvoid
Copy link

I still run into the same cmake issues on non Linux OS. I quit my work on porting that software to OpenBSD.

@ghost
Copy link

ghost commented Mar 16, 2018

in debian/ubuntu land running into the same issue...but was able to get past it with the changes in this branch. It's a bit of a work in progress but looks like boost/jsonrpc is included.
https://github.com/themusicgod1/cpp-ethereum/tree/withouthera

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

No branches or pull requests

6 participants