facebook / wangle

Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
Apache License 2.0
3.06k stars 540 forks source link

Problem linking libsodium #200

Open flatironnyc opened 3 years ago

flatironnyc commented 3 years ago

Hi guys, I am trying to build an example program and link wangle.

I got the following error:

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")  
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.51.0") found components: context filesystem program_options regex system thread 
-- Found folly: /usr/local
-- Found Threads: TRUE  
CMake Error at /home/taylor/bin/clion/bin/cmake/linux/share/cmake-3.20/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  By not providing "FindSodium.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Sodium", but
  CMake did not find one.

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

    SodiumConfig.cmake
    sodium-config.cmake

  Add the installation prefix of "Sodium" to CMAKE_PREFIX_PATH or set
  "Sodium_DIR" to a directory containing one of the above files.  If "Sodium"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  /usr/local/lib/cmake/fizz/fizz-config.cmake:53 (find_dependency)
  CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/taylor/CLionProjects/wangle_ex/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/home/taylor/CLionProjects/wangle_ex/cmake-build-debug/CMakeFiles/CMakeError.log".
make: *** [Makefile:179: cmake_check_build_system] Error 1

I have libsodium-dev installed via apt-get. Do you guys know what might be wrong? Thank you for your help in advance!

cmachaca commented 3 years ago

Hi there. There is a fix in this request. https://github.com/microsoft/vcpkg/issues/20805

flatironnyc commented 3 years ago

hi @cmachaca,

How do I get unofficial-sodium installed on Ubuntu?

According to fb's fizz repo readme, https://github.com/facebookincubator/fizz, fizz depends on libsodium. I was able to compile fizz without any problems, though. Does this mean I'd have to recompile fizz as well after switching to unofficial-sodium?

Thank you very much for your help!

cmachaca commented 3 years ago

Hi @tribecany

Sorry for my English, I use the google translator. Unofficial-sodium is a port of vcpkg. You can install libsodium separately and compile wangle again, I use vcpkg for its ease of installing packages.

Greetings.