Skip to content

Unable to build QGIS locally, fatal error: too many errors emitted, stopping now [-ferror-limit=] #60711

Open
@shreyass-ranganatha

Description

What is the bug or the crash?

After executing make -j 12 the task runs up to 26% and fails with

In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayer.cpp:36:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:20:
In file included from /opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/io/coded_stream.h:141:
In file included from /opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/stubs/common.h:46:
In file included from /opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/stubs/port.h:43:
/opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/port_def.inc:92:2: error: PROTOBUF_VERSION was previously defined
   92 | #error PROTOBUF_VERSION was previously defined
      |  ^
/opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/port_def.inc:95:2: error: PROTOBUF_VERSION_SUFFIX was previously defined
   95 | #error PROTOBUF_VERSION_SUFFIX was previously defined
      |  ^
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayerrenderer.cpp:20:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:20:
In file included from /opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/io/coded_stream.h:141:
In file included from /opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/stubs/common.h:46:
In file included from /opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/stubs/port.h:43:
/opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/port_def.inc:92:2: error: PROTOBUF_VERSION was previously defined
   92 | #error PROTOBUF_VERSION was previously defined
      |  ^
/opt/QGIS/qgis-deps-0.9/stage/include/google/protobuf/port_def.inc:95:2: error: PROTOBUF_VERSION_SUFFIX was previously defined
   95 | #error PROTOBUF_VERSION_SUFFIX was previously defined
      |  ^
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayerrenderer.cpp:20:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:23:
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:133:9: error: unknown type name 'PROTOBUF_CC'
  133 | typedef PROTOBUF_CC const char* (*TailCallParseFunc)(PROTOBUF_TC_PARAM_DECL);
      |         ^
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayer.cpp:36:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:23:
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:133:9: error: unknown type name 'PROTOBUF_CC'
  133 | typedef PROTOBUF_CC const char* (*TailCallParseFunc)(PROTOBUF_TC_PARAM_DECL);
      |         ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:133:54: error: unknown type name 'PROTOBUF_TC_PARAM_DECL'
  133 | typedef PROTOBUF_CC const char* (*TailCallParseFunc)(PROTOBUF_TC_PARAM_DECL);
      |                                                      ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:133:54: error: unknown type name 'PROTOBUF_TC_PARAM_DECL'
  133 | typedef PROTOBUF_CC const char* (*TailCallParseFunc)(PROTOBUF_TC_PARAM_DECL);
      |                                                      ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:244:7: error: use of undeclared identifier 'Unreachable'
  244 |       Unreachable();
      |       ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:244:7: error: use of undeclared identifier 'Unreachable'
  244 |       Unreachable();
      |       ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:290:9: error: unknown type name 'ClassData'; did you mean 'QHashData'?
  290 |   const ClassData* class_data;
      |         ^
/opt/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qhash.h:62:22: note: 'QHashData' declared here
   62 | struct Q_CORE_EXPORT QHashData
      |                      ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:290:9: error: unknown type name 'ClassData'; did you mean 'QHashData'?
  290 |   const ClassData* class_data;
      |         ^
/opt/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qhash.h:62:22: note: 'QHashData' declared here
   62 | struct Q_CORE_EXPORT QHashData
      |                      ^
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayerrenderer.cpp:20:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:23:
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:315:36: error: unknown type name 'ClassData'; did you mean 'QHashData'?
  315 |                              const ClassData* class_data,
      |                                    ^
/opt/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qhash.h:62:22: note: 'QHashData' declared here
   62 | struct Q_CORE_EXPORT QHashData
      |                      ^
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayer.cpp:36:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:23:
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:315:36: error: unknown type name 'ClassData'; did you mean 'QHashData'?
  315 |                              const ClassData* class_data,
      |                                    ^
/opt/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qhash.h:62:22: note: 'QHashData' declared here
   62 | struct Q_CORE_EXPORT QHashData
      |                      ^
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayerrenderer.cpp:20:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:23:
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:431:24: error: unknown type name 'LazyEagerVerifyFnType'
  431 |     constexpr FieldAux(LazyEagerVerifyFnType verify_func)
      |                        ^
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayer.cpp:36:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:23:
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:431:24: error: unknown type name 'LazyEagerVerifyFnType'
  431 |     constexpr FieldAux(LazyEagerVerifyFnType verify_func)
      |                        ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:442:5: error: unknown type name 'LazyEagerVerifyFnType'
  442 |     LazyEagerVerifyFnType verify_func;
      |     ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:442:5: error: unknown type name 'LazyEagerVerifyFnType'
  442 |     LazyEagerVerifyFnType verify_func;
      |     ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:477:68: error: no member named 'prototype' in 'QHashData'
  477 |   const MessageLite* default_instance() const { return class_data->prototype; }
      |                                                        ~~~~~~~~~~  ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:477:68: error: no member named 'prototype' in 'QHashData'
  477 |   const MessageLite* default_instance() const { return class_data->prototype; }
      |                                                        ~~~~~~~~~~  ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:548:11: error: unknown type name 'PROTOBUF_CC'
  548 |           PROTOBUF_CC const char* (*func)(T*, const char*, ParseContext*)>
      |           ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:548:11: error: unknown type name 'PROTOBUF_CC'
  548 |           PROTOBUF_CC const char* (*func)(T*, const char*, ParseContext*)>
      |           ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:549:1: error: unknown type name 'PROTOBUF_CC'
  549 | PROTOBUF_CC const char* StubParseImpl(PROTOBUF_TC_PARAM_DECL) {
      | ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:549:1: error: unknown type name 'PROTOBUF_CC'
  549 | PROTOBUF_CC const char* StubParseImpl(PROTOBUF_TC_PARAM_DECL) {
      | ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:549:39: error: unknown type name 'PROTOBUF_TC_PARAM_DECL'
  549 | PROTOBUF_CC const char* StubParseImpl(PROTOBUF_TC_PARAM_DECL) {
      |                                       ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:549:39: error: unknown type name 'PROTOBUF_TC_PARAM_DECL'
  549 | PROTOBUF_CC const char* StubParseImpl(PROTOBUF_TC_PARAM_DECL) {
      |                                       ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:550:31: error: use of undeclared identifier 'msg'
  550 |   return func(static_cast<T*>(msg), ptr, ctx);
      |                               ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:550:37: error: use of undeclared identifier 'ptr'
  550 |   return func(static_cast<T*>(msg), ptr, ctx);
      |                                     ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:550:42: error: use of undeclared identifier 'ctx'
  550 |   return func(static_cast<T*>(msg), ptr, ctx);
      |                                          ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:550:31: error: use of undeclared identifier 'msg'
  550 |   return func(static_cast<T*>(msg), ptr, ctx);
      |                               ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:550:37: error: use of undeclared identifier 'ptr'
  550 |   return func(static_cast<T*>(msg), ptr, ctx);
      |                                     ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:550:42: error: use of undeclared identifier 'ctx'
  550 |   return func(static_cast<T*>(msg), ptr, ctx);
      |                                          ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:554:11: error: unknown type name 'PROTOBUF_CC'
  554 |           PROTOBUF_CC const char* (*func)(T*, const char*, ParseContext*)>
      |           ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:554:11: error: unknown type name 'PROTOBUF_CC'
  554 |           PROTOBUF_CC const char* (*func)(T*, const char*, ParseContext*)>
      |           ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:556:11: error: unknown type name 'ClassData'; did you mean 'QHashData'?
  556 |     const ClassData* class_data,
      |           ^
/opt/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qhash.h:62:22: note: 'QHashData' declared here
   62 | struct Q_CORE_EXPORT QHashData
      |                      ^
/opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:556:11: error: unknown type name 'ClassData'; did you mean 'QHashData'?
  556 |     const ClassData* class_data,
      |           ^
/opt/Qt/5.15.2/clang_64/lib/QtCore.framework/Headers/qhash.h:62:22: note: 'QHashData' declared here
   62 | struct Q_CORE_EXPORT QHashData
      |                      ^
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayerrenderer.cpp:20:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
/Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:101:16: error: expected ';' at end of declaration list
  101 |   ~Tile_Value() PROTOBUF_FINAL;
      |                ^
      |                ;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilelayer.cpp:36:
In file included from /Users/shreyas/Developer/GitHub/QGIS_DEV/QGIS/src/core/vectortile/qgsvectortilemvtdecoder.h:26:
/Users/shreyas/Developer/GitHub/QGIS_DEV/build/src/core/vector_tile.pb.h:101:16: error: expected ';' at end of declaration list
  101 |   ~Tile_Value() PROTOBUF_FINAL;
      |                ^
      |                ;
fatal error: too many errors emitted, stopping now [-ferror-limit=]

Steps to reproduce the issue

Pulled the latest commit and followed the instructions from https://github.com/qgis/QGIS/blob/release-3_34/INSTALL.md#5-building-on-macos-x

Everything works fine until make -j 12

I'm on commit 69ec6ca

Versions

Apple Silicon but I'm building for x86_64 by prepending all commands with arch x86_64 and using installing brew for the same.

I was not able to build for Apple Silicon (tried everything)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!Build/InstallRelated to compiling or installing QGISmacOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions