我正在尝试在 Redhawk 1.9.0 中构建 UHD 设备,最新提交 (c749987865c5e158b65f26b160e0435f34c71580),但收到多个构建错误(见下文)。在尝试构建最新版本的 UHD 设备 (v2.0.2) 时,我收到了类似的错误。
UHD 设备的自述文件并未指明构建设备的要求或提供任何其他说明。
我有 2 个问题:
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 ),选择“构建项目”
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)