jontio / JAERO

Demodulate and decode Aero signals. These signals contain SatCom ACARS messages as used by planes beyond VHF ACARS range
https://jontio.zapto.org/hda1/jaero.html
MIT License
224 stars 39 forks source link

RPI 4 Raspbian Bullseye Build Issue #73

Open Stormtracker017 opened 2 years ago

Stormtracker017 commented 2 years ago

I updated the pi-build script with the suggestion found in issue #72 and now get the following error:

pi@raspberrypi:~/JAERO $ ./pi-build.sh cant find qt5-default in repo Reading package lists... Done Building dependency tree... Done Reading state information... Done qt5-qmake is already the newest version (5.15.2+dfsg-9+rpi1). qtbase5-dev is already the newest version (5.15.2+dfsg-9+rpi1). qtbase5-dev-tools is already the newest version (5.15.2+dfsg-9+rpi1). qtchooser is already the newest version (66-2). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.9). checkinstall is already the newest version (1.6.2+git20170426.d24a630-2). cpputest is already the newest version (4.0-2). libogg-dev is already the newest version (1.3.4-0.1). libqcustomplot-dev is already the newest version (2.0.1+dfsg1-4). libqt5multimedia5-plugins is already the newest version (5.15.2-3). libqt5svg5-dev is already the newest version (5.15.2-3). libvorbis-dev is already the newest version (1.3.7-1). libzmq3-dev is already the newest version (4.3.4-1). qtmultimedia5-dev is already the newest version (5.15.2-3). unzip is already the newest version (6.0-26). cmake is already the newest version (3.18.4-2+rpt1+rpi1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Cloning into 'checkinstall'... remote: Enumerating objects: 313, done. remote: Total 313 (delta 0), reused 0 (delta 0), pack-reused 313 Receiving objects: 100% (313/313), 227.08 KiB | 977.00 KiB/s, done. Resolving deltas: 100% (201/201), done. for file in locale/checkinstall-*.po ; do \ case ${file} in \ locale/checkinstall-template.po) ;; \ *) \ out=echo $file | sed -s 's/po/mo/'; \ msgfmt -o ${out} ${file} ; \ if [ $? != 0 ] ; then \ exit 1 ; \ fi ; \ ;; \ esac ; \ done /bin/sh: 6: msgfmt: not found make: *** [Makefile:10: all] Error 1

General Device Information: `cpuinfo model name : ARMv7 Processor rev 3 (v7l) Hardware : BCM2711 Revision : c03114 Model : Raspberry Pi 4 Model B Rev 1.4

os-release PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian `

jontio commented 2 years ago

checkinstall on buster raspberrian using apt doesn't seem to work so I installed it from source. Maybe they have fixed that on bullseye? Remove the the following from the sh file and see what happens...

#checkinstall on my buster raspberrian fails with make: *** [Makefile:332: cmake_check_build_system] Segmentation fault
#so clone and install a version that works on the pi
FOLDER="checkinstall"
URL="https://github.com/giuliomoro/checkinstall"
if [ ! -d "$FOLDER" ] ; then
    git clone $URL $FOLDER
    cd "$FOLDER"
else
    cd "$FOLDER"
    git pull $URL
fi
make
sudo make install
sudo ldconfig
cd ..
Stormtracker017 commented 2 years ago

I removed those lines from the pi-build script. I ran the script and I get the following error:

`dpkg-deb: building package 'libaeroambe-dev' in 'libaeroambe-dev_1.1-1.deb'. Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'libaeroambe-dev' instead of './libaeroambe-dev_1.1-1.deb' Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: libaeroambe-dev : Depends: qt5-default (>= 5.11) but it is not installable E: Unable to correct problems, you have held broken packages. pi@raspberrypi:~/JAERO $ `

jontio commented 2 years ago

That's because they have removed the qt5-default package. Hmm that's a bother. I guess the easiest way is just remove the dependence. Go through the sh file and remove both references to qt5-default (>= 5.11) eg...

