Errors when compiling LimeSuiteNG with gnuradio

Hello,

I’m attempting to use the LimeSDR XTRX with a Raspberry Pi 5. I’ve gotten it to work, connect, and detect without GNURadio, but in a different image, if I use apt to install gnuradio, there are errors when running cmake.

The raspberry pi uses gnuradio 3.10.5.1-3.

There is a ton of output, but what appears at the bottom is the following:

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Traceback (most recent call last):
  File "/home/lab/Downloads/LimeSuiteNG/plugins/gr-limesdr/python/bindings/header_utils.py", line 67, in <module>
    pbhp = PybindHeaderParser(args.pathname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lab/Downloads/LimeSuiteNG/plugins/gr-limesdr/python/bindings/header_utils.py", line 9, in __init__
    with open(pathname,'r') as f:
         ^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/lab/Downloads/LimeSuiteNG/plugins/gr-limesdr/python/bindings/sink_python.cc'


Traceback (most recent call last):
  File "/home/lab/Downloads/LimeSuiteNG/plugins/gr-limesdr/python/bindings/header_utils.py", line 67, in <module>
    pbhp = PybindHeaderParser(args.pathname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lab/Downloads/LimeSuiteNG/plugins/gr-limesdr/python/bindings/header_utils.py", line 9, in __init__
    with open(pathname,'r') as f:
         ^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/lab/Downloads/LimeSuiteNG/plugins/gr-limesdr/python/bindings/source_python.cc'

Does anyone have any ideas?

Thank you

Please post the whole log, as the last error might be result of previous errors.
Also you need gnuradio-dev package.

I’ve dumped the file to a pastebin link, apologies if that’s not acceptable. I get a character limit error when I try to drop it in just the message board website, and there doesn’t appear to be a way to attach a text file:

To complete this thought, gnuradio-dev is also installed:

lab@raspberrypi:~/Downloads/LimeSuiteNG/build $ sudo apt install gnuradio-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gnuradio-dev is already the newest version (3.10.5.1-3).
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.

The logfile also reports the Linux Kernel Headers are missing, but when I attempted to build LSNG without GNURadio, the same notice appears, but I was able to still make and install LSNG. I was also able to see the device and test through limeGUI.

It’s just WITH GNURadio that I run into the above problem.

It’s a GNU Radio issue: gr_modtool bind fails with gcc-12 and -13 (e.g., Ubuntu 24) · Issue #6477 · gnuradio/gnuradio · GitHub

maybe GCC update would help. Your GCC version 12.2.0, the issue reports that GCC 12.3.0 does not experience this problem.

Thanks for the reply,

Sadly I don’t think that’s helped unless I did something wrong during my GCC build. I’ve copied a new log file here: Errors now with 12.3.0 - Pastebin.com

The top of the log reports that the version is 12.2.0 still, but if you look at the error body it does appear to use 12.3.0. If I also check gcc --version it also returns that it is 12.3.0.

It’s not just a compiler problem. installing and using g+±11 works around the compiler problem. But there are other issues with GNURadio gr_modtool python bindings generation, seems to be external packages issues on Arm platform.

ERROR error occured, while parsing element with name "Field" and attrs "['id', 'name', 'type', 'context', 'access', 'offset']".
Error: 'line'.

I was just about to update this thread again with the same observation.

I guess that means it’s no good then? LimeSuiteNG will not compile with GNURadio on the Raspberry Pi, because of an issue either with ARM or GNURadio, but not with LimeSuiteNG. That’s totally fine, but at least now we know.

I’ve added hardcoded python bindings, that will allow it to be built on RPi, but it’s just a hack, so not gonna push it to the main repo.

Perfect! Everything works with this!

Thanks so much for your help!

One last question now that I’ve had some time to run some tests:

Has gr-limesdr been updated to use the new LimeSuiteNG API? There isn’t a reference to the XTRX and the sample rate is locked to 61.44e6. I tried removing the limit via the yml file but the next error I got was:

device_handler :info: SISO CH0 set for device number 0.
Lime Suite NG :info: Sampling rate set(100.000 MHz): CGEN:800.000 MHz, Decim: 2^1, Interp: 2^1
Lime Suite NG :error: lms7002m_set_frequency_cgen: requested frequency(800000000) too high
device_handler :warning: 

Separately, in this thread: Sample rate in LimeSuiteNG for Lime XTRX - #3 by ricardas

It’s mentioned that you need to use I12 format to reach a higher sample rate. Does that just mean that the data is packed and the upper 4 bits are truncated?

Yes, gr-limesdr is using LimeSuiteNG API. But I haven’t reviewed the GRC yml descriptions.

For XTRX to go above 61.44e6 sampling rate:
Only SISO is supported
Oversampling has to be x1 (bypass). (you are using x2 that’s why CGEN requirement is too high)

linkData format:
XTRX has Gen2 x2 PCIe lanes, if plugged in through adapter which has only 1 PCIe lane, the theoretical data bandwidth limit is ~500 MB/s. (2 lanes limit is 1GB/s).
So the linkData format should be chosen to allow to fit within that limitation.

for example, using 1 pcie lane:
linkFormat I16, one IQ sample is 4bytes * 122.88 MSps = 491.52 MB/s + packets overhead. The result is on the edge of PCIe bandwidth limit, so no guarantees that it would be stable.
linkFormat I12, one IQ sample is 3bytes * 122.88 MSps = 368.64 MB/s + packets overhead. Everything is within limits and guaranteed to work.

XTRX uses 12bit ADC/DAC values, so there is no data difference or loss between I12 and I16 link formats. The only difference is for the host side, with I12 it has to do extra processing to decompress the values into native format, with I16 host can simply do memory copy.