Building Qt Creator from source
-
trying to build qt from source using guide https://doc.qt.io/qt-6/linux-building.html, all libs installed https://doc.qt.io/qt-6/linux-requirements.html | errors: https://justpaste.it/9wm8q... Pls advise
first one is crucial
Run Build Command(s):/usr/bin/ninja cmTC_3db9f && [1/2] Building CXX object CMakeFiles/cmTC_3db9f.dir/src.cxx.o
[2/2] Linking CXX executable cmTC_3db9f
FAILED: cmTC_3db9f
: && /usr/bin/g++ -fuse-ld=lld CMakeFiles/cmTC_3db9f.dir/src.cxx.o -o cmTC_3db9f && :
collect2: fatal error: cannot find ‘ld’
compilation terminated.
ninja: build stopped: subcommand failed.supernova@supernova-BOHB-WAX9:~/dev/qt-build$ which ld
/usr/bin/ld
supernova@supernova-BOHB-WAX9:~/dev/qt-build$ which ldd
/usr/bin/ldd[/home/supernova/dev/qt-build/CMakeFiles/CMakeError.log
Performing C++ SOURCE FILE Test TEST_use_lld_linker failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_3db9f && [1/2] Building CXX object CMakeFiles/cmTC_3db9f.dir/src.cxx.o
[2/2] Linking CXX executable cmTC_3db9f
FAILED: cmTC_3db9f
: && /usr/bin/g++ -fuse-ld=lld CMakeFiles/cmTC_3db9f.dir/src.cxx.o -o cmTC_3db9f && :
collect2: fatal error: cannot find ‘ld’
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test TEST_gdb_index failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_36f48 && [1/2] Building CXX object CMakeFiles/cmTC_36f48.dir/src.cxx.o
[2/2] Linking CXX executable cmTC_36f48
FAILED: cmTC_36f48
: && /usr/bin/g++ -Wl,--gdb-index CMakeFiles/cmTC_36f48.dir/src.cxx.o -o cmTC_36f48 && :
/usr/bin/ld: unrecognized option '--gdb-index'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test HAVE_alloca_malloc_h failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_83990 && [1/2] Building CXX object CMakeFiles/cmTC_83990.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_83990.dir/src.cxx.o
/usr/bin/g++ -DHAVE_alloca_malloc_h -fPIE -o CMakeFiles/cmTC_83990.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main()’:
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:6:1: error: ‘alloca’ was not declared in this scope; did you mean ‘valloc’?
6 | alloca(1);
| ^~~~~~
| valloc
ninja: build stopped: subcommand failed.Source file was:
#include <malloc.h>int main(void)
{
/* BEGIN TEST: /
alloca(1);
/ END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_pollts failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_2ae6e && [1/2] Building CXX object CMakeFiles/cmTC_2ae6e.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_2ae6e.dir/src.cxx.o
/usr/bin/g++ -DHAVE_pollts -fPIE -o CMakeFiles/cmTC_2ae6e.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main()’:
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:11:1: error: ‘pollts’ was not declared in this scope; did you mean ‘pollfd’?
11 | pollts(&pfd, 1, &ts, &sig);
| ^~~~~~
| pollfd
ninja: build stopped: subcommand failed.Source file was:
#include <poll.h>
#include <signal.h>
#include <time.h>int main(void)
{
/* BEGIN TEST: /
struct pollfd pfd;
struct timespec ts;
sigset_t sig;
pollts(&pfd, 1, &ts, &sig);
/ END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_cpp_winrt failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_3dda2 && [1/2] Building CXX object CMakeFiles/cmTC_3dda2.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_3dda2.dir/src.cxx.o
/usr/bin/g++ -DHAVE_cpp_winrt -fPIE -o CMakeFiles/cmTC_3dda2.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:2:13: fatal error: winrt/base.h: No such file or directory
2 | # include <winrt/base.h>
| ^~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
// Including winrt/base.h causes an error in some configurations (Windows 10 SDK + c++20)include <winrt/base.h>
int main(void)
{
return 0;
}Performing C++ SOURCE FILE Test HAVE_xlocalescanprint failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_03b96 && [1/2] Building CXX object CMakeFiles/cmTC_03b96.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_03b96.dir/src.cxx.o
/usr/bin/g++ -DHAVE_xlocalescanprint -fPIE -o CMakeFiles/cmTC_03b96.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:10:10: error: #include expects "FILENAME" or <FILENAME>
10 | #include QDSP_P_H
| ^~~~~~~~
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main()’:
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:18:1: error: ‘locale_t’ was not declared in this scope
18 | locale_t invalidLocale = NULL;
| ^~~~~~~~
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:21:17: error: ‘argv’ was not declared in this scope
21 | qDoubleSnprintf(argv[0], 1, invalidLocale, "invalid format", a);
| ^~~~
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:21:29: error: ‘invalidLocale’ was not declared in this scope
21 | qDoubleSnprintf(argv[0], 1, invalidLocale, "invalid format", a);
| ^~~~~~~~~~~~~
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:21:1: error: ‘qDoubleSnprintf’ was not declared in this scope
21 | qDoubleSnprintf(argv[0], 1, invalidLocale, "invalid format", a);
| ^~~~~~~~~~~~~~~
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:22:62: error: ‘argc’ was not declared in this scope
22 | qDoubleSscanf(argv[0], invalidLocale, "invalid format", &a, &argc);
| ^~~~
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:22:1: error: ‘qDoubleSscanf’ was not declared in this scope
22 | qDoubleSscanf(argv[0], invalidLocale, "invalid format", &a, &argc);
| ^~~~~~~~~~~~~
ninja: build stopped: subcommand failed.Source file was:
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE#ifdef _MSVC_VER
#define Q_CC_MSVC _MSVC_VER
#endif#define QT_NO_DOUBLECONVERSION
#include QDSP_P_H
int main(void)
{
/* BEGIN TEST: /
#ifdef _MSVC_VER
_locale_t invalidLocale = NULL;
#else
locale_t invalidLocale = NULL;
#endif
double a = 3.4;
qDoubleSnprintf(argv[0], 1, invalidLocale, "invalid format", a);
qDoubleSscanf(argv[0], invalidLocale, "invalid format", &a, &argc);
/ END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_ifr_index failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_07baf && [1/2] Building CXX object CMakeFiles/cmTC_07baf.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_07baf.dir/src.cxx.o
/usr/bin/g++ -DHAVE_ifr_index -fPIE -o CMakeFiles/cmTC_07baf.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main()’:
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:7:5: error: ‘struct ifreq’ has no member named ‘ifr_index’
7 | req.ifr_index = 0;
| ^~~~~~~~~
ninja: build stopped: subcommand failed.Source file was:
#include <net/if.h>int main(void)
{
/* BEGIN TEST: /
struct ifreq req;
req.ifr_index = 0;
/ END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_sctp failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_8202a && [1/2] Building CXX object CMakeFiles/cmTC_8202a.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_8202a.dir/src.cxx.o
/usr/bin/g++ -DHAVE_sctp -fPIE -o CMakeFiles/cmTC_8202a.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:4:10: fatal error: netinet/sctp.h: No such file or directory
4 | #include <netinet/sctp.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/sctp.h>int main(void)
{
/* BEGIN TEST: /
sctp_initmsg sctpInitMsg;
socklen_t sctpInitMsgSize = sizeof(sctpInitMsg);
(void) socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP);
(void) getsockopt(-1, SOL_SCTP, SCTP_INITMSG, &sctpInitMsg, &sctpInitMsgSize);
/ END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_networklistmanager failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_3642d && [1/2] Building CXX object CMakeFiles/cmTC_3642d.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_3642d.dir/src.cxx.o
/usr/bin/g++ -DHAVE_networklistmanager -fPIE -o CMakeFiles/cmTC_3642d.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:1:11: fatal error: netlistmgr.h: No such file or directory
1 | #include <netlistmgr.h>
| ^~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <netlistmgr.h>
#include <wrl/client.h>int main(void)
{
/* BEGIN TEST: /
using namespace Microsoft::WRL;
ComPtr<INetworkListManager> networkListManager;
ComPtr<IConnectionPoint> connectionPoint;
ComPtr<IConnectionPointContainer> connectionPointContainer;
networkListManager.As(&connectionPointContainer);
connectionPointContainer->FindConnectionPoint(IID_INetworkConnectionEvents, &connectionPoint);
/ END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_EGL failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_37436 && [1/2] Building CXX object CMakeFiles/cmTC_37436.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_37436.dir/src.cxx.o
/usr/bin/g++ -DHAVE_EGL -fPIE -o CMakeFiles/cmTC_37436.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:2:10: fatal error: EGL/egl.h: No such file or directory
2 | #include <EGL/egl.h>
| ^~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <EGL/egl.h>
int main(int, char **) {
EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0;
eglDestroyContext(dpy, ctx);
}
Performing C++ SOURCE FILE Test HAVE_GLESv2 failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_b57e2 && [1/2] Building CXX object CMakeFiles/cmTC_b57e2.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_b57e2.dir/src.cxx.o
/usr/bin/g++ -DHAVE_GLESv2 -fPIE -o CMakeFiles/cmTC_b57e2.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:6:12: fatal error: GLES2/gl2.h: No such file or directory
6 | # include <GLES2/gl2.h>
| ^~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#ifdef APPLE
include <OpenGLES/ES2/gl.h>
#else
define GL_GLEXT_PROTOTYPES
include <GLES2/gl2.h>
#endif
int main(int, char **) {
glUniform1f(1, GLfloat(1.0));
glClear(GL_COLOR_BUFFER_BIT);
}
Performing C++ SOURCE FILE Test HAVE_integrityfb failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_1b94b && [1/2] Building CXX object CMakeFiles/cmTC_1b94b.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_1b94b.dir/src.cxx.o
/usr/bin/g++ -DHAVE_integrityfb -fPIE -o CMakeFiles/cmTC_1b94b.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:1:11: fatal error: device/fbdriver.h: No such file or directory
1 | #include <device/fbdriver.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <device/fbdriver.h>int main(void)
{
/* BEGIN TEST: */
FBDriver driver = 0;
/ END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_directwrite failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_5ab35 && [1/2] Building CXX object CMakeFiles/cmTC_5ab35.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_5ab35.dir/src.cxx.o
/usr/bin/g++ -DHAVE_directwrite -fPIE -o CMakeFiles/cmTC_5ab35.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:1:11: fatal error: dwrite_2.h: No such file or directory
1 | #include <dwrite_2.h>
| ^~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <dwrite_2.h>
int main(int, char **)
{
IUnknown *factory = nullptr;
DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory2),
&factory);
return 0;
}Performing C++ SOURCE FILE Test HAVE_directwrite3 failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_bd135 && [1/2] Building CXX object CMakeFiles/cmTC_bd135.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_bd135.dir/src.cxx.o
/usr/bin/g++ -DHAVE_directwrite3 -fPIE -o CMakeFiles/cmTC_bd135.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:1:11: fatal error: dwrite_3.h: No such file or directory
1 | #include <dwrite_3.h>
| ^~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <dwrite_3.h>
int main(int, char **)
{
IUnknown *factory = nullptr;
DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory3),
&factory);
return 0;
}Performing C++ SOURCE FILE Test HAVE_d2d1 failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_d41f3 && [1/2] Building CXX object CMakeFiles/cmTC_d41f3.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_d41f3.dir/src.cxx.o
/usr/bin/g++ -DHAVE_d2d1 -fPIE -o CMakeFiles/cmTC_d41f3.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:1:11: fatal error: d2d1.h: No such file or directory
1 | #include <d2d1.h>
| ^~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <d2d1.h>
int main(int, char **)
{
void *factory = nullptr;
D2D1_FACTORY_OPTIONS options;
ZeroMemory(&options, sizeof(D2D1_FACTORY_OPTIONS));
D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, GUID{}, &options, &factory);
return 0;
}Performing C++ SOURCE FILE Test HAVE_d2d1_1 failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_2261d && [1/2] Building CXX object CMakeFiles/cmTC_2261d.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_2261d.dir/src.cxx.o
/usr/bin/g++ -DHAVE_d2d1_1 -fPIE -o CMakeFiles/cmTC_2261d.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:1:11: fatal error: d2d1_1.h: No such file or directory
1 | #include <d2d1_1.h>
| ^~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <d2d1_1.h>
int main(int, char **)
{
ID2D1Factory1 *d2dFactory;
D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &d2dFactory);
return 0;
}Performing C++ SOURCE FILE Test HAVE_pointer_32bit failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_373ac && [1/2] Building CXX object CMakeFiles/cmTC_373ac.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_373ac.dir/src.cxx.o
/usr/bin/g++ -DHAVE_pointer_32bit -fPIE -o CMakeFiles/cmTC_373ac.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main(int, char**)’:
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:8:30: error: static assertion failed: fail
8 | static_assert(sizeof(void *) == 4, "fail");
| ~~~~~~~~~~~~~^~
ninja: build stopped: subcommand failed.Source file was:
int main(int argc, char *argv)
{
(void)argc; (void)argv;
/ BEGIN TEST: */
static_assert(sizeof(void ) == 4, "fail");
/ END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_arm_thumb failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_b4639 && [1/2] Building CXX object CMakeFiles/cmTC_b4639.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_b4639.dir/src.cxx.o
/usr/bin/g++ -DHAVE_arm_thumb -fPIE -o CMakeFiles/cmTC_b4639.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:16:6: error: #error "fail"
16 | # error "fail"
| ^~~~~
ninja: build stopped: subcommand failed.Source file was:
int main(int argc, char *argv)
{
(void)argc; (void)argv;
/ BEGIN TEST: */
#if defined(thumb2) || defined(thumb2)define THUMB_OK
#elif (defined(__thumb) || defined(thumb)) && __TARGET_ARCH_THUMB-0 == 4
define THUMB_OK
#elif defined(__ARM_ARCH_ISA_THUMB) && __ARM_ARCH_ISA_THUMB == 2
// clang 3.5 and later will set this if the core supports the Thumb-2 ISA.define THUMB_OK
#else
error "fail"
#endif
/* END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_uacpp failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_ef89e && [1/2] Building CXX object CMakeFiles/cmTC_ef89e.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_ef89e.dir/src.cxx.o
/usr/bin/g++ -DHAVE_uacpp -fPIE -o CMakeFiles/cmTC_ef89e.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:3:10: fatal error: uaplatformlayer.h: No such file or directory
3 | #include <uaplatformlayer.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <stdio.h>#include <uaplatformlayer.h>
#include <uastring.h>
#include <uasession.h>using namespace UaClientSdk;
int main(int /argc/, char ** /argv/)
{UaPlatformLayer::init(); UaSession *session = new UaSession; UaPlatformLayer::cleanup(); return 0;
}
Performing C++ SOURCE FILE Test HAVE_ntddmodm failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_2a86c && [1/2] Building CXX object CMakeFiles/cmTC_2a86c.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_2a86c.dir/src.cxx.o
/usr/bin/g++ -DHAVE_ntddmodm -fPIE -o CMakeFiles/cmTC_2a86c.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:2:10: fatal error: windows.h: No such file or directory
2 | #include <windows.h>
| ^~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <windows.h>
#include <ntddmodm.h>int main(int argc, char *argv)
{
(void)argc; (void)argv;
/ BEGIN TEST: /
GUID guid = GUID_DEVINTERFACE_MODEM;
/ END TEST: */
return 0;
}Performing C++ SOURCE FILE Test HAVE_khr failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_7ccca && [1/2] Building CXX object CMakeFiles/cmTC_7ccca.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_7ccca.dir/src.cxx.o
/usr/bin/g++ -DHAVE_khr -fPIE -o CMakeFiles/cmTC_7ccca.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:2:10: fatal error: KHR/khrplatform.h: No such file or directory
2 | #include <KHR/khrplatform.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.Source file was:
#include <KHR/khrplatform.h>
int main(void) {
return 0;
}
Performing C++ SOURCE FILE Test HAVE_winversion failed with the following output:
Change Dir: /home/supernova/dev/qt-build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/ninja cmTC_7a0bc && [1/2] Building CXX object CMakeFiles/cmTC_7a0bc.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_7a0bc.dir/src.cxx.o
/usr/bin/g++ -DHAVE_winversion -fPIE -o CMakeFiles/cmTC_7a0bc.dir/src.cxx.o -c /home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx
/home/supernova/dev/qt-build/CMakeFiles/CMakeTmp/src.cxx:3:2: error: #error unsupported Visual Studio version
3 | #error unsupported Visual Studio version
| ^~~~~
ninja: build stopped: subcommand failed.Source file was:
#if !defined(clang) && _MSC_FULL_VER < 191426428
#error unsupported Visual Studio version
#endif
int main(void){
return 0;
}](link url) -
@JacobNovitsky said in Building Qt Creator from source:
/usr/bin/g++ -fuse-ld=lld CMakeFiles/cmTC_3db9f.dir/src.cxx.o -o cmTC_3db9f
This says
lld
, not theldd
you searched for, which is quite a different thing.
I don't know much about that, except that it seems to come up as a clang/llvm thing. -
@JonB oh! thats might be helpful, thanks
also, I ve installed all depenciessudo apt-get -y install build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5 '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
and could configure, but next step (cmake --build . --parallel, it proceeds till 10% and system is crashed)
So now I have only one way to do the same copy whole /home/ directory, but not sure if it would work
In some while I will retry, maybe its ldd issue
-
@JacobNovitsky said in Building Qt Creator from source:
In some while I will retry, maybe its ldd issue
No. The build cannot find
lld
(doc) which, as @JonB pointed out, is notldd
(man page). -
@ChrisW67 it was missing bunch of libraries, now Qt components installed
but there is no qt creator
I've installed Qt Creator using
sudo apt download qtcreator
installed qt Creator 6.0.2
Is this correct way?
see screen below
if not correct, what should I do?
P.S: https://www.ics.com/blog/how-build-qt-640-source-ubuntu-linux
-
@JacobNovitsky said in Building Qt Creator from source:
alled
but there is no qt creator
I've installed Qt Creator usingI dont see any kits available
how to install
how to detect?
-
Hi @JacobNovitsky,
it may be a stupid question, but why don't you just install Qt and Creator with the Online Installer?
https://download.qt.io/official_releases/online_installers/
That way, everything is correctly set up plus you can easily upgrade. (by the way, the current version is Creator 12.0)
Or do you have a specific reason to compile from source?
In this case, you have to register the Qt version yourself in Creators settings.
Regards
-
in this case, you have to follow the documentation. The following pages should give you some insight:
https://doc.qt.io/qtcreator/creator-project-qmake.html
https://doc.qt.io/qtcreator/creator-tool-chains.html
https://doc.qt.io/qtcreator/creator-debuggers.html
https://doc.qt.io/qtcreator/creator-targets.htmlRegards
-
-
I have another idea: you could download the offline installer from https://download.qt.io/official_releases/qtcreator/12.0/12.0.1/ to avoid compiling Creator yourself.
Regards
-
@aha_1980 I downloaded, and building it, but there is slight confusion, please lit some light upon that:
I already built sources using official guide from https://doc.qt.io/qt-6/linux-building.html and its located > /usr/local/Qt-6.4.2;
Pls note I used the same commands:
cmake --build . --parallel
cmake --install .Read me under the link https://download.qt.io/official_releases/qtcreator/12.0/12.0. says:
Linux and macOS
These instructions assume that Ninja is installed and in the
PATH
, Qt Creator
sources are located at/path/to/qtcreator_sources
, Qt is installed in
/path/to/Qt
, and LLVM is installed in/path/to/llvm
.Note that if you install Qt via the online installer, the path to Qt must
include the version number and compiler ABI. The path to the online installer
content is not enough.Note that
/path/to/Qt
doesn't imply the full path depth like:
$USER/Qt/6.2.4/gcc_64/lib/cmake/Qt6
, but only$USER/Qt/6.2.4/gcc_64
.See instructions on how to
get LLVM.```
mkdir qtcreator_build
cd qtcreator_buildcmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources cmake --build .
**I use command**
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2
cmake --build .Confusion: Now I have same building ouput, same time to build as I took to build sources [1200/1000] Building Cxx object... 1. Build sources 2. Build Qt creator Is this way correct? Not sure why is re-building sources, as I already pointed to Qt installed
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2
maybe root is not correct or bad syntax?
-
@JacobNovitsky said in Building Qt Creator from source:
I installed qt creator from apt, but version is much lower then needed how to install fresh qt creator from source?
Seriously, don't build Qt Creator and/or Qt from source code if you do not have to. You started this thread failing to build Qt Creator from source, changed to installing the Ubuntu package binaries^^, and then flipped back to building Qt Creator from source (with an unconnected reference to Qt 6.4 libraries built).
^^ While not the latest Qt Creator version it is perfectly able to build Qt projects using any version of Qt 5 or 6 and matching compiler tools you manage to install.
Install the prebuilt, easy-to-install current version of Qt Creator, one or more Qt library versions, and optional add-ons binaries using the Online Installer as @aha_1980 suggested a day back.
-
@JacobNovitsky said in Building Qt Creator from source:
Read me under the link https://download.qt.io/official_releases/qtcreator/12.0/12.0. says:
Nothing, the link is broken.
Carefully compare what the Readme in the Qt Creator12.0.0 source archive file says:
mkdir qtcreator_build cd qtcreator_build cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources cmake --build .
with what you say you have typed:
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2 cmake --build .
Ask yourself, "Where are the Qt Creator sources?" Qt Creator is not the Qt Libraries.
@JacobNovitsky said in Building Qt Creator from source:
should I build source and qt creator separately?
What does "build source" mean?
I already built all, but I would love to save some time, thats why I'm asking
Clearly you have not built Qt Creator from source code or you would not still be asking how to do it. Save some time by building none of it.
I do not know how to make this clearer:
- Do not build the Qt Creator tool from its source code unless you have a specific reason to do so. A valid reason might be developing changes for Qt Creator itself. A invalid reason would be thinking this was somehow related to the versions of Qt libraries used to build your projects. Install a pre-built Qt Creator IDE and be done with it.
- Do not built Qt libraries from source unless, for some specific reason, you must. Valid reasons might include modifying the library itself (bugs or features), building with unusual options or for an unusual target etc. Otherwise, install a pre-built set of Qt library binaries and be done with it.
- Build your projects from their source code using any compatible Qt library (installed above) with, or without, using Qt Creator.
-
j@j-BOHB-WAX9:/$ find / -type f -name qtcreator 2>/dev/null
/home/j/Downloads/qtcreator_build/bin/qtcreator -