Open kevin-meng opened 9 months ago
check your protoc version.
I found two versions installed in my m3.
The new version should be placed before the old one in PATH.
Use the following command to find versions installed.
which -a protoc
it turely have two version protoc in my pc
╰─ which -a protoc ─╯
/Users/kevin/anaconda3/bin/protoc
/opt/homebrew/bin/protoc
and i rename the first version
mv /Users/kevin/anaconda3/bin/protoc /Users/kevin/anaconda3/bin/protoc1
but not success
and the errror and log as below /:sad
google::protobuf::internal::KeyMapBase<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::FindHelper(std::__1::basic_string_view<char, std::__1::char_traits<char>>, absl::lts_20230802::container_internal::btree_iterator<absl::lts_20230802::container_internal::btree_node<absl::lts_20230802::container_internal::map_params<google::protobuf::internal::VariantKey, google::protobuf::internal::NodeBase*, std::__1::less<google::protobuf::internal::VariantKey>, google::protobuf::internal::MapAllocator<std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>>, 256, false>>, std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>&, std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>*>*) const in libhw_grpc_proto.a[3](backend.pb.cc.o)
google::protobuf::internal::ZeroFieldsBase::GetClassData() const, referenced from:
vtable for backend::HealthMessage in libhw_grpc_proto.a[3](backend.pb.cc.o)
google::protobuf::internal::TaggedStringPtr::ForceCopy(google::protobuf::Arena*) const, referenced from:
backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o)
backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o)
backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o)
backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o)
backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o)
backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o)
backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o)
backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o)
...
clang: error: linker command failed with exit code 1 (use -v to see invocation)
it turely have two version protoc in my pc
╰─ which -a protoc ─╯ /Users/kevin/anaconda3/bin/protoc /opt/homebrew/bin/protoc
and i rename the first version
mv /Users/kevin/anaconda3/bin/protoc /Users/kevin/anaconda3/bin/protoc1
but not success
and the errror and log as below /:sad
google::protobuf::internal::KeyMapBase<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::FindHelper(std::__1::basic_string_view<char, std::__1::char_traits<char>>, absl::lts_20230802::container_internal::btree_iterator<absl::lts_20230802::container_internal::btree_node<absl::lts_20230802::container_internal::map_params<google::protobuf::internal::VariantKey, google::protobuf::internal::NodeBase*, std::__1::less<google::protobuf::internal::VariantKey>, google::protobuf::internal::MapAllocator<std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>>, 256, false>>, std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>&, std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>*>*) const in libhw_grpc_proto.a[3](backend.pb.cc.o) google::protobuf::internal::ZeroFieldsBase::GetClassData() const, referenced from: vtable for backend::HealthMessage in libhw_grpc_proto.a[3](backend.pb.cc.o) google::protobuf::internal::TaggedStringPtr::ForceCopy(google::protobuf::Arena*) const, referenced from: backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) ... clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is my version.
protoc --version libprotoc 25.1
Your version is : protobuf version 24.3.0
could you update your protoc to lastest version and retry ?
my protobuf version already 25.1
i dont know why the build version use 24.3.0....
it turely have two version protoc in my pc
╰─ which -a protoc ─╯ /Users/kevin/anaconda3/bin/protoc /opt/homebrew/bin/protoc
and i rename the first version
mv /Users/kevin/anaconda3/bin/protoc /Users/kevin/anaconda3/bin/protoc1
but not success and the errror and log as below /:sadgoogle::protobuf::internal::KeyMapBase<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::FindHelper(std::__1::basic_string_view<char, std::__1::char_traits<char>>, absl::lts_20230802::container_internal::btree_iterator<absl::lts_20230802::container_internal::btree_node<absl::lts_20230802::container_internal::map_params<google::protobuf::internal::VariantKey, google::protobuf::internal::NodeBase*, std::__1::less<google::protobuf::internal::VariantKey>, google::protobuf::internal::MapAllocator<std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>>, 256, false>>, std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>&, std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>*>*) const in libhw_grpc_proto.a[3](backend.pb.cc.o) google::protobuf::internal::ZeroFieldsBase::GetClassData() const, referenced from: vtable for backend::HealthMessage in libhw_grpc_proto.a[3](backend.pb.cc.o) google::protobuf::internal::TaggedStringPtr::ForceCopy(google::protobuf::Arena*) const, referenced from: backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) ... clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is my version.
protoc --version libprotoc 25.1
Your version is : protobuf version 24.3.0
could you update your protoc to lastest version and retry ?
hi i have try it again. faild again..... logs as below log5.txt
it turely have two version protoc in my pc
╰─ which -a protoc ─╯ /Users/kevin/anaconda3/bin/protoc /opt/homebrew/bin/protoc
and i rename the first version
mv /Users/kevin/anaconda3/bin/protoc /Users/kevin/anaconda3/bin/protoc1
but not success and the errror and log as below /:sadgoogle::protobuf::internal::KeyMapBase<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::FindHelper(std::__1::basic_string_view<char, std::__1::char_traits<char>>, absl::lts_20230802::container_internal::btree_iterator<absl::lts_20230802::container_internal::btree_node<absl::lts_20230802::container_internal::map_params<google::protobuf::internal::VariantKey, google::protobuf::internal::NodeBase*, std::__1::less<google::protobuf::internal::VariantKey>, google::protobuf::internal::MapAllocator<std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>>, 256, false>>, std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>&, std::__1::pair<google::protobuf::internal::VariantKey const, google::protobuf::internal::NodeBase*>*>*) const in libhw_grpc_proto.a[3](backend.pb.cc.o) google::protobuf::internal::ZeroFieldsBase::GetClassData() const, referenced from: vtable for backend::HealthMessage in libhw_grpc_proto.a[3](backend.pb.cc.o) google::protobuf::internal::TaggedStringPtr::ForceCopy(google::protobuf::Arena*) const, referenced from: backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) backend::PredictOptions::PredictOptions(google::protobuf::Arena*, backend::PredictOptions const&) in libhw_grpc_proto.a[3](backend.pb.cc.o) ... clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is my version.
protoc --version libprotoc 25.1
Your version is : protobuf version 24.3.0 could you update your protoc to lastest version and retry ?hi i have try it again. faild again..... logs as below log5.txt
Check this link: https://github.com/protocolbuffers/protobuf/issues/11828#issue-1573588295
Maybe another library is not compatible.
I suggest to change your PATH in your ~/.zshrc like this:
export PATH=/opt/homebrew/bin:$PATH
finally , it works ~
thank you so much for your kindly help! @sweetcard
========================= build scripts as blow:
export C_INCLUDE_PATH=/usr/local/include
export CPLUS_INCLUDE_PATH=/usr/local/include
brew install abseil cmake go grpc protobuf wget
2. check protoc path and version
add `export PATH=/opt/homebrew/bin:$PATH` to the last line of `~/.zshrc`
`source ~/.zshrc`
check PATH. should as below
which -a protoc whereis protoc echo $PATH
>/opt/homebrew/bin:/Users/kevin/.zplug/bin:/Users/kevin/bin:/usr/local/bin:/opt/homebrew/bin:/Users/kevin/anaconda3/bin:/Users/kevin/anaconda3/bin:/Users/kevin/anaconda3/condabin:
Note: anaconda also have protoc in the ~/anaconda3/bin . this why i faild before.
3. build LocalAI on mac
git clone https://github.com/go-skynet/LocalAI.git
cd LocalAI
make clean brew link protobuf make BUILD_TYPE=metal build
then you can enjoy this awsome project
finally , it works ~ thank you so much for your kindly help! @sweetcard
========================= build scripts as blow:
- install build dependencies
export C_INCLUDE_PATH=/usr/local/include export CPLUS_INCLUDE_PATH=/usr/local/include # install build dependencies brew install abseil cmake go grpc protobuf wget
- check protoc path and version add
export PATH=/opt/homebrew/bin:$PATH
to the last line of~/.zshrc
source ~/.zshrc
check PATH. should as below
which -a protoc whereis protoc echo $PATH
/opt/homebrew/bin:/Users/kevin/.zplug/bin:/Users/kevin/bin:/usr/local/bin:/opt/homebrew/bin:/Users/kevin/anaconda3/bin:/Users/kevin/anaconda3/bin:/Users/kevin/anaconda3/condabin:
Note: anaconda also have protoc in the ~/anaconda3/bin . this why i faild before.
- build LocalAI on mac
# clone the repo git clone https://github.com/go-skynet/LocalAI.git cd LocalAI make clean brew link protobuf make BUILD_TYPE=metal build
then you can enjoy this awsome project
Glad to hear that. 😄👍
Hi! I'm a bot running with LocalAI ( a crazy experiment of @mudler ) - please beware that I might hallucinate sometimes!
_but.... I can also be funny or helpful :smilecat: and I can provide generally speaking good tips or places where to look after in the documentation or in the code based on what you wrote in the issue.
Don't engage in conversation with me, I don't support (yet) replying!
ERROR: The prompt size exceeds the context window size and cannot be processed.
Sources:
During the build I have another issue: In my case protobuf version already 25.1
but then
go: too many arguments make: *** [replace] Error 1
LocalAI version:
branch: master. tag:1.40.0
Environment, CPU architecture, OS, and Version:
MacBook Pro M3 96 GB mac0S sonoma 14.1
Describe the bug
Error: error: This file was generated by an older version of protoc Error as blow
To Reproduce
build faild use blow script
Expected behavior
Logs
full log in the attrachment log.txt
Additional context