Yocto Project Discussions
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: Robert Varga <robert.varga@getinge.com>, yocto@lists.yoctoproject.org
Subject: Re: [yocto] Linker error undefined reference to `_rtld_global_ro'
Date: Tue, 14 Jul 2020 08:45:09 -0700	[thread overview]
Message-ID: <faf2f2ae-5bfe-2493-1445-ebfaaafde328@gmail.com> (raw)
In-Reply-To: <15607.1594713192924490761@lists.yoctoproject.org>



On 7/14/20 12:53 AM, Robert Varga wrote:
> Thank you very much for your response.
> 
>     it seems static apps with glibc compiled with PIE related.
> 
> I'm afraid I didn't understand (as I am new to yocto and try to
> understand it). Did you mean, the following statement in my-image.bb
> file generates the static apps which is not a good approach?
> SDKIMAGE_FEATURES_append = " staticdev-pkgs"
> 
> I introduced this statement because I got linking errors when
> compiling/linking using the SDK complaining about missing libs just like ...
> /opt/mydistro/1.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/real-ld:
> cannot find -lpthread
> /opt/mydistro/1.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/real-ld:
> cannot find -ldl
> /opt/mydistro/1.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/real-ld:
> cannot find -lstdc++
> /opt/mydistro/1.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/real-ld:
> cannot find -lm
> /opt/mydistro/1.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/real-ld:
> cannot find -lc
> collect2: error: ld returned 1 exit status
> makefile:128: recipe for target 'arm' failed
> make: *** [arm] Error 1
> 
> When using this statement (SDKIMAGE_FEATURES_append = " staticdev-pkgs")
> I can see in /opt/mydistro/1.0.0/sysroots/usr/lib many *.a files which
> are not present without this statement. But I am not sure if this
> statement is correct? Maybe there is another approach for including the
> missing libs?
> 
> And what do you mean with "PIE related"? Are you thinking of an
> Raspberri PI?
> 
>     Can you verfiy if you get same issue with aarch64 or mips ?
> 
> Also I would like to verify, but do not know how to setup for aarch64 or
> mips. Can you provide a short example?
> 
> Thank you for your support.

build SDK for arm64. e.g. MACHINE=qemuarm64 bitbake -cpopulate_sdk
core-image-sato

and install this SDK and repeat your experiment.

> 
> -- 
> 
> Rob
> 
> 
> 

  reply	other threads:[~2020-07-14 15:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 11:21 Linker error undefined reference to `_rtld_global_ro' Robert Varga
2020-07-13 16:51 ` [yocto] " Khem Raj
2020-07-14  7:53   ` Robert Varga
2020-07-14 15:45     ` Khem Raj [this message]
2020-07-15 14:36       ` Robert Varga
2020-07-16 19:59         ` [yocto] " Khem Raj
2020-07-17  7:51           ` Robert Varga
2020-07-21 15:07             ` Robert Varga
2020-07-21 19:10               ` [yocto] " Khem Raj
2020-07-23 12:42                 ` Robert Varga

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=faf2f2ae-5bfe-2493-1445-ebfaaafde328@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=robert.varga@getinge.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox