Open Dimandragon opened 3 months ago
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive
because the last activity was over 90 days ago. This issue will be closed and archived after 14 additional days without activity.
I tried downloading protobuf c++ releases 3.15.2, 3.16.0 and 3.19.6, and create static library using files listed for libprotobuf and libprotobuf-lite targets (from cmake/libprotobuf-lite.cmake and cmake/libprotobuf.cmake) and adding "src" folder to include path using cmake in my esp-idf project using components api (should give result similar to creating static library)
When i use option optimize_for = LITE_RUNTIME; in the proto file there is no any problems
But withno this option I get the following linker error in all listed versions:
/home/dmitry/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../xtensa-esp32s3-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(wire_format.cc.obj):(.literal._ZN6google8protobuf8internal10WireFormat27_InternalParseAndMergeFieldEPNS0_7MessageEPKcPNS1_12ParseContextEyPKNS0_10ReflectionEPKNS0_15FieldDescriptorE+0x8): undefined reference to
_ZNK6google8protobuf10Reflection28MutableRepeatedFieldInternalIiEEPNS0_13RepeatedFieldIT_EEPNS0_7MessageEPKNS0_15FieldDescriptorE' /home/dmitry/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-es p32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(wire_format.cc.obj):(.literal._ZN6google8protobuf8internal10WireFormat22InternalSerializeFieldEPKNS0_15FieldDescriptorERKNS0_7MessageEPhPNS0_2io19EpsCopyOutputStreamE+0xc): undefined reference to
_ZNK6google8protobuf10Reflection24GetRepeatedFieldInternalIiEERKNS0_13RepeatedFieldIT_EERKNS0_7MessageEPKNS0_15FieldDescriptorE' /home/dmitry/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa- esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(wire_format.cc.obj): in function_ZN6google8protobuf8internal10WireFormat27_InternalParseAndMergeFieldEPNS0_7MessageEPKcPNS1_12ParseContextEyPKNS0_10ReflectionEPKNS0_15FieldDescriptorE': /home/dmitry/projects/smart-glove/components/protobuf/src/google/protobuf/wire_format.cc :862: undefined reference to
_ZNK6google8protobuf10Reflection28MutableRepeatedFieldInternalIiEEPNS0_13RepeatedFieldIT_EEPNS0_7MessageEPKNS0_15FieldDescriptorE' /home/dmitry/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-es p32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/protobuf/libprotobuf.a(wire_format.cc.obj): in function_ZN6google8protobuf2io19EpsCopyOutputStream15UnsafeWriteSizeEmPh': /home/dmitry/projects/smart-glove/components/protobuf/src/google/protobuf/io/coded_stream.h:947: undefined reference to
_ZNK6google8protobuf10Reflection24GetRepeatedFieldInternalI iEERKNS0_13RepeatedFieldIT_EERKNS0_7MessageEPKNS0_15FieldDescriptorE'What could I have missed? There is my cmake file to protobuf component version 3.19.6, for other versions i've used simular to this one, but using SRCS list from cmake/libprotobuf-lite.cmake and cmake/libprotobuf.cmake files of other versions