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

Compiling Issue, Linux Mint 21.1, Qt 6.0.2 #20

Open
vk6mo opened this issue May 2, 2023 · 35 comments
Open

Compiling Issue, Linux Mint 21.1, Qt 6.0.2 #20

vk6mo opened this issue May 2, 2023 · 35 comments

Comments

@vk6mo
Copy link

vk6mo commented May 2, 2023

Having probs compiling the QSSTV code taken from main branch today 2May2023.
Using QtCreator (6.0.2) installed on LinuxMint Mate v21.1 with all updates as of today.
Library qt5-default is not available (E: Package 'qt5-default' has no installation candidate) but other libraries installed OK as per dependency list.
Lots of compile warnings (mainly old/deprecatated call messages) I cant seem to identify the cause of one error which appears that CDRMTransmitter methods have "multiple defines", then drmTransmitter methods have undefined references.
Have attached the output from the build.
Anything else you want, please ask.
Have lots of C experience, but C++ is more limited.
Initially was looking at seeing if I could get Easypal going again, but I understand the source code is entirely lost.
Am hoping might be able to get on top of qsstv, maybe make some contributions here, then maybe even look at porting this code to a windows based app (big job I know).
Thx
Dave vk6mo

@vk6mo
Copy link
Author

vk6mo commented May 2, 2023

First mistake! Forgot to attach build. Now attached
CompileOutput.txt

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 2, 2023

I have started porting QSSTV to Qt6. Parts of the attempt is already in mainline, there is one more pull request open about it.
You can give it a try if you want, instead of tinkering with the old Qt5 any longer.
Alas, I forgot to record which exact Qt6 package I had to install on Ubuntu, so I could update the readme file. The entire list of Qt6 packages I have installed is:

libqt6concurrent6:amd64
libqt6core6:amd64
libqt6dbus6:amd64
libqt6designer6:amd64
libqt6designercomponents6:amd64
libqt6gui6:amd64
libqt6help6:amd64
libqt6multimedia6:amd64
libqt6multimediaquick6:amd64
libqt6multimediawidgets6:amd64
libqt6network6:amd64
libqt6opengl6:amd64
libqt6opengl6-dev:amd64
libqt6openglwidgets6:amd64
libqt6printsupport6:amd64
libqt6qml6:amd64
libqt6qmlmodels6:amd64
libqt6quick6:amd64
libqt6serialport6:amd64
libqt6serialport6-dev:amd64
libqt6sql6:amd64
libqt6sql6-sqlite:amd64
libqt6test6:amd64
libqt6uitools6:amd64
libqt6widgets6:amd64
libqt6xml6:amd64
linguist-qt6
qmake6:amd64
qmake6-bin
qt6-base-dev:amd64
qt6-base-dev-tools
qt6-gtk-platformtheme:amd64
qt6-l10n-tools
qt6-multimedia-dev:amd64
qt6-qpa-plugins:amd64
qt6-tools-dev:amd64
qt6-tools-dev-tools

but I guess some of them are just depencies of a "super package".

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 2, 2023

First mistake! Forgot to attach build. Now attached CompileOutput.txt

Alas, the file has 0 bytes. :/

@vk6mo
Copy link
Author

vk6mo commented May 2, 2023

Thanks for info. I will see how I get on with Qt libraries as per your list.
Non zero byte compile output attached (third time lucky! :)
CompileOutput.202305021845.txt

It would also be good at some stage to at least start a discussion about how we might use this code as a base for a windows based SSTV program and how best to set up on github. Here in this issue might not be best place. No rush, early days, but just a bit of a heads up. Would like to follow your advice in that regard. I haven't even thought of how best to do it in Windows, although Visual Studio seems the obvious choice. Something that keeps it as simple as possible.

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 2, 2023

For whatever reason, it seems your compilation has some (or all?) files twice, with two different spellings. For example:

Preprocessing /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/common/DrmTransmitter.cpp...
Parsing file /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/common/DrmTransmitter.cpp...
Preprocessing /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/common/DrmTransmitter.h...
Parsing file /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/common/DrmTransmitter.h...
…
Preprocessing /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/drmtransmitter.cpp...
Parsing file /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/drmtransmitter.cpp...
Preprocessing /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/drmtransmitter.h...
Parsing file /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/drmtransmitter.h...

