building OOT module in conda

2022-03-10 Thread Wayne Roberts
gnuradio itself from conda works ok on windows from conda.
But i was trying to build an OOT module  using conda on windows
https://wiki.gnuradio.org/index.php/CondaInstall

I had easy time building this OOT module in linux, and it worked good.
But on windows i use conda install gnuradio-build-deps as part of build
environment.  But then cmake doesnt find MPLIB.  I search for it on the
anaconda repository, perhaps its gmp or libgmp for mplib, but its not there
for windows.

This stuff is so much easier on linux, perhaps gnuradio works in WSL2.  But
having it native on windows would be good too from conda


Re: building OOT module in conda

2022-03-10 Thread Ryan Volz

Hi Wayne,

On 3/10/22 1:49 PM, Wayne Roberts wrote:

gnuradio itself from conda works ok on windows from conda.


Glad to hear it!


But i was trying to build an OOT module  using conda on windows 
https://wiki.gnuradio.org/index.php/CondaInstall 


I had easy time building this OOT module in linux, and it worked good.
But on windows i use conda install gnuradio-build-deps as part of build 
environment.  But then cmake doesnt find MPLIB.  I search for it on the 
anaconda repository, perhaps its gmp or libgmp for mplib, but its not there for 
windows.


GMP doesn't exist for Windows, so what you need (and should already be 
installed as a dependency of GNU Radio, or rather the `gnuradio-core` package) 
is `mpir`.



This stuff is so much easier on linux, perhaps gnuradio works in WSL2.  But 
having it native on windows would be good too from conda


I'm striving to make things as painless as possible on Windows, but there are 
inevitable frictions that happen because of its differences from Linux and the 
fact that the conda packages are relatively new and building OOTs is still the 
frontier.

What OOT in particular are you trying to build? Maybe there are other things 
that are needed to get it working if nobody has done it before successfully on 
Windows. The full output from CMake would also be helpful to really see what's 
going wrong.

Cheers,
Ryan



Re: building OOT module in conda

2022-03-10 Thread Ryan Volz

Hi Wayne,

On 3/10/22 5:21 PM, Wayne Roberts wrote:

when i say that gnuradio works on windows, that doesnt include UHD.
When i plug in B100, and point windows 11 device management to the unzipped 
erllc_uhd_winusb_driver.zip, it just ignores the contents.
But run it ok in ubuntu now.


Getting the USB driver installed for any device is always going to be an 
external step that no GNU Radio package can help with, but if the UHD 
documentation is not getting you there then I recommend giving the generic 
WinUSB driver a try as documented here:

https://github.com/ryanvolz/radioconda#windows-users-5



The OOT module i build and run is https://github.com/tapparelj/gr-lora_sdr 

It is for 3.8.2, so i must install that version of gnuradio, and on ubuntu hold 
back the update on package management.


Ah, GR 3.8 might be a little trickier since the Wiki documentation has been 
updated to correspond to 3.9/3.10. That said, nothing about that OOT looks like 
it would necessarily make the process more difficult.



On windows though, with conda,  for building that I have the VS2015 installed 
and cmake finds that, but cmake stops at finding MPLIB (or MPIR) on windows.


VS2017 might be necessary, or at least have the "MSVC v141 - VS2017 C++ x64/x86 
build tools (v14.16)" component selected for inclusion in your Visual Studio 
installation.


Also note that in conda, cmake and git are not installed by default.  I'm not 
sure if base should be activated when installing cmake and git.


Something seems off here since `mpir` and `cmake` should both be installed in 
an environment where `gnuradio-build-deps` and `gnuradio-core` are installed. 
`git` is not required for the build, only for how you're getting the source, so 
it would be necessary for you to install the `git` package manually.

Let me be explicit about how I think this should work:

1) Start from an activated base conda environment:

conda activate base

2) Create a new environment, say "gnuradio", that contains `gnuradio` and, 
since you want to build an OOT, `gnuradio-build-deps`.

conda create -n gnuradio gnuradio gnuradio-build-deps

