【问题标题】:UHD Device Won't Build in Redhawk 1.9.0UHD 设备不会在 Redhawk 1.9.0 中构建
【发布时间】:2013-12-17 15:00:13
【问题描述】:

我正在尝试在 Redhawk 1.9.0 中构建 UHD 设备,最新提交 (c749987865c5e158b65f26b160e0435f34c71580),但收到多个构建错误(见下文)。我在尝试构建最新版本的 UHD 设备 (v2.0.2) 时收到了类似的错误。

UHD 设备的自述文件并未说明构建设备的要求或提供任何其他说明。

我有两个问题:
1) 我也需要安装 GNUHawk 吗?
2) 如果是这样,我想这意味着我需要降级到 Redhawk 1.8.4,因为 GNUHawk 据说不能与 Redhawk 1.9.0 (http://redhawksdr.github.io/Documentation/gnuhawk/mainli2.html) 一起使用,对吗?

如果问题与我的构建过程有关,我的步骤如下:
1) 从 GitHub 下载 repo 的 zip 文件
2) 将文件内容提取到REDHAWK工作区并导入项目
3)右键项目名称(USRP_UHD-develop-1.8),选择“Build Project”

09:30:38 **** Build of configuration Debug for project USRP_UHD-develop-1.8 ****
/home/nousain/workspace/USRP_UHD-develop-1.8/cpp/build.sh all 
g++ -DPACKAGE_NAME=\"USRP_UHD\" -DPACKAGE_TARNAME=\"usrp_uhd\" -DPACKAGE_VERSION=\"2.0.1\" -DPACKAGE_STRING=\"USRP_UHD\ 2.0.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"usrp_uhd\" -DVERSION=\"2.0.1\" -DHAVE_OMNIORB4=1 -DHAVE_LOG4CXX=1 -DHAVE_BOOST=1 -DHAVE_BOOST_THREAD=1 -DEXPECTED_VECTOR_IMPL=/\*\*/     -Wall -D__x86_64__ -D__linux__ -D__OSVERSION__=2 -DHAVE_LOG4CXX=1 -DENABLE_EVENTS=1 -I/usr/local/redhawk/core/include -I/usr/local/redhawk/core/include/ossie -I/usr/local/redhawk/core/share/idl   -pthread -I/usr/include -I/usr/local/redhawk/core/include/ossie -I/usr/local/redhawk/core/include/redhawk    -g -O2 -MT USRP_UHD-USRP_UHD.o -MD -MP -MF .deps/USRP_UHD-USRP_UHD.Tpo -c -o USRP_UHD-USRP_UHD.o `test -f 'USRP_UHD.cpp' || echo './'`USRP_UHD.cpp
In file included from USRP_UHD.cpp:37:
USRP_UHD.h:26:35: error: uhd/usrp/multi_usrp.hpp: No such file or directory
In file included from /usr/include/boost/thread/future.hpp:12,
                 from /usr/include/boost/thread.hpp:24,
                 from USRP_UHD_base.h:24,
                 from USRP_UHD.h:25,
                 from USRP_UHD.cpp:37:
