qitab / cl-protobufs

Common Lisp protocol buffer implementation.
MIT License
78 stars 17 forks source link

how to build on mac M1 #362

Closed jidibinlin closed 2 years ago

jidibinlin commented 2 years ago

I tryed to build protoc-gen-cl-pb on mac m1 but got this error

❯ PROTOC_ROOT=/opt/homebrew/Cellar/protobuf/21.3 make g++ enum.o field.o file.o generator.o literals.o message.o names.o service.o proto2-descriptor-extensions.o main.o -o protoc-gen-cl-pb -Wl,-L/opt/homebrew/Cellar/protobuf/21.3/lib -Wl,-rpath -Wl,/opt/homebrew/Cellar/protobuf/21.3/lib -lprotoc -lprotobuf -pthread Undefined symbols for architecture arm64: "google::protobuf::internal::ExtensionSet::RegisterExtension(google::protobuf::MessageLite const*, int, unsigned char, bool, bool)", referenced from: void google::protobuf::internal::StringTypeTraits::Register<google::protobuf::FileOptions>(int, unsigned char, bool) in proto2-descriptor-extensions.o void google::protobuf::internal::StringTypeTraits::Register<google::protobuf::MessageOptions>(int, unsigned char, bool) in proto2-descriptor-extensions.o void google::protobuf::internal::StringTypeTraits::Register<google::protobuf::FieldOptions>(int, unsigned char, bool) in proto2-descriptor-extensions.o "google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::Arena*)", referenced from: google::protobuf::io::AnnotationProtoCollector<google::protobuf::GeneratedCodeInfo>::AddAnnotation(unsigned long, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<int, std::__1::allocator<int> > const&) in generator.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:29: protoc-gen-cl-pb] Error 1

jidibinlin commented 2 years ago

my fault! I should make clean first