Your point is well taken, although I confess I am still a bit surprised that Python support is not the norm, given the popularity of this language in the scientific & engineering community.
Getting back to my problem: Am I correct in assuming that the C++ API is included as standard with every UHD build? If so, rather than spending days/weeks trying to add Python support to UHD on the Raspberry Pi, would it be faster for me to just create a C++ function to communicate with the USRP, and put a Python wrapper around it? On Sun, Apr 4, 2021 at 1:15 AM Marcus D Leech <patchvonbr...@gmail.com> wrote: > > > Sent from my iPhone > > On Apr 3, 2021, at 7:08 AM, Brendan Horsfield <b > > QUESTION 2: This whole process feels more difficult than it should be. > Why isn't the Python API installed with the UHD driver by default? Would I > be better off using another language (like C++) to control the USRP? > > Thanks, > Brendan. > > Well, NI/Ettus have zero control over how various distros choose to > package and build UHD, similarly for PyBombs—PyBombs isn’t maintained by > NI/Ettus. > > So if you “land” on a distro where the packaged UHD doesn’t include Python > support, then you end up building UHD yourself. Which may entail the pain > you encountered due to missing compiler flags. > > Because the Linux world is so incredibly diverse, it’s rare that the > developer of a given code base is also responsible for packaging for a > given distro/platform. That’s why there are “package maintainers” for each > distro, and they’re the ones who end up making decisions like enabling > support for various options, turning on “weird” compiler flags, etc. > > UHD is no different in this regard. > > > > On Fri, Apr 2, 2021 at 11:25 PM Marcus D Leech <patchvonbr...@gmail.com> > wrote: > >> Perhaps look at the PyBombs recipe for your platform—there’s probably a >> compiler flag that needs to be set that you’re missing, but I don’t know >> what that is. >> >> Also, in general, you don’t need to become root to compile and build >> code—only needed during the “make install” >> >> >> >> Sent from my iPhone >> >> On Apr 2, 2021, at 7:19 AM, Brendan Horsfield < >> brendan.horsfi...@vectalabs.com> wrote: >> >> >> Hi Folks, >> >> I would like to interface my Raspberry Pi 4 to a USRP B210 via the Python >> API. This requires the UHD driver to be built from source. Unfortunately, >> whenever I try this I encounter some errors that stop the build process in >> its tracks. >> >> Details of the error are as follows: >> >> [ 53%] Linking CXX executable test_clock_synch >> /usr/bin/ld: ../lib/libuhd.so.4.0.0: undefined reference to >> `__atomic_compare_exchange_8' >> /usr/bin/ld: ../lib/libuhd.so.4.0.0: undefined reference to >> `__atomic_load_8' >> /usr/bin/ld: ../lib/libuhd.so.4.0.0: undefined reference to >> `__atomic_store_8' >> /usr/bin/ld: ../lib/libuhd.so.4.0.0: undefined reference to >> `__atomic_fetch_add_8' >> collect2: error: ld returned 1 exit status >> make[2]: *** [examples/CMakeFiles/test_clock_synch.dir/build.make:95: >> examples/test_clock_synch] Error 1 >> make[1]: *** [CMakeFiles/Makefile2:1039: >> examples/CMakeFiles/test_clock_synch.dir/all] Error 2 >> make: *** [Makefile:163: all] Error 2 >> >> The process I have been using is as follows: >> >> STEP 1: INSTALL DEPENDENCIES >> sudo apt-get install libboost-all-dev libusb-1.0-0-dev doxygen >> python3-docutils python3-mako python3-numpy python3-requests >> python3-ruamel.yaml python3-setuptools cmake build-essential >> >> STEP 2: BUILD UHD DRIVER FROM SOURCE >> cd /home/pi >> mkdir workarea-uhd >> cd workarea-uhd >> git clone https://github.com/EttusResearch/uhd >> cd uhd >> git checkout v4.0.0.0 >> cd host >> mkdir build >> cd build >> sudo cmake -DNEON_SIMD_ENABLE=OFF -DENABLE_PYTHON_API=ON ../ >> sudo make ---> (ERRORS OCCUR DURING "MAKE" PROCESS) >> >> My system configuration is as follows: >> Hardware: Raspberry Pi 4 Model B Rev 1.4 >> OS: Raspbian GNU/Linux 10 (buster) (32-bit, armv7l) >> Ettus USRP B210 >> >> Does anyone know what the problem could be, and how I can resolve it? >> >> One final note: Using PyBOMBS, I was able to successfully build & >> install the UHD driver and connect to the USRP. Unfortunately the PyBOMBS >> build does not include the Python API, which is what I really want. Is >> there a different version of the PyBOMBS build that includes the Python API? >> >> Thanks & Regards, >> Brendan. >> >> >> >> _______________________________________________ >> USRP-users mailing list -- usrp-users@lists.ettus.com >> To unsubscribe send an email to usrp-users-le...@lists.ettus.com >> >>
_______________________________________________ USRP-users mailing list -- usrp-users@lists.ettus.com To unsubscribe send an email to usrp-users-le...@lists.ettus.com