Thanks for replying..
I tried deleting all the files that are related to protobuf and grpc in all
the bin and lib folders and tried installing it again.
1) When I install grpc first and then protobuf.. I'm able to install it
without any errors... But i'm getting the below error while running the
helloworld program in cpp exmaples.
Undefined symbols for architecture x86_64:
"grpc::CreateChannel(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
std::shared_ptr<grpc::ChannelCredentials> const&)", referenced from:
_main in greeter_client.o
"google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char
const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&))", referenced from:
helloworld::protobuf_helloworld_2eproto::AddDescriptorsImpl() in
helloworld.pb.o
"google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned char*)",
referenced from:
google::protobuf::internal::WireFormatLite::WriteStringToArray(int,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator
<char> > const&, unsigned char*) in helloworld.pb.o
"google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const*,
google::protobuf::internal::ArenaStringPtr)", referenced from:
helloworld::HelloRequest::HelloRequest(helloworld::HelloRequest const
&) in helloworld.pb.o
helloworld::HelloRequest::HelloRequest(helloworld::HelloRequest const
&) in helloworld.pb.o
helloworld::HelloRequest::MergeFrom(helloworld::HelloRequest const&)
in helloworld.pb.o
helloworld::HelloReply::HelloReply(helloworld::HelloReply const&) in
helloworld.pb.o
helloworld::HelloReply::HelloReply(helloworld::HelloReply const&) in
helloworld.pb.o
helloworld::HelloReply::MergeFrom(helloworld::HelloReply const&) in
helloworld.pb.o
"google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)",
referenced from:
helloworld::HelloRequest::SerializeWithCachedSizes(google::protobuf::
io::CodedOutputStream*) const in helloworld.pb.o
helloworld::HelloReply::SerializeWithCachedSizes(google::protobuf::io
::CodedOutputStream*) const in helloworld.pb.o
"google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*)", referenced from:
google::protobuf::internal::WireFormatLite::ReadString(google::
protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::
char_traits<char>, std::allocator<char> >*) in helloworld.pb.o
"google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
google::protobuf::internal::MigrationSchema const*,
google::protobuf::Message const* const*, unsigned int const*,
google::protobuf::MessageFactory*, google::protobuf::Metadata*,
google::protobuf::EnumDescriptor const**,
google::protobuf::ServiceDescriptor const**)", referenced from:
helloworld::protobuf_helloworld_2eproto::(anonymous namespace)::
protobuf_AssignDescriptors() in helloworld.pb.o
"google::protobuf::internal::fixed_address_empty_string[abi:cxx11]",
referenced from:
google::protobuf::internal::GetEmptyStringAlreadyInited[abi:cxx11]()
in helloworld.pb.o
google::protobuf::internal::GetEmptyStringAlreadyInited[abi:cxx11]()
in greeter_client.o
"google::protobuf::Message::GetTypeName[abi:cxx11]() const", referenced
from:
vtable for helloworld::HelloReply in helloworld.pb.o
vtable for helloworld::HelloRequest in helloworld.pb.o
"google::protobuf::Message::InitializationErrorString[abi:cxx11]() const",
referenced from:
vtable for helloworld::HelloReply in helloworld.pb.o
vtable for helloworld::HelloRequest in helloworld.pb.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [greeter_client] Error 1
Enter code here...
2) When I install protobuf first and then grpc i'm getting the same error
which i first posted in this thread (during executing make command in grpc
directory ).
On Wednesday, May 31, 2017 at 3:26:58 AM UTC+5:30, Makarand Dharmapurikar
wrote:
>
> My guess is that you have an older copy of protobuf installed on the
> system somewhere. Can you manually search and remove older protobuf
> libraries?
>
> On Sun, May 28, 2017 at 12:09 PM, Bugsfunny <[email protected]
> <javascript:>> wrote:
>
>> Plz help me with this..
>> On Wednesday, May 24, 2017 at 12:44:25 PM UTC+5:30, Bugsfunny wrote:
>>>
>>> I installed grpc using the below commands :
>>>
>>> git clone -b $(curl -L http://grpc.io/release)
>>> https://github.com/grpc/grpc
>>> cd grpc
>>> git checkout -b 1.2.0
>>> git submodule foreach git clean -xfd
>>> git submodule update --init
>>> cd third_party/protobuf
>>> ./autogen.sh
>>> ./configure
>>> make -j2
>>> sudo make install
>>> cd ../cares/cares/
>>> ./buildconf
>>> ./configure
>>> make -j2
>>> make ahost adig acountry
>>> make install
>>> cd ../..
>>> git clean -xfd
>>> make -j2 (I get the below error while executing this command)
>>> sudo make install (did not execute this command)
>>>
>>>
>>>
>>> ERRORS :
>>>
>>>
>>>
>>> [LD] Linking /Users/anambia/Downloads/Softwares/grpc/libs/opt/
>>> libgrpc.dylib
>>> [LD] Linking /Users/anambia/Downloads/Softwares/grpc/libs/opt/
>>> libgrpc_cronet.dylib
>>> [AR] Creating /Users/anambia/Downloads/Softwares/grpc/libs/opt/
>>> libgrpc.a
>>> [AR] Creating /Users/anambia/Downloads/Softwares/grpc/libs/opt/
>>> libgrpc_cronet.a
>>> [HOSTLD] Linking /Users/anambia/Downloads/Softwares/grpc/bins/opt/
>>> grpc_cpp_plugin
>>> Undefined symbols for architecture x86_64:
>>>
>>> "google::protobuf::io::StringOutputStream::StringOutputStream(std::__1::basic_string<char,
>>>
>>> std::__1::char_traits<char>, std::__1::allocator<char> >*)", referenced
>>> from:
>>> ProtoBufFile::CreatePrinter(std::__1::basic_string<char, std::__1
>>> ::char_traits<char>, std::__1::allocator<char> >*) const in cpp_plugin.o
>>>
>>> "google::protobuf::io::Printer::Print(std::__1::map<std::__1::basic_string<char,
>>>
>>> std::__1::char_traits<char>, std::__1::allocator<char> >,
>>> std::__1::basic_string<char, std::__1::char_traits<char>,
>>> std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char,
>>> std::__1::char_traits<char>, std::__1::allocator<char> > >,
>>> std::__1::allocator<std::__1::pair<std::__1::basic_string<char,
>>> std::__1::char_traits<char>, std::__1::allocator<char> > const,
>>> std::__1::basic_string<char, std::__1::char_traits<char>,
>>> std::__1::allocator<char> > > > > const&, char const*)", referenced from
>>> :
>>> ProtoBufPrinter::Print(std::__1::map<std::__1::basic_string<char,
>>> std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::
>>> basic_string<char, std::__1::char_traits<char>, std::__1::allocator
>>> <char> >, std::__1::less<std::__1::basic_string<char, std::__1::
>>> char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<
>>> std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>,
>>> std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1
>>> ::char_traits<char>, std::__1::allocator<char> > > > > const&, char
>>> const*) in cpp_plugin.o
>>>
>>> "google::protobuf::FileDescriptor::GetSourceLocation(std::__1::vector<int,
>>> std::__1::allocator<int> > const&, google::protobuf::SourceLocation*) const"
>>> , referenced from:
>>> void grpc_generator::GetComment<google::protobuf::FileDescriptor>(
>>> google::protobuf::FileDescriptor const*, grpc_generator::CommentType,
>>> std::__1::vector<std::__1::basic_string<char, std::__1::char_traits
>>> <char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::
>>> basic_string<char, std::__1::char_traits<char>, std::__1::allocator
>>> <char> > > >*) in cpp_plugin.o
>>>
>>> "google::protobuf::compiler::CodeGenerator::GenerateAll(std::__1::vector<google::protobuf::FileDescriptor
>>>
>>> const*, std::__1::allocator<google::protobuf::FileDescriptor const*> >
>>> const&, std::__1::basic_string<char, std::__1::char_traits<char>,
>>> std::__1::allocator<char> > const&,
>>> google::protobuf::compiler::GeneratorContext*, std::__1::basic_string<char,
>>> std::__1::char_traits<char>, std::__1::allocator<char> >*) const",
>>> referenced from:
>>> vtable for CppGrpcGenerator in cpp_plugin.o
>>> ld: symbol(s) not found for architecture x86_64
>>> clang: error: linker command failed with exit code 1 (use -v to see
>>> invocation)
>>> make: *** [/Users/anambia/Downloads/Softwares/grpc/bins/opt/
>>> grpc_cpp_plugin] Error 1
>>> make: *** Waiting for unfinished jobs....
>>>
>>>
>>>
>>> The gcc and g++ versions are :
>>>
>>> gcc --version
>>>
>>> gcc (GCC) 6.3.0
>>> Copyright (C) 2016 Free Software Foundation, Inc.
>>> This is free software; see the source for copying conditions. There is
>>> NO
>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>>> PURPOSE.
>>>
>>>
>>> Please help me with this.
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "grpc.io" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/grpc-io.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grpc-io/fa8d0c31-da74-4ee4-9f92-7a991ef12853%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/grpc-io/fa8d0c31-da74-4ee4-9f92-7a991ef12853%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/959ca120-d9c0-4a08-941a-5934cc75bc66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.