All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy MacLeod <randy.macleod@windriver.com>
To: Pgowda <pgowda.cve@gmail.com>, openembedded-core@lists.openembedded.org
Cc: richard.purdie@linuxfoundation.org, rwmacleod@gmail.com,
	alex.kanavin@gmail.com, umesh.kalappa0@gmail.com,
	vinay.m.engg@gmail.com
Subject: Re: [OE-core] [PATCH] Fix rust-native build issue when debug is enabled
Date: Tue, 5 Oct 2021 20:42:51 -0400	[thread overview]
Message-ID: <582c9e8b-0b34-dba4-4a6f-1d6ff27f9204@windriver.com> (raw)
In-Reply-To: <20210929132054.117151-1-pgowda.cve@gmail.com>

On 2021-09-29 9:20 a.m., Pgowda wrote:
> When DEBUG_BUILD is set for building rust-native, it generated
> error as follows:-
> =========================================================
> Building : rustdoc, rustdoc-json-types
> error[E0463]: can't find crate for `rustc_llvm`
> which `rustc_driver` depends on
>    --> src/librustdoc/lib.rs:37:1
>     |
> 37 | extern crate rustc_driver;
>     | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
> =========================================================
> On analyzing the issue, it was found that rustc_llvm crate was present
> at required path. However, it was very huge due to the presence of
> debugging information. Hence, it was somehow not recognized as a valid
> crate. 

So we need to know more about this. What tool is being used to identify
the crate and has there been any changes to fix is since 1.54?

Also, please check this problem still happens with Alex's 1.55 upgrade:
 
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/package-version-updates



> The following patch removes the debug information from
> rust-llvm-native which is built prior to rust-native but retains debug
> information as required in rust-native binaries.

This is a functional work-around but I suspect that we'll hold-off
for a while before giving in and accepting it in oe-core/master.
Some people might find it useful so thanks for posting it as I suggested.

Hopefully we can better understand and fix the root cause.

Thanks Naveen,

../Randy

> 
> Signed-off-by: Pgowda <pgowda.cve@gmail.com>
> ---
>   meta/recipes-devtools/rust/rust-llvm.inc | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/meta/recipes-devtools/rust/rust-llvm.inc b/meta/recipes-devtools/rust/rust-llvm.inc
> index d7f445385b..0f8fb785b7 100644
> --- a/meta/recipes-devtools/rust/rust-llvm.inc
> +++ b/meta/recipes-devtools/rust/rust-llvm.inc
> @@ -15,6 +15,11 @@ DEPENDS += "ninja-native rust-llvm-native"
>   ARM_INSTRUCTION_SET:armv5 = "arm"
>   ARM_INSTRUCTION_SET:armv4t = "arm"
>   
> +# rustc_llvm with debug info is not recognized as a valid crate that's
> +# generated by rust-llvm-native.
> +CFLAGS:remove = "-g"
> +CXXFLAGS:remove = "-g"
> +
>   LLVM_DIR = "llvm${LLVM_RELEASE}"
>   
>   EXTRA_OECMAKE = " \
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#156454): https://lists.openembedded.org/g/openembedded-core/message/156454
> Mute This Topic: https://lists.openembedded.org/mt/85948023/3616765
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
# Randy MacLeod
# Wind River Linux



  reply	other threads:[~2021-10-06  0:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 13:20 [PATCH] Fix rust-native build issue when debug is enabled Pgowda
2021-10-06  0:42 ` Randy MacLeod [this message]
2021-10-07  8:56   ` [OE-core] " pgowda cve
2021-10-07 17:03     ` Randy MacLeod

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=582c9e8b-0b34-dba4-4a6f-1d6ff27f9204@windriver.com \
    --to=randy.macleod@windriver.com \
    --cc=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pgowda.cve@gmail.com \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=rwmacleod@gmail.com \
    --cc=umesh.kalappa0@gmail.com \
    --cc=vinay.m.engg@gmail.com \
    /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.