Building QT 6.2.2 for Windows and Android

I downloaded QT 6.2.2, verified its checksum:

certutil -hashfile qt-everywhere-src-6.2.2.zip MD5

Building for Windows with MSVC2019

Configured QT for building in the system Command Prompt (but not in MSVC Developer Command Prompt) as follows:

CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
  
set "CMAKE_ROOT=E:\PFiles\cmake-3.21.3-windows-x86_64\bin"
set "NINJA_ROOT=E:\PFiles\ninja-win"
set "PERL_ROOT=E:\PFiles\Strawberry\perl\bin"
   
set PATH=%CMAKE_ROOT%;%PATH%
set PATH=%NINJA_ROOT%;%PATH%
set PATH=%PERL_ROOT%;%PATH%
set PATH=E:\PFiles\Python35;%PATH%
     
rem Check if the tools are in PATH
where perl.exe
where python.exe
where cmake.exe
where ninja.exe
 
set "MY_INSTALL_PATH=E:\Qt\Qt6.2.2\windows"
set CL=/MP
 
configure.bat -prefix %MY_INSTALL_PATH% -DQT_NO_EXCEPTIONS=1 -debug-and-release -force-debug-info -platform win32-msvc -opensource -confirm-license ^
-opengl es2 -I "C:\Program Files\OpenSSL\include" -L "C:\Program Files\OpenSSL\lib"
(more…)

I have MacBook

And it is even Pro:

System Version: macOS 11.6 (20G165)
Kernel Version: Darwin 20.6.0

(more…)

“Server certificate verification failed” error with command line Git client

Some guy described the same situation about 10 years ago on stackoverflow.com and there was another discussion about 7 years ago.

First I did:

GIT_CURL_VERBOSE=1 git clone https://git.developernote.com/examples.git
Cloning into 'examples'...
* Couldn't find host git.developernote.com in the .netrc file; using defaults
*   Trying 139.162.243.103...
* TCP_NODELAY set
* Connected to git.developernote.com (139.162.243.103) port 443 (#0)
* found 129 certificates in /etc/ssl/certs/ca-certificates.crt
* found 387 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
* stopped the pause stream!
* Closing connection 0
fatal: unable to access 'https://git.developernote.com/examples.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
(more…)

How to backup entire disk on MacOS

Open Disk Utility, select View->Show All Devices, select the disk and then Image from … :

To restore the disk from backup create a boot USB flash, boot from it and use Recovery option.

Periodically get ‘device not responding’ error on my HiveOS rig

Once a 2 or 3 minutes I get the following error in the miner log:

grep -i error /var/log/miner/gminer/gminer.log
Error on GPU6: Device not responding, check overclocking settings

and on the following message on the miner screen:

miner
GPU6: DAG has been damaged, check overclocking settings
Miner terminated, watchdog will restart process after 10 seconds

GPU temperature is about 50-60°C, but looks like the memory chips overheat, because there was NVidia error:

(more…)

Writing market data to SQLite database

SQLite utilizes up to 90% of the my SSD disk when SHIB coin riches its local peaks with more than 10.000 – 18.000 trades/min that is 166 – 300 trades/second. My C++ app inserts 64-bit values to tables like this:

CREATE TABLE trades (time INT PRIMARY KEY NOT NULL, price REAL, volume REAL) WITHOUT ROWID;

so it is only 3984 – 7200 bytes/second. Totally across all markets there can be about 30.000 trades/min that is 500 trades/second and only 12.000 bytes/second and it is enough to slow down my SQLite database.

I use WAL with 4GB cache:

PRAGMA journal_mode = WAL;
PRAGMA cache_size = -4 * 1024 * 1024;

and do all the inserts in a transaction once a 5 seconds into 500+ tables (a separate table for each market) with a prepared statement.

See the screenshots of my app below:

(more…)

Building QT 6.2 for Android on Windows

First I built QT 6.2 for Windows then I installed JDK8, CMake 3.21.3 and configured QT as follows:

set "CMAKE_ROOT=E:\PFiles\cmake-3.21.3-windows-x86_64\bin"
set "NINJA_ROOT=E:\PFiles\ninja-win"
set "JDK_ROOT=C:\Program Files\Java\jdk1.8.0_301\bin"
set "MINGW_ROOT=E:\PFiles\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin"
set "PERL_ROOT=E:\PFiles\Strawberry\perl\bin"
 
set PATH=C:\WINDOWS\system32;C:\WINDOWS
set PATH=%CMAKE_ROOT%;%PATH%
set PATH=%NINJA_ROOT%;%PATH%
set PATH=%JDK_ROOT%;%PATH%
set PATH=%MINGW_ROOT%;%PATH%
set PATH=%PERL_ROOT%;%PATH%
set PATH=E:\PFiles\Python35;%PATH%
   
rem Check if the tools are in PATH
where gcc
where mingw32-make.exe
where perl.exe
where javac.exe
where python.exe
where cmake.exe
where ninja.exe

set "ANDROID_SDK_ROOT=C:\Users\D-Ef\AppData\Local\Android\Sdk"
set "ANDROID_NDK_PATH=C:\Users\D-Ef\AppData\Local\Android\Sdk\ndk\21.3.6528147"
rem See qtbase\mkspecs\android-clang\qmake.conf
set "ANDROID_NDK_PLATFORM=android-23"
rem see %ANDROID_SDK_ROOT%\build-tools folder
set "ANDROID_BUILD_TOOLS_REVISION=29.0.2"
 
set MY_INSTALL_PATH=E:\Qt\Qt6.2\android
set QT_HOST_PATH=E:\Qt\Qt6.2\windows

configure.bat -platform android-clang -prefix %MY_INSTALL_PATH% -android-sdk %ANDROID_SDK_ROOT% -android-ndk %ANDROID_NDK_PATH% -qt-host-path %QT_HOST_PATH% -android-abis x86_64 ^
  -DQT_NO_EXCEPTIONS=1 -release -force-debug-info -opensource -confirm-license
(more…)

How I fixed “CMake configuration has no path to C++ compiler” in QT Creator

CMake did not work and there was a yellow triangle at the left side of MSVC2019 kit name:

I fixed this buy changing C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat with C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsx86_arm64.bat.

(more…)

Using QML_ELEMENT with CMake

There is an example of using QML_ELEMENT in qt5\qtdeclarative\examples\quick\scenegraph\openglunderqml and qt_add_qml_module in CMake:

qt_add_qml_module(openglunderqml
    URI OpenGLUnderQML
    VERSION 1.0
    QML_FILES main.qml
    RESOURCE_PREFIX /scenegraph/openglunderqml
    NO_RESOURCE_TARGET_PATH
)

In QML it imports the module:

import OpenGLUnderQML 1.0
(more…)

Building QT 6.2 for Windows with MSVC2019

I cloned QT repository:

git clone --recursive https://code.qt.io/qt/qt5.git --branch v6.2.0
cd qt5

Looks like the command below is not required:

./init-repository --module-subset=all

because it prints:

Will not reinitialize already initialized repository (use -f to force)!
(more…)