Error in building qt from source on debian - qt

I downloaded a Qt source from the official site.
I extracted it in home directory and try to build it using commands:
./configure -developer-build
cmake --build .
But I get this error:
[ 48%] Running moc --collect-json for target tst_qmlsplitlib
Error opening /home/yas/Qt-6.3.1/qtdeclarative/tests/auto/qml/qmlsplitlib/tst_qmlsplitlib_autogen/include/moc_tst_qmlsplitlib_library_tst_qmlsplitlib.cpp.json for reading
gmake[2]: *** [qtdeclarative/tests/auto/qml/qmlsplitlib/CMakeFiles/tst_qmlsplitlib.dir/build.make:75: qtdeclarative/tests/auto/qml/qmlsplitlib/meta_types/qt6tst_qmlsplitlib_debug_metatypes.json.gen] Error 1
gmake[2]: *** Deleting file 'qtdeclarative/tests/auto/qml/qmlsplitlib/meta_types/qt6tst_qmlsplitlib_debug_metatypes.json.gen'
gmake1: *** [CMakeFiles/Makefile2:141639: qtdeclarative/tests/auto/qml/qmlsplitlib/CMakeFiles/tst_qmlsplitlib.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
'''
I have MacBook Pro 2012 and with Debian 11.
Any help would be appreciated.

Building Qt6 with make is not really supported. There should be a CMake warning about that in the configure output.
Please install ninja and try to configure again. The configure script will detect ninja's presence and use CMake's ninja generator.
You didn't share the CMake version you're using. Please use a recent CMake, best something > 3.22.
If you don't plan to run the autotests, configure with -nomake tests.
Lastly, please report such build problems at https://bugreports.qt.io/ - that's a better place to reach us.

Related

grpc_out: protoc-gen-grpc: Plugin failed with status code 1

I have cross compiled gRPC (v1.27.3) for QNX 7 (ARM) platform. I am using the protobuf which was already available for our system (QNX ARM v3.11.4).
I used following cmake command to build gRPC for compilation process
cmake -DCMAKE_CROSSCOMPILING=1 -DgRPC_BUILD_TESTS=OFF -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_ZLIB_PROVIDER=package -DOPENSSL_CRYPTO_LIBRARY=$QNX_TARGET/aarch64le/usr/lib/libcrypto.a -DOPENSSL_SSL_LIBRARY=$TARGET/aarch64le/usr/lib/libssl.a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/tmp/qnxarm/toolchain.cmake -DCMAKE_INSTALL_PREFIX=/tmp/qnxarm/inst ../..
make plugins
make -j4
sudo make install
After compiling, I am able to see the binaries in /tmp/qnxarm/inst folder.
I copied those binaries in our code to compile the application for QNX.
While compiling I am getting this issue:
<local_directory>/grpc/aarch64/qnx/bin/grpc_cpp_plugin: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
lib/qmonitor/proto/CMakeFiles/QMonitorProto.dir/build.make:105: recipe for target 'lib/qmonitor/proto/QAicMonitorInternal.grpc.pb.cc' failed
make[2]: *** [lib/qmonitor/proto/QAicMonitorInternal.grpc.pb.cc] Error 1
Please help me to know what is wrong? or what should be done to solve this.
Do we need to add the PATH in gRPCTargets.cmake file which is generated in lib folder?
You've compiled the gRPC tools for your QNX ARM system -- so the version of grpc_cpp_plugin you made is expecting to be run on your QNX system, not your build host.
The usual approach for this sort of thing is to make a second copy of gRPC compiled for your build host, and then instruct your application build to link the libraries from the cross build, but call the grpc_cpp_plugin compiled for the build host.

How to build Qt5.6 with QtWebKit on Mac OSX (El Capitan)

I can't find any concrete pointers on the qt.io site how to actually build qt5.6 together with qtwebkit, so any hint is appreciated.
I can build qt5.6.0 flawlessly from the git repo in dev mode, however I don't know the further steps to re add qtwebkit.
Somebody out there who did it already?
I'm also trying to build Qt webkit together with 5.6.0, I got the source not from git but from the community release directory: http://download.qt.io/community_releases/5.6/5.6.0/
I put the content of the .tar.gz in qtwebkit submodule next to qtbase, it's trying to build it but then I have an error:
.pch/debug/QtWebKitWidgets_debug/c++.pch
../include/QtWebKitWidgets/QtWebKitWidgetsDepends:7:10: fatal error: 'QtWebKit/QtWebKit' file not found
#include <QtWebKit/QtWebKit>
^
1 error generated.
make[4]: *** [.pch/debug/QtWebKitWidgets_debug/c++.pch] Error 1
make[3]: *** [debug-all] Error 2
make[2]: *** [sub-widgetsapi-pri-make_first-ordered] Error 2
make[1]: *** [sub-Source-QtWebKit-pro-make_first-ordered] Error 2
make: *** [module-qtwebkit-make_first] Error 2
QWebKit is deprecated as of 5.6.0 (https://wiki.qt.io/New_Features_in_Qt_5.6) however it is still buildable for Qt 5.6 (but you should consider migrating at some point).
The easiest way to do it is to clone the git repository into the same source directory and build it like a normal Qt project. If you want to do it the ultra standard way you can add it as a submodule and follow the same steps they perform in the init-repository script but it's not necessary.

Can't Install QtMobility [Windows 64-bit]

I've downloaded and installed the QT SDK and downloaded the QT Mobility source.
Following the provided instructions, I navigated to my QtMobility directory via the Visual Studio Command Prompt (2010)... note, this is the QtMobility dir with the bin, plugins, examples, etc. folders.
D:\
cd D:\Files\Downloads\QtMobility
configure
Regardless of whether I gave configure a -prefix parameter or not, the following output was displayed:
Checking available Qt
4.8.2
Checking make
... Unknown target environment .
Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH
Aborting.
Of course, I then went to see if my computer had nmake in its PATH: the directory is added as follows:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
I went to CMD and typed in "nmake /?" to receive proper output.
What am I doing wrong? When I try to simply run nmake in the QTMobility directory, it displays:
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
Help, please! Thank you. :) I will continue attempting debugs on my own...
I suppose this is late but you could simply run the visual studio command prompt, as it has specific env. variables preset to find nmake, etc.

Qt Compile Time Error . .

I am new to Qt, and I am facing the follwoing error. I have set all the environment variables. I don't know what the problem is. Kindly Help me.
11:44:39: Running build steps for project rabiaapp...
11:44:39: Configuration unchanged, skipping qmake step.
11:44:39: Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
c:\QtSDK\Desktop\Qt\4.8.0\msvc2008\bin\uic.exe ..\rabiaapp\mainwindow.ui -o ui_mainwindow.h
C:\QtSDK\QtCreator\bin\jom.exe -f Makefile.Debug
Error: cannot open C:\Windows\main.obj.5540.16.jom for write
jom 1.0.8 - empower your cores
jom: C:\Users\rs01\rabiaapp-build-desktop-Qt_4_8_0_for_Desktop_-_MSVC2008__Qt_SDK__Debug\Makefile [debug] Error 1
11:44:39: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
Error while building project rabiaapp (target: Desktop)
When executing build step 'Make'
I can reproduce this problem if I check "Clear system environment" on the Projects' Build Settings page. Try unchecking that box.
I encountered a similar problem. My TMP variable has Chinese characters, which makes qt creator produce error: cannot open ** for write.
Try to change your TMP variable with only English characters, no spaces. Ensure that the folder exists and you have permissions to access it.
My Qt version: Qt 5.4.0 for Windows 32-bit (VS 2013, OpenGL). You can set this in Qt Creator
Try using nmake instead of jom there should be a checkbox in Settings-> Build and Run -> uncheck use jom instead of nmake.

Imagemagick Linking to QT and mingw32-make: *** [debug] Error 2

I created an application using Imagemagick library with Qt on Mac.
Now that I want to deploy the application for windows:
I installed the imagemagick library
on my pc,
I installed the SDK version of QT 4.7
I added my include and lib paths
And when I go run the application I'm getting errors that I think they are related to mingw32.
here are the build issues:
and here is the compile output:
Can someone Identify the error ?
What do I have to do to deploy the application for windows?
I also tried to use a Mingw32 version of my library but again, It didnt work:
When I put -lmagick after the lib it says file lmagick cannot ne found
and when I try to build unticking the shadow build checkbox in the build settings, it give me the errors in the first screenshoot. Thank you
See the answer to this question.

Resources