Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build on Mac. Cmake throws "package 'jsoncpp' not found" #33

Closed
staszain opened this issue Apr 2, 2020 · 5 comments
Closed
Assignees

Comments

@staszain
Copy link

staszain commented Apr 2, 2020

MacOS 10.15.4

tried installing with brew:
Error: No available formula with the name "jwtpp"

tried building with Cmake:

cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=/Users/xxxxx/Projects/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ ..

...
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/local/Cellar/[email protected]/1.1.1d/lib/libcrypto.dylib (found version "1.1.1d")
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'jsoncpp'
-- No package 'jsoncpp' found
CMake Error at /usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/FindPkgConfig.cmake:458 (message):
A required package was not found
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/FindPkgConfig.cmake:637 (_pkg_check_modules_internal)
CMakeLists.txt:39 (pkg_check_modules)
-- Configuring incomplete, errors occurred!

jsoncpp is built with vcpkg as described in jsoncpp repo. tried installing it with brew as well.

@troian troian self-assigned this Apr 2, 2020
@troian
Copy link
Owner

troian commented Apr 2, 2020

Thank you for reporting. brew formula is broken. I'll give a fix soon.
Regarding manual build, you have to install jsoncpp manually too.
brew install jsoncpp then try to build

@troian
Copy link
Owner

troian commented Apr 3, 2020

Tap fixed. brew install jwtpp is working now

@troian troian closed this as completed Apr 3, 2020
@staszain
Copy link
Author

staszain commented Apr 3, 2020

I tried "brew install jsoncpp" yesterday. It doesn't work as well. I suspect it needs some additional variable or something, like openssl needs OPENSSL_ROOT_DIR to compile, but it is not transparent which one and where. Anyway, brew install jwtpp works now, thank you very much!

@staszain
Copy link
Author

staszain commented Apr 3, 2020

FYI, I'm afraid brew package is missing include folder after installation.

@troian
Copy link
Owner

troian commented Apr 5, 2020

Yes. On MacOS you have to specify OPENSSL_ROOT_DIR on cmake stage.
For example -DOPENSSL_ROOT_DIR=$(brew --prefix openssl)

FYI, I'm afraid brew package is missing include folder after installation.

Thanks for reporting. There is a bug in CMakeLists.txt. Release v2.0.2 fixes it.

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

No branches or pull requests

2 participants