e-fever / e-fever-codebase

A Collection of Project Wizard for Qt Creator
Apache License 2.0
19 stars 5 forks source link

Error compiling SIGSEV #1

Open williamkibira opened 6 years ago

williamkibira commented 6 years ago

Hello. I am having a bit of trouble trying to build with the base template projects for both minimal and full QMLFlux templates main.cpp:25: error: ‘SIGSEGV’ was not declared in thil wit s scope signal(SIGSEGV, handleBacktrace); ^

How can i deal with this issue ? I am using Qt 5.10 on Ubuntu 16.04 LTS

benlau commented 6 years ago

Thanks for reporting the bug.

I have missed to include in unit test. You may fix it by adding #include <signal.h> in your unit tests, or install the latest version of this code base..

Reference:

https://github.com/e-fever/e-fever-codebase/commit/29e0f42608555aae0665e9c4c94e988acaea1074#diff-4cde1200f7ba1579a39deae3475064d9

williamkibira commented 6 years ago

Sorry for troubling you but, after adding the I get this error


../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:
In function ‘const QQmlType* findQmlType(const QMetaObject*, bool)’:

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:110:15:
error: no match for ‘operator=’ (operand types are ‘QList<QQmlType*>’ and
‘QList<QQmlType>’)

types = QQmlMetaType::qmlAllTypes();

^

In file included from
/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qhash.h:46:0,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qdebug.h:45,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/QDebug:1,

from
../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:1:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:500:29: note:
candidate: QList<T>& QList<T>::operator=(const QList<T>&) [with T =
QQmlType*]

Q_INLINE_TEMPLATE QList<T> &QList<T>::operator=(const QList<T> &l)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:500:29: note:
no known conversion for argument 1 from ‘QList<QQmlType>’ to ‘const
QList<QQmlType*>&’

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:158:19: note:
candidate: QList<T>& QList<T>::operator=(QList<T>&&) [with T = QQmlType*]

inline QList &operator=(QList<T> &&other) Q_DECL_NOTHROW

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:158:19: note:
no known conversion for argument 1 from ‘QList<QQmlType>’ to
‘QList<QQmlType*>&&’

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:112:15:
error: no match for ‘operator=’ (operand types are ‘QList<QQmlType*>’ and
‘QList<QQmlType>’)

types = QQmlMetaType::qmlTypes();

^

In file included from
/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qhash.h:46:0,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qdebug.h:45,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/QDebug:1,

from
../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:1:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:500:29: note:
candidate: QList<T>& QList<T>::operator=(const QList<T>&) [with T =
QQmlType*]

Q_INLINE_TEMPLATE QList<T> &QList<T>::operator=(const QList<T> &l)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:500:29: note:
no known conversion for argument 1 from ‘QList<QQmlType>’ to ‘const
QList<QQmlType*>&’

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:158:19: note:
candidate: QList<T>& QList<T>::operator=(QList<T>&&) [with T = QQmlType*]

inline QList &operator=(QList<T> &&other) Q_DECL_NOTHROW

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:158:19: note:
no known conversion for argument 1 from ‘QList<QQmlType>’ to
‘QList<QQmlType*>&&’

In file included from
/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qalgorithms.h:43:0,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qdebug.h:44,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/QDebug:1,

from
../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:1:

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:
In function ‘bool isPublicComponent(const QMetaObject*)’:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:996:34:
error: cannot convert ‘const QQmlType’ to ‘const QQmlType*’ in
initialization

for (variable = *_container_.i; _container_.control; _container_.control =
0)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:1004:21:
note: in expansion of macro ‘Q_FOREACH’

# define foreach Q_FOREACH

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:129:5:
note: in expansion of macro ‘foreach’