/usr/include/boost/exception_ptr.hpp:43: error: looser throw specifier for ‘virtual boost::exception_ptr::~exception_ptr()’
/usr/include/boost/exception/detail/exception_ptr_base.hpp:26: error:   overriding ‘virtual boost::exception_detail::exception_ptr_base::~exception_ptr_base() throw ()’
In file included from USRP_UHD.cpp:37:
USRP_UHD.h:393: error: ‘uhd’ has not been declared
USRP_UHD.h:393: error: ISO C++ forbids declaration of ‘sptr’ with no type
USRP_UHD.h:393: error: expected ‘;’ before ‘usrpDevice’
USRP_UHD.h:394: error: ‘uhd’ has not been declared
USRP_UHD.h:394: error: ISO C++ forbids declaration of ‘device_addr_t’ with no type
USRP_UHD.h:394: error: expected ‘;’ before ‘device_addr’
USRP_UHD.cpp: In member function ‘virtual int USRP_UHD_i::serviceFunction()’:
USRP_UHD.cpp:281: error: ‘uhd’ has not been declared
USRP_UHD.cpp:281: error: expected ‘;’ before ‘_metadata’
USRP_UHD.cpp:282: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:282: error: ‘_metadata’ was not declared in this scope
USRP_UHD.cpp:282: error: ‘uhd’ has not been declared
USRP_UHD.cpp:282: error: ‘uhd’ has not been declared
USRP_UHD.cpp:285: error: ‘uhd’ has not been declared
USRP_UHD.cpp:287: error: ‘uhd’ has not been declared
USRP_UHD.cpp:290: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘bool USRP_UHD_i::singleService_transmit(IN_PORT_TYPE*)’:
USRP_UHD.cpp:366: error: ‘uhd’ has not been declared
USRP_UHD.cpp:366: error: expected ‘;’ before ‘_metadata’
USRP_UHD.cpp:367: error: ‘_metadata’ was not declared in this scope
USRP_UHD.cpp:372: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:372: error: ‘uhd’ has not been declared
USRP_UHD.cpp:372: error: ‘uhd’ has not been declared
USRP_UHD.cpp:376: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:376: error: ‘uhd’ has not been declared
USRP_UHD.cpp:376: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘virtual void USRP_UHD_i::configure(const CF::Properties&)’:
USRP_UHD.cpp:431: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:446: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:454: error: ‘uhd’ has not been declared
USRP_UHD.cpp:454: error: expected ‘;’ before ‘clock_config’
USRP_UHD.cpp:455: error: ‘clock_config’ was not declared in this scope
USRP_UHD.cpp:455: error: ‘uhd’ has not been declared
USRP_UHD.cpp:456: error: ‘uhd’ has not been declared
USRP_UHD.cpp:457: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:459: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:459: error: ‘uhd’ has not been declared
USRP_UHD.cpp:461: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:461: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘void USRP_UHD_i::init_usrp(std::string)’:
USRP_UHD.cpp:473: error: ‘device_addr’ was not declared in this scope
USRP_UHD.cpp:473: error: ‘uhd’ has not been declared
USRP_UHD.cpp:475: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:475: error: ‘uhd’ has not been declared
USRP_UHD.cpp:492: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘bool USRP_UHD_i::setupTuner(size_t, const frontend_tuner_allocation_struct&)’:
USRP_UHD.cpp:693: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:706: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:724: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
USRP_UHD.cpp:730: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
USRP_UHD.cpp: In member function ‘bool USRP_UHD_i::enableTuner(size_t, bool)’:
USRP_UHD.cpp:761: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:761: error: ‘uhd’ has not been declared
USRP_UHD.cpp:776: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:776: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘void USRP_UHD_i::updateAvaiableUsrpSeq()’:
USRP_UHD.cpp:1020: error: ‘uhd’ has not been declared
USRP_UHD.cpp:1020: error: expected ‘;’ before ‘himt’
USRP_UHD.cpp:1021: error: ‘uhd’ has not been declared
USRP_UHD.cpp:1021: error: expected ‘;’ before ‘device_addrs’
USRP_UHD.cpp:1022: error: ‘device_addrs’ was not declared in this scope
USRP_UHD.cpp:1024: error: ‘device_addrs’ was not declared in this scope
USRP_UHD.cpp:1027: error: expected primary-expression before ‘key’
USRP_UHD.cpp:1027: error: ‘BOOST_FOREACH’ was not declared in this scope
USRP_UHD.cpp:1027: error: expected ‘;’ before ‘{’ token
USRP_UHD.cpp: In member function ‘void USRP_UHD_i::update_myDeviceSeq()’:
USRP_UHD.cpp:1045: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:1052: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:1062: error: ‘uhd’ has not been declared
USRP_UHD.cpp:1075: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:1084: error: ‘uhd’ has not been declared
make: *** [USRP_UHD-USRP_UHD.o] Error 1

09:30:49 Build Finished (took 11s.457ms)

【问题讨论】:

    标签: redhawksdr


    【解决方案1】:

    这是 RHEL/CentOS 6.4 的 boost 头文件中的一个问题。您需要通过编辑文件 /usr/include/boost/exception_ptr.hpp(需要 sudo)来修补 boost 文件。从第 92 行开始添加以下行:

    ~exception_ptr() throw()
    {
    }
    

    Source 1

    这应该会处理您的异常抛出错误。

    此外,您需要添加必备文件并下载 USRP 驱动程序的源代码。下载UHD源码,下载依赖如下:

    git clone https://github.com/EttusResearch/uhd.git
    sudo yum -y install boost-devel libusb1-devel python-cheetah doxygen python-docutils
    

    接下来,进入您的 uhd 文件夹并进入主机文件夹并生成 makefile。

    cd uhd/host
    mkdir build
    cd build
    cmake ../
    make
    make test
    sudo make install
    sudo ldconfig
    

    Source 2
    Source 3

    现在尝试构建 USRP_UHD 项目。按照这些步骤,我能够复制您的问题并成功构建。至于你的两个问题,我没有安装 GNUHawk,所以你不需要它来构建这个项目。

    【讨论】:

    • 这仅适用于 1.41.0-17 (redhawksdr.github.io/Documentation/mainap10.html#x36-478000J.1) 之前的 Boost 版本。我安装了 Boost 1.41.0-18,并且这些行已经存在于该文件中。
    • 你说得对。新版本的 Boost 实际上修复了这个错误。
    • 谢谢!你的指示奏效了。我必须采取的唯一额外步骤是 1) sudo yum -y install cmake (因为我的系统上默认没有安装 cmake) 和 2) sudo echo "/usr/local/lib64" >> /etc/ld.so .conf(在运行“sudo ldconfig”之前),以便系统可以找到 uhd 库。
    猜你喜欢
    • 2013-05-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多