Hi,

I used the following flags in the Makefile for hellpworld.

46   SLIBS += /home/biswas.91/grpc/install/lib/libgrpc++.a
47  LDFLAGS += -L/usr/local/lib
 -L//home/biswas.91/grpc/third_party/protobuf/src/.libs/
-L/home/biswas.91/grpc/install/lib/ \
48            -lprotobuf -lpthread -lgrpc


And this is how I link
 61 greeter_client: helloworld.pb.o helloworld.grpc.pb.o greeter_client.o
 62         $(CXX) $^ $(LDFLAGS) -o $@ $(SLIBS)
 63
 64 greeter_server: helloworld.pb.o helloworld.grpc.pb.o greeter_server.o
 65         $(CXX) $^ $(LDFLAGS) -o $@ $(SLIBS)

Hope these help.

Rajarshi

On Thu, May 11, 2017 at 3:06 AM, GM <[email protected]>
wrote:

> Hi I am having the same problem, can you elaborate on how to solve it.
>
>
> On Wednesday, May 10, 2017 at 10:02:14 PM UTC+5:30, Rajarshi Biswas wrote:
>>
>> OK never mind.
>> I have fixed it by doing a static link to libgrpc++.a
>>
>> On Monday, May 8, 2017 at 6:48:35 PM UTC-4, Rajarshi Biswas wrote:
>>>
>>> Hello guys,
>>>
>>> I am having the following issue while running the greeter_server
>>> example.
>>>
>>> $ ./greeter_server
>>> ./greeter_server: error while loading shared libraries: libgrpc++.so.1:
>>> cannot open shared object file: No such file or directory
>>>
>>> But
>>>
>>> ll ../../../install/lib/libgrpc++*
>>> -rwxr-xr-x 1 biswas.91 biswas.91 1939536 May  8 18:02
>>> ../../../install/lib/libgrpc++.a
>>> -rwxr-xr-x 1 biswas.91 biswas.91 4868510 May  8 18:02
>>> ../../../install/lib/libgrpc++_cronet.a
>>> lrwxrwxrwx 1 biswas.91 biswas.91      25 May  8 18:02
>>> ../../../install/lib/libgrpc++_cronet.so -> libgrpc++_cronet.so.1.3.0
>>> -rwxr-xr-x 1 biswas.91 biswas.91  956448 May  8 18:02
>>> ../../../install/lib/libgrpc++_cronet.so.1.3.0
>>> lrwxrwxrwx 1 biswas.91 biswas.91      25 May  8 18:02
>>> ../../../install/lib/libgrpc++_cronet.so.3 -> libgrpc++_cronet.so.1.3.0
>>> -rwxr-xr-x 1 biswas.91 biswas.91  162902 May  8 18:02
>>> ../../../install/lib/libgrpc++_error_details.a
>>> lrwxrwxrwx 1 biswas.91 biswas.91      32 May  8 18:02
>>> ../../../install/lib/libgrpc++_error_details.so ->
>>> libgrpc++_error_details.so.1.3.0
>>> -rwxr-xr-x 1 biswas.91 biswas.91 1423240 May  8 18:02
>>> ../../../install/lib/libgrpc++_error_details.so.1.3.0
>>> lrwxrwxrwx 1 biswas.91 biswas.91      32 May  8 18:02
>>> ../../../install/lib/libgrpc++_error_details.so.3 ->
>>> libgrpc++_error_details.so.1.3.0
>>> -rwxr-xr-x 1 biswas.91 biswas.91  587184 May  8 18:02
>>> ../../../install/lib/libgrpc++_reflection.a
>>> lrwxrwxrwx 1 biswas.91 biswas.91      29 May  8 18:02
>>> ../../../install/lib/libgrpc++_reflection.so ->
>>> libgrpc++_reflection.so.1.3.0
>>> -rwxr-xr-x 1 biswas.91 biswas.91 1649440 May  8 18:02
>>> ../../../install/lib/libgrpc++_reflection.so.1.3.0
>>> lrwxrwxrwx 1 biswas.91 biswas.91      29 May  8 18:02
>>> ../../../install/lib/libgrpc++_reflection.so.3 ->
>>> libgrpc++_reflection.so.1.3.0
>>> lrwxrwxrwx 1 biswas.91 biswas.91      18 May  8 18:02
>>> ../../../install/lib/libgrpc++.so -> libgrpc++.so.1.3.0
>>> -rwxr-xr-x 1 biswas.91 biswas.91  761976 May  8 18:02
>>> ../../../install/lib/libgrpc++.so.1.3.0
>>> lrwxrwxrwx 1 biswas.91 biswas.91      18 May  8 18:02
>>> ../../../install/lib/libgrpc++.so.3 -> libgrpc++.so.1.3.0
>>> -rwxr-xr-x 1 biswas.91 biswas.91 1795644 May  8 18:02
>>> ../../../install/lib/libgrpc++_unsecure.a
>>> lrwxrwxrwx 1 biswas.91 biswas.91      27 May  8 18:02
>>> ../../../install/lib/libgrpc++_unsecure.so ->
>>> libgrpc++_unsecure.so.1.3.0
>>> -rwxr-xr-x 1 biswas.91 biswas.91  716504 May  8 18:02
>>> ../../../install/lib/libgrpc++_unsecure.so.1.3.0
>>> lrwxrwxrwx 1 biswas.91 biswas.91      27 May  8 18:02
>>> ../../../install/lib/libgrpc++_unsecure.so.3 ->
>>> libgrpc++_unsecure.so.1.3.0
>>>
>>> So when I make gRPC , it did not generate libgrpc++.so.1, but
>>> greeter_server is looking for that. What am i doing wrong here?
>>>
>>> Thanks.
>>>
>>> _Rajarshi
>>>
>>>
>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "grpc.io" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/grpc-io/zFhTb27BGa0/unsubscribe.
> To unsubscribe from this group and all its topics, 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/0fbc72dc-b98e-4a2d-a850-c87a2deda898%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/0fbc72dc-b98e-4a2d-a850-c87a2deda898%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Rajarshi Biswas
Citrix R&D
India

-- 
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/CA%2BHkcRD65Csqjg6AjvuZV7xqCzptbj0-suHpyqhP6jJ2kHXoMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to