discuss-gnuradio
[Top][All Lists]
Advanced

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

conda build fails with: ImportError: generic_type: type "square_ff" refe


From: Franco VENTURI
Subject: conda build fails with: ImportError: generic_type: type "square_ff" referenced unknown base type "gr::block"
Date: Tue, 22 Mar 2022 21:52:04 -0400 (EDT)

In order to learn how conda recipes and conda build work, I did the following steps on my computer:

- created a VM running the latest version of Ubuntu (21.10); I did all the remaining steps inside this VM
- installed conda (miniforge3), created the 'gnuradio' environment, installed the latest version of gnuradio from conda (3.10.1.1), ran 'conda upgrade -all', ran a quick check with 'gnuradio-compantion' - for this part I followed the instructions in the GNU Radio Wiki (https://wiki.gnuradio.org/index.php/CondaInstall)
- ran 'conda install gnuradio-build-deps' and 'conda activate $CONDA_DEFAULT_ENV' as per the instructions here: https://wiki.gnuradio.org/index.php/CondaInstall#Building_OOT_modules_to_use_with_conda-installed_GNU_Radio
- followed the GNU Radio OOT Modules tutorial (https://wiki.gnuradio.org/index.php/OutOfTreeModules) to create the sample 'gr-howto' OOT module with the two blocks 'square_ff' and 'square2_ff'
- in the sample OOT howto module I ran the commands:
    mkdir build
    cd build
    cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DLIB_SUFFIX="" ..
    cmake --build .
    cmake --build . --target install
and I was able to build the sample 'gr-howto' module, and ran the QA tests without any errors
- I then created a conda recipe following the steps in Ryan Volz template (https://github.com/ryanvolz/gnuradio-oot-template-feedstock); modified the meta.yaml file, and the build.sh file (didn't touch bld.bat since my build/host environment is Ubuntu)
- I installed conda-build and ran the command 'conda build .' in the directory with the recipe
- After a few minutes the compile/link part ran without errors, however the QA tests failed with the error message:

    ImportError: generic_type: type "square_ff" referenced unknown base type "gr::block"

For those interested in seeing all the files (howto module, meta.yaml, build.sh), I uploaded them to my Google drive and this is the link: https://drive.google.com/file/d/1rkMcrsF9jLxUvgOU1F3kpbCRij4e9qa-/view?usp=sharing

I know that error message is due to pybind11 and I saw it was mentioned in this mailing list before (https://lists.gnu.org/archive/html/discuss-gnuradio/2021-05/msg00056.html and https://github.com/gnuradio/gnuradio/issues/4841), but in this case the module does work with the conda gnuradio environment if built the 'normal' way using the 'cmake' commands above; it fails when run inside a 'conda build' recipe.

Thanks in advance,
Franco




   
 

reply via email to

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