OP25 op25 boatbod with gnuradio-3.10

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
An version of boatbod op25 supporting gnuradio-3.10 (ubuntu 22.04) is now available for alpha testing. Presently the code is only available from the "gr310" branch of my github repo and the install.sh script is somewhat minimal in it's error detection. Functionality is identical to the current gnuradio-3.8 version.

Code:
git clone https://github.com/boatbod/op25
cd op25
git checkout gr310
./install.sh

I have not testing this on any os other than ubuntu-22.04 using multi_rx.py. Bugs are inevitably still lurking in there!
 

ki4hyf

Member
Premium Subscriber
Joined
Mar 2, 2005
Messages
95
Location
Jackson, TN
Installed flawlessly on my Ubuntu 22.04. One very minor error in rx.py: the "setDaemon(1)" is complaining it's deprecated, so I changed line 978 to "self.daemon = True". So far, it works great!
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Installed flawlessly on my Ubuntu 22.04. One very minor error in rx.py: the "setDaemon(1)" is complaining it's deprecated, so I changed line 978 to "self.daemon = True". So far, it works great!
Now fixed in all versions, along with a package dependency which seems to affect some installations.
 

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
I have been trying to get this to compile on Arch, but considering it's a rolling release distribution, I have had zero success. I would love to be able to offer this in the Arch User Repository (AUR), so will continue working on it.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
I have been trying to get this to compile on Arch, but considering it's a rolling release distribution, I have had zero success. I would love to be able to offer this in the Arch User Repository (AUR), so will continue working on it.
It's kinda hard to offer advice without some logs or compilation errors. Post me something to look at please!
 

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
It's kinda hard to offer advice without some logs or compilation errors. Post me something to look at please!
I appreciate that offer. The reason I didn't post the logs is that many developers take the "you're on your own" approach and tell you to use the distro they designed it for. Here's the error, along with the cmake and make logs.
Code:
[ 88%] Copying op25_repeater docstring templates as pybind headers ...
[ 88%] Built target op25_repeater_docstrings
[ 89%] Building CXX object op25/gr-op25_repeater/python/op25_repeater/bindings/CMakeFiles/op25_repeater_python.dir/ambe_encoder_sb_python.cc.o
In file included from /usr/include/spdlog/common.h:45,
                 from /usr/include/gnuradio/logger.h:36,
                 from /usr/include/gnuradio/custom_lock.h:15,
                 from /usr/include/gnuradio/buffer.h:15,
                 from /usr/include/gnuradio/buffer_double_mapped.h:15,
                 from /usr/include/gnuradio/io_signature.h:23,
                 from /usr/include/gnuradio/basic_block.h:15,
                 from /usr/include/gnuradio/block.h:17,
                 from /home/belvdr/build/op25/op25/gr-op25_repeater/python/op25_repeater/bindings/../../../include/gnuradio/op25_repeater/ambe_encoder_sb.h:26,
                 from /home/belvdr/build/op25/op25/gr-op25_repeater/python/op25_repeater/bindings/ambe_encoder_sb_python.cc:28:
/usr/include/spdlog/fmt/fmt.h:27:14: fatal error: spdlog/fmt/bundled/core.h: No such file or directory
   27 | #    include <spdlog/fmt/bundled/core.h>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [op25/gr-op25_repeater/python/op25_repeater/bindings/CMakeFiles/op25_repeater_python.dir/build.make:76: op25/gr-op25_repeater/python/op25_repeater/bindings/CMakeFiles/op25_repeater_python.dir/ambe_encoder_sb_python.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:784: op25/gr-op25_repeater/python/op25_repeater/bindings/CMakeFiles/op25_repeater_python.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Being this is a rolling distro, I've searched for spdlog's core.h. It seems to be removed in later releases, assuming that's being sourced from here:
GitHub - gabime/spdlog: Fast C++ logging library.

For reference, these are the packages available in Arch for "spdlog":
Code:
[belvdr@host build]$ yay -Ss spdlog
aur/r-spdl 0.0.4-1 (+0 0.00)
    Wrapper for 'RcppSpdlog' Functions
aur/r-rcppspdlog 0.0.12-1 (+0 0.00)
    R and C++ Interfaces to 'spdlog' C++ Header Library for Logging
aur/mingw-w64-spdlog-git 1.8.1.r11.geebb921c-1 (+0 0.00)
    Very fast, header only, C++ logging library
aur/mingw-w64-spdlog 1.11.0-1 (+0 0.00)
    Very fast, header-only/compiled, C++ logging library (mingw-w64)
aur/spdlog-git 1.10.0.r0.g76fb40d9-1 (+7 0.00)
    Very fast, header only, C++ logging library
community/spdlog 1.11.0-1 (183.6 KiB 723.1 KiB) (Installed)
    Very fast, header-only/compiled, C++ logging library
 

