Hi Marcus,

I have tried your suggestion, but unfortunately without success:

Per your advice, I have edited the file "cmake.lwt" in the folder
/usr/local/lib/python3.7/dist-packages/pybombs/templates to include the
option "-DENABLE_PYTHON_API=ON" in the calls to cmake.  The modified
commands are as follows:

configure: cmake .. -DENABLE_PYTHON_API=ON
-DCMAKE_BUILD_TYPE=$cmakebuildtype -DCMAKE_INSTALL_PREFIX=$prefix
$config_opt -Wno-dev
configure_static: cmake .. -DENABLE_PYTHON_API=ON
-DCMAKE_BUILD_TYPE=$cmakebuildtype -DCMAKE_INSTALL_PREFIX=$prefix
-DENABLE_STATIC_LIBS=True $config_opt

I removed the previous UHD installation and re-ran "pybombs install uhd",
but the end result was much the same:  the installation process completed
without errors, but the Python API was not included in the installation.

QUESTION 1:  Can you tell me if PyBOMBS actually builds the UHD driver from
source, or does it simply copy a pre-compiled binary onto my system?  The
reason I ask is that PyBOMBS is quite quick to install the UHD driver,
whereas the non-PyBOMBS approach is VERY slow (i.e. around 60 minutes to
get to 53%, at which point it crashes out with an error).

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.



On Fri, Apr 2, 2021 at 11:25 PM Marcus D Leech <[email protected]>
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 <
> [email protected]> 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 -- [email protected]
> To unsubscribe send an email to [email protected]
>
>
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to