HOWTO: Installing Qt and building SavvyCAN on Linux #804
douglasheld2
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Browse to Qt's developer Wiki site. Here, you can create an account without needing to verify a telephone number: https://wiki.qt.io/Qt_Serial_Port
On that Wiki page, click on
Log In
in the upper right. This will land you on login.qt.io/login, the Unified Qt identity page. Click the green "New Account" link.Enter your email address, new password twice, the captcha, and accept the terms.
Receive the verification email and click the link.
Set a friendly name for the account
Browse to the Open Source installer page: https://www.qt.io/download-qt-installer-oss
Note this is not the big glossy "download" link from the home page.
Click the icon and then the download button which is beneath
If you are using Chrome and you download the installer for Linux, it will block your download because of the filename extension, "run". Click in the downloads to indicate to Chrome that you wish to accept the file.
In the terminal, navigate to your browser's Downloads directory and issue
chmod +x qt-online-installer-linux-x64-4.8.0.run
or specify whatever is the name of the QT installer you downloaded.Note further, the version number of the installer - 4.8.0 in my case - is not the same as the version of Qt libraries you are going to download. Today I am downloading version 6.7.2 but I don't find that out until later.
In the terminal, now run the installer, e.g.
./qt-online-installer-linux-x64-4.8.0.run
In the graphical installer window, log in with the credentials you created in step 3. Proceed Next.
Click the first checkbox when you agree to the licenses.
Click the second checkbox to indicate you are an individual and are not using Qt for work. Proceed Next.
You are now presented with an install type. I don't dare choose "custom install" but someone help me here. Choose "Qt ... for Desktop Development"
Accept the default installation path of
Qt
in your home directory (as I have seen that path referenced in the SavvyCAN build instructions). Proceed Next.The installer will install all components after a few minutes of work.
It will offer to open the Qt Design Studio and Qt Creator applications. Because now is the ideal time to understand whether anything is not working, I'd advise to select all such boxes. Proceed clicking "Finish".
Note, in my distro (ElementaryOS 7.1) the
usr/bin/xmessage
application has opened a window, with an error message relating to the Qt system requirements not being met at runtime. Neither of the GUI applications have actually opened."From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin...."
Just on the off chance that you are running Ubuntu and have the same error and it will become important to us later, I'll follow up with the following command:
sudo apt install libxcb-cursor0
I can then verify with the following command to start one of the Qt graphical applications:
~/Qt/Tools/QtCreator/bin/qtcreator
For my installation, the application opened and I take this as a sign that Qt graphical applications can work now.
PART TWO: Building SavvyCAN Dependencies
git clone https://github.com/collin80/SavvyCAN.git
cd Savv*
git checkout tags/continuous-QT6
and thengit fetch
qmake
and that is a Qt application. Just ensure it is not already installed outside of what we just did up to step 22 above. Run the commandwhich qmake
and we are expecting to see, no response.sudo apt autopurge qtchooser
and that seems to have done the trick - but YMMV. For good measure, I also had to purgecmake
.export PATH=~/Qt/6.7.2/gcc_64/bin:$PATH
qmake
. At this point, we expect the error, "Project ERROR: Unknown modules in QT: serialbus serialport"serialport-*.zip
andserialbus-*.zip
.export PATH=~/Qt/Tools/CMake/bin:$PATH
export PATH=~/Qt/Tools/Ninja/bin:$PATH
qt-configure-module .
which will conclude by indicating it has written the configuration files.cmake --build . --parallel 4
. Note, the parallel build setting is your option. If something breaks, try without the parallel parameter.cmake --install .
. which is a good sign - it has automatically detected where we have already installed Qt and it is enhancing that installation - exactly what we want.~/Qt/6.7.2/gcc_64/plugins/canbus/libqtpeakcanbus.so
which is a great sign.PART THREE: BUILDING and running SavvyCAN
qmake
, which doesn't return anything when the command is successful. Just exit code 0.GL/gl.h no such file or directory
and this was solved bysudo apt install libgl-dev
. Ignore this if you don't get the error.make
. This compiles all the parts of SavvyCAN. It takes 22 minutes on my slow computer../SavvyCAN
to run SavvyCAN.Beta Was this translation helpful? Give feedback.
All reactions