Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fail with Qt 5.15.2 at linux #258

Open
dmitry-aka-jok opened this issue Dec 30, 2021 · 1 comment
Open

Build fail with Qt 5.15.2 at linux #258

dmitry-aka-jok opened this issue Dec 30, 2021 · 1 comment
Assignees
Labels
bug Something isn't working protobuf QtProtobuf related issues
Projects

Comments

@dmitry-aka-jok
Copy link

dmitry-aka-jok commented Dec 30, 2021

In file included from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqml.h:43,
                 from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlengine.h:47,
                 from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/QQmlEngine:1,
                 from /home/joker/Git/qtprotobuf/src/protobuf/qqmllistpropertyconstructor.h:29,
                 from /home/joker/Git/qtprotobuf/build/include/Protobuf/QQmlListPropertyConstructor:1,
                 from /home/joker/Git/qtprotobuf/build/src/wellknowntypes/generated/google/protobuf/empty.qpb.h:16,
                 from /home/joker/Git/qtprotobuf/build/src/wellknowntypes/generated/google/protobuf/empty.qpb.cpp:3:
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h: В функции «void QQmlPrivate::createInto(void*) [with T = google::protobuf::Empty]»:
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h:166:37: ошибка: «static void QQmlPrivate::QQmlElement<T>::operator delete(void*, void*) [with T = google::protobuf::Empty]» called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
  166 |     void createInto(void *memory) { new (memory) QQmlElement<T>; }
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h:166:37: замечание: returned from «void* operator new(std::size_t, void*)»
In file included from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqml.h:43,
                 from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlengine.h:47,
                 from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/QQmlEngine:1,
                 from /home/joker/Git/qtprotobuf/src/protobuf/qqmllistpropertyconstructor.h:29,
                 from /home/joker/Git/qtprotobuf/build/include/Protobuf/QQmlListPropertyConstructor:1,
                 from /home/joker/Git/qtprotobuf/build/src/wellknowntypes/generated/google/protobuf/source_context.qpb.h:16,
                 from /home/joker/Git/qtprotobuf/build/src/wellknowntypes/generated/google/protobuf/source_context.qpb.cpp:3:
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h: В функции «void QQmlPrivate::createInto(void*) [with T = google::protobuf::SourceContext]»:
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h:166:37: ошибка: «static void QQmlPrivate::QQmlElement<T>::operator delete(void*, void*) [with T = google::protobuf::SourceContext]» called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
  166 |     void createInto(void *memory) { new (memory) QQmlElement<T>; }
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h:166:37: замечание: returned from «void* operator new(std::size_t, void*)»
In file included from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqml.h:43,
                 from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlengine.h:47,
                 from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/QQmlEngine:1,
                 from /home/joker/Git/qtprotobuf/src/protobuf/qqmllistpropertyconstructor.h:29,
                 from /home/joker/Git/qtprotobuf/build/include/Protobuf/QQmlListPropertyConstructor:1,
                 from /home/joker/Git/qtprotobuf/build/src/wellknowntypes/generated/google/protobuf/any.qpb.h:16,
                 from /home/joker/Git/qtprotobuf/build/src/wellknowntypes/generated/google/protobuf/any.qpb.cpp:3:
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h: В функции «void QQmlPrivate::createInto(void*) [with T = google::protobuf::Any]»:
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h:166:37: ошибка: «static void QQmlPrivate::QQmlElement<T>::operator delete(void*, void*) [with T = google::protobuf::Any]» called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
  166 |     void createInto(void *memory) { new (memory) QQmlElement<T>; }
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h:166:37: замечание: returned from «void* operator new(std::size_t, void*)»
In file included from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqml.h:43,
                 from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlengine.h:47,
                 from /home/joker/Qt/5.15.2/gcc_64/include/QtQml/QQmlEngine:1,
                 from /home/joker/Git/qtprotobuf/src/protobuf/qqmllistpropertyconstructor.h:29,
                 from /home/joker/Git/qtprotobuf/build/include/Protobuf/QQmlListPropertyConstructor:1,
                 from /home/joker/Git/qtprotobuf/build/src/wellknowntypes/generated/google/protobuf/duration.qpb.h:16,
                 from /home/joker/Git/qtprotobuf/build/src/wellknowntypes/generated/google/protobuf/duration.qpb.cpp:3:
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h: В функции «void QQmlPrivate::createInto(void*) [with T = google::protobuf::Duration]»:
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h:166:37: ошибка: «static void QQmlPrivate::QQmlElement<T>::operator delete(void*, void*) [with T = google::protobuf::Duration]» called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
  166 |     void createInto(void *memory) { new (memory) QQmlElement<T>; }
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joker/Qt/5.15.2/gcc_64/include/QtQml/qqmlprivate.h:166:37: замечание: returned from «void* operator new(std::size_t, void*)»
cc1plus: все предупреждения считаются ошибками
make[2]: *** [src/wellknowntypes/CMakeFiles/empty.dir/build.make:102: src/wellknowntypes/CMakeFiles/empty.dir/generated/google/protobuf/empty.qpb.cpp.o] Ошибка 1
make[1]: *** [CMakeFiles/Makefile2:4931: src/wellknowntypes/CMakeFiles/empty.dir/all] Ошибка 2
make[1]: *** Ожидание завершения заданий…
[ 92%] Building CXX object src/wellknowntypes/CMakeFiles/duration.dir/generated/google/protobuf/moc_duration.qpb.cpp.o
cc1plus: все предупреждения считаются ошибками
make[2]: *** [src/wellknowntypes/CMakeFiles/source_context.dir/build.make:102: src/wellknowntypes/CMakeFiles/source_context.dir/generated/google/protobuf/source_context.qpb.cpp.o] Ошибка 1
make[1]: *** [CMakeFiles/Makefile2:5043: src/wellknowntypes/CMakeFiles/source_context.dir/all] Ошибка 2
[ 92%] Building CXX object src/wellknowntypes/CMakeFiles/any.dir/generated/google/protobuf/moc_any.qpb.cpp.o
cc1plus: все предупреждения считаются ошибками
cc1plus: все предупреждения считаются ошибками
make[2]: *** [src/wellknowntypes/CMakeFiles/duration.dir/build.make:102: src/wellknowntypes/CMakeFiles/duration.dir/generated/google/protobuf/duration.qpb.cpp.o] Ошибка 1
make[2]: *** Ожидание завершения заданий…
make[2]: *** [src/wellknowntypes/CMakeFiles/any.dir/build.make:102: src/wellknowntypes/CMakeFiles/any.dir/generated/google/protobuf/any.qpb.cpp.o] Ошибка 1
make[2]: *** Ожидание завершения заданий…
make[1]: *** [CMakeFiles/Makefile2:4875: src/wellknowntypes/CMakeFiles/duration.dir/all] Ошибка 2
make[1]: *** [CMakeFiles/Makefile2:4819: src/wellknowntypes/CMakeFiles/any.dir/all] Ошибка 2
make: *** [Makefile:156: all] Ошибка 2

To Reproduce
Build by "All-in-one build"
cmake .. -DCMAKE_PREFIX_PATH=/home/joker/Qt/5.15.2/gcc_64/lib/cmake -DQT_PROTOBUF_MAKE_TESTS=false -DQT_PROTOBUF_MAKE_EXAMPLES=false -DBUILD_SHARED_LIBS=true

Environment:

  • OS: arch linux
  • Version: 0.6.0
  • gcc (GCC) 11.1.0
@dmitry-aka-jok dmitry-aka-jok added the bug Something isn't working label Dec 30, 2021
@semlanik semlanik added this to ToDo in Qt Protobuf via automation Jan 3, 2022
@semlanik semlanik added the protobuf QtProtobuf related issues label Jan 3, 2022
@semlanik
Copy link
Owner

semlanik commented Jan 3, 2022

I tested the build using 5.15.2 with built-in and external protobuf locally and it works. What version of protobuf, grpc and QtProtobuf you use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working protobuf QtProtobuf related issues
Projects
Qt Protobuf
  
ToDo
Development

No branches or pull requests

2 participants