yes my problem is at linking phase of cross-compiling. That is why I was
wondering which libraries I should include.

The Makefile on the host (PC)  where it compiles correctly, I see:
g++ -std=c++11 `pkg-config --cflags protobuf grpc`  -c -o greeter_server.o
greeter_server.cc
g++ helloworld.pb.o helloworld.grpc.pb.o greeter_server.o -L/usr/local/lib
`pkg-config --libs protobuf grpc++ grpc` -Wl,--no-as-needed
-lgrpc++_reflection -Wl,--as-needed -ldl -o greeter_server

what does the `*pkg-config --libs protobuf grpc++ grpc*` instruction do?

I am including the following libraries:

[image: image.png]

libprotobuf.a
libgrpc++.a
libgrpc.a
libgrpc++_reflection.a




On Wed, Oct 24, 2018 at 4:12 PM robert engels <[email protected]> wrote:

> I think you may just be linking incorrectly, that method is part of the
> grpc core https://grpc.io/grpc/core/alloc_8h.html
>
> On Oct 24, 2018, at 3:01 PM, Simon Chamlian <[email protected]>
> wrote:
>
> for example, one of the errors is:
>
> /home/jay/works_Versa_imx7/xgrpc_server/src/libgrpc.a(httpcli.cc.o): In
> function `append_error':
> /usr/src/debug/grpc/1.8.5-r0/git/src/core/lib/http/httpcli.cc:124:
> undefined reference to `gpr_free'
>
> So inside libgrpc.a(httpcli.cc.o) the function append_error is calling
> gpr_free.
>
> I guess I am missing some libraries.
>
>
>
>
>
>
>
>
>
>
> On Wed, Oct 24, 2018 at 3:55 PM Simon Chamlian <[email protected]>
> wrote:
>
>> I did a cross compilation a grpc within YOCTO and ended up with the
>> following libraries:
>>
>> libgrpc.a
>> libgrpc_cronet.a
>> libgrpc++_error_details.a
>> libgrpc++_reflection.a
>> libgrpc++_unsecure.a
>> libprotobuf-c.a
>> libgrpc++.a
>> libgrpc++_cronet.a
>> libgrpc_plugin_support.a
>> libgrpc_unsecure.a
>> libprotobuf.a
>> libprotobuf-lite.a
>>
>>
>> When I compile the *greeter_server* within Eclipse, I get lots of errors
>> of classes not recognized. I presume these classes are defined in libraries.
>>
>> Does anyone know which libraries do I need to include in Eclipse project?
>>
>> Thanks,
>> S
>>
>>
>>
>>
>> On Tue, Oct 23, 2018 at 11:08 AM Simon Chamlian <[email protected]>
>> wrote:
>>
>>> Still having lots of issues to cross compile.
>>>
>>> Is it a good strategy to give up on libraries and instead compile the
>>> source code?
>>> If so, does anyone knows which source code is required to be able to
>>> cross-compile the *greeter_server* example?
>>>
>>> ~/grpc/src/cpp$ ls -l
>>> total 32
>>> drwxrwxr-x 2 jay jay 4096 Aug 24 15:04 client
>>> drwxrwxr-x 2 jay jay 4096 Aug 24 15:04 codegen
>>> drwxrwxr-x 2 jay jay 4096 Aug 24 15:04 common
>>> drwxrwxr-x 2 jay jay 4096 Aug 24 15:04 ext
>>> -rwxrwxr-x 1 jay jay 1170 Aug 24 15:04 README.md
>>> drwxrwxr-x 3 jay jay 4096 Oct 23 10:59 server
>>> drwxrwxr-x 2 jay jay 4096 Aug 24 15:04 thread_manager
>>> drwxrwxr-x 2 jay jay 4096 Aug 24 15:04 util
>>>
>>> Is it source code in ~/grpc/src/cpp/server  directory and
>>> ~/grpc/src/cpp/common directory I need to include?
>>>
>>> Tx,
>>> S.
>>>
>>>
>>>
>>> On Fri, Oct 12, 2018 at 11:13 AM Stephan Menzel <
>>> [email protected]> wrote:
>>>
>>>> Am Freitag, 12. Oktober 2018 15:33:46 UTC+2 schrieb SimonC:
>>>>>
>>>>> Is there binary versions available for different platforms (CPUs)?
>>>>>
>>>>>>
>>>>>>
>>>> Sure. Raspbian at the very least has grpc and protobuf packages. You
>>>> may need to include extra repos though.
>>>> Look for libgrpc-dev.
>>>>
>>>> > apt search libgrpc-dev
>>>>
>>>> HTH,
>>>> Stephan
>>>>
>>>> --
>>>> 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/d1d65d9c-113a-4486-981d-5a6dbb5f870c%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/grpc-io/d1d65d9c-113a-4486-981d-5a6dbb5f870c%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/CANmTPBYN__MkReUKXtuPqdVUQrB6pKn%2B9mOhJA0J6TTQYD5a0g%40mail.gmail.com
> <https://groups.google.com/d/msgid/grpc-io/CANmTPBYN__MkReUKXtuPqdVUQrB6pKn%2B9mOhJA0J6TTQYD5a0g%40mail.gmail.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/CANmTPBbUyHbLzfuAF4OLtaKP%3D0%2BeqfNo3FPrggCBmmpeo6Q%3DSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to