All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robert Varga" <robert.varga@getinge.com>
To: yocto@lists.yoctoproject.org
Subject: Re: Linker error undefined reference to `_rtld_global_ro'
Date: Tue, 14 Jul 2020 00:53:12 -0700	[thread overview]
Message-ID: <15607.1594713192924490761@lists.yoctoproject.org> (raw)
In-Reply-To: <e123353d-7215-94eb-176e-049ab759defc@gmail.com>

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

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.

--

Rob

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

  reply	other threads:[~2020-07-14  7:53 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 [this message]
2020-07-14 15:45     ` Khem Raj
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=15607.1594713192924490761@lists.yoctoproject.org \
    --to=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 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.