Depends: qt5-default (>= 5.11), qtmultimedia5-dev, libvorbis-dev, libogg-dev, libqt5multimedia5-plugins, libqcustomplot-dev, libqt5svg5-dev, libzmq3-dev

becomes

Depends: qtmultimedia5-dev, libvorbis-dev, libogg-dev, libqt5multimedia5-plugins, libqcustomplot-dev, libqt5svg5-dev, libzmq3-dev
Stormtracker017 commented 2 years ago

Removed the both dependence to qt-5-default. Now received this error, which is the same issue in issue #72 .

tests/jfastfir_tests.cpp: In member function ‘virtual void TEST_GROUP_CppUTestGroupTest_JFastFir::teardown()’: tests/jfastfir_tests.cpp:26:34: error: ‘turnOnNewDeleteOverloads’ is not a member of ‘MemoryLeakWarningPlugin’ 26 | MemoryLeakWarningPlugin::turnOnNewDeleteOverloads(); | ^~~~~~~~~~~~~~~~~~~~~~~~ make: *** [Makefile:923: jfastfir_tests.o] Error 1

I don't see where to execute the program

Stormtracker017 commented 2 years ago

I answered my own question about execution. I removed the following from the script:

`#run unit tests

rm -fr JAERO

qmake CONFIG+="CI"

make

./JAERO -v

rm JAERO`

I still get the following error:

`From https://github.com/jontio/libaeroambe

The following packages have unmet dependencies: libaeroambe-dev : Depends: qt5-default (>= 5.11) but it is not installable E: Unable to correct problems, you have held broken packages.`

nmaster2042 commented 2 years ago

@Stormtracker017: like for my issue it's because the scripts builds .deb with qt5-default as deoendency whereas you don't have this avaliable now.

You can replace in the script like this:

Depends: qt5-default

By

Depends: qtbase5-dev, qtchooser, qt5-qmake, qtbase5-dev-tools

You should have it twice or more.

Let's try this.

gprime31 commented 2 years ago

ok so this worked: sudo apt-get install cpputest build-essential cmake checkinstall gettext qtmultimedia5-dev libvorbis-dev libogg-dev libqt5multimedia5-plugins libqcustomplot-dev libqt5svg5-dev libzmq3-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools -y

but it dies here: 2022-08-02_19-10

looks like a qmqtt issue

thebaldgeek commented 2 years ago

@gprime31 I have a roughly 5 hour work around for that... It will build QT5, but its really no fun. My go-to for Jaero on Linux/Pi is to just use DragonOS. Jaero is built ready to go. Works flawlessly. I am using it now on 98w and 54w. (Two different Pis) L-Band.

gprime31 commented 2 years ago

I could, but I use my pi for other stuff too, don't want to reinstall, i'll wait for a fix.

DickvanNoort commented 2 years ago

I wanted to use JAERO on my RPi3B with the bullseye OS and it failed. Found this issue and decided to give it a go. It was an interesting learningcurve, but with some help I made some changes that made it work. These are the changes that I made:

The JAERO build for unittest gave this error:

tests/jfastfir_tests.cpp: In member function ‘virtual void TEST_GROUP_CppUTestGroupTest_JFastFir::teardown()’: tests/jfastfir_tests.cpp:26:34: error: ‘turnOnNewDeleteOverloads’ is not a member of ‘MemoryLeakWarningPlugin’ 26 | MemoryLeakWarningPlugin::turnOnNewDeleteOverloads(); | ^~~~~~~~ make: *** [Makefile:966: jfastfir_tests.o] Error 1

Attached script has been tested on both these OS: 2022-04-04-raspios-bullseye-armhf-full.img.xz 2022-04-04-raspios-bullseye-arm64.img.xz

Cheers, Dick pi-build-bullseye (2022-08-14).txt

gprime31 commented 2 years ago

ok, had some time here is the working script.....

!/bin/bash

linux build (for github "ubuntu-latest")

will get dependancies, build and install jaero

NB will create folders at the same level as the JAERO folder. e.g if you cloned into ~/git/JAERO then you will have the following folders..

