最终目标:在 GNURadio Companion 中使用 RTL-SDR 进行操作
按照以下说明操作这一页,我遇到了与 Boost C++ 库相关的错误。在构建用于 GNURadio 的 gr-osmosdr 块时,cmake 无法完成,因为它找不到确实已安装的 Boost。版本 1.57。
Last metadata expiration check performed 1:27:21 ago on Thu Jul 28 15:01:40 2016.
Package boost-1.57.0-6.fc22.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
具体来说,我收到的错误消息如下所示......
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
-- Found Git: /usr/bin/git (found version "2.4.11")
-- Extracting version information from git describe...
-- Configuring Boost C++ Libraries...
-- Could NOT find Boost
CMake Error at CMakeLists.txt:125 (message):
Boost required to build gr-osmosdr
CMakeLists.txt 中有关 Boost 的代码是......
########################################################################
# Setup boost
########################################################################
MESSAGE(STATUS "Configuring Boost C++ Libraries...")
# Although not required on my system, some users have linking issues without
SET(BOOST_REQUIRED_COMPONENTS
thread
system
)
if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
set(Boost_ADDITIONAL_VERSIONS
"1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39"
"1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44"
"1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49"
"1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54"
"1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59"
"1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64"
"1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69"
)
find_package(Boost COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost required to build " ${CMAKE_PROJECT_NAME})
endif()
ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK)
可能只需要将一件事指向另一件事。但我不知道哪件事指向什么。
答案1
Fedora 中的一般规则是,软件包包含运行时库,但不包含头信息和您可能需要针对它们进行编译的其他内容。为此,您需要相应的-devel
软件包。
在这种情况下:
sudo dnf install boost-devel
应该这么做。