Attachments

  • cmake.log.txt
    8.3 KB · Views: 7
  • make.log.txt
    17.6 KB · Views: 6
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
I expect you're going to find the "libspdlog-dev" package has not been installed.
Code:
apt list | grep spdlog
Should be an easy fix...
Code:
sudo apt install libspdlog-dev

Now the big question is why did it get installed on my system by default, and not yours...

ETA: I've added libspdlog-dev as a named packaged in the install.sh script
 
Last edited:

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
I expect you're going to find the "libspdlog-dev" package has not been installed.
Code:
apt list | grep spdlog
Should be an easy fix...
Code:
sudo apt install libspdlog-dev

Now the big question is why did it get installed on my system by default, and not yours...

ETA: I've added libspdlog-dev as a named packaged in the install.sh script
Arch doesn’t use apt; it is not Debian based. Also, the packages are named differently. I have all the other header files but not core.h. It is as if it has been renamed or removed in later versions.

What version do you have installed? Mine is 1.11.0.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Arch doesn’t use apt; it is not Debian based. Also, the packages are named differently. I have all the other header files but not core.h. It is as if it has been renamed or removed in later versions.

What version do you have installed? Mine is 1.11.0.
Ah, well that's good to know. I do have plans to download Arch and set it up in a virtual environment, but I have to solve another couple issues first. Keep me posted if you find a good solution in the interim.
 

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
Ah, well that's good to know. I do have plans to download Arch and set it up in a virtual environment, but I have to solve another couple issues first. Keep me posted if you find a good solution in the interim.
Here's something I found that correlates to the issue at hand:

Using external fmt results in missing header `spdlog/fmt/bundled/core.h` · Issue #1897 · gabime/spdlog

I stumbled this issue as well while building something for NixOS. After a bit researching I found that

The line #include <spdlog/fmt/bundled/core.h> is guarded by #if !defined(SPDLOG_FMT_EXTERNAL), which means that as long as SPDLOG_FMT_EXTERNAL is defined (VERY IMPORTANT, it should be defined for your compilation target), that offending #include line will be NOOP.

Although in the .nix file that packages spdlog we have -DSPDLOG_FMT_EXTERNAL=ON, but that does not propagate to your project that depends on spdlog.

I found the following in compile_commands.json in the build directory for op25. It is just one example:
"command": "/usr/bin/c++ -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK -DBOOST_UNIT_TEST_FRAMEWORK_NO_LIB -DFMT_SHARED -DGR_CTRLPORT -DGR_MPLIB_GMP -DGR_PERFORMANCE_COUNTERS -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DUSE_SSE2 -Dop25_python_EXPORTS -I/home/tfo/develop/op25/build/op25/gr-op25/python/op25/bindings -I/home/tfo/develop/op25/op25/gr-op25/python/op25/bindings/../../../lib -I/home/tfo/develop/op25/op25/gr-op25/python/op25/bindings/../../../include -I/home/tfo/develop/op25/op25/gr-op25/lib/../include -isystem /usr/include/python3.10 -isystem /usr/lib/python3.10/site-packages/numpy/core/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++17 -Wsign-compare -Wall -Wno-uninitialized -O3 -DNDEBUG -fPIC -fvisibility=hidden -msse2 -Wno-unused-variable -flto -fno-fat-lto-objects -std=c++17 -o CMakeFiles/op25_python.dir/fsk4_demod_ff_python.cc.o -c /home/tfo/develop/op25/op25/gr-op25/python/op25/bindings/fsk4_demod_ff_python.cc"

I am not sure what it is used for though. Additionally, I am currently unable to locate what is adding that to the make commands.
 
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Here's something I found that correlates to the issue at hand:

Using external fmt results in missing header `spdlog/fmt/bundled/core.h` · Issue #1897 · gabime/spdlog

I found the following in compile_commands.json in the build directory for op25. It is just one example:

I am not sure what it is used for though. Additionally, I am currently unable to locate what is adding that to the make commands.
A lot of those -D options come from defaults that cmake "knows" about your system. In this instance it seems there is a configuration file called spdlog.pc which tells cmake what to do. The file location on Arch may differ from my Ubuntu.
Code:
cat /usr/lib/x86_64-linux-gnu/pkgconfig/spdlog.pc 
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib/x86_64-linux-gnu

Name: libspdlog
Description: Fast C++ logging library.
URL: https://github.com/gabime/spdlog
Version: 1.9.2
CFlags: -I${includedir} -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL
Libs: -L${libdir} -lspdlog -pthread
Requires: fmt
 
Last edited:

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
A lot of those -D options come from defaults that cmake "knows" about your system. In this instance it seems there is a configuration file called spdlog.pc which tells cmake what to do. The file location on Arch may differ from my Ubuntu.
Code:
cat /usr/lib/x86_64-linux-gnu/pkgconfig/spdlog.pc
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib/x86_64-linux-gnu