~/git/JFFT

~/git/JAERO

~/git/libacars

~/git/libcorrect

~/git/libaeroambe

fail on first error

set -e

we will need sudo later may as well do a sudo now

if [[ ! $(sudo echo 0) ]]; then exit; fi

sudo apt update

install dependancies and build tools

if ! apt search qt5-default 2>/dev/null | grep -q qt5-default ; then echo "cant find qt5-default in repo" sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools else echo "found qt5-default in repo" sudo apt-get install qt5-default fi

sudo apt-get install cpputest build-essential cmake checkinstall gettext qtmultimedia5-dev libvorbis-dev libogg-dev libqt5multimedia5-plugins libqcustomplot-dev libqt5svg5-dev libzmq3-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools -y

get script path

SCRIPT=$(realpath $0) SCRIPTPATH=$(dirname $SCRIPT) cd $SCRIPTPATH/..

qmqtt

FOLDER="qmqtt" URL="https://github.com/emqx/qmqtt.git" if [ ! -d "$FOLDER" ] ; then git clone $URL $FOLDER cd "$FOLDER" else cd "$FOLDER" git pull $URL fi

needed for github actions

git fetch --prune --unshallow --tags || true git status > /dev/null 2>&1 PACKAGE_VERSION=$(git describe --tags --match 'v' --dirty 2> /dev/null | tr -d v) PACKAGE_NAME=qmqtt-dev MAINTAINER=https://github.com/emqx PACKAGE_SOURCE=https://github.com/emqx/qmqtt echo "PACKAGE_NAME="$PACKAGE_NAME echo "PACKAGE_VERSION="$PACKAGE_VERSION echo "MAINTAINER="$MAINTAINER echo "PACKAGE_SOURCE="$PACKAGE_SOURCE qmake make make INSTALL_ROOT=$PWD/release/${PACKAGENAME}${PACKAGEVERSION%}-1 install cd release cat < control Package: ${PACKAGE_NAME} Source: ${PACKAGE_SOURCE} Section: base Priority: extra Depends: qtbase5-dev, qtchooser, qt5-qmake, qtbase5-dev-tools Provides: ${PACKAGE_NAME} Maintainer: ${MAINTAINER} Version: ${PACKAGEVERSION%} License: Eclipse Public License 1.0 Architecture: $(dpkg --print-architecture) Description: MQTT Client for Qt EOT echo "" >> control mkdir -p ${PACKAGENAME}${PACKAGEVERSION%}-1/DEBIAN cp control ${PACKAGENAME}${PACKAGEVERSION%}-1/DEBIAN dpkg-deb --build ${PACKAGENAME}${PACKAGEVERSION%}-1

install the deb package and go back to the main path

sudo apt install ./${PACKAGE_NAME}*.deb -y sudo ldconfig cd ../..

libacars

FOLDER="libacars" URL="https://github.com/szpajder/libacars" if [ ! -d "$FOLDER" ] ; then git clone $URL $FOLDER cd "$FOLDER" else cd "$FOLDER" git pull $URL fi

needed for github actions

git fetch --prune --unshallow --tags || true git status > /dev/null 2>&1 PACKAGE_VERSION=$(git describe --tags --match 'v*' --dirty 2> /dev/null | tr -d v) echo "PACKAGE_VERSION="$PACKAGE_VERSION rm -fr build mkdir build cd build cmake .. make sudo checkinstall \ --pkgsource="https://github.com/szpajder/libacars" \ --pkglicense="MIT" \ --maintainer="https://github.com/szpajder" \ --pkgversion="$PACKAGE_VERSION" \ --pkgrelease="1" \ --pkgname=libacars-dev \ --provides=libacars-dev \ --summary="A library for decoding various ACARS message payloads" \ --requires="" \ -y sudo ldconfig cd ../..

libcorrect

FOLDER="libcorrect" URL="https://github.com/quiet/libcorrect" if [ ! -d "$FOLDER" ] ; then git clone $URL $FOLDER cd "$FOLDER" else cd "$FOLDER" git pull $URL fi

