boatbod / op25

Fork of osmocom OP25 by boatbod
311 stars 97 forks source link

Too many errors compiling for gr310 #168

Closed srs4511351 closed 1 year ago

srs4511351 commented 1 year ago

I have a Raspberry Pi 4 running 64 bit Debian Bookworm.

When compiling op25,gr310 branch, there are many fatal and other errors and it finally fails.

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

These are samples of the many errors:

/usr/include/c++/12/new:166:6: note: non-usual 'operator delete' declared here void operator delete(void*, std::size_t, std::align_val_t)


fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

CMake Error at /usr/lib/aarch64-linux-gnu/cmake/gnuradio/GrPybind.cmake:214 (list):
  list GET given empty list
Call Stack (most recent call first):
  op25/gr-op25_repeater/python/op25_repeater/bindings/CMakeLists.txt:47 (GR_PYBIND_MAKE_OOT)

-- Configuring incomplete, errors occurred!
See also "/home/pi/op25/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.

I can attach the whole long list if necessary.
boatbod commented 1 year ago

Those errors are caused by gcc-12 incompatibility with gnuradio's gr_modtool. https://github.com/gnuradio/gnuradio/issues/6477

If you can manually install the package for gcc-11 and use that instead of gcc-12 it should build ok.

srs4511351 commented 1 year ago

It looks like you opened an issue on gnuradio about this. I hope a graceful solution can be found. On Debian bookworm, I am finding it impossible to get gcc-12 removed (dependency issues) and gcc-11 installed. With Debian bookworm, gcc-12 comes with gnuradio 3.10. My only alternative short of getting help doing this, is to try a Debian Bullseye system and install gnuradio 3.10 on that.

boatbod commented 1 year ago

Yes, I had already logged an issue against gnuradio since this is a problem outside of my control.

You shouldn't have to remove gcc-12, just install gcc-11 alongside, then use "update-alternatives" to manage which compiler you want to be used. (You might have to install the update-alternatives package, but that's pretty simple).

srs4511351 commented 1 year ago

In the Bullseye system, I changed the executable link for gcc to point to gcc-11 and many of the errors went away, but it still failed.

Booting on another SD card, I installed gnuradio 3.10.5.0 from source on a Debian Bullseye system. It has gcc 10.2.1, c++ 10.2.1, g++ 10.2.1 install.sh detected the package version of gnuradio 3.8 that was not installed, so I installed it with the commands that I use for the gnuradio 3.8 version.

cd ~ git clone https://github.com/boatbod/op25 cd op25 git checkout gr310 sudo sed -i -- 's/^# *deb-src/deb-src/' /etc/apt/sources.list echo "/usr/bin/python3" > op25/gr-op25_repeater/apps/op25_python

mkdir build cd build cmake ../

These are the last few errors. They look exactly like the patched Bookworm results with gcc-11.

CMake Error at /usr/local/lib/cmake/gnuradio/GrPybind.cmake:213 (list): list GET given empty list Call Stack (most recent call first): op25/gr-op25_repeater/python/op25_repeater/bindings/CMakeLists.txt:47 (GR_PYBIND_MAKE_OOT)

CMake Error at /usr/local/lib/cmake/gnuradio/GrPybind.cmake:214 (list): list GET given empty list Call Stack (most recent call first): op25/gr-op25_repeater/python/op25_repeater/bindings/CMakeLists.txt:47 (GR_PYBIND_MAKE_OOT)

-- Configuring incomplete, errors occurred! See also "/home/pi/op25/build/CMakeFiles/CMakeOutput.log". See also "/home/pi/op25/build/CMakeFiles/CMakeError.log".

boatbod commented 1 year ago

Generally speaking you cannot safely use the install.sh script with a built-from-sources gnuradio because the install script will detect only the package version of gnuradio not the locally built one. There is the issue of mismatched libraries such as package installed gr-osmosdr and librtlsdr which will fail because they were built against gr-3.8 unless you locally build and install copies of them too.

