为 Sony NMOS 实现编译 C++ boost 库

Posted

技术标签:

【中文标题】为 Sony NMOS 实现编译 C++ boost 库【英文标题】:compiling C++ boost library for Sony NMOS implementation 【发布时间】:2019-11-07 03:06:48 【问题描述】:

我正在编译一个开源软件,在满足所需依赖项的过程中,我遇到了以下错误。来源位于此处。

Sony NMOS GIT Repository

编译错误似乎与 C++ Boost 和 OpenSSL 有关。看来 c++ 依赖项不可用。如何从源代码编译 c++ boost 以解决此问题?其次,我还必须编译 OPENSSL 并使库可用,以便满足依赖关系。

[root@nmos build]# cmake .. -DCMAKE_BUILD_TYPE:STRING="<Debug-or-Release>" -DWERROR:BOOL="0" -DBUILD_SAMPLES:BOOL="0" -DBUILD_TESTS:BOOL="0"
-- Setting gcc options
-- websocketpp not found, using the embedded version
CMake Warning at /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:577 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
  cmake/cpprest_find_boost.cmake:49 (find_package)
  cmake/cpprest_find_websocketpp.cmake:17 (cpprest_find_boost)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


CMake Warning at /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:577 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
  cmake/cpprest_find_boost.cmake:49 (find_package)
  cmake/cpprest_find_websocketpp.cmake:17 (cpprest_find_boost)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


CMake Warning at /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:577 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
  cmake/cpprest_find_boost.cmake:49 (find_package)
  cmake/cpprest_find_websocketpp.cmake:17 (cpprest_find_boost)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


CMake Warning at /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:577 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
  cmake/cpprest_find_boost.cmake:49 (find_package)
  cmake/cpprest_find_websocketpp.cmake:17 (cpprest_find_boost)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


CMake Warning at /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:577 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
  cmake/cpprest_find_boost.cmake:49 (find_package)
  cmake/cpprest_find_websocketpp.cmake:17 (cpprest_find_boost)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


CMake Warning at /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:577 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
  cmake/cpprest_find_boost.cmake:49 (find_package)
  cmake/cpprest_find_websocketpp.cmake:17 (cpprest_find_boost)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


CMake Warning at /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:577 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
  cmake/cpprest_find_boost.cmake:49 (find_package)
  cmake/cpprest_find_websocketpp.cmake:17 (cpprest_find_boost)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


CMake Warning at /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:577 (message):
  Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
  cmake/cpprest_find_boost.cmake:49 (find_package)
  cmake/cpprest_find_websocketpp.cmake:17 (cpprest_find_boost)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


CMake Error at /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:2048 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  cmake/cpprest_find_boost.cmake:49 (find_package)
  cmake/cpprest_find_websocketpp.cmake:17 (cpprest_find_boost)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


CMake Error at /usr/local/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
  OPENSSL_INCLUDE_DIR) (Required is at least version "1.0.0")
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.12/Modules/FindOpenSSL.cmake:412 (find_package_handle_standard_args)
  cmake/cpprest_find_openssl.cmake:44 (find_package)
  cmake/cpprest_find_websocketpp.cmake:18 (cpprest_find_openssl)
  src/CMakeLists.txt:68 (cpprest_find_websocketpp)


-- Configuring incomplete, errors occurred!
See also "/home/admin/cpprestsdk/Release/build/CMakeFiles/CMakeOutput.log".
See also "/home/admin/cpprestsdk/Release/build/CMakeFiles/CMakeError.log".

【问题讨论】:

【参考方案1】:

随时将此类问题作为问题发布到 sony/nmos-cpp GitHub 问题跟踪器上:https://github.com/sony/nmos-cpp/issues。谢谢!

【讨论】:

以上是关于为 Sony NMOS 实现编译 C++ boost 库的主要内容,如果未能解决你的问题,请参考以下文章

id生成器雪花算法和雪花算法的sony实现

PMOS 和 NMOS使用总结

CMOS和NMOS区别

NMOS管和PMOS管做开关控制电路

NMOS管和PMOS管做开关控制电路

NMOS和PMOS详解以及电路设计