needed for github actions

git fetch --prune --unshallow --tags || true git status > /dev/null 2>&1 PACKAGEVERSION=1$(git rev-parse HEAD | cut -c 1-8) echo "PACKAGE_VERSION="$PACKAGE_VERSION rm -fr build mkdir build cd build cmake .. make sudo checkinstall \ --pkgsource="https://github.com/quiet/libcorrect" \ --pkglicense="BSD-3-Clause License" \ --maintainer="https://github.com/quiet" \ --pkgversion="$PACKAGE_VERSION" \ --pkgrelease="1" \ --pkgname=libcorrect-dev \ --provides=libcorrect-dev \ --summary="C library for Convolutional codes and Reed-Solomon" \ --requires="" \ -y sudo ldconfig cd ../..

JFFT

FOLDER="JFFT" URL="https://github.com/jontio/JFFT" if [ ! -d "$FOLDER" ] ; then git clone $URL $FOLDER cd "$FOLDER" else cd "$FOLDER" git pull $URL fi cd ..

libaeroambe

FOLDER="libaeroambe" URL="https://github.com/jontio/libaeroambe" if [ ! -d "$FOLDER" ] ; then git clone $URL $FOLDER cd "$FOLDER" else cd "$FOLDER" git pull $URL fi cd mbelib-master

needed for github actions

git fetch --prune --unshallow --tags || true git status > /dev/null 2>&1 PACKAGE_VERSION=$(git describe --tags --match 'v*' --dirty 2> /dev/null | tr -d v) PACKAGE_NAME=libaeroambe-dev MAINTAINER=nobody PACKAGE_SOURCE=https://github.com/jontio/libaeroambe echo "PACKAGE_NAME="$PACKAGE_NAME echo "PACKAGE_VERSION="$PACKAGE_VERSION echo "MAINTAINER="$MAINTAINER echo "PACKAGE_SOURCE="$PACKAGE_SOURCE

build the old modified libmbe with mini-m patch

rm -fr build mkdir build cd build

need to turn of -fPIC for static linking

cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. make

dont install this as it's an old libmbe clone so instread delete the shared objects and just leave the static one to link with

rm $PWD/.so cd ../../libaeroambe

change install paths as i'm not sure of the QT define that gets the standard local user install path

sed -i 's/\$\$[QT_INSTALL_HEADERS]/\/usr\/local\/include/g' libaeroambe.pro sed -i 's/\$\$[QT_INSTALL_LIBS]/\/usr\/local\/lib\//g' libaeroambe.pro

add path for the static libmbe.a file

echo 'linux: LIBS += -L$$MBELIB_PATH/build/' >> libaeroambe.pro echo "" >> libaeroambe.pro

build the shared library and put it into a deb package

qmake make make INSTALL_ROOT=$PWD/release/${PACKAGENAME}${PACKAGEVERSION%}-1 install cd release cat < control Package: ${PACKAGE_NAME} Source: ${PACKAGE_SOURCE} Section: base Priority: extra Depends: qtbase5-dev, qtchooser, qt5-qmake, qtbase5-dev-tools Provides: ${PACKAGE_NAME} Maintainer: ${MAINTAINER} Version: ${PACKAGEVERSION%} License: MIT Architecture: $(dpkg --print-architecture) Description: A formal description of a mini-m decoder library EOT echo "" >> control mkdir -p ${PACKAGENAME}${PACKAGEVERSION%}-1/DEBIAN cp control ${PACKAGENAME}${PACKAGEVERSION%}-1/DEBIAN dpkg-deb --build ${PACKAGENAME}${PACKAGEVERSION%*}-1

install the deb package and go back to the main path

sudo apt install ./${PACKAGE_NAME}*.deb -y sudo ldconfig cd ../../..

basestation

$SCRIPTPATH/ci-create-basestation.sh

JAERO

cd $SCRIPTPATH

needed for github actions

