Modifying UHD code to work with GNU Radio - gnuradio

I need to modify the UHD code and then need to make that code work with gnuradio-companion. For this, I built UHD from source and made the required modifications.
The next step would have been to build GNU Radio by source. But the installation steps mentioned in the tutorial do not seem to take UHD into account here. Also, the change in UHD is not being detected in an already installed version of GNU radio.
How do I make GNU Radio work with the modified UHD code?

you need to uninstall your currently installed GNU Radio, your currently installed UHD (make doubly sure you've removed both), then you need to install your self-built UHD, then build and install GNU Radio. Make sure not to accidentally install your operating system's UHD again!
You cannot make a GNU Radio that was built with a different version
of UHD work with your version; you need to built it.

Related

GNU Radio on CentOS missing QT Blocks

I was trying to follow through with GNU Radio Tutorial 2, but I wasn't able to find any of the QT blocks in the library. The tutorial wants me to use QT GUI Time Sink, but it and many similar blocks are missing from my library.
What the tutorial says my search should return.
My search, following the tutorial.
Searching for the specific block.
The version yum installed for me is 3.7.11. I received no errors during installation.
I even tried porting in the tutorial's finished code, but the block was marked as a Missing Block.
Tutorial 2's GUI Representation.
How do I incorporate these blocks in the library?
I'm not familiar with CentOS, but based on your description, the GNU Radio package you installed was compiled without QT support. You will have to find a different package or compile GNU Radio yourself.
Also note that GNU Radio 3.7.11 is a very old version, from 2017. Therefore another reason to install a better package, with a current version, is to get new blocks and bug fixes from the past three years.

Why is which `executable software` and `software -v` refer to different things?

I was installing GNU make in an HPC cluster. There is pre-installed lower version make there.
And after I successfully configure and make the GNU make, I realized that another program is looking for gmake. So I just soft-link gmake to make. And add them to the $PATH.
The weird thing is, even if which gmake refers to the newly installed location, gmake -v showed the old version. I'd like to know how to fix it and in what order the system looks up the software.
Thank you.

Can a library that uses CMake also be built with SCons?

I want to use KDL (Kinematics and Dynamics Library) in robot control box. But robot control box uses SCons as their build system while KDL uses CMake.
It turned out that the control box doesn't have CMake installed. Should I install CMake in the control box? Or write SCons file for compiling KDL?
====================================================
My question is ambiguous. Sorry for that. And unfortunately, I cannot show the link of Control Box, it's not public. Here is link of KDL installation manual.
http://www.orocos.org/kdl/installation-manual
Let me make it more clear.
Forget all of previous question above and all about Control box, KDL. Let's say that you want to use one library. But the library can be built using CMake according to installation manual. Your PC doesn't have CMake installed but it has SCons, and unfortunately you should not install CMake on your PC.
If you can only use SCons, what can you do?
I know this situation is not usual, I want to know your opinion.
To answer your initial question: Yes, you should always try to install CMake, if that is a build requirement for you library and if you need to build that library from the sources.
To answer your later question: Replacing or rewriting the build system scripts is a major effort and not advisable. In general there is no script to convert build-systems. Such script might help to make the manual transformation. If you have a look at LLVM's effort to replace Autotools by CMake or Boost replacing it's own build system by CMake, you find out it takes several people several years and still not everybody is satisfied.
Often you don't need to build the library yourself. Either there are already built packages from the project directly of from your distribution (Debian etc. packages) or third party packagers like Mac Ports or NuGet.
In your case KDL provides Debian/Ubuntu packages.
Additional KDL is part of ROS, which is experimental in Homebrew for OS X.

how to build g++

I'm currently trying to get g++ working, and looking at http://gcc.gnu.org/install/build.html, I can't seem to find where it says how "to perform a 3-stage bootstrap of the compiler". Where would I find this information?
(I'm on a mac, in case that matters.)
After running configure, you do make bootstrap
You cannot bootstrap GCC without an already-functioning compiler on your platform:
From the prerequisites page:
ISO C90 compiler
Necessary to bootstrap GCC, although versions of GCC prior to 3.4 also allow bootstrapping with a traditional (K&R) C compiler.
And to preempt your next question, you also need a functioning compiler (usually GCC) in order to build Clang+LLVM.
It might be possible to do what you're trying so hard to do, by cross-compiling GCC from some other platform (see this section of the documentation). But I imagine this is not for the feint of heart, and you'd be far, far better off simply updating your copy of Mac OS X to the latest version with Xcode support.
From that link:
For a native build, the default configuration is to perform a 3-stage bootstrap of the compiler when `make' is invoked.
It seems to me that if your configuration isn't tweaked, it should do it out of the box. Just type make.
More specifically, you have to download the source code, and follow the instructions in that whole tutorial in order to build.
A side note - I am finding it hard to believe that there is no easy way to get GCC on an OSX box without having the installation media. That sounds really annoying :)
Edit:
If you are simply trying to write C++ on OSX, you could install one of many other IDEs. If you are lucky, they may come with their own compiler. Here is a list of alternatives to XCode:
http://alternativeto.net/desktop/xcode/?profile=mac&platform=mac

compile wxWidget on Snow Leopard

I just downloaded wxWidget source code on my snow leopard machine. The source code is the multiplatform one, so it contains windows and GTK components of wxWidget as well. I'd like to compile the wxWidget source code, but haven't found a good guide yet.
This is my first step to create a multiplatform project, hopefully I would be able to use CMake to generate makefile later on.
Any help would be appreciated.
EDIT: Just to clarify, I'd like to build stable release of wxWidget on Snow Leopard, it would be building wxWidget 2.8.x on OS X 10.6.x. I have read the compiling wiki here http://wiki.wxwidgets.org/Development:_wxMac#Building_under_10.6_Snow_Leopard
Unfortunately, it didn't help.
I like using configure/make/make install:
./configure --enable-monolithic --enable-universal_binary --disable-shared --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk
make
sudo make install
I just tried this with wxWidgets 2.9.0 and it worked great.
The wxWiki is always a good place for guides, specifically the various OSX guides and the extra note here about compiling under 10.6.
It would also be good to note that there have been many changes between the current stable releases and the trunk, specifically much work has been done on a port to Cocoa.
Using CMake is pretty straight forward, just check the FindWxWidgets.cmake file in CMake for instructions, you can also check out the CMake docs (I would give the link but they don't seem to be up right now).