From: "Khem Raj" <raj.khem@gmail.com>
To: Juergen Landwehr <juergen.landwehr@gmx.de>, yocto@lists.yoctoproject.org
Subject: Re: [yocto] using grpc fails with linker error: file in wrong format
Date: Mon, 24 May 2021 08:41:17 -0700 [thread overview]
Message-ID: <d11af7fd-15d1-f0a6-e5c1-9545704f7f6c@gmail.com> (raw)
In-Reply-To: <TYgw.1621841848638083780.ftKc@lists.yoctoproject.org>
On 5/24/21 12:37 AM, Juergen Landwehr wrote:
> Hi all,
>
> I am developing a C++ library that is using gRPC.
>
> To be able to use protoc for generating the stubs I added the following
> dependencies:
>
> DEPENDS += "\
> grpc-native \
> protobuf-native \
> ...
> "
>
>
> and to link my library with cross-compiled libraries:
>
> RDEPENDS += "\
> grpc \
> protobuf \
> ...
> "
>
> However, linking the library fails with the following error:
>
> ld:
> /data/jenkins/workspace/e0_mbient_yocto_mbient_manifests_master_downstream/build/tmp/work/cortexa72-mbient-linux/tokenmaster-client/git-r0/recipe-sysroot-native/usr/lib/libgrpc++.so.1.24.3:
> error adding symbols: file in wrong format
>
> I guess the problem is, that native grpc++ library is used from the
> "recipe-sysroot-native" directory and thus not the cross-compiled version.
>
> What am I doing wrong? How can I tell Yocto to use the cross-compiled
> versions?
this is upto your component's build system, so perhaps you should look
into that and ensure that its using right options. Second place to look
is recipe for your package and ensure right vars and options are passed
to build. you might want to look at sysdig package build system and see
how they are doing it and perhaps mimic that for your package too.
>
> Thanks,
>
> Jürgen
>
>
>
>
next prev parent reply other threads:[~2021-05-24 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 7:37 using grpc fails with linker error: file in wrong format Juergen Landwehr
2021-05-24 15:41 ` Khem Raj [this message]
2021-05-26 13:02 ` Juergen Landwehr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d11af7fd-15d1-f0a6-e5c1-9545704f7f6c@gmail.com \
--to=raj.khem@gmail.com \
--cc=juergen.landwehr@gmx.de \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.