discuss-gnuradio
[Top][All Lists]
Advanced

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

Trying to compile gr-osmosdr on windows


From: Mitja kocjančič
Subject: Trying to compile gr-osmosdr on windows
Date: Tue, 26 Apr 2022 17:52:45 +0200

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

So I a fresh Windows 11 install and installed all the  prerequisites for my build enviroment (to not disturb my precious work computer running windows 7 and gnuradio3.7 install until I make 3.9 work on it)
Visual studio 2019
Python 3.9 x64
Git
Cmake
Perl (to build QT5)
Boost 1.75
CyAPI:(for LimeSDR)
SDRplayAPIv3 (to build gr-sdrplay)

then I started to build all the prerequsites
pthreads (sdr hw libs), libusb (sdr hw libs), zeromq (gr-zeromq), cppzmq (gr-zeromq)
portaudio (gr-audio), qt5 (gnuradio), qwt (gr-qtgui), faac (gr-drm)
faad2 (gr-drm), cppunit (gnuradio), gsl (gnuradio), libxml2 (libiio)
pybind11 (gnuradio), log4cpp (gnuradio), gmp (gnuradio), libsndfile (gr-blocks)

I also opted to install some prebuilt stuff (just because it was easier then to compile them):
zadig (prebuilt executable), boost (prebuilt runtime dlls), fx3 (prebuilt static libs), swig (prebuilt generator),
fftw (prebuilt runtime dlls), SDL 1.2 (prebuilt runtime dlls), liquiddsp (prebuilt runtime dlls)

which built fine
then it was hardware build part
## osmo-sdr
## rtl-sdr
## bladerf
## hackrf
## uhd/usrp
## airspy
## airspy-hf+
## mirisdr
## libiio (plutosdr)
## libad9361 (plutosdr)

which also built fine

then after waiting about 10 hours for every prerequisite to eather install or build it was finaly gnuradio built part
this is what I mean by gnuradio part
## volk
## gnuradio
## gr-osmosdr
## gqrx
## gr-sdrplay3

## volk -- builds fine
## gr-sdrplay3 -- builds fine

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

I hope this this variables don't confuse anyone, but they are properly set on my system
this gnuradio build-process is also part of a larger script because building this by hand would probably take more then 12hours (it already took to this point) (as you would have to be physically present instead of ordering a computer to do it while you do something else, also
"^" does the same thing on windows as does "\" on linux (it allows you to split command to multiple lines if anyone wonders why there is "^" at the end of every line instead of more usual "\")

this was all going great, but then it was GROsmoSDR part ....
I clone master branch off their git: git://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

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 seams people managed to build GROsmoSDR on windows with GNURadio 3.9 awhile ago: 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 :)

and I cannot use prebuilt binaries because they don't include what GNURadio 3.7 does (

gr-nrsc5: https://github.com/argilo/gr-nrsc5
gr-zeromq (built-in now IIRC): https://github.com/gnuradio/gnuradio/tree/master/gr-zeromq
gr-drm: https://github.com/kit-cel/gr-drm (hmm is this built-in??)
gr-dvbt/t2: 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 (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

reply via email to

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