UHD设备无法在Redhawk 1.9.0中构建

时间:2013-12-17 15:00:14

标签: redhawksdr

我正在尝试在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)

1 个答案:

答案 0 :(得分:4)

这是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,所以你不需要它来构建这个项目。