Standard Bullseye works fine with gnuradio-3.8 and the op25 install.sh script.

On 1/24/23 02:23, srs4511351 wrote:

In the Bullseye system, I changed the executable link for gcc to point to gcc-11 and many of the errors went away, but it still failed.

Booting on another SD card, I installed gnuradio 3.10.5.0 from source on a Debian Bullseye system. It has gcc 10.2.1, c++ 10.2.1, g++ 10.2.1 install.sh detected the package version of gnuradio 3.8 that was not installed, so I installed it with the commands that I use for the gnuradio 3.8 version.

srs4511351 commented 1 year ago

I built gr-osmosdr against gnuradio 3.10 from source. The built from source gnuradio 3.10 had the same or similar failures as the one installed from packages.

Do you see anything in particular that caused my failures?

I could build build librtlsdr from source if that would help. We need to be able to build op25 with gnuradio 3.10, as the end of 3.8 is drawing near.

boatbod commented 1 year ago

To give yourself the best chance of success, apt purge everything gnuradio related then restart the build from cmake on up.  Don't use install.shOn Jan 24, 2023 11:14 AM, srs4511351 @.***> wrote: I built gr-osmosdr against gnuradio 3.10 from source. The built from source gnuradio 3.10 had the same or similar failures as the one installed from packages. Do you see anything in particular that caused my failures? I could build build librtlsdr from source if that would help. We need to be able to build op25 with gnuradio 3.10, as the end of 3.8 is drawing near.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>

srs4511351 commented 1 year ago