git fetch --prune --unshallow --tags || true git status > /dev/null 2>&1 PACKAGE_VERSION=$(git describe --tags --match 'v*' --dirty 2> /dev/null | tr -d v) PACKAGE_NAME=jaero MAINTAINER=https://github.com/jontio PACKAGE_SOURCE=https://github.com/jontio/JAERO echo "PACKAGE_NAME="$PACKAGE_NAME echo "PACKAGE_VERSION="$PACKAGE_VERSION echo "MAINTAINER="$MAINTAINER echo "PACKAGE_SOURCE="$PACKAGE_SOURCE cd JAERO

run unit tests

qmake CONFIG+="CI" make ./JAERO -v rm JAERO

build for release

qmake CONFIG-="CI" make make INSTALL_ROOT=$PWD/${PACKAGENAME}${PACKAGEVERSION%*}-1 install JAERO_INSTALL_PATH=$(cat JAERO.pro | sed -n -e 's/^INSTALL_PATH[|( ).]= //p') JAERO_INSTALL_PATH=${JAERO_INSTALL_PATH//$'\r'/} echo 'JAERO_INSTALL_PATH='${JAERO_INSTALL_PATH}

add control

cat < control Package: ${PACKAGE_NAME} Source: ${PACKAGE_SOURCE} Section: base Priority: extra Depends: qtbase5-dev, qtchooser, qt5-qmake, qtbase5-dev-tools Provides: ${PACKAGE_NAME} Maintainer: ${MAINTAINER} Version: ${PACKAGEVERSION%} License: MIT Architecture: $(dpkg --print-architecture) Description: Demodulate and decode Aero signals. These signals contain SatCom ACARS messages as used by planes beyond VHF ACARS range EOT echo "" >> control mkdir -p ${PACKAGENAME}${PACKAGEVERSION%}-1/DEBIAN cp control ${PACKAGENAME}${PACKAGEVERSION%*}-1/DEBIAN

add path command

mkdir -p ${PACKAGENAME}${PACKAGEVERSION%}-1/usr/local/bin cat < ${PACKAGENAME}${PACKAGEVERSION%}-1/usr/local/bin/jaero

!/bin/bash

/opt/jaero/JAERO "\$@" EOT chmod +x ${PACKAGENAME}${PACKAGEVERSION%*}-1/usr/local/bin/jaero

basestation if available

if [ -f "../../basestation/basestation.sqb" ]; then echo "basestation.sqb found. including it in package" cp ../../basestation/basestation.sqb ${PACKAGENAME}${PACKAGEVERSION%*}-1/opt/jaero/ else echo "basestation.sqb not found. will be missing from package" fi

build and install package

dpkg-deb --build ${PACKAGENAME}${PACKAGEVERSION%}-1 sudo apt install ./${PACKAGE_NAME}.deb -y sudo ldconfig cd ../..

package

mkdir -p JAERO/bin mkdir -p JAERO/bin/jaero cp JAERO/JAERO/.deb JAERO/bin/jaero cp libacars/build/.deb JAERO/bin/jaero cp libcorrect/build/.deb JAERO/bin/jaero cp libaeroambe/libaeroambe/release/.deb JAERO/bin/jaero cp qmqtt/release/*.deb JAERO/bin/jaero cd JAERO/bin cat < jaero/install.sh

!/bin/bash

installs built packages

sudo apt install --reinstall ./*.deb sudo ldconfig EOT chmod +x jaero/install.sh cat < jaero/uninstall.sh

!/bin/bash

removes built packages

sudo dpkg --remove qmqtt-dev libacars-dev libcorrect-dev libaeroambe-dev jaero sudo ldconfig EOT chmod +x jaero/uninstall.sh cat < jaero/readme.md

JAERO ${PACKAGE_VERSION}

OS: $(lsb_release -d | cut -f 2)

Build Date: $(date -u)

Cheers,
ci-linux-build.sh EOT

compress

tar -czvf ${PACKAGENAME}${PACKAGEVERSION%*}-1linux$(uname -m).tar.gz jaero echo "done"