Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-ubuntu CI pipeline is failing #303

Closed
daniestevez opened this issue Oct 15, 2021 · 5 comments
Closed

build-ubuntu CI pipeline is failing #303

daniestevez opened this issue Oct 15, 2021 · 5 comments

Comments

@daniestevez
Copy link
Owner

We're getting errors like these in the tests:

1: Test command: /usr/bin/sh "/github/workspace/build/python/qa_fixedlen_tagger_test.sh"
1: Test timeout computed to be: 10000000
1: Traceback (most recent call last):
1:   File "/github/workspace/python/qa_fixedlen_tagger.py", line 24, in <module>
1:     from satellites import fixedlen_tagger
1: ModuleNotFoundError: No module named 'satellites'
 1/14 Test  #1: qa_fixedlen_tagger ...............***Failed    0.22 sec

I think this is caused by the release of Ubuntu 21.10, since we're using ubuntu:latest as base Docker image.

@daniestevez daniestevez self-assigned this Oct 15, 2021
@daniestevez
Copy link
Owner Author

Digging more into this. ubuntu:latest was and is still 20.04, but the image was updated 10 days ago.

I'm running the tests by hand on the container, and I get the following problem when importing the Python module:

>>> import python
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/gr-satellites/python/__init__.py", line 42, in <module>
    from .bindings.satellites_python import *
ImportError: generic_type: type "ax100_decode" referenced unknown base type "gr::block"

@daniestevez
Copy link
Owner Author

Now I think that the breakage cause is the update of GNU Radio from 3.9.2.0 to 3.9.3.0. The pipeline runs that succeeded some days ago were still pulling 3.9.2.0 from the PPA:

Get:49 http://ppa.launchpad.net/gnuradio/gnuradio-releases/ubuntu focal/main amd64 libgnuradio-runtime amd64 3.9.2.0-0~gnuradio~focal-3 [525 kB]

@daniestevez
Copy link
Owner Author

daniestevez commented Oct 15, 2021

It appears that there's a problem with the GNU Radio 3.9.3.0 PPA package. Using the PPA package I get this problem. If instead I build GNU Radio 3.9.3.0 from source, it works.

To use the PPA package I'm using this Dockerfile:

# syntax=docker/dockerfile:1
FROM ubuntu:latest
RUN apt-get update \
    && DEBIAN_FRONTEND="noninteractive" apt-get install -y software-properties-common \
    && add-apt-repository ppa:gnuradio/gnuradio-releases \
    && apt-get update \
    && DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade \
    && DEBIAN_FRONTEND="noninteractive" apt-get install -y \
           gnuradio build-essential cmake git swig liborc-0.4-dev \
	   python3-pip \
    && pip3 install construct \
    && git clone https://github.com/daniestevez/gr-satellites \
    && cd gr-satellites \
    && mkdir build \
    && cd build \
    && cmake .. \
    && make -j$(nproc) \
    && make install \
    && ldconfig
ENV PYTHONPATH /usr/local/lib/python3/dist-packages/

If I run python3 -c "import satellites; print(satellites.__version__)" using that image I get

Traceback (most recent call last):
  File "/usr/local/lib/python3/dist-packages/satellites/__init__.py", line 42, in <module>
    from .bindings.satellites_python import *
ModuleNotFoundError: No module named 'satellites.bindings'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3/dist-packages/satellites/__init__.py", line 44, in <module>
    from .satellites_python import *
ImportError: generic_type: type "ax100_decode" referenced unknown base type "gr::block"

To build GNU Radio (and Volk) from source I'm using this Dockerfile:

# syntax=docker/dockerfile:1
FROM ubuntu:latest
RUN apt-get update \
    && DEBIAN_FRONTEND="noninteractive" apt-get install -y software-properties-common \
    && apt-get update \
    && DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade \
    && DEBIAN_FRONTEND="noninteractive" apt-get install -y \
           build-essential cmake git \
	   python3-pip \
	   g++ libboost-all-dev libgmp-dev swig python3-numpy \
	   python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev \
	   libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev python3-pyqt5 \
	   liblog4cpp5-dev libzmq3-dev python3-yaml python3-click python3-click-plugins \
	   python3-zmq python3-scipy python3-gi python3-gi-cairo gir1.2-gtk-3.0 \
	   libcodec2-dev libgsm1-dev \
	   pybind11-dev python3-matplotlib libsndfile1-dev \
    && pip3 install construct \
    && git clone --recursive https://github.com/gnuradio/volk \
    && cd volk \
    && git checkout v2.5.0 \
    && mkdir build \
    && cd build \
    && cmake .. \
    && make -j$(nproc) \
    && make install \
    && ldconfig \
    && cd .. \
    && git clone https://github.com/gnuradio/gnuradio \
    && cd gnuradio \
    && git checkout v3.9.3.0 \
    && mkdir build \
    && cd build \
    && cmake .. \
    && make -j$(nproc) \
    && make install \
    && ldconfig \
    && cd .. \
    && git clone https://github.com/daniestevez/gr-satellites \
    && cd gr-satellites \
    && mkdir build \
    && cd build \
    && cmake .. \
    && make -j$(nproc) \
    && make install \
    && ldconfig
ENV PYTHONPATH /usr/local/lib/python3/dist-packages/

If I run python3 -c "import satellites; print(satellites.__version__)" using this image I get

v4.4.0-git

as expected.

@ryanvolz
Copy link
Contributor

Perhaps this could happen if GNU Radio from the PPA is built with a different version of pybind11 than used when building gr-satellites? As far as I can tell both are built with pybind11-dev within an Ubuntu 20.04 image and so that's not the problem, but it's the only explanation that immediately comes to mind to me.

@daniestevez
Copy link
Owner Author

The cause of the problem was a pybind11-dev package with the wrong version in the GNU Radio PPA repository (see here). This package has now been removed and the problem has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants