I am trying to build the UHD device, latest commit (c749987865c5e158b65f26b160e0435f34c71580), in Redhawk 1.9.0, but receive multiple build errors (see below). I received similar error when trying to build the most recent release of the UHD Device (v2.0.2).
The readme file with the UHD device doesn't indicate the requirements for building the device or provide any other instructions.
I have 2 questions:
1) Do I need to have GNUHawk installed too?
2) If so, I guess that means I need to downgrade to Redhawk 1.8.4, since GNUHawk supposedly won't work with Redhawk 1.9.0 (http://redhawksdr.github.io/Documentation/gnuhawk/mainli2.html), correct?
In case the problem is related to my build procedure, my steps are as follows:
1) Download zip file of repo from GitHub
2) Extract file contents into REDHAWK workspace and import project
3) Right click on project name (USRP_UHD-develop-1.8), select "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)
This is an issue in the boost header files from RHEL/CentOS 6.4. You need to patch the boost file by editing the file /usr/include/boost/exception_ptr.hpp (which requires sudo). Add the following lines starting at line 92:
~exception_ptr() throw()
{
}
This should take care of your exception throw errors.
Additionally, you need to add the pre-requisite files and download the source code for the USRP drivers. Download the UHD source and download the dependencies as follows:
git clone https://github.com/EttusResearch/uhd.git
sudo yum -y install boost-devel libusb1-devel python-cheetah doxygen python-docutils
Next, go into your uhd folder and into host folder and generate the makefiles.
cd uhd/host
mkdir build
cd build
cmake ../
make
make test
sudo make install
sudo ldconfig
Now try building the USRP_UHD project. Following these steps I was able to replicate your issues and have a successful build. As for your two questions, I do not have GNUHawk installed so you do not need it to build this project.