I am trying to compile qtbase recipe with CFLAGS and LDFLAGS in yocto-project. I have added the following lines in qtbase recipe.
CFLAGS and CPPFLAGS are used to add instrumentation of code to find the code coverage.
CFLAGS += "-fprofile-arcs -ftest-coverage"
CPPFLAGS += "-fprofile-arcs -ftest-coverage"
LDFLAGS are used for linking.
LDFLAGS += "-lgcov --coverage"
please find link to log file : https://drive.google.com/open?id=1tmVd7C2IHgOUZKdId-Xl0zFRfKwjYPut
Error Snippet
/scratch/work/sysdk/dksys/build/tmp/work/core2-64-mel-linux/qtbase/5.6.3+gitAUTOINC+e6f8b072d2-r0/recipe-sysroot-native/usr/bin/x86_64-mel-linux/../../libexec/x86_64-mel-linux/gcc/x86_64-mel-linux/7.3.0/ld.gold: internal error in override_version, at ../../gold/resolve.cc:61<br>
collect2: error: ld returned 1 exit status<br>
Makefile.eglfs_device_lib:146: recipe for target '../../../../lib/libQt5EglDeviceIntegration.so.5.6.3' failed<br>
make[5]: [../../../../lib/libQt5EglDeviceIntegration.so.5.6.3] Error 1
make[5]: Leaving directory '/scratch/work/sysdk/dksys/build/tmp/work/core2-64-mel-linux/qtbase/5.6.3+gitAUTOINC+e6f8b072d2-r0/build/src/plugins/platforms/eglfs'
Makefile:42: recipe for target 'sub-eglfs_device_lib-pro-make_first-ordered' failed
make[4]: *** [sub-eglfs_device_lib-pro-make_first-ordered] Error 2
make[4]: Leaving directory '/scratch/work/sysdk/dksys/build/tmp/work/core2-64-mel-linux/qtbase/5.6.3+gitAUTOINC+e6f8b072d2-r0/build/src/plugins/platforms/eglfs'
Makefile:96: recipe for target 'sub-eglfs-make_first' failed
make[3]:[sub-eglfs-make_first] Error 2
make[3]:Waiting for unfinished jobs....
After a lot of research, I am able to find an answer to my question. I have to add the following line in recipe to remove gold linker.
QT_CONFIG_FLAGS += " -no-use-gold-linker"
Related
The command (cia cmd.exe) in Windows 10
configure -release -opensource -confirm-license -prefix C:\Qt\6.1.3\Build
went through without problems, but now I get the following error message with
make -j8
I always get the following error message and it aborts.
make[1]: *** [qtbase/src/tools/androiddeployqt/CMakeFiles/androiddeployqt.dir/all] Error 2
[ 15%] Linking CXX static library ......\lib\libQt6DeviceDiscoverySupport.a
Generating version linker script
[ 15%] Built target DeviceDiscoverySupport
Makefile:144: recipe for target 'all' failed
make: *** [all] Error 2
Thank you, I will do from now on.
Have here times a little of the error message which occurred before with attached, vlt. can someone with it what begin and help me.
C:/Qt/6.1.3/Src/qtbase/src/corelib/text/qstringconverter.h:189:87: internal compiler error: in make_rtl_for_nonlocal_decl, at cp/decl.c:6590
Q_CORE_EXPORT static const Interface encodingInterfaces[Encoding::LastEncoding + 1];
^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/mingw-w64> for instructions.
qtbase\src\tools\androiddeployqt\CMakeFiles\androiddeployqt.dir\build.make:90: recipe for target 'qtbase/src/tools/androiddeployqt/CMakeFiles/androiddeployqt.dir/main.cpp.obj' failed
make[2]: *** [qtbase/src/tools/androiddeployqt/CMakeFiles/androiddeployqt.dir/main.cpp.obj] Error 1
CMakeFiles\Makefile2:12798: recipe for target 'qtbase/src/tools/androiddeployqt/CMakeFiles/androiddeployqt.dir/all' failed
make[1]: *** [qtbase/src/tools/androiddeployqt/CMakeFiles/androiddeployqt.dir/all] Error 2
[ 15%] Linking CXX static library ..\..\..\lib\libQt6DeviceDiscoverySupport.a
Generating version linker script
[ 15%] Built target DeviceDiscoverySupport
Makefile:144: recipe for target 'all' failed
make: *** [all] Error 2
I am getting the following error in building qtsampleplayer:
ubuntu#ubuntu:~/Libdash/libdash/libdash/qtsampleplayer/build$ make
[ 3%] Automoc for target qtsampleplayer
[ 3%] Built target qtsampleplayer_automoc
Linking CXX executable qtsampleplayer
i386-linux-gnu/libQt5Gui.so.5.2.1:undefined reference to symbol 'inflateInit2_'
/libz.so.1:error adding symbols:DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [qtsampleplayer] Error 1
make[1]: *** [CMakeFiles/qtsampleplayer.dir/all] Error 2
make: *** [all] Error 2
Tried several options like giving path of libz.so in command line but no help
Regards
Mayank
collect2: error: ld returned 1 exit status that means basically that something before went wrong.
/libz.so.1:error adding symbols:DSO missing from command linethat means that he is not finding DSO so you have not included correctly the libz.so BUT before it says: i386-linux-gnu/libQt5Gui.so.5.2.1:undefined reference to symbol 'inflateInit2_' So your problem is not in libz.so, it can be in libQt5Gui .
Do you really have both libraries where your project is looking? Seems the program is not finding them
I have Hello World app that consists mainwindow.h, mainwindow.cpp, main.cpp and also mainwindow.ui. When I try to compile it, I receive following error messages:
E:\Qt\5.2.1\msvc2012_64_opengl\bin\uic.exe mainwindow.ui -o ui_mainwindow.h
Makefile.Debug:226: recipe for target 'ui_mainwindow.h' failed
mingw32-make[1]: *** [ui_mainwindow.h] Error -1073741515
mingw32-make[1]: Leaving directory 'E:/Qt/workspace/Run'
Makefile:34: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2.
So I suppose ui_mainwindow.h is generated, but compiler can't find it at next step.
How can fix it?
The same problem was fixed (http://www.prog.org.ru/topic_27434_0.html). It seems no ICU DLLs in your bin dir.
(Change pathes for yours).
copy C:\icu\bin*.dll C:\Qt\Qt5.7.0n\bin\
I am trying to compile qt with dbus but it gives me the following exception. I have installed the dbus version 1.3 in the system and I am using the following configure command.
Can someone point me as to what should be done.
configure -dbus -I/usr/include/dbus-1.0 -L/usr/local/dbus/lib -ldbus-1 -fast -prefix /home/thwijeth/Software/qt-4.8.1-com-debug -v
thank you in advance.
qdbus_symbols_p.h:39: fatal error: dbus/dbus.h: No such file or directory
compilation terminated.
In file included from qdbusconnection_p.h:51,
from qdbusconnection.cpp:33:
qdbus_symbols_p.h:39: fatal error: dbus/dbus.h: No such file or directory
compilation terminated.
make[1]: *** [qdbuserror.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [qdbusconnection.o] Error 1
In file included from qdbusconnectioninterface.cpp:33:
qdbus_symbols_p.h:39: fatal error: dbus/dbus.h: No such file or directory
compilation terminated.
make[1]: *** [qdbusconnectioninterface.o] Error 1
In file included from qdbusconnection_p.h:51,
from qdbusintegrator.cpp:33:
qdbus_symbols_p.h:39: fatal error: dbus/dbus.h: No such file or directory
compilation terminated.
make[1]: *** [qdbusintegrator.o] Error 1
make[1]: Leaving directory `/home/thwijeth/Software/qt-repo/qt-4.8.1-src/src/dbus'
make: *** [sub-dbus-make_default-ordered] Error 2
verify if /usr/include/dbus-1.0 contains a dbus directory, if it does not, verify whether /usr/include/dbus-1.0 contains dbus.h, if so you need to create a symbolic link to dbus-1.0 as dbus
ln -s dbus-1.0 /usr/include/dbus
and then try to rerun configure.
This solution worked fine for me for this missing header. However, I got then a different error fatal error: dbus/dbus-arch-deps.h: No such file. I worked around this error by copying this file from /usr/lib/x86_64-linux-gnu/dbus-1.0/include/dbus to /usr/include/dbus-1.0/dbus/. I don't know why this header was not in the /usr/include directory from the beginning. But this is my hack to the problem.
Regards
I'm trying to use a QGLWidget in a QT application, and I've added the "QT += opengl" line into the .pro file but I am now getting :: error: collect2: ld returned 1 exit status when I attempt to compile my program
the compile output shows the following,
Running build steps for project MapEditor...
Configuration unchanged, skipping qmake step.
Starting: "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" -w
mingw32-make: Entering directory `C:/Qt/2010.05/MapEditor-build-desktop'
C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/2010.05/MapEditor-build-desktop'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\MapEditor.exe debug/Main.o debug/window.o debug/glwidget.o debug/moc_window.o debug/moc_glwidget.o -L"c:\Qt\2010.05\qt\lib" -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -lqtmaind -lQtOpenGLd4 -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory `C:/Qt/2010.05/MapEditor-build-desktop'
mingw32-make: Leaving directory `C:/Qt/2010.05/MapEditor-build-desktop'
debug/moc_glwidget.o:moc_glwidget.cpp:(.rdata$_ZTV8GLWidget[vtable for GLWidget]+0x14): undefined reference to `GLWidget::~GLWidget()'
debug/moc_glwidget.o:moc_glwidget.cpp:(.rdata$_ZTV8GLWidget[vtable for GLWidget]+0x18): undefined reference to `GLWidget::~GLWidget()'
debug/moc_glwidget.o:moc_glwidget.cpp:(.rdata$_ZTV8GLWidget[vtable for GLWidget]+0x118): undefined reference to `non-virtual thunk to GLWidget::~GLWidget()'
debug/moc_glwidget.o:moc_glwidget.cpp:(.rdata$_ZTV8GLWidget[vtable for GLWidget]+0x11c): undefined reference to `non-virtual thunk to GLWidget::~GLWidget()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\MapEditor.exe] Error 1
mingw32-make: *** [debug] Error 2
The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited with code %2.
Error while building project MapEditor (target: Desktop)
When executing build step 'Make'
and my .pro file contains the following,
TARGET = MapEditor
TEMPLATE =app
QT += opengl
SOURCES += \
Main.cpp \
window.cpp \
glwidget.cpp
HEADERS += \
window.h \
glwidget.h
Check you .pro file (i.e. project file) that u have added all the class files and header files in SOURCES and HEADERS tags.[For this purpose run qmake command from build menubar options]
Also check that u have declared the Q_OBJECT macro in the starting of your glwidget class.
It looks like some file is missing. Did you add this to your header?
#include <QtOpenGL>