discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to compile gr-osmosdr on windows


From: Mitja kocjančič
Subject: Re: Trying to compile gr-osmosdr on windows
Date: Wed, 27 Apr 2022 01:45:26 +0200

Thanks for hinting to gr-utils
I am one step closer now (I missed gr-utils, gr-modtool (click, click-plugins), gr-filter (scipy was missing) and gr-video-sdl (SDL 1.2 was missing),

I also found some missing dependencies that I had to enable like this
-DENABLE_GRC=ON
-DENABLE_GR_UTILS=ON
-DENABLE_GR_VIDEO_SDL=ON
-DENABLE_GR_MODTOOL=ON

now gr-utils is built, but for some reson GROsmoSDR still wants to invoke it (its failing to invoke it now, but it does try): https://user-images.githubusercontent.com/6347325/165409049-73253f38-c5f2-40c1-923e-a06df46e5f33.png
I also tried to delete pygccxml but it made no diference

maybe the problem might be that you are building with DCMAKE_BUILD_TYPE=Release

while I am building with DCMAKE_BUILD_TYPE=RelWithDebInfo

and the thing wants to invoke something different, idk

BTW: if I go with 0.2.3, tag of GROsmoSDR how should I go about applying your patches (is there a tool that would take a patch and apply it automaticly, because I don't want to patch this by hand because then it would surely take another month or 2 for me to patch this manualy :)

Now I guess I need to figure out why does GROsmoSDR invoke bind_oot_file.py

BTW: I am trying to use PothosSDR build enviroment (without pothos, since SoapySDR doesn't want to built and I don't need it if I have OsmoSDR) (since it served me well in 3.7 days (without it I would never be able to use GNURadio on windows in early days (back when I got my hackRF you could only run GNURadio on linux and for some reason it had to be physycal linux machine since it didn't work in VM) and here is my modified BuildGNURadio.cmake script: https://github.com/veso266/PothosSDR/blob/master/BuildGNURadio.cmake




V V tor., 26. apr. 2022 ob 19:59 je oseba Ryan Volz <ryan.volz@gmail.com> napisala:
Hi Mitja,

On 4/26/22 11:52 AM, Mitja kocjančič wrote:
> Hello there, I finaly decided to upgrade to GNURadio 3.9 and decided to
> build everything from source because precompiled versions outthere
> didn't include everything I needed
>
> I knew there would be pain, I just didn't knew how much til I started
> tinkering with it

I commend the effort, and now that you know the pain I hope to convert
you to the conda way of life :)

>
> ...
>
> even gnuradio builds fine
> this is how I built it (incase it matters)
>
> cmake ../ -G "Visual Studio 16 2019" -Wno-dev ^
>          -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ^
>          -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} ^
>          -DLOG4CPP_INCLUDE_DIR=${CMAKE_INSTALL_PREFIX}/include ^
>          -DLOG4CPP_LIBRARY=${CMAKE_INSTALL_PREFIX}/lib/log4cpp.lib ^
>          -DMPIR_INCLUDE_DIR=${MPIR_INCLUDE_DIR} ^
>          -DMPIR_LIBRARY=${MPIR_LIBRARY} ^
>          -DMPIRXX_LIBRARY=${MPIRXX_LIBRARY} ^
>          -DENABLE_INTERNAL_VOLK=OFF ^
>          -DBOOST_ROOT=${BOOST_ROOT} ^
>          -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} ^
>          -DBOOST_ALL_DYN_LINK=TRUE ^
>          -DPYTHON_EXECUTABLE=${PYTHON3_EXECUTABLE} ^
>          -DPYTHON_INCLUDE_DIR=${PYTHON3_INCLUDE_DIR} ^
>          -DPYTHON_LIBRARY=${PYTHON3_LIBRARY} ^
>          -DGR_PYTHON_DIR=${PYTHON3_INSTALL_DIR} ^
>          -DFFTW3f_INCLUDE_DIRS=${FFTW3F_INCLUDE_DIRS} ^
>          -DFFTW3f_LIBRARIES=${FFTW3F_LIBRARIES} ^
>          -DUHD_INCLUDE_DIRS=${UHD_INCLUDE_DIRS} ^
>          -DUHD_LIBRARIES=${UHD_LIBRARIES} ^
>          -DENABLE_TESTING=ON ^
>          -DCPPUNIT_INCLUDE_DIRS=${CPPUNIT_INCLUDE_DIRS} ^
>          -DCPPUNIT_LIBRARIES=${CPPUNIT_LIBRARIES} ^
>          -DENABLE_PYTHON=ON ^
>          -DPORTAUDIO_INCLUDE_DIRS=${PORTAUDIO_INCLUDE_DIR} ^
>          -DPORTAUDIO_LIBRARIES=${PORTAUDIO_LIBRARY} ^
>          -DZEROMQ_INCLUDE_DIRS=${ZEROMQ_INCLUDE_DIRS} ^
>          -DZEROMQ_LIBRARIES=${ZEROMQ_LIBRARIES} ^
>          -DGSL_INCLUDE_DIRS=${GSL_INCLUDE_DIRS} ^
>          -DGSL_LIBRARY=${GSL_LIBRARY} ^
>          -DGSL_CBLAS_LIBRARY=${GSL_CBLAS_LIBRARY} ^
>          -DENABLE_GR_QTGUI=ON ^
>          -DCMAKE_PREFIX_PATH=${QT5_ROOT} ^
>          -DQWT_INCLUDE_DIRS=${QWT_INCLUDE_DIR} ^
>          -DQWT_LIBRARIES=${QWT_LIBRARY} ^
>          -DENABLE_GRC=ON
>

What might be helpful is if you could note the components that are
enabled/disabled after running CMake for GNU Radio.

>
> this was all going great, but then it was GROsmoSDR part ....
> I clone master branch off their git: git://git.osmocom.org/gr-osmosdr
> <http://git.osmocom.org/gr-osmosdr>
>
> started to build
> cmake ../ -G "Visual Studio 16 2019" ^
>          -Wno-dev
>          -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ^
>          -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} ^
>          -DLOG4CPP_INCLUDE_DIR=${CMAKE_INSTALL_PREFIX}/include ^
>          -DLOG4CPP_LIBRARY=${CMAKE_INSTALL_PREFIX}/lib/log4cpp.lib ^
>          -DMPIR_INCLUDE_DIR=${MPIR_INCLUDE_DIR} ^
>          -DMPIR_LIBRARY=${MPIR_LIBRARY} ^
>          -DMPIRXX_LIBRARY=${MPIRXX_LIBRARY} ^
>          -DFFTW3f_INCLUDE_DIRS=${FFTW3F_INCLUDE_DIRS} ^
>          -DFFTW3f_LIBRARIES=${FFTW3F_LIBRARIES} ^
>          -DUHD_INCLUDE_DIRS=${UHD_INCLUDE_DIRS} ^
>          -DUHD_LIBRARIES=${UHD_LIBRARIES} ^
>          -DBOOST_ROOT=${BOOST_ROOT} ^
>          -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} ^
>          -DBOOST_ALL_DYN_LINK=TRUE ^
>          -DPYTHON_EXECUTABLE=${PYTHON3_EXECUTABLE} ^
>          -DPYTHON_INCLUDE_DIR=${PYTHON3_INCLUDE_DIR} ^
>          -DPYTHON_LIBRARY=${PYTHON3_LIBRARY} ^
>          -DGR_PYTHON_DIR=${PYTHON3_INSTALL_DIR} ^
>          -DENABLE_RFSPACE=OFF ^
>          -DENABLE_REDPITAYA=OFF
>
> BTW: -DCMAKE_BUILD_TYPE=RelWithDebInfo
>
> and then it went donwhill :(
> that's what the error looks like:
> https://user-images.githubusercontent.com/6347325/161424913-e10c0ee7-8901-49e4-a093-b34c39e68053.png
> <https://user-images.githubusercontent.com/6347325/161424913-e10c0ee7-8901-49e4-a093-b34c39e68053.png>
>
> it seams it wants BindingGenerator from GNURadio.bindtool
>
> but I checked there is nothing like that anywhere on my system (I
> checked where gr python binding normaly reside
> CMAKE_INSTALL_PREFIX\lib\python3.9\site-packages\gnuradio\gr
>
> CMAKE_INSTALL_PREFIX can be different for everyone in my case its
> C:\GnuRadio
>
> now What is GNURadio.bindtool and where can I find it?

It's a component of the gr-utils portion of the main GNU Radio build, so
I'd suggest checking to see that you built that (seems not). I think it
would be easy to miss a dependency here and not end up with the bindtool.

That said, I'm not entirely sure why the build is trying to run
bind_oot_file.py as that is more of a developer activity and I don't
think it's something that happens in my builds. I do know that I don't
install pygccxml, and perhaps if you do have that dependency available
then it might be triggering this when I wouldn't see it.

>
> It seams people managed to build GROsmoSDR on windows with GNURadio 3.9
> awhile ago: https://osmocom.org/issues/5021
> <https://osmocom.org/issues/5021> because there is GRConda, official
> gnuradio prebuild installer and even Pothos one
>
> so I have to be doing something wrong, I hope someone has any idea how
> to fix my gnuradio problems :)

These are the things I see you doing differently than my conda builds:

- Using the Visual Studio generator with CMake (I'm using Ninja)
- You're building gr-osmosdr from the latest git (I'm starting from the
0.2.3 tag with the three patches you can find here:
https://github.com/conda-forge/gnuradio-osmosdr-feedstock/tree/main/recipe)
- Possibly having pygccxml installed, see above (I don't)

>
> and I cannot use prebuilt binaries because they don't include what
> GNURadio 3.7 does (
>
> gr-nrsc5: https://github.com/argilo/gr-nrsc5
> <https://github.com/argilo/gr-nrsc5>
> gr-zeromq (built-in now IIRC):
> https://github.com/gnuradio/gnuradio/tree/master/gr-zeromq
> <https://github.com/gnuradio/gnuradio/tree/master/gr-zeromq>
> gr-drm: https://github.com/kit-cel/gr-drm
> <https://github.com/kit-cel/gr-drm> (hmm is this built-in??)
> gr-dvbt/t2: https://github.com/BogdanDIA/gr-dvbt
> <https://github.com/BogdanDIA/gr-dvbt> (if reading this correctly, it
> built in now under gr-dtv)
> gr-dvbs2: https://github.com/drmpeg/gr-dvbs2
> <https://github.com/drmpeg/gr-dvbs2> (most build-in this works with 3.9)
>
> )
> so to bring my 3.9 install to a state 3.7 is in right now I would need a
> built enviroment at some point anyway, so why not start early :)
>
> Thanks for reading this long post, I hope I didn't confuse to much people

It seems like most of what you want is something that I have already
built with conda and included in radioconda. Not to discourage you from
building everything from scratch if that's really what you want, but I'm
willing to help you get the things you're missing built with conda so
that they become available for everyone. (I'm hoping that by building
out the base, other people like yourself might be motivated to add onto
it!) It looks like for 3.9/3.10, you're only missing gr-nrsc5 and
gr-dvbs2? I'm not sure if gr-drm and gr-dvbt/t2 are now built in, so
maybe those too. If you're interested, the place to start is building
from source but depending on the conda packages:

https://wiki.gnuradio.org/index.php/CondaInstall#Building_GNU_Radio_from_source_within_a_conda_environment

An alternative is to write a conda recipe, for which there is now a
template available with some instructions:

https://github.com/gnuradio/gnuradio/tree/main/gr-utils/modtool/templates/gr-newmod/.conda

I will also see what I can do for gr-nrsc5 and gr-dvbs2 myself, when I
get some spare time for GNU Radio things. If you do decide to go down
the conda path, don't hesitate to reach out to me for help!

Cheers,
Ryan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]