I tried to do it by following commands:
./configure -developer-build -opensource -nomake examples -nomake tests
make module-qtconnectivity
But then I get the following when you start the program:
qt.bluetooth: Dummy backend running. Qt Bluetooth module is non-functional.
OS: Ubuntu 14.04
Here I was asked to set Bluez, but did not understand how to do it:
https://bugreports.qt.io/browse/QTBUG-52692?focusedCommentId=319847&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-319847
You compiled the module successfully. That message just states that you are using the Dummy backend hence you won't be able to connect to a device.
What OS are you developing on ?
Related
I will try to cut the story short as much as I can.
I statically compiled QT 5.11.2 to be able to compile a single executable under windows following this guide:
https://retifrav.github.io/blog/2018/02/17/build-qt-statically/
After many trials, compiling and such I was able to get in "release" mode a .exe of around 15MB.
I compiled it using different MinGW versions with the option "QTPLUGIN.imageformats = -" in the .pro project to avoid -ltiff error.
This is strange as my Application has no image handling opss...
My application is a basic and simple push button (no event associated).
The issue I am facing now is that when the mouse moves over the button and it should turn from grey to light blue the Windows wheel spins for a second before the application crashes with Segmentation fault.
Using dynamic compiling it works well and no crashes.
After many tries I found out that at least another QT objects crashes in the same way which is RadioBox. CheckBox and Tool Button are handled correctly the mouse over event.
I tried to change crashing object properties copying from working objects but still crashes!
I am desperate! After the nightmare of static compiling I landed to this issues and no googling helped me so far.
Tested Compilers are:
MinGW 4.9.2 g++
MinGW 5.3 g++
MinGW 7.3 g++
I also tried to remove the Debugger just in case.
Any help?
I am moving from Rad Studio to QT for its known issues finding more troubles than solutions.
I am posting this as an answer because its far too long for a comment...
I did a "from scratch" install of qt. I did this starting from the qt git hub repo. Once finished, I added it as a kit to my qtcreator and re-built some old GUI projects I had with push buttons. I then took the exe's (they where about 500mb because I used debug config) and ran them on a PC that has never seen Qt (a travel laptop) and the two programs I tested both ran fine with button presses and no crashes.
So, here is the list of instructions that I used (for windows 10), you can perhaps try this from the start to see if this helps:
1. Preparation
In no particular order:
install strawberry perl (required during compilation). Note normal perl does not seem to work very well.
from here: http://strawberryperl.com/
Get the qt source:
git clone https://github.com/qt/qt5.git qt5
git checkout 5.12.1 (specific build instead of 5.12 latest)
git submodule update --init --recursive
git submodule foreach --recursive "git clean -dfx" && git clean -dfx (ensure repo is clean)
Download and install mingw64 (32 bit) from: https://sourceforge.net/projects/mingw-w64/. I used options:
version 7.3.0
Arch i686
Threads posix
Exception dwarf
Build-rev 0
Windows 10 NTFS long path names
Get MediaCreationTool1809.exe from here https://www.microsoft.com/en-gb/software-download/windows10 and run it as admin.
https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing
Once you installed step 1 (maybe reboot) then you should be able to do windows button "gpedit.msc" and see the open to open gpedit
Right click it, run as admin. Then: Local Computer Policy --> Computer Config --> Administrative Templates --> System --> FileSystem --> Enable Win32 Long Paths (double click)
In there click the enable tick box and ok.
Install Python (required during make install):
From here: https://www.python.org/downloads/
NOTE: in the mingw folder there should be a mingw-xx.bat file to open an cmd prompt environment for gcc. Run this for all cmd prompts to do the following actions.
NOTE: make sure you edit the paths so that strawberry perl .../bin is before any other perl's
So the dos env setup should look like:
set PATH=D:\install\StrawberryPerl\perl\bin;%PATH%
set PATH=D:\install\mingw-w64\i686-7.3.0-posix-dwarf\mingw32\bin;%PATH%
set PATH=D:\install\Qt\qt5\qtbase\bin;%PATH%
set PATH=D:\install\Qt\qt5\gnuwin32\bin;%PATH%
Where D:\install\Qt\qt5 is where my qt5 git repo is.
2. Configuration
2.1. Static Config
Create folder at the same level as ../qt5/ repo called ../qt5-static-build/ (for example) and cd into it, then run:
- ..\qt5\configure -debug -opensource -static -static-runtime -skip webengine -nomake examples -nomake tests -nomake tools -accessibility -no-sql-sqlite -no-opengl -platform win32-g++ -qt-zlib -qt-libpng -qt-libjpeg -confirm-license -prefix "C:\install\Qt\5.12.1-static"
2.2. Shared Lib Config
Create folder at the same level as ../qt5/ repo called ../qt5-build/ (for example) and cd into it, then run:
..\qt5\configure -debug -opensource -skip webengine -nomake examples -nomake tests -nomake tools -accessibility -no-sql-sqlite -no-opengl -platform win32-g++ -qt-zlib -qt-libpng -qt-libjpeg -confirm-license -prefix "C:\install\Qt\5.12.1-sharedlib"
3. Compile and installation
Either way you configured qt (static or not) this part is the same, basically run:
mingw32-make -j8
mingw32-make install -j8
Note: you can use whatever parallel number you want (-j<num-jobs>). Each stage takes a while depending on your CPU of course.
Once you have finished, the install path set in your config line (e.g. C:\install\Qt\5.12.1-static) will contain your qt install. You can then add this in qtcreator as a new qt version (if that is how you are building it).
Appendix - release static configuration
You may want the following configuration if you want release builds etc (but I did not test this yet):
..\qt5\configure with the following options:
-release -optimize-size -opengl desktop -no-pch -platform win32-g++ -opensource -static -static-runtime -skip webengine -nomake examples -nomake tests -nomake tools -accessibility -no-sql-sqlite -no-opengl -platform win32-g++ -qt-zlib -qt-libpng -qt-libjpeg -confirm-license -prefix "C:\install\Qt\5.12.1-static"
where I added:
-release - instead of debug
-optimize-size - make smallest size
-opengl desktop - opengl if you must have it
-no-pch - no pre-compiled headers, not sure you need this, but...
-platform win32-g++ - Again, this may help if you have build issues, but probably don't need it.
I have been trying to create a GUI application using Qt5 on Raspbian Stretch, but the application doesn't launch correctly unless I specifically tell it to run as XCB. This is fine, as I don't need it running in EGLFS mode, so I went back and configured Qt5 with no EGLFS support, but it still does the same thing.
Configure:
/qt-everywhere-src-5.10.1/configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot /home/bast/cross-compile-rpi/sysroot -prefix /usr/local/qt5pi -opensource -confirm-license -skip qtwebengine -skip qtscript -nomake examples -make libs -no-icu -xcb -no-eglfs -nomake tests -nomake examples -v
When I run make and make install, then rsync the files to my Pi it still defaults to EGLFS mode and the application freezes with this output:
[9;0]Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
Everything works perfectly if I run it as XCB, and I need the application to run along-side other windows, it isn't meant to be run as the primary window for the Pi.
Substitute the -opengl es2 option with -no-opengl and try again
Maybe you need to setting environment on your raspberry pi
export QT_QPA_PLATFORM=xcb
I have compiled (make -j4) and installed (sudo make install) Qt 5.9.1 on Jetson TX1 Board from NVIDIA with following configure command
./configure
-opensource
-confirm-license
-release
-linuxfb
-no-tslib
-no-sql-sqlite
-qt-libpng
-qt-libjpeg
-qt-freetype
-qt-xkbcommon-x11
-skip multimedia
-skip wayland
-skip winextras
-skip webchannel
-skip webengine
-skip websockets
-skip webkit
-skip webview
-skip webkit-examples
-nomake examples
-nomake tests
-nomake tools
-prefix /usr
-opengl es2
Everything compiled fine and my QtQuick Project also compiled fine.
The trouble started, when i executed the program.
In release mode the program would run for half a minute and then crash without any message. In debug mode the program crashes at startup. I used Callgrind to pinpoint the crash reason and got the following messages:
Since I have compiled Qt with provided gcc/g++ compiler i don't get why an invalid opcode can be found in the libraries.
Any idea what the problem could be?
I also got some troubles on Jetson TX2 when using Qt (OS: Ubuntu 16.04, x64). I used this tutorial:
Install Jetson
It´s working for me so perhaps you can try it with mentioned dependences.
So I think after tedious debugging I got to the origin of the problem.
Apparently the usage of QCharts in QML on aarch64 Systems doesn't really work, at least it produces the crashes. When removing all QCharts from my QML files the program started working, though I now got a memory leak, that might be originating from the QML Image class (even though caching is disabled), so I'm thinking about replacing it with my own renderalgorithm.
I have an application which i want to deploy using static linking.I am using Qt 5.4 and ubuntu.I learnt that to deploy my application i have to bulid qt statically using the following code
cd /path/to/Qt
./configure -static -prefix /path/to/Qt <other parameters>
make sub-src
i have Qt installed in home/Qt5.4.0
When i run the above code it says that
configure:no such file
When i check the Qt directory there is indeed no configure file.I could only find
configure.prf
in Qt5.4.0/5.4/gcc_64/mkspecs/features/
this may be novice but how should i deploy my application now?
I can describe steps I did for Windows.
Configure Qt static build. For this download source code and in e.g. d:\Qt\5.4\Src\qtbase\mkspecs\win32-g++\qmake.conf change line QMAKE_LFLAGS = to QMAKE_LFLAGS = -static -static-libgcc. Then save and exit.
Make Qt. In console (preferably one from Qt folder like Qt 5.4 for Desktop (MinGW 4.9 32 bit) go to d:\Qt\5.4\Src\qtbase, change environment variables
set LIB=
set INCLUDE=
SET QTDIR=D:\Qt\5.4\Src\qtbase
SET QMAKESPEC=win32-g++
SET PATH=C:\Python34;c:\Strawberry\perl\bin;d:\Qt\Tools\mingw491_32\bin;d:\Qt\5.4\Src\qtbase\bin;%PATH%
Start configuration (accept license) and make.
configure.exe -debug-and-release -opensource -c++11 -static -opengl desktop -no-angle -no-vcproj -nomake examples -nomake demos
mingw32-make.exe (This can take time)
Add kit in Qt Options (Build & Run tab)
Chose new kit for the project. Should work.
The new Qt 5.1 has (partial) support for iOS as mentioned in the release announcement, but how do I actually build and deploy a Qt project to a iOS device? Or in other words, how do I end up with a iOS XCode project?
This shows how to compile qt5 for the iOS simulator.
Based on qt build instructions for iOS.
If you want to build for an iOS device, you have to check out the qt5 sources a second time to a second directory and use the alternate configure command as shown below.
This uses qt 5.2 beta 1. Check for newer versions with git tag.
git clone git://gitorious.org/qt/qt5.git qt5-ios-simulator.git
cd qt5-ios-simulator.git
git tag
git reset --hard v5.2.0-beta1
Initialize qt but do not use webkit because it takes too long to compile
perl init-repository --no-webkit
Configure qt to use open source version with simulator, skipping examples and test
./configure -xplatform macx-ios-clang -developer-build -opensource -release -nomake examples -nomake tests -sdk iphonesimulator
Alternatively, use this configure command in a separate git checkout to build for iOS devices
./configure -xplatform macx-ios-clang -developer-build -opensource -release -nomake examples -nomake tests
Run make. Uses 4 jobs in parallel for faster compilation.
make -j 4
cd ..
Done.
You may test if everything works by building an example project
git clone https://github.com/msorvig/qt-ios-demo.git
cd qt-ios-demo
../qt5-ios-simulator.git/qtbase/bin/qmake
open qt-ios-demo.xcodeproj
I have not tried it myself yet but I would guess have to install XCode and Qt Creator on your OSX. As I know the Qt guys its probably like the Android version. Just try to install the Qt SDK with the online installer and select the iOS version. The rest should be possible in QtCreator. I would be interested to know if it worked.