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

Kubuntu 21.10 build issue #72

Open
nmaster2042 opened this issue Mar 16, 2022 · 8 comments
Open

Kubuntu 21.10 build issue #72

nmaster2042 opened this issue Mar 16, 2022 · 8 comments

Comments

@nmaster2042
Copy link

I tried to build JAERO on my kubuntu 21.10 system.

First, in ci-linux-build.sh, there is a change in packages:
qt5-default is no more avaliable.

I found a way here https://stackoverflow.com/questions/67373586/install-qt5-on-ubuntu-21-04

I modified the sh script to take this change in account.

Now I have a build issue while building JAERO.
Previous libs buit ok.

PACKAGE_NAME=jaero PACKAGE_VERSION=1.0.4.13-23-g3d92aea-dirty MAINTAINER=https://github.com/jontio PACKAGE_SOURCE=https://github.com/jontio/JAERO Info: creating stash file /home/nicolas/Applis/SDR/JAERO/JAERO/.qmake.stash /usr/lib/qt5/bin/uic mainwindow.ui -o ui_mainwindow.h /usr/lib/qt5/bin/uic gui_classes/settingsdialog.ui -o ui_settingsdialog.h /usr/lib/qt5/bin/uic gui_classes/planelog.ui -o ui_planelog.h g++ -c -pipe -std=c++11 -Wno-deprecated-copy -O3 -Wall -Wextra -D_REENTRANT -fPIC -DJAERO_VERSION=\"v1.0.4.13\" -D_USE_MATH_DEFINES -DGENERATE_TEST_OUTPUT_FILES -DMATLAB_PATH=\"/home/nicolas/Applis/SDR/JAERO/JAERO/matlab/\" -DTEST_OUTPUT_PATH=\"/home/nicolas/Applis/SDR/JAERO/JAERO/test_output/\" -DQCUSTOMPLOT_USE_LIBRARY -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_SVG_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -I../../JFFT -I/usr/local/include/libacars-2 -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtMultimedia -I/usr/include/x86_64-linux-gnu/qt5/QtSvg -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o testall.o tests/testall.cpp g++ -c -pipe -std=c++11 -Wno-deprecated-copy -O3 -Wall -Wextra -D_REENTRANT -fPIC -DJAERO_VERSION=\"v1.0.4.13\" -D_USE_MATH_DEFINES -DGENERATE_TEST_OUTPUT_FILES -DMATLAB_PATH=\"/home/nicolas/Applis/SDR/JAERO/JAERO/matlab/\" -DTEST_OUTPUT_PATH=\"/home/nicolas/Applis/SDR/JAERO/JAERO/test_output/\" -DQCUSTOMPLOT_USE_LIBRARY -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_SVG_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -I../../JFFT -I/usr/local/include/libacars-2 -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtMultimedia -I/usr/include/x86_64-linux-gnu/qt5/QtSvg -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o fftwrapper_tests.o tests/fftwrapper_tests.cpp g++ -c -pipe -std=c++11 -Wno-deprecated-copy -O3 -Wall -Wextra -D_REENTRANT -fPIC -DJAERO_VERSION=\"v1.0.4.13\" -D_USE_MATH_DEFINES -DGENERATE_TEST_OUTPUT_FILES -DMATLAB_PATH=\"/home/nicolas/Applis/SDR/JAERO/JAERO/matlab/\" -DTEST_OUTPUT_PATH=\"/home/nicolas/Applis/SDR/JAERO/JAERO/test_output/\" -DQCUSTOMPLOT_USE_LIBRARY -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_SVG_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -I../../JFFT -I/usr/local/include/libacars-2 -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtMultimedia -I/usr/include/x86_64-linux-gnu/qt5/QtSvg -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o fftrwrapper_tests.o tests/fftrwrapper_tests.cpp g++ -c -pipe -std=c++11 -Wno-deprecated-copy -O3 -Wall -Wextra -D_REENTRANT -fPIC -DJAERO_VERSION=\"v1.0.4.13\" -D_USE_MATH_DEFINES -DGENERATE_TEST_OUTPUT_FILES -DMATLAB_PATH=\"/home/nicolas/Applis/SDR/JAERO/JAERO/matlab/\" -DTEST_OUTPUT_PATH=\"/home/nicolas/Applis/SDR/JAERO/JAERO/test_output/\" -DQCUSTOMPLOT_USE_LIBRARY -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_SVG_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -I../../JFFT -I/usr/local/include/libacars-2 -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtMultimedia -I/usr/include/x86_64-linux-gnu/qt5/QtSvg -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o jfastfir_tests.o tests/jfastfir_tests.cpp 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:980 : jfastfir_tests.o] Erreur 1

@nmaster2042 nmaster2042 changed the title Kbuntu 21.10 build issue Kubuntu 21.10 build issue Mar 16, 2022
@jontio
Copy link
Owner

jontio commented Mar 17, 2022

Thanks for that. Yes I knew that qt5-default was missing for some of the later releases but was putting off a workaround. I think the same issue might happen on later raspbian. I guess we need a way of seeing if qt5-default exists in the repo and if not then use qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools instead. maybe somethings like...

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 install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
else
    echo "found qt5-default in repo"
    sudo apt install qt5-default
