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

value: fix build without jsoncpp #613

Merged
merged 1 commit into from
May 25, 2022
Merged

value: fix build without jsoncpp #613

merged 1 commit into from
May 25, 2022

Conversation

cho-m
Copy link
Contributor

@cho-m cho-m commented May 25, 2022

Seen in Homebrew (Homebrew/homebrew-core#101711) where we haven't added optional jsoncpp features

Issue was that checkSignature and decrypt were added inside the #ifdef OPENDHT_JSONCPP, so they weren't getting compiled resulting in

Undefined symbols for architecture x86_64:
    "dht::Value::checkSignature()", referenced from:
        dht::SecureDht::checkValue(std::__1::shared_ptr<dht::Value> const&) in securedht.cpp.o
        std::__1::__function::__func<dht::SecureDht::secureType(dht::ValueType&&)::$_3, std::__1::allocator<dht::SecureDht::secureType(dht::ValueType&&)::$_3>, bool (dht::Hash<20ul>, std::__1::shared_ptr<dht::Value>&, dht::Hash<20ul> const&, dht::SockAddr const&)>::operator()(dht::Hash<20ul>&&, std::__1::shared_ptr<dht::Value>&, dht::Hash<20ul> const&, dht::SockAddr const&) in securedht.cpp.o
        std::__1::__function::__func<dht::SecureDht::secureType(dht::ValueType&&)::$_4, std::__1::allocator<dht::SecureDht::secureType(dht::ValueType&&)::$_4>, bool (dht::Hash<20ul>, std::__1::shared_ptr<dht::Value> const&, std::__1::shared_ptr<dht::Value>&, dht::Hash<20ul> const&, dht::SockAddr const&)>::operator()(dht::Hash<20ul>&&, std::__1::shared_ptr<dht::Value> const&, std::__1::shared_ptr<dht::Value>&, dht::Hash<20ul> const&, dht::SockAddr const&) in securedht.cpp.o
    "dht::Value::decrypt(dht::crypto::PrivateKey const&)", referenced from:
        dht::SecureDht::checkValue(std::__1::shared_ptr<dht::Value> const&) in securedht.cpp.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[2]: *** [libopendht.2.4.4.dylib] Error 1
  make[1]: *** [CMakeFiles/opendht.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....

Building Homebrew formula for v2.4.4 with the patch worked for me.

@cho-m cho-m mentioned this pull request May 25, 2022
6 tasks
@aberaud aberaud merged commit 56442ac into savoirfairelinux:master May 25, 2022
@cho-m cho-m deleted the value-without-jsoncpp branch May 25, 2022 15:08
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

Successfully merging this pull request may close these issues.

2 participants