Name: libspdlog
Description: Fast C++ logging library.
URL: https://github.com/gabime/spdlog
Version: 1.9.2
CFlags: -I${includedir} -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL
Libs: -L${libdir} -lspdlog -pthread
Requires: fmt
Even when removing "-DSPDLOG_FMT_EXTERNAL" from /usr/lib/pkgconfig/spdlog.pc on Arch, it still generates the compile commands with it included.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Even when removing "-DSPDLOG_FMT_EXTERNAL" from /usr/lib/pkgconfig/spdlog.pc on Arch, it still generates the compile commands with it included.
Unfortunately, I'm not much of an expert on the details of how cmake works, but it might be caching the results somewhere. That said, if libspdlog was build with external fmt, it's likely not going to work (at runtime) even if you get op25 to compile. I'd lean more towards finding a solution to the missing file. Is the fmt package installed?
 

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
Unfortunately, I'm not much of an expert on the details of how cmake works, but it might be caching the results somewhere. That said, if libspdlog was build with external fmt, it's likely not going to work (at runtime) even if you get op25 to compile. I'd lean more towards finding a solution to the missing file. Is the fmt package installed?
Yes fmt is installed
 

sjacket99

FuzzThePiGuy
Feed Provider
Joined
Dec 21, 2016
Messages
77
Location
Pa
I have the following on a spare computer, so I thought I would install this and see how it goes.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

And I am getting the following:

Code:
fuzz@sdr-server:~/op25$ git checkout gr310
Already on 'gr310'
Your branch is up to date with 'origin/gr310'.
fuzz@sdr-server:~/op25$ ./install.sh
Identified GNURadio version 3.8
Installing for GNURadio 3.8 is not supported by this version of op25
Please "git checkout master" for GNURadio-3.8 or earlier
fuzz@sdr-server:~/op25$
 

sjacket99

FuzzThePiGuy
Feed Provider
Joined
Dec 21, 2016
Messages
77
Location
Pa
I have the following on a spare computer, so I thought I would install this and see how it goes.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

And I am getting the following:

Code:
fuzz@sdr-server:~/op25$ git checkout gr310
Already on 'gr310'
Your branch is up to date with 'origin/gr310'.
fuzz@sdr-server:~/op25$ ./install.sh
Identified GNURadio version 3.8
Installing for GNURadio 3.8 is not supported by this version of op25
Please "git checkout master" for GNURadio-3.8 or earlier
fuzz@sdr-server:~/op25$

____________________________________-

Update:

I updated to

Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

And the install is working.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
I have the following on a spare computer, so I thought I would install this and see how it goes.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

And I am getting the following:

Code:
fuzz@sdr-server:~/op25$ git checkout gr310
Already on 'gr310'
Your branch is up to date with 'origin/gr310'.
fuzz@sdr-server:~/op25$ ./install.sh
Identified GNURadio version 3.8
Installing for GNURadio 3.8 is not supported by this version of op25
Please "git checkout master" for GNURadio-3.8 or earlier
fuzz@sdr-server:~/op25$
The key pieces of this log are "Ubuntu 20.04" (which is a GNURadio 3.8 system) and that you're on the "gr310" branch. For Ubuntu 20.04 you'd want to be on the master (head) of the repo. Ubuntu 22.04 / 22.04.1 are both GNURadio 3.10 and work with "gr310".

As of now I am unable to build gr310 on Ubuntu 22.10 due to c++ errors in the pybind11 bindings code. While I haven't fully got to the bottom of it, I'm suspecting the move to gcc-12 may be the reason.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
As of now I am unable to build gr310 on Ubuntu 22.10 due to c++ errors in the pybind11 bindings code. While I haven't fully got to the bottom of it, I'm suspecting the move to gcc-12 may be the reason.
I investigated this a bit more and it seems ubuntu's move to gcc-12 is the trigger that causes gr_modtool to blow up. There are ways to mitigate this by adding "-fsized-deallocation" as a compiler flag, but this requires modifying more than just op25's sources. For now I would suggest manually installing gcc-11 and using "update-alternatives" to switch over before building op25.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
I changed the way pybind11 bindings are handled and as a result have been able to successfully build and run the boatbod op25 gr310 branch on the following gnuradio-3.10 based distros:
- Mint 21.1
- Ubuntu 22.04 and 22.04.1
- Ubuntu 22.10
- Debian Bookworm (current Debian Testing release)
 

excentric

Member
Premium Subscriber
Joined
Mar 10, 2018
Messages
6
So I was able to get OP25 to build on Arch linux but now I have these errors (look in file) Anybody have any suggestions on what to do next?
 

Attachments

  • op_25.txt
    1.8 KB · Views: 18
Top