Awesome. When you get everything sorted out and you're feeling adventurous, you can add NEON optimization. In the cmake step, replace:

-DNEON_SIMD_ENABLE=OFF

with:

-DCMAKE_CXX_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a72" -DCMAKE_C_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a72" -DCMAKE_ASM_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a72 -g"

Ron

On 4/6/21 05:15, Brendan Horsfield wrote:
Thanks for the tip Ron!  It got me (almost) all the way home.

I can now interface with the USRP via the C++ API, which I couldn't do previously.

Unfortunately there's still a niggling problem with the Python API (a different one than before), but I will start a new thread to cover that issue.

Cheers,
Brendan.


On Sun, Apr 4, 2021 at 11:53 AM Ron Economos <w...@comcast.net <mailto:w...@comcast.net>> wrote:

    This is just a guess, but you could try:

    -DCMAKE_SHARED_LINKER_FLAGS="-latomic"

    in addition.

    Ron

    On 4/3/21 18:34, Brendan Horsfield wrote:
    Thanks Ken.  As you suggested, I added
    -DCMAKE_EXE_LINKER_FLAGS="-latomic" to the CMake call.

    The good news is that the UHD build & installation process
    completed successfully.

    The bad news is that when I try to import the uhd module in
    Python3, I get the following error:

    pi@raspberrypi:~ $ python3
    Python 3.7.3 (default, Jan 22 2021, 20:04:44)
    [GCC 8.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more
    information.
    >>> import uhd
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python3/dist-packages/uhd/__init__.py",
    line 10, in <module>
        from . import types
      File "/usr/local/lib/python3/dist-packages/uhd/types.py", line
    10, in <module>
        from . import libpyuhd as lib
    ImportError: /usr/local/lib/libuhd.so.4.0.0: undefined symbol:
    __atomic_fetch_add_8
    >>>

    Did you encounter this problem too?

    I guess the next step is to hack the "CMakeLists.txt" files as
    per the link you sent me.  Just to clarify one point first:  If I
    modify the CMakeLists.txt files, do I still need to include
    -DCMAKE_EXE_LINKER_FLAGS="-latomic" in the CMake call?

    Thanks,
    Brendan.


    On Sat, Apr 3, 2021 at 10:29 PM Clark (US), Kenneth C
    <kenneth.c.cla...@boeing.com
    <mailto:kenneth.c.cla...@boeing.com>> wrote:


        I had the same problem build UHD on RPi4

        Answer here:
        https://gitlab.kitware.com/cmake/cmake/-/issues/21174

        Add to CMake call:
        -DCMAKE_EXE_LINKER_FLAGS="-latomic"

        Regards,

        Ken


_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to