All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] uninative: Fix conflicts with normal sysroot
Date: Fri, 22 Jan 2016 13:01:32 -0600	[thread overview]
Message-ID: <56A27C8C.8000403@windriver.com> (raw)
In-Reply-To: <1453483030.6378.24.camel@linuxfoundation.org>

On 1/22/16 11:17 AM, Richard Purdie wrote:
> Currently this code installs into the standard sysroot, however this causes
> some conflicts when linking since the linker can look specifically for
> versioned .so files (e.g. like libpthreads.so.0). This breaks builds
> of util-linux-native for example.
> 
> The easiest solution is to install uninative into its own separate sysroot.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
> index fe1e89b..8686159 100644
> --- a/meta/classes/uninative.bbclass
> +++ b/meta/classes/uninative.bbclass
> @@ -1,6 +1,6 @@
>  NATIVELSBSTRING = "universal"
>  
> -UNINATIVE_LOADER ?= "${@bb.utils.contains('BUILD_ARCH', 'x86_64', '${STAGING_DIR_NATIVE}/lib/ld-linux-x86-64.so.2', '${STAGING_DIR_NATIVE}/lib/ld-linux.so.2', d)}"
> +UNINATIVE_LOADER ?= "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux/lib/${@bb.utils.contains('BUILD_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"

Have you considered changing the name of the ld.so for the uninative so that
there is no way it can conflict with the host system.

This would require a minor patch to the uninative linker/compiler to use the new
name -- and of course above to know it as well.

This might be a useful safety to prevent the system from every falling back to
the /lib/... version.

--Mark

>  UNINATIVE_URL ?= "unset"
>  UNINATIVE_TARBALL ?= "${BUILD_ARCH}-nativesdk-libc.tar.bz2"
> @@ -41,7 +41,8 @@ python uninative_eventhandler() {
>                  fetcher.download()
>              except Exception as exc:
>                  bb.fatal("Unable to download uninative tarball: %s" % str(exc))
> -        cmd = e.data.expand("mkdir -p ${STAGING_DIR}; cd ${STAGING_DIR}; tar -xjf ${UNINATIVE_DLDIR}/${UNINATIVE_TARBALL}; ${STAGING_DIR}/relocate_sdk.py ${STAGING_DIR_NATIVE} ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_BINDIR_NATIVE}/patchelf-uninative")
> +
> +        cmd = e.data.expand("mkdir -p ${STAGING_DIR}-uninative; cd ${STAGING_DIR}-uninative; tar -xjf ${UNINATIVE_DLDIR}/${UNINATIVE_TARBALL}; ${STAGING_DIR}-uninative/relocate_sdk.py ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux/patchelf-uninative")
>          try:
>              subprocess.check_call(cmd, shell=True)
>          except subprocess.CalledProcessError as exc:
> @@ -51,6 +52,8 @@ python uninative_eventhandler() {
>  
>  SSTATEPOSTUNPACKFUNCS_append = " uninative_changeinterp"
>  
> +PATH_prepend = "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:"
> +
>  python uninative_changeinterp () {
>      import subprocess
>      import stat
> 
> 



  reply	other threads:[~2016-01-22 19:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 17:17 [PATCH] uninative: Fix conflicts with normal sysroot Richard Purdie
2016-01-22 19:01 ` Mark Hatle [this message]
2016-01-22 23:18   ` Richard Purdie

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=56A27C8C.8000403@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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.