Since they also appear twice on the linker commandline, you get those double symbol definition errors.

Also:

sh: 1: dot: not found

It might make sense to install graphviz so you can generate the docs.

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 2, 2023

Regarding Windows builds: it requires some volunteer. Qt is certainly already a good starting point, but without some motivated Windows developer, I don't think it will happen.

@pa2eon
Copy link

pa2eon commented May 2, 2023

Dear OM's .. the source code of the QSSTV version on this Github is made for QT version 5.x
At the latest download of the QT creator, you can chose the QT version 5.15.2.
After that place the ../document folder inside the scr code folder , and start the compiler.

I did the installation on Linux Mint, latest version.
The next installs I did also:

apt-get install doxygen libqwt-qt5-dev   libqwt-headers libqwt-qt5-6  libqwt-qt5-dev    libqt5svg5-dev   linux-libc-dev

To use the source code inside QT 6 we have to rewrite / update the code.
Because a lot of routines in QT5 are disabled or changed in QT6.

BUT !!

I have plans to rebuild the software together with you or others .. to bring in new modulation items that we want to use at ISS communication ( up and downlinks ) .. you can think about QQSPK for example.
This kind of calculation in the software works great to receive SSTV pictures with interference.

Next weeks I will update more .. and make a new fork on my own github ( pa2eon ) page.

vy ´73, Eric

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 2, 2023

Dear OM's .. the source code of the QSSTV version on this Github is made for QT version 5.x

Much of my earlier port to Qt6 is already in the tree.
The missing pieces (the V4L stuff), you can find in pull request #17 . If someone reviews the PR, I'm willing to merge it as well.

@vk6mo
Copy link
Author

vk6mo commented May 3, 2023

For whatever reason, it seems your compilation has some (or all?) files twice, with two different spellings. For example:

Preprocessing /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/common/DrmTransmitter.cpp...
Parsing file /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/common/DrmTransmitter.cpp...
Preprocessing /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/common/DrmTransmitter.h...
Parsing file /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/common/DrmTransmitter.h...
…
Preprocessing /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/drmtransmitter.cpp...
Parsing file /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/drmtransmitter.cpp...
Preprocessing /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/drmtransmitter.h...
Parsing file /media/sf_Development/qsstv-master/qsstv-master/qsstv/drmtx/drmtransmitter.h...

Since they also appear twice on the linker commandline, you get those double symbol definition errors.

Also:

sh: 1: dot: not found

It might make sense to install graphviz so you can generate the docs.

Is it twice? One is preprocessing, one is parsing...??
Also see attached image of link stage. There is one DrmTransmitter.o and one drmtransmitter.o
Screenshot at 2023-05-03 11-21-13

@vk6mo
Copy link
Author

vk6mo commented May 3, 2023

Thanks for comments all round. I can try build on both Qt5 and Qt6 (machines) and let you know feedback...

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 3, 2023

Is it twice?

Yes, with different spelling, but obviously same contents. That's why the double definition linker errors.
I see both files in my source directory as well … let me check (later on, not right now).

@Ruxton
Copy link
Contributor

Ruxton commented May 3, 2023

pretty certain that was fixed in main a while back by @dl8dtl 1413923 got the latest copy of source code?

@Ruxton
Copy link
Contributor

Ruxton commented May 3, 2023

@vk6mo yeaah reading that output, you're definitely not compiling the latest main src. Make sure everything is pulled to the latest and then try again. You will get most of QT6 fixed (there's still some in PR) and some other fixes. You might also wish to work from development, it includes everything from main and some other new QT6 fixes.

@vk6mo
Copy link
Author

vk6mo commented May 3, 2023

Thanks for comments, all.
Have started a clean install, since various strange happenings - will download and ensure I have latest from devel and see how I get on.... Have also grabbed flatpak version - seems to make QT5/QT6 easier to manage.
I think Im a bit rusty with all this stuff. Thanks for your patience :)

@vk6mo
Copy link
Author

vk6mo commented May 3, 2023