fi
sudo apt-get install cpputest build-essential qtmultimedia5-dev cmake libvorbis-dev libogg-dev libqt5multimedia5-plugins checkinstall libqcustomplot-dev libqt5svg5-dev libzmq3-dev unzip -y

@nmaster2042
Copy link
Author

Yes, it's what I made in the sh script to get dependencies installed on my system:
I replaced qt5-default by packages mentioned in the link I posted.
But the build error is something else I think and I haven't found what is causing this.

@jontio
Copy link
Owner

jontio commented Mar 17, 2022

Hmm. Oh I didn't notice that. Yes that's part of CPP Utest it looks like they have changed something. That has nothing to do with Qt.

@jontio
Copy link
Owner

jontio commented Mar 18, 2022

I see that on linux I mention...

the strange error that cpputest throws of a memory leak when using QFile only happens so far on linux

And then I use MemoryLeakWarningPlugin::turnOffNewDeleteOverloads(); to disable it ( https://cpputest.github.io/docs/class_memory_leak_warning_plugin.html ) I'm not sure why it says that function is not a member of MemoryLeakWarningPlugin. maybe there is a package that is separate from cpputest that is needed now.

Anyway if you can't find out why it's happening you could comment out the calls to MemoryLeakWarningPlugin and see if the QFile issue is fixed. Or if you don't want to build the tests then in the pro file remove the tests by commenting that part out...

#run unit tests
#qmake CONFIG+="CI"
#make
#./JAERO -v
#rm JAERO
#build for release
qmake CONFIG-="CI"
make

@nmaster2042
Copy link
Author

I changed ci-linux-build, adding conditional block for install packages instead of qt5-default.
I had to make some conditional blocks too when packages are built (dependencies to replace qt5-default by qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools.
I also commented the test build.

Now I get a new error whilg building JAERO itself:

...
...
g++ -Wl,-O1 -o JAERO main.o mainwindow.o coarsefreqestimate.o DSP.o mskdemodulator.o audiomskdemodulator.o console.o qscatterplot.o qspectrumdisplay.o qled.o fftwrapper.o fftrwrapper.o textinputwidget.o settingsdialog.o aerol.o planelog.o databasetext.o oqpskdemodulator.o audiooqpskdemodulator.o burstoqpskdemodulator.o audioburstoqpskdemodulator.o arincparse.o tcpserver.o sbs1.o tcpclient.o burstmskdemodulator.o audioburstmskdemodulator.o jconvolutionalcodec.o audiooutdevice.o compressedaudiodiskwriter.o jfft.o stdio_utils.o file_utils.o RuntimeError.o zmq_audiosender.o zmq_audioreceiver.o qrc_jaero.o moc_mainwindow.o moc_coarsefreqestimate.o moc_mskdemodulator.o moc_audiomskdemodulator.o moc_console.o moc_qscatterplot.o moc_qspectrumdisplay.o moc_qled.o moc_textinputwidget.o moc_settingsdialog.o moc_aerol.o moc_planelog.o moc_databasetext.o moc_oqpskdemodulator.o moc_audiooqpskdemodulator.o moc_burstoqpskdemodulator.o moc_audioburstoqpskdemodulator.o moc_arincparse.o moc_tcpserver.o moc_sbs1.o moc_tcpclient.o moc_burstmskdemodulator.o moc_audioburstmskdemodulator.o moc_jconvolutionalcodec.o moc_audiooutdevice.o moc_compressedaudiodiskwriter.o moc_zmq_audioreceiver.o moc_zmq_audiosender.o   -lqcustomplot -lzmq -lcorrect -lvorbis -lvorbisenc -logg -lacars-2 /usr/lib/x86_64-linux-gnu/libQt5Multimedia.so /usr/lib/x86_64-linux-gnu/libQt5Svg.so /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Sql.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lGL -lpthread   
/usr/bin/ld : ne peut trouver -lacars-2
collect2: error: ld returned 1 exit status
make: *** [Makefile:371 : JAERO] Erreur 1

@thebaldgeek
Copy link

@nmaster2042 I understand you probably want to build Jaero on your existing system and that you might probably know, but just in case not.... Jaero is build on x86 and Arm here: https://cemaxecuter.com/ (DragonOS)

@jontio
Copy link
Owner

jontio commented Apr 4, 2022

checkinstall seems to have ramdom troubles with softlinks, i'm not sure why. It's a shame checkinstall isn't used much these days as it's very handy. Sometimes running checkinstall 2 times gets the softlink but it seems a bit random. I'm not sure of a nice solution but the easiest way is just to check the softlink was installed and if not create it before linking JAERO. try the following...

#checkinstall with libacars seems to not always install the softlink
if ! compgen -G "/usr/local/lib/libacars-2.so" > /dev/null; then
    echo "libacars .so soft link missing"
    find "/usr/local/lib/" -name "libacars-2.so.*"|while read fname; do
        echo "found something like it. creating softlink"
        echo "$fname"
        sudo ln -s $fname /usr/local/lib/libacars-2.so
        break;
    done
fi

@nmaster2042
Copy link
Author

@jontio : thank you very much for your support.
I finally managed to build jaero on my system modifying ci-linux-build.sh with all points you mentioned.
Let me share here for other people who would need it.

ci-linux-build.zip

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

No branches or pull requests

3 participants