foreach (const QQmlType *ty, QQmlMetaType::qmlTypes()) {

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:
In function ‘QString
SnapshotTesting::Private::classNameToComponentName(const QString&)’:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:996:34:
error: cannot convert ‘const QQmlType’ to ‘const QQmlType*’ in
initialization

for (variable = *_container_.i; _container_.control; _container_.control =
0)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:1004:21:
note: in expansion of macro ‘Q_FOREACH’

# define foreach Q_FOREACH

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:159:5:
note: in expansion of macro ‘foreach’

foreach (const QQmlType *ty, QQmlMetaType::qmlTypes()) {

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:
In function ‘QString SnapshotTesting::Private::obtainQmlPackage(QObject*)’:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:996:34:
error: cannot convert ‘const QQmlType’ to ‘const QQmlType*’ in
initialization

for (variable = *_container_.i; _container_.control; _container_.control =
0)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:1004:21:
note: in expansion of macro ‘Q_FOREACH’

# define foreach Q_FOREACH

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:1233:5:
note: in expansion of macro ‘foreach’

foreach (const QQmlType *ty, QQmlMetaType::qmlAllTypes()) {

^

Makefile:4286: recipe for target 'snapshottesting.o' failed

make[1]: Leaving directory
'/home/william/Projects/QT/fever/build-flex-Desktop_Qt_5_10_0_GCC_64bit-Debug/tests/unittests'

make[1]: *** [snapshottesting.o] Error 1

make: *** [sub-tests-unittests-make_first-ordered] Error 2

Makefile:88: recipe for target 'sub-tests-unittests-make_first-ordered'
failed

23:22:27: The process "/usr/bin/make" exited with code 2.

Error while building/deploying project flex (kit: Desktop Qt 5.10.0 GCC
64bit)

When executing step "Make"

23:22:27: Elapsed time: 01:54.

I added the templates to this location $HOME/Qt5.10.0/Tools/QtCreator/share/qtcreator/templates/wizards/projects/ I am using Xubuntu 16.04 and Qt 5.10

On Thu, Feb 8, 2018 at 7:07 AM, Ben Lau notifications@github.com wrote:

Thanks for reporting the bug.

I have missed to include in unit test. You may fix it by adding #include

in your unit tests, or install the latest version of this code base.. Reference: 29e0f42#diff-4cde1200f7ba1579a39deae3475064d9 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or mute the thread .
williamkibira commented 6 years ago

Found another error in the Minimal template /home/william/Projects/QT/rock/fate/appview.cpp:2: error: QFAppDispatcher: No such file or directory

On Thu, Feb 8, 2018 at 11:26 PM, William Kibira williamkibira@gmail.com wrote:

Sorry for troubling you but, after adding the I get this error


../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:
In function ‘const QQmlType* findQmlType(const QMetaObject*, bool)’:

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:110:15:
error: no match for ‘operator=’ (operand types are ‘QList<QQmlType*>’ and
‘QList<QQmlType>’)

types = QQmlMetaType::qmlAllTypes();

^

In file included from /home/william/Qt5.10.0/5.10.0/
gcc_64/include/QtCore/qhash.h:46:0,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qdebug.h:45,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/QDebug:1,

from ../../../flex/tests/unittests/vendor/net/efever/snapshottesting/
snapshottesting.cpp:1:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:500:29: note:
candidate: QList<T>& QList<T>::operator=(const QList<T>&) [with T =
QQmlType*]

Q_INLINE_TEMPLATE QList<T> &QList<T>::operator=(const QList<T> &l)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:500:29: note:
no known conversion for argument 1 from ‘QList<QQmlType>’ to ‘const
QList<QQmlType*>&’

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:158:19: note:
candidate: QList<T>& QList<T>::operator=(QList<T>&&) [with T = QQmlType*]

inline QList &operator=(QList<T> &&other) Q_DECL_NOTHROW

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:158:19: note:
no known conversion for argument 1 from ‘QList<QQmlType>’ to
‘QList<QQmlType*>&&’

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:112:15:
error: no match for ‘operator=’ (operand types are ‘QList<QQmlType*>’ and
‘QList<QQmlType>’)

types = QQmlMetaType::qmlTypes();

^

In file included from /home/william/Qt5.10.0/5.10.0/
gcc_64/include/QtCore/qhash.h:46:0,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qdebug.h:45,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/QDebug:1,

from ../../../flex/tests/unittests/vendor/net/efever/snapshottesting/
snapshottesting.cpp:1:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:500:29: note:
candidate: QList<T>& QList<T>::operator=(const QList<T>&) [with T =
QQmlType*]

Q_INLINE_TEMPLATE QList<T> &QList<T>::operator=(const QList<T> &l)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:500:29: note:
no known conversion for argument 1 from ‘QList<QQmlType>’ to ‘const
QList<QQmlType*>&’

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:158:19: note:
candidate: QList<T>& QList<T>::operator=(QList<T>&&) [with T = QQmlType*]

inline QList &operator=(QList<T> &&other) Q_DECL_NOTHROW

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qlist.h:158:19: note:
no known conversion for argument 1 from ‘QList<QQmlType>’ to
‘QList<QQmlType*>&&’

In file included from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/
qalgorithms.h:43:0,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qdebug.h:44,

from /home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/QDebug:1,

from ../../../flex/tests/unittests/vendor/net/efever/snapshottesting/
snapshottesting.cpp:1:

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:
In function ‘bool isPublicComponent(const QMetaObject*)’:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:996:34:
error: cannot convert ‘const QQmlType’ to ‘const QQmlType*’ in
initialization

for (variable = *_container_.i; _container_.control; _container_.control =
0)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:1004:21:
note: in expansion of macro ‘Q_FOREACH’

# define foreach Q_FOREACH

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:129:5:
note: in expansion of macro ‘foreach’

foreach (const QQmlType *ty, QQmlMetaType::qmlTypes()) {

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:
In function ‘QString SnapshotTesting::Private::classNameToComponentName(const
QString&)’:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:996:34:
error: cannot convert ‘const QQmlType’ to ‘const QQmlType*’ in
initialization

for (variable = *_container_.i; _container_.control; _container_.control =
0)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:1004:21:
note: in expansion of macro ‘Q_FOREACH’

# define foreach Q_FOREACH

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:159:5:
note: in expansion of macro ‘foreach’

foreach (const QQmlType *ty, QQmlMetaType::qmlTypes()) {

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:
In function ‘QString SnapshotTesting::Private::
obtainQmlPackage(QObject*)’:

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:996:34:
error: cannot convert ‘const QQmlType’ to ‘const QQmlType*’ in
initialization

for (variable = *_container_.i; _container_.control; _container_.control =
0)

^

/home/william/Qt5.10.0/5.10.0/gcc_64/include/QtCore/qglobal.h:1004:21:
note: in expansion of macro ‘Q_FOREACH’

# define foreach Q_FOREACH

^

../../../flex/tests/unittests/vendor/net/efever/snapshottesting/snapshottesting.cpp:1233:5:
note: in expansion of macro ‘foreach’

foreach (const QQmlType *ty, QQmlMetaType::qmlAllTypes()) {

^

Makefile:4286: recipe for target 'snapshottesting.o' failed

make[1]: Leaving directory '/home/william/Projects/QT/
fever/build-flex-Desktop_Qt_5_10_0_GCC_64bit-Debug/tests/unittests'

make[1]: *** [snapshottesting.o] Error 1

make: *** [sub-tests-unittests-make_first-ordered] Error 2

Makefile:88: recipe for target 'sub-tests-unittests-make_first-ordered'
failed

23:22:27: The process "/usr/bin/make" exited with code 2.

Error while building/deploying project flex (kit: Desktop Qt 5.10.0 GCC
64bit)

When executing step "Make"

23:22:27: Elapsed time: 01:54.

I added the templates to this location $HOME/Qt5.10.0/Tools/ QtCreator/share/qtcreator/templates/wizards/projects/ I am using Xubuntu 16.04 and Qt 5.10

On Thu, Feb 8, 2018 at 7:07 AM, Ben Lau notifications@github.com wrote:

Thanks for reporting the bug.

I have missed to include in unit test. You may fix it by adding #include in your unit tests, or install the latest version of this code base..

Reference:

29e0f42#diff-4cde1200f7ba1579a39deae3475064d9 https://github.com/e-fever/e-fever-codebase/commit/29e0f42608555aae0665e9c4c94e988acaea1074#diff-4cde1200f7ba1579a39deae3475064d9

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/e-fever/e-fever-codebase/issues/1#issuecomment-363996503, or mute the thread https://github.com/notifications/unsubscribe-auth/ACExCwmEZ7x3ffb02vNDAW6qND4kXtCyks5tSnMGgaJpZM4R9cf_ .

benlau commented 6 years ago

The SnapshotTesting used by the template is a bit old. It don't work with Qt 5.10 and that is why the compilation is failed.

You may run qpm install net.efever.snapshottesting in tests/unittests to upgrade to the latest version. Or simply remove it from the unit tests.

For the problem of missing QFAppDispatcher, it is because the package is not installed. You may fix it by running qpm install to obtain the source.

p.s Those problems should be fixed by latest template.