Solved Running two interval timers on QT
-
Hi @koahnig ,
thanks for your answer.
I checked some on my configs.
It seems I have on my raspberry Qt version 5.7.1
on the UBUNTU toolchain I have Qt version 5.12.3
This means I have to install QT-Creator and the toolchain completely new?
Kurt -
Not necessarily. It depends on your intentions. This might be perfectly fine. However, I tend to have same versions everywhere. IMHO otherwise one gets confused.
When you use the Ubuntu install to do a cross-compile for RPi, it is recommended to have the same kit/toolchain for both. I do not know if there is a place to get RPi pre-compiled versions. You might have to cross-compile a newer Qt lib version for RPi or the other way around you need to downgrade on Ubuntu to Qt 5.7.1.
-
@koahnig
Thanks for your answer.
I think I install everything completely new.
This means I have to install the following Items:- QT-Creator
- qt-everywhere
- a rpi image raspbian stretch which fits to qt-everywhere
What are the actual versions of this items?
Kurt -
It depends how you have installed the components before. The easiest is IMHO the online installer found on https://www.qt.io/download e.g. the open-source version on the right.
Potentially you have used in the past and you have already maintenance tool available. This is typically updating for the newest Qt creator anyway.
When you have already a prebuilt rpi Qt lib version you can try to match this version by installing it on your linux desktop. Otherwise you can download the linux open source archive and build the rpi Qt lib version based on https://wiki.qt.io/Raspberry_Pi_Beginners_Guide . There are also other tutorials available based on different Qt versions. I expect that a fairly new tutorial would work also with latest Qt lib code.
As indicated above I suggest to install the same version on linux desktop and use it also for rpi. Typically it is a matter of taste what people prefer. However, using Qt 5.12.4 seem to be good choice because it is relatively new and has long-term support.
-
@koahnig ,
hello, thanks for your tip.
It*s quiet confusing, because whatever you do you run in some problems.
I followed the beginners guide described here but I runned into some problems:- the mount command
sudo mount -o loop,offset=62914560 2015-05-05-raspbian-wheezy.img /mnt/rasp-pi-rootfs
does not work
- has to be something like this
sudo mount -v -o offset=62914560 -t ext4 2015-05-05-raspbian-wheezy.img /mnt/rasp-pi-rootfs
finaly I'm stuck on this point
sudo apt-get install ia32-libs
ther is no way to install lib32bz2-1.0
maybe this causes this failure
You don't seem to have 'make' or 'gmake' inyour PATH
when I run this command./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
the command
sudo ./fixQualifiedLibraryPaths /mnt/rasp-pi-rootfs/ ~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gcc
reports usage ./cmd targt-rootfs
So what can I do? -
I am not really a linux guy. Therefore I am struggling as well.
However, can you run everywhere on your Ubuntu machine
make -v
or
gmake -v
otherwise you may to install either command. You need for configure and the cross-compilation anyhow.
-
@koahnig
the outputs are :make -v Command 'make' not found, but can be installed with: sudo apt install make sudo apt install make-guileth
and
gmake -v Command 'gmake' not found, but there are 14 similar ones.
This means I must install make?
-
Yes, try to install either make or gmake. Not sure if there is a difference, but you need one.
-
@koahnig
Thanks for your answer!
I have a question about the versions of gcc linearo and raspbian. It's quiet confusing.
Is it correct, that the version of gcc-linearo and gcc of the raspbian has to be equal?
gcc-4.7-linearo has version 7.4.0
gcc on 2019-04-08-raspbian-stretch has version 8.3
gcc on 2018-11-13-raspbian-stretch has version 6.3 -
@k-str said in Running two interval timers on QT:
@koahnig
Thanks for your answer!
I have a question about the versions of gcc linearo and raspbian. It's quiet confusing.
Is it correct, that the version of gcc-linearo and gcc of the raspbian has to be equal?
gcc-4.7-linearo has version 7.4.0
gcc on 2019-04-08-raspbian-stretch has version 8.3
gcc on 2018-11-13-raspbian-stretch has version 6.3Not necessarily. However, there are a couple of possible issues.
The different versions of gcc have to be compatible on object level, when you want to mix object files resp libraries. AFAIK are most gcc compilers compatible on object level, but I know there some which are not. In general I would recommend staying with the same version everywhere, at least where you intend to mix.
The other thing are Qt libs. If you are using pre-compiled versions as delivered with an OS, it would be better to have same versions ( see recommendation above). Not sure if there are already Qt dynamic libs included with raspbian. If so, you have also a possible version issue with those libs. Some time it works without issue, but personally I recommend staying with same versions.
The linaro compiler is on desktop for cross-compilation. The other two are on RPi. If you intend to cross-compile on desktop, you would need to use always the same compiler there. If you intend to compile on RPi, try to get everything on RPi and do compilation there. That will make live easier.
When you do all on desktop, you have to cross-compile Qt libs and deploy the libraries for Qt also to RPi. For this you may use also a pretty old compiler as long as it support the required C++ standards.
-
@koahnig ,
thanks a lot for your tips.
I installed qt again .
using an other guide
It worked almost with some changes.
The timer problem I solved by adding -lrt to the make.
The problem using the assignemend :tidp = &si->si_value.sival_ptr;
I solved in this "old style" way;
titp = (void**)si->si_value.sival_ptr;
It works now.