3) Activate your "gnuradio" environment.

conda activate gnuradio

4) Install any extra dependencies you might need for your OOT (for gr-lora_sdr 
it looks like that would be nothing).

conda install ...

*) At this point, you should be in an environment where `mpir` and `cmake` are 
installed.

conda list

(output includes `mpir` and `cmake`)

5) Execute CMake and the build steps as described on the wiki.

If you're doing all of that and it's still failing, post the CMake output and 
`conda list` from the environment that is active when you're doing the build.

Cheers,
Ryan



Re: building OOT module in conda

2022-03-10 Thread Wayne Roberts
  is it possible (since the OOT needs 3.82 of gnuradio), your step 2:
conda create -n gnuradio gnuradio=3.8.2 gnuradio-build-deps
that results in conflicts

It looks like gnuradio is installed via conda with environment gnuradio
activated.
But its not clear if gnuradio-build-deps needs also be installed with the
active environment set to gnuradio vs base.
Also cxx-compiler installed in which environment.
And then finally, running cmake on the OOT module in the same environment.

On Thu, Mar 10, 2022 at 3:13 PM Ryan Volz  wrote:

> Hi Wayne,
>
> On 3/10/22 5:21 PM, Wayne Roberts wrote:
> > when i say that gnuradio works on windows, that doesnt include UHD.
> > When i plug in B100, and point windows 11 device management to the
> unzipped erllc_uhd_winusb_driver.zip, it just ignores the contents.
> > But run it ok in ubuntu now.
>
> Getting the USB driver installed for any device is always going to be an
> external step that no GNU Radio package can help with, but if the UHD
> documentation is not getting you there then I recommend giving the generic
> WinUSB driver a try as documented here:
>
> https://github.com/ryanvolz/radioconda#windows-users-5
>
> >
> > The OOT module i build and run is
> https://github.com/tapparelj/gr-lora_sdr <
> https://github.com/tapparelj/gr-lora_sdr>
> > It is for 3.8.2, so i must install that version of gnuradio, and on
> ubuntu hold back the update on package management.
>
> Ah, GR 3.8 might be a little trickier since the Wiki documentation has
> been updated to correspond to 3.9/3.10. That said, nothing about that OOT
> looks like it would necessarily make the process more difficult.
>
> >
> > On windows though, with conda,  for building that I have the VS2015
> installed and cmake finds that, but cmake stops at finding MPLIB (or MPIR)
> on windows.
>
> VS2017 might be necessary, or at least have the "MSVC v141 - VS2017 C++
> x64/x86 build tools (v14.16)" component selected for inclusion in your
> Visual Studio installation.
>
> > Also note that in conda, cmake and git are not installed by default.
> I'm not sure if base should be activated when installing cmake and git.
>
> Something seems off here since `mpir` and `cmake` should both be installed
> in an environment where `gnuradio-build-deps` and `gnuradio-core` are
> installed. `git` is not required for the build, only for how you're getting
> the source, so it would be necessary for you to install the `git` package
> manually.
>
> Let me be explicit about how I think this should work:
>
> 1) Start from an activated base conda environment:
>
>  conda activate base
>
> 2) Create a new environment, say "gnuradio", that contains `gnuradio` and,
> since you want to build an OOT, `gnuradio-build-deps`.
>
>  conda create -n gnuradio gnuradio gnuradio-build-deps
>
> 3) Activate your "gnuradio" environment.
>
>  conda activate gnuradio
>
> 4) Install any extra dependencies you might need for your OOT (for
> gr-lora_sdr it looks like that would be nothing).
>
>  conda install ...
>
> *) At this point, you should be in an environment where `mpir` and `cmake`
> are installed.
>
>  conda list
>
> (output includes `mpir` and `cmake`)
>
> 5) Execute CMake and the build steps as described on the wiki.
>
> If you're doing all of that and it's still failing, post the CMake output
> and `conda list` from the environment that is active when you're doing the
> build.
>
> Cheers,
> Ryan
>