analogdevicesinc / gr-ofdmradar

A simple OFDM Radar implementation
GNU General Public License v3.0
40 stars 11 forks source link

setdata function depreciated / List of dependancies #1

Open raidfire99 opened 2 years ago

raidfire99 commented 2 years ago

Hi can we have a full isit of dependencies and versions?

I'm on Ubuntu 20.04, GNR 3.10, I managed to run the cmake command ok to completion after modifying the cmake command to be python 3.8 not 3.9, installing missing dependencies and repeating until it finished but when i try to make it fails on an open gl texture error in the screen file with notes that 7 arguments expected 9 provided, you mention in the MD file gl headers and runtimes, other than qt5 and building opengl what am I missing?

[ 10%] Building CXX object lib/CMakeFiles/gnuradio-ofdmradar.dir/gui/ofdmradar_screen.cc.o /home/raidfire/gr-ofdmradar/lib/gui/ofdmradar_screen.cc: In member function ‘virtual void OFDMRadarScreen::initializeGL()’: /home/raidfire/gr-ofdmradar/lib/gui/ofdmradar_screen.cc:95:45: error: no matching function for call to ‘QOpenGLTexture::setData(int, int, int, unsigned int, unsigned int, int, QOpenGLTexture::PixelFormat, QOpenGLTexture::PixelType, std::complex*)’ 95 | d_front_buffer.data()); | ^

raidfire99 commented 2 years ago

A little more digging and I have discovered the openGL 'setdata' function is now marked as depreciated, voids are no longer handled as before, can you offer any words of wisdom on how to get round this?

estherwyx commented 2 years ago

Hello, I have met the same problem. Have you solved this problem? Or is there a direction to try

tafkos commented 2 years ago

Some investiagtion on the problem...

At https://github.com/analogdevicesinc/gr-ofdmradar/blob/e6f1cc185a95c2157fe8431004509005bc3d2dc4/lib/gui/ofdmradar_screen.cc#L87-L95 and https://github.com/analogdevicesinc/gr-ofdmradar/blob/e6f1cc185a95c2157fe8431004509005bc3d2dc4/lib/gui/ofdmradar_screen.cc#L131-L139 a method QOpenGLTexture::setData() is called with parameters list become available since Qt 5.14:

This function was introduced in Qt 5.14. https://doc.qt.io/qt-5/qopengltexture.html#setData-9

Thus, QT 5.14 is required... but it is not available with GNU Radio 3.10 installed either from conda nor from PPA for Ubuntu 18.04...

Trying to upgrade QT up to 5.15 on my Ubuntu by using https://launchpad.net/%7Esavoury1/+archive/ubuntu/qt-5-15

tafkos commented 2 years ago

I confirm it could be installed using Ubuntu 20.04, Pybombs, QT15.4+ and successfully run examples:

screenshot

Using following guide:

Install GR OFDM RADAR

upgrade QT to 5.14+ (requires SUDO)

https://launchpad.net/%7Esavoury1/+archive/ubuntu/qt-5-15

Prequisites

Ubuntu 20.04

sudo apt install python3.9-full libpython3.9-dev libgirepository1.0-dev
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
pip3 install --upgrade git+https://github.com/gnuradio/pybombs.git
pip3 install mako pygi numpy pyyaml click pygobject pycairo pgi pyqt5 pygccxml matplotlib --upgrade

Gnuradio 3.10 by pybombs

gnuradio by pybombs

pybombs -y auto-config
pybombs -y recipes add-defaults
pybombs -y prefix init $HOME/prefix-gr310radar -a gr310radar -R gnuradio310

GR-ofdmradar build from source

https://github.com/analogdevicesinc/gr-ofdmradar#building

source $HOME/prefix-gr310radar/setup_env.sh

cd $HOME
git clone https://github.com/analogdevicesinc/gr-ofdmradar.git gr-ofdmradar.git
mkdir $HOME/gr-ofdmradar.git/build
cd $HOME/gr-ofdmradar.git/build

cmake -DCMAKE_INSTALL_PREFIX=$HOME/gnuradio310_ofdmradar/local \
    -DPYTHON_EXECUTABLE=$(which python3) \
    -DPYTHON_INCLUDE_DIR=$HOME/gnuradio310_ofdmradar/include/python3.9 \
    -DPYTHON_LIBRARY=$HOME/gnuradio310_ofdmradar/lib/libpython3.9.so \
    -DGR_PYTHON_DIR=$HOME/gnuradio310_ofdmradar/lib/python3.9/site-packages \
    -DCMAKE_BUILD_TYPE=Release \
    -B build \
    -S ..

make -C build -j5
make -C build install
estherwyx commented 2 years ago

I confirm it could be installed using Ubuntu 20.04, Pybombs, QT15.4+ and successfully run examples:

  • ofdmradar_test.grc
  • doatest.grc

screenshot

Using following guide:

Install GR OFDM RADAR

upgrade QT to 5.14+ (requires SUDO)

https://launchpad.net/%7Esavoury1/+archive/ubuntu/qt-5-15

Prequisites

Ubuntu 20.04

sudo apt install python3.9-full libpython3.9-dev libgirepository1.0-dev
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
pip3 install --upgrade git+https://github.com/gnuradio/pybombs.git
pip3 install mako pygi numpy pyyaml click pygobject pycairo pgi pyqt5 pygccxml matplotlib --upgrade

Gnuradio 3.10 by pybombs

gnuradio by pybombs

pybombs -y auto-config
pybombs -y recipes add-defaults
pybombs -y prefix init $HOME/prefix-gr310radar -a gr310radar -R gnuradio310

GR-ofdmradar build from source

https://github.com/analogdevicesinc/gr-ofdmradar#building

source $HOME/prefix-gr310radar/setup_env.sh

cd $HOME
git clone https://github.com/analogdevicesinc/gr-ofdmradar.git gr-ofdmradar.git
mkdir $HOME/gr-ofdmradar.git/build
cd $HOME/gr-ofdmradar.git/build

cmake -DCMAKE_INSTALL_PREFIX=$HOME/gnuradio310_ofdmradar/local \
    -DPYTHON_EXECUTABLE=$(which python3) \
    -DPYTHON_INCLUDE_DIR=$HOME/gnuradio310_ofdmradar/include/python3.9 \
    -DPYTHON_LIBRARY=$HOME/gnuradio310_ofdmradar/lib/libpython3.9.so \
    -DGR_PYTHON_DIR=$HOME/gnuradio310_ofdmradar/lib/python3.9/site-packages \
    -DCMAKE_BUILD_TYPE=Release \
    -B build \
    -S ..

make -C build -j5
make -C build install

Thanks for your reply. Later, I also found that a version after QT5.14 was needed, but I failed to install it from the source code. I used ubuntu21.04 and gnuradio3.9 to complete the gr-ofdmradar installation because ubuntu21.04 installed 5.15 qt by default.