OK. Brand new LinuxMint 21.1 install (plus all updates as at 3May2023), followed by QtCreator (flatpak) v8.0.1 based on Qt 6.3.1. Using Qt6 kit.
Downloaded zip of latest code from development branch-> personal desktop for time being.
Attempted build fails to find <hamlib/rig.h> in rigcontrol.h, although file is present (/usr/include/hamlib/rig.h> (library libhamlib-dev installed).
Build stops on error - presumably other errors would follow with similar issue.
Im guessing "/usr/include/" is missing from INCLUDEPATH in .pro file??
Screenshot at 2023-05-03 20-19-18
Screenshot at 2023-05-03 19-52-23
Screenshot at 2023-05-03 19-45-50
Thanks.

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 3, 2023

Can you give that a try without the IDE?

cd src
mkdir build
cd build
qmake ../qsstv.pro
make

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 3, 2023

And, for Qt6 on Linux, please use

https://github.com/dl8dtl/QSSTV/tree/qt6_linux

Without that, it will fail to compile the V4L stuff.

@pa2eon
Copy link

pa2eon commented May 3, 2023

All .. I used the online installer ( version 10 of QT create) from : https://www.qt.io/download-qt-installer-oss
Then use the ' custom setup' to select the packages what you want.
Sometimes you have to install after this installation a few qt or lib modules extra in your native OS.

@vk6mo
Copy link
Author

vk6mo commented May 3, 2023

Can you give that a try without the IDE?

cd src
mkdir build
cd build
qmake ../qsstv.pro
make

See attached. I presume you meant src.pro as no qsstv.pro in src directory.

Screenshot at 2023-05-03 21-03-15

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 3, 2023

export QT_SELECT=qt6

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 3, 2023

Or somehow, make Qt6 your default version. See qtchooser.

@vk6mo
Copy link
Author

vk6mo commented May 4, 2023

No difference to building from command line with above.
There's something more fundamental going on... I will play around and see what is happening.

QtCreator has Qt6 set as default. You would think it would install the necessary qt6 libraries but it appears not (from apt list *qt6*)
Have installed a whole bunch of libraries via the qt-unified-linux-x64 script (Qt6 for desktop apps option).
From the command line qtchooser -list-versions still doesn't even list qt6 as an option.
setting QT_SELECT=qt6 and exporting makes no difference.
Synaptic (or apt list) shows some qt6 libraries are now installed but still cl build fails.
Have added /usr/lib/x86_64-linux-gnu/qtchooser/qt6.conf and a `/usr/lib/x86_64-linux-gnu/qtchooser/6.conf but this only seems to help the qtchooser app, not the build itself.

Will update this thread when I have something significant to add.

PS: Initially Qt Creator was added using Linux Mint Software Manager.
Installing from above script has loaded a much later version (v10.0.0)
But still doesn't build from command line.

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 4, 2023

What does qmake --version say, and what qmake -qt=qt6 --version?

For me (Ubuntu 22.04):

$ qmake --version
QMake version 3.1
Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
$ qmake -qt=qt6 --version
QMake version 3.1
Using Qt version 6.2.4 in /usr/lib/x86_64-linux-gnu

@vk6mo
Copy link
Author

vk6mo commented May 4, 2023

$ qmake --version
QMake version 3.1
Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
$ qmake -qt=qt6 --version
qmake: could not exec '/usr/lib/qt6/bin/qmake': No such file or directory
$

Also see attached for state of qt5 and qt6 folder in /usr/lib/x86_64-linux-gnu

Screenshot at 2023-05-04 20-29-44

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 4, 2023

$ qmake -qt=qt6 --version
qmake: could not exec '/usr/lib/qt6/bin/qmake': No such file or directory

Please install the qmake6 package.

@vk6mo
Copy link
Author

vk6mo commented May 4, 2023

$ qmake -qt=qt6 --version
QMake version 3.1
Using Qt version 6.2.4 in /usr/lib/x86_64-linux-gnu
Step 1! :)

@vk6mo
Copy link
Author

vk6mo commented May 4, 2023

This might be helpful - output from apt list libqt6*
(file attached. Non empty!! :)
qt6_list.txt
So, for example, build complains that 'core' is missing but libqt6core6 is installed

@pa2eon
Copy link

pa2eon commented May 4, 2023

Dear OM's,

I have found a good way to work:
Go to the side: https://the-codeslinger.com/2020/12/20/manual-install-of-qt6-on-linux-mint/
( Sorry is an good install story for Linux Mint ( debian ))
But scrol down to nearly the end of the page:
After installing the full QT6 offline package .. then follow the last instruction:
I mean:

  1. export export PATH=/opt/Qt/6.x.x/gcc_64/bin/:$PATH => 6.x.x is for example 6.5.0
  2. ln -s /opt/Qt/6.x.x/gcc_64/bin/qmake /usr/bin/qmake

When now testing the qmake --version .. you seen that it is going to qt 6

When the next commands are given to compile qsstv:
cd src
mkdir build && cd build
qmake ../qsstv.pro
make -j<number of your cpu's>

And now the full source is compiled .. !
After a while .. type ,/qsstv and see if the program starts !! => for me it did =;)

I will test this also with the QT6 GUI editor .. I think this will work also.

Note:
In the installer of the internet .. all the needed libs and others are still their.

@pa2eon
Copy link

pa2eon commented May 4, 2023

IMPORTANT :
If you have made the build in the CLI .. remove this one first BEFORE you use the QT IDE compiler .. standard is the IDE reading the info from the src/build directory !!
You can switch this off before rebuilding the code inside the IDE GUI of QT6

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 4, 2023

standard is the IDE reading the info from the src/build directory

Interesting, since Creator by default uses a much more complicated build directory naming.

@dl8dtl
Copy link
Collaborator

dl8dtl commented May 4, 2023

Thanks for confirming the changes from PR #17 do work for you. I'll give them a final try, and see whether the camera is actually working with these changes (after all, they affect the Video4Linux part), and if so, I'll merge the PR.
I'll also have a look at the other open PRs, from their description, they appear to make much sense to me.

@vk6mo
Copy link
Author

vk6mo commented May 8, 2023

Thanks all. Sorry haven't responded, but have got tied up with some priorities last few days. Next few days will be busy too. Will post once Ive tested all the above but wiith pa2eon's comments as well, hopefully that will resolve. Am going to test WITHOUT QtCreator first, then add QtCreator and test build inside that environment.

@pa2eon
Copy link

pa2eon commented May 9, 2023

For devolopers who want to start with a clean version of QSSTV see my own github : https://github.com/pa2eon/QT6SSTV
The version is started clean at Version 10.0.0 to remove all source code who is history and wil give error or notices who the compiler did not like.
AND the most important reason that I start a 'clean' version is that I will start to use new modulation forms.
It is NOT that an fork of the main code will be bad .. we will come back .. but to make a fresh clean start for new developers to use QT6 en higher AND who are willing to help with the new modulations ( raptorQ etc.)
We leave the code as open as it is.
On both githubs you can give your comment .. or updates .. I will follow them both.
Regards, Eric - PA2EON

@vk6mo
Copy link
Author

vk6mo commented May 10, 2023

Hi All
Steps to successful build for me with NO QtCreator installed.
Install LM21.1 plus all updates
The following libraries are needed (a few already installed with LM21.1)

  • pkg-config (already installed with LM21.1)
  • g++
  • libfftw3-dev
  • libhamlib-dev
  • libasound2-dev
  • libpulse-dev
  • libopenjp2-7 (already installed with LM21.1)
  • libopenjp2-7-dev
  • libv4l-dev
  • openssl (already installed with LM21.1)
  • ninja-build
  • libgl-dev

I installed Qt6.5.0 using the qt-unified-linux-lx64-4.5.2-online.run available from qt.io (login required) with the following settings
QtInstallOptions

Finally created a softlink using
ln -s /opt/Qt/6.5.0/gcc_64/bin/qmake /usr/bin/qmake
(or, as suggested, use /usr/bin/qmake6 to differentiate if you have multiple Qt installs!!)

@vk6mo
Copy link
Author

vk6mo commented May 10, 2023

What version of libqwt is best to install for Qt6.5.0 and QtCreator 10.0.1? Best to get from where?
I'm assuming libqwt-qt5-dev isn't correct.
Sourceforge has a qwt 6.2?

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

4 participants