I purged every package that I could find related to gnuradio. Still the same result, but I looked deeper into the errors. One concern is that decoder_bf_python.cc is missing. On github, the comments by most files in op25/op25/gr-op25/python/op25/bindings/ refer to restoring deleted files... ... -- Found pybind11: /usr/include (found version "2.6.2" ) Traceback (most recent call last): File "/home/pi/op25/op25/gr-op25/python/op25/bindings/header_utils.py", line 69, in pbhp = PybindHeaderParser(args.pathname) File "/home/pi/op25/op25/gr-op25/python/op25/bindings/header_utils.py", line 9, in init with open(pathname, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/op25/op25/gr-op25/python/op25/bindings/decoder_bf_python.cc' CMake Error at /usr/local/lib/cmake/gnuradio/GrPybind.cmake:211 (list): list GET given empty list Call Stack (most recent call first): op25/gr-op25/python/op25/bindings/CMakeLists.txt:39 (GR_PYBIND_MAKE_OOT)

boatbod commented 1 year ago

The bindings files normally get generated by the install.sh script but you can manually achieve the same thing by running ~/op25/build_bindings.sh

On 1/24/23 15:35, srs4511351 wrote:

I purged every package that I could find related to gnuradio. Still the same result, but I looked deeper into the errors. One concern is that decoder_bf_python.cc is missing. On github, the comments by most files in op25/op25/gr-op25/python/op25/bindings/ refer to restoring deleted files... ... -- Found pybind11: /usr/include (found version "2.6.2" ) Traceback (most recent call last): File "/home/pi/op25/op25/gr-op25/python/op25/bindings/header_utils.py", line 69, in pbhp = PybindHeaderParser(args.pathname) File "/home/pi/op25/op25/gr-op25/python/op25/bindings/header_utils.py", line 9, in init with open(pathname, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/op25/op25/gr-op25/python/op25/bindings/decoder_bf_python.cc' CMake Error at /usr/local/lib/cmake/gnuradio/GrPybind.cmake:211 (list): list GET given empty list Call Stack (most recent call first): op25/gr-op25/python/op25/bindings/CMakeLists.txt:39 (GR_PYBIND_MAKE_OOT)

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAM-2FMhXiYSW6swBilmEJI1RrRk-2BNERB0W7hz4GuYa2KIoo-3Da-Wp_U31jt5HgHBh7k3Grc5s4l9YU-2FQz2FsMZltSAcSaJr4laPf8yMF43CSyYQLKsPjMvgAT5ipmBrgLNTrVajINloPk73Qj-2Fwr2VFabiIRj8580bIwduEUeHXO48Q8aTkFAKk4bDQTXlvw5VqgC8Obwv0ymdUWiZAWeUJt8kL7RpYtKD9nmNsO4fnH3RbXjQbjqg1Bwzy2FoMnvp-2FL7NGyhtLrN8DxuZzDv9c92o9MwNVqJWhZqluz0Minewm3EvlQXxX-2BsNeksfiYQp1lPrOrXaPp7Bwfv-2FcaIHGOL570tU-2BmE-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTEetp3yiSPZEaogBm8RTQL4blWIYnf9rbpWcukY8nsqK5X7vyGiwztGPTJLBu2eosWQ-3D-3DQtzu_U31jt5HgHBh7k3Grc5s4l9YU-2FQz2FsMZltSAcSaJr4laPf8yMF43CSyYQLKsPjMvgAT5ipmBrgLNTrVajINloPk73Qj-2Fwr2VFabiIRj8580bIwduEUeHXO48Q8aTkFAKv8z02RWYqZG9Hx965-2BgufEttTCBn2MeTE5R1vdq0bZBfUpZ26dOeNP1RpckJjfXipp-2B-2BlQi8RfIArN9OEfgPDRKHvSzFdzH2-2Bpt0lPqpniYOyZe3xH-2BUOrAHoyAkXlRzs5WHsWl4dkzQInklhHvixOFp9l-2BB3pLRu0ipNMibDEw-3D. You are receiving this because you modified the open/close state.Message ID: @.***>

srs4511351 commented 1 year ago

Do we need the missing file decoder_bf_python.cc ?

boatbod commented 1 year ago

That file will be created once build_bindings.sh completes successfully. Since you cannot use the install script (install.sh) on a non-packaged build you'll need to manually run "build_bindings.sh" prior to running "cmake ../".

If build_bindings.sh does not complete successfully it's an issue with gnuradio and/or gcc-12 because all the bindings are all built using "gr_modtool bind " from the appropriate OOT directory.

On 1/24/23 19:47, srs4511351 wrote:

Do we need the missing file decoder_bf_python.cc ?

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAM-2FMhXiYSW6swBilmEJI1RrcqcGICBW0qWGBz8b0fOv1w-3DxSD__U31jt5HgHBh7k3Grc5s4l1lBleB94SK44rNmv480LV6qH4WjAs0Kn3rCguCseYisoRsW-2FtgeiNL4LHrAspMdiHRwHBbSDDbn0GdZNn1Kb6fhYfHOq1QFd3e4b4DIi-2FSxb6HaAEIytg-2BOzDmRDcZVGhq-2BWvVRqd2ebNwqo1qM-2BKOVt0ONRlR8TYnSleeZbabWAVTDCbv03EnnnydIafH8v5Hse3TEs5fkLrmV00kykEXXw8iYBDVUsuk32j-2B-2FxAGw4QwGOfNRO2B0qudY-2FCayBQ-3D-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTEdxzrKXyWk5YDChSTZZix29sjk7a7fi0J3SjqgFv5F1XXbSuEySwD8AFXe55lnDS1A-3D-3DG71X_U31jt5HgHBh7k3Grc5s4l1lBleB94SK44rNmv480LV6qH4WjAs0Kn3rCguCseYisoRsW-2FtgeiNL4LHrAspMdiHRwHBbSDDbn0GdZNn1Kb6fhYfHOq1QFd3e4b4DIi-2FSxgLp2x8t4ogtihafzInZEiYaH7BpSHb7-2FErkA-2FWp6CtWsCF4SUcd-2BngTViKWAahuoGAScAhPgCf-2BdfJRVME1KVDnC8F0-2FRuENs1VqsQLBH7YDvech4XRDero1NhwnoXn4J39UGwZJEqYIZS3w6Ll1aw-3D-3D. You are receiving this because you modified the open/close state.Message ID: @.***>

srs4511351 commented 1 year ago

I tried the modified procedure in README-gr3.10, but it still seems that gr_modtool bind is still failing in build_bindings.sh. I read that it compiles perfectly in some OSes, so there must be something wrong with mine, other dependencies and versions. I guess I'll have to wait for things to be straitened out.

Building bindings for gr-op25 GNU Radio module name identified: op25 creating docstrings directory /home/pi/op25/op25/gr-op25/python/op25/bindings/docstrings ERROR error occured, while parsing element with name "Field" and attrs "['id', 'name', 'type', 'context', 'access', 'offset']". Error: 'line'. 'line'

Thanks.

boatbod commented 1 year ago

What was your base os? Debian Buster should be good, as is Ubuntu 20.04, 22.04 and Raspberry PI OS (current ver).

On 1/25/23 13:52, srs4511351 wrote:

I tried the modified procedure in README-gr3.10, but it still seems that gr_modtool bind is still failing in build_bindings.sh. I read that it compiles perfectly in some OSes, so there must be something wrong with mine, other dependencies and versions. I guess I'll have to wait for things to be straitened out.

Building bindings for gr-op25 GNU Radio module name identified: op25 creating docstrings directory /home/pi/op25/op25/gr-op25/python/op25/bindings/docstrings ERROR error occured, while parsing element with name "Field" and attrs "['id', 'name', 'type', 'context', 'access', 'offset']". Error: 'line'. 'line'

Thanks.

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAM-2FMhXiYSW6swBilmEJI1RrR7CMEmJm5JN-2Bv2iancLh20-3Dnv0Z_U31jt5HgHBh7k3Grc5s4l6CaEswOwF9Ob-2BDleUMJ5rspOTFRYjBYbGrg-2FRXiEhU33VFWEWVXjwRKS4WWxi52-2F4m7I3vXmlZsDgCyyj9KHI1IGhRsanCu290biIRJHjt-2FNyDxTVYx5sgbsJbzpVn925gpQe9aRT-2BTbmLnItSlJ7Ni5zmq5hrfJ6eXQFDZKA6GELlicIhryj9UpWiUwYbyIpy-2FQn0viQUx4RUURNRyHHqpIzAbahBp2uG2uImvLNRXuCG0LcedMRZFQeVgjrnGlA-3D-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTETUbg1iO8h-2FxhUBzkx7VET-2Bhh-2Bin7levn1S-2B3ZQZL3bGFjBG0ol2-2Fu8nB4wIYEGMfQ-3D-3D6Lv7_U31jt5HgHBh7k3Grc5s4l6CaEswOwF9Ob-2BDleUMJ5rspOTFRYjBYbGrg-2FRXiEhU33VFWEWVXjwRKS4WWxi52-2F4m7I3vXmlZsDgCyyj9KHI1IGhRsanCu290biIRJHjt-2FuaUF-2B8t-2BXMuejPJ520WulviFxU-2BGwOV4bAsYK6iyTxY-2BjDSeGFzhtQFGaNSyNFAYhl1o-2FOE-2BaUlq-2FIgUIzWO7qAVVp-2FiRascm4-2FHQouR24isyDq9-2BbwT-2FMSbj7qq8Lj0ZfsnBtKYYGIhB19wI0Tdtw-3D-3D. You are receiving this because you modified the open/close state.Message ID: @.***>

srs4511351 commented 1 year ago

I tried two operating systems.

2023.01.01 bookworm from Debian. Installed gcc-11. update-alternatives did not offer any choices, so I switched the gcc link to point to gcc-11, g++ link to point to g++-11, cpp link to point to cpp-11. I hope I didn't miss one.

2023.01.02 bullseye from Debian Installed gnuradio 3.10.5.0 from source.

They both fail on gr_modtool bind

I could try a raspios-bullseye system with gnuradio 3.10.5.0 installed from source if you think it will help. Buster is quite old.

boatbod commented 1 year ago

Why can't you just run Bullseye without building gnuradio from sources?  As I recall it's a gnuradio-3.8 release so it'll work just fine. Bookworm is definitely no-go right now.

On 1/25/23 20:33, srs4511351 wrote:

I tried two operating systems.

2023.01.01 bookworm from Debian. Installed gcc-11. update-alternatives did not offer any choices, so I switched the gcc link to point to gcc-11, g++ link to point to g++-11, cpp link to point to cpp-11. I hope I didn't miss one.

2023.01.02 bullseye from Debian Installed gnuradio 3.10.5.0 from source.

They both fail on gr_modtool bind

I could try a raspios-bullseye system with gnuradio 3.10.5.0 installed from source if you think it will help. Buster is quite old.

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAM-2FMhXiYSW6swBilmEJI1RrV0Kf1DvrO8dltcTCJubt6Y-3DRuuO_U31jt5HgHBh7k3Grc5s4lwGsvYZPTwL-2BJz13Fr7rQuZ9yBDwwGoS7GGyRvvF-2BMbmWXR9czsUNl7fEhbr-2FSARN7IFcAQNSTfph5-2BA2VvIIpegVoq5nQ7BWsO-2BDIu89x9hZh2CykEHjNETRUsGdoB2bknhS30WlnZS4mq-2BRMfRR3UEQ9hrJfn2CzCSGAXATNx6Kv3PmOhcjfS5SxhOgyLGgmSWVD-2BGThsjYgPDZk8WxuCIjZqp0Z0zqY1w56gDSrBKNW18VwBzqe082JmvvghqVg-3D-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTETUujAadssgyzXr0-2BtM-2BDjAhOl9Ua77RgGNExnyDn-2BNj-2F7NOSg3e29S7SzISWhViog-3D-3Di2pC_U31jt5HgHBh7k3Grc5s4lwGsvYZPTwL-2BJz13Fr7rQuZ9yBDwwGoS7GGyRvvF-2BMbmWXR9czsUNl7fEhbr-2FSARN7IFcAQNSTfph5-2BA2VvIIpegVoq5nQ7BWsO-2BDIu89x9huAQ1g4kSaC6s7-2BLb-2B7Qhzu8rsUT8wVuiIHEskDJ2429gZ-2Fq6UjH2ct3-2BGRtA-2FvQb1UMNVwFXmkRwAz3upJmozm0zCDYNpRAb-2F7UiYcW6jkUXrTqzud6jlMe0-2FpGZvcou8ojw2Pt-2FFdTuUgE49EEIGg-3D-3D. You are receiving this because you modified the open/close state.Message ID: @.***>

srs4511351 commented 1 year ago

op25 does work with GR 3.8 and Bullseye. The point of this exercise is to get everything working on Bookworm/GR 3.10. I have many SDR applications installed and Bookworm with GR 3.10 will be released. It is time for me to sit back and wait for this to be fixed, although for some reason, it does work for some OSes.

srs4511351 commented 1 year ago

I see that you provided pre-made bindings files. I also noted the issue with the compiler versions. I was able to compile and install op25 on my Raspberry Pi bookworm system with gr 3.10.5.1 I just omitted the build_bindings.sh step.

There were problems, though. Just before I installed op25, apt did a bunch of upgrades, including gnuradio. When I initially ran it, I got a 'osmosdr source_c creation failure' message. I recompiled and installed gr-osmosdr. After that, op25 ran and functioned!

I don't know if it is a valid comparison, but gqrx, which was compiled before the gnuradio upgrade, ran just fine after the upgrade and also after the gr-osmosdr reinstall.

I hope that reinstalling things every time there are upgrades does not become the standard.