All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Juergen Landwehr" <juergen.landwehr@gmx.de>
To: yocto@lists.yoctoproject.org
Subject: using grpc fails with linker error: file in wrong format
Date: Mon, 24 May 2021 00:37:28 -0700	[thread overview]
Message-ID: <TYgw.1621841848638083780.ftKc@lists.yoctoproject.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

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?

Thanks,

Jürgen

[-- Attachment #2: Type: text/html, Size: 1179 bytes --]

             reply	other threads:[~2021-05-24  7:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  7:37 Juergen Landwehr [this message]
2021-05-24 15:41 ` [yocto] using grpc fails with linker error: file in wrong format Khem Raj
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=TYgw.1621841848638083780.ftKc@lists.yoctoproject.org \
    --to=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.