Hey,
I’m unable to build any CMake project from QtCreator, for example the official cmakesample. Configurating CMake project in QtCreator succeeds:
Führe /home/richard/.config/SailfishSDK/libsfdk/build-target-tools/sailfish-sdk-build-engine/SailfishOS-4.3.0.12-armv7hl.default/cmake -S /home/richard/src/cmakesample -B /home/richard/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug -GNinja -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_SYSROOT:PATH=/home/richard/SailfishOS/mersdk/targets/SailfishOS-4.3.0.12-armv7hl.default -DCMAKE_C_COMPILER_TARGET:STRING=armv7hl-meego-linux-gnueabi -DCMAKE_CXX_COMPILER_TARGET:STRING=armv7hl-meego-linux-gnueabi -DCMAKE_CXX_COMPILER:STRING=/home/richard/.config/SailfishSDK/libsfdk/build-target-tools/sailfish-sdk-build-engine/SailfishOS-4.3.0.12-armv7hl.default/gcc -DCMAKE_C_COMPILER:STRING=/home/richard/.config/SailfishSDK/libsfdk/build-target-tools/sailfish-sdk-build-engine/SailfishOS-4.3.0.12-armv7hl.default/gcc -DCMAKE_PREFIX_PATH:STRING=/home/richard/SailfishOS/mersdk/targets/SailfishOS-4.3.0.12-armv7hl.default/usr -DQT_QMAKE_EXECUTABLE:STRING=/home/richard/.config/SailfishSDK/libsfdk/build-target-tools/sailfish-sdk-build-engine/SailfishOS-4.3.0.12-armv7hl.default/qmake in /home/richard/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug aus.
+ /home/richard/SailfishOS/bin/sfdk cmake /home/richard/src/cmakesample -- -GNinja -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_SYSROOT:PATH=/home/richard/SailfishOS/mersdk/targets/SailfishOS-4.3.0.12-armv7hl.default -DCMAKE_C_COMPILER_TARGET:STRING=armv7hl-meego-linux-gnueabi -DCMAKE_CXX_COMPILER_TARGET:STRING=armv7hl-meego-linux-gnueabi -DCMAKE_CXX_COMPILER:STRING=/home/richard/.config/SailfishSDK/libsfdk/build-target-tools/sailfish-sdk-build-engine/SailfishOS-4.3.0.12-armv7hl.default/gcc -DCMAKE_C_COMPILER:STRING=/home/richard/.config/SailfishSDK/libsfdk/build-target-tools/sailfish-sdk-build-engine/SailfishOS-4.3.0.12-armv7hl.default/gcc -DCMAKE_PREFIX_PATH:STRING=/home/richard/SailfishOS/mersdk/targets/SailfishOS-4.3.0.12-armv7hl.default/usr -DQT_QMAKE_EXECUTABLE:STRING=/home/richard/.config/SailfishSDK/libsfdk/build-target-tools/sailfish-sdk-build-engine/SailfishOS-4.3.0.12-armv7hl.default/qmake
sfdk: [I] Options from environment: -c target=SailfishOS-4.3.0.12-armv7hl
Loading repository data...
Reading installed packages...
'pkgconfig(sailfishapp) >= 1.0.2' not found in package names. Trying capabilities.
'libsailfishapp-devel' providing 'pkgconfig(sailfishapp) >= 1.0.2' is already installed.
'pkgconfig(Qt5Core)' not found in package names. Trying capabilities.
'qt5-qtcore-devel' providing 'pkgconfig(Qt5Core)' is already installed.
'pkgconfig(Qt5Qml)' not found in package names. Trying capabilities.
'qt5-qtdeclarative-devel' providing 'pkgconfig(Qt5Qml)' is already installed.
'cmake' is already installed.
No update candidate for 'cmake-3.19.3+git4-1.9.2.jolla.armv7hl'. The highest available version is already installed.
'pkgconfig(Qt5Quick)' not found in package names. Trying capabilities.
'qt5-qtdeclarative-qtquick-devel' providing 'pkgconfig(Qt5Quick)' is already installed.
'desktop-file-utils' is already installed.
No update candidate for 'desktop-file-utils-0.26+git3-1.6.1.jolla.armv7hl'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
Building target platforms: armv7hl-meego-linux
Building for target armv7hl-meego-linux
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.mBWJaG
+ umask 022
+ cd /home/richard/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb -Wno-psabi'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb -Wno-psabi'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb -Wno-psabi -I/usr/lib/gfortran/modules'
+ export FFLAGS
+ LD_AS_NEEDED=1
+ export LD_AS_NEEDED
+ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
/home/mersdk/.mb2/wrappers/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug/cmake: Executing real cmake:
+ /usr/bin/cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -GNinja -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER_TARGET:STRING=armv7hl-meego-linux-gnueabi -DCMAKE_CXX_COMPILER_TARGET:STRING=armv7hl-meego-linux-gnueabi /home/richard/src/cmakesample
-- The CXX compiler identification is GNU 8.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for one of the modules 'sailfishapp'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/richard/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug
+ make
/home/mersdk/.mb2/wrappers/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug/make: Ignoring make
+ RPM_EC=0
++ jobs -p
+ exit 0
Verstrichene Zeit: 00:10.
Führe /home/richard/.config/SailfishSDK/libsfdk/build-target-tools/sailfish-sdk-build-engine/SailfishOS-4.3.0.12-armv7hl.default/cmake -S /home/richard/src/cmakesample -B /home/richard/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug in /home/richard/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug aus.
+ /home/richard/SailfishOS/bin/sfdk cmake /home/richard/src/cmakesample --
sfdk: [I] Options from environment: -c target=SailfishOS-4.3.0.12-armv7hl
Loading repository data...
Reading installed packages...
'pkgconfig(sailfishapp) >= 1.0.2' not found in package names. Trying capabilities.
'libsailfishapp-devel' providing 'pkgconfig(sailfishapp) >= 1.0.2' is already installed.
'pkgconfig(Qt5Core)' not found in package names. Trying capabilities.
'qt5-qtcore-devel' providing 'pkgconfig(Qt5Core)' is already installed.
'pkgconfig(Qt5Qml)' not found in package names. Trying capabilities.
'qt5-qtdeclarative-devel' providing 'pkgconfig(Qt5Qml)' is already installed.
'cmake' is already installed.
No update candidate for 'cmake-3.19.3+git4-1.9.2.jolla.armv7hl'. The highest available version is already installed.
'pkgconfig(Qt5Quick)' not found in package names. Trying capabilities.
'qt5-qtdeclarative-qtquick-devel' providing 'pkgconfig(Qt5Quick)' is already installed.
'desktop-file-utils' is already installed.
No update candidate for 'desktop-file-utils-0.26+git3-1.6.1.jolla.armv7hl'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
Building target platforms: armv7hl-meego-linux
Building for target armv7hl-meego-linux
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.L8ohxG
+ umask 022
+ cd /home/richard/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb -Wno-psabi'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb -Wno-psabi'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb -Wno-psabi -I/usr/lib/gfortran/modules'
+ export FFLAGS
+ LD_AS_NEEDED=1
+ export LD_AS_NEEDED
+ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
/home/mersdk/.mb2/wrappers/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug/cmake: Executing real cmake:
+ /usr/bin/cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr /home/richard/src/cmakesample
-- Configuring done
-- Generating done
-- Build files have been written to: /home/richard/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug
+ make
/home/mersdk/.mb2/wrappers/src/build-cmakesample-SailfishOS_4_3_0_12_armv7hl_in_sailfish_sdk_build_engine-Debug/make: Ignoring make
+ RPM_EC=0
++ jobs -p
+ exit 0
Verstrichene Zeit: 00:09.
But then the build button stays gray:
And build configuration says that a CMake configuration is missing, what ever is means (for example CMakeCache.txt exists there):
Build for i486 fails with an other error, because of missing Ninja which is used by default (can be fixed with changing the Generator in CMake parameters, but after that the problem from above stays):
-- Configuring incomplete, errors occurred!
See also "/home/richard/src/build-cmakesample-SailfishOS_4_3_0_12_i486_in_sailfish_sdk_build_engine-Debug/CMakeFiles/CMakeOutput.log".
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
A reinstallation did not fixed the problem. QMake projects work as expected. Building with sfdk also works.
Does anyone have an idea how to solve the problem?