Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Sundeep KOKKONDA" <sundeep.kokkonda@gmail.com>
To: OE-core <openembedded-core@lists.openembedded.org>
Cc: "Gowda, Naveen" <naveen.gowda@windriver.com>,
	Randy MacLeod <randy.macleod@windriver.com>,
	Alexander Kanavin <alex.kanavin@gmail.com>
Subject: Re: [OE-core] [AUH] rust-llvm: upgrading to 1.61.0 FAILED
Date: Wed, 22 Jun 2022 11:54:19 +0530	[thread overview]
Message-ID: <429629c2-95d3-7a9f-df3f-e8ddf2ba5b2f@gmail.com> (raw)
In-Reply-To: <CANNYZj_WDmAaji4tiUQi9=w1bwMTQ810tO-HUXqroSMAZa21Mg@mail.gmail.com>

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

Hi,

In Yocto, the Rust upgrade from 1.60.0 -> 1.61.0 enables a dependency on 
the libstdc++-static library for rust-llvm. With this upgrade build is 
aborted for 'bitbake core-image-minimal -cpopulate_sdk' with below error.

======= Error Text =======
| error: could not compile `rustc_llvm` due to previous error
|
| Caused by:
|   process didn't exit successfully: 
`/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/build/bootstrap/debug/rustc 
--crate-name rustc_llvm --edition=2021 compiler/rustc_llvm/src/lib.rs 
--error-format=json 
--json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type 
lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C 
debuginfo=0 -C metadata=5acc17ffb3ce44a9 -C 
extra-filename=-5acc17ffb3ce44a9 --out-dir 
/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps 
--target x86_64-unknown-linux-gnu -C 
linker=/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/wrapper/build-rust-ccld 
-L 
dependency=/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps 
-L 
dependency=/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps 
--extern 
libc=/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblibc-be8f25d7c5c0a059.rmeta 
--cfg=bootstrap -Csymbol-mangling-version=v0 -Zmacro-backtrace 
-Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' 
-Ztls-model=initial-exec -Zunstable-options '-Wrustc::internal' 
-Cprefer-dynamic -Z binary-dep-depinfo -L 
native=/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-688051e8c720f5a9/out 
-L 
native=/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/recipe-sysroot-native/usr/lib/llvm-rust/lib 
-L 
native=/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-llvm-native/1.61.0-r0/recipe-sysroot-native/usr/lib 
-L 
native=/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-llvm-native/1.61.0-r0/recipe-sysroot-native/lib 
-L native= --cfg 'llvm_component="aarch64"' --cfg 'llvm_component="arm"' 
--cfg 'llvm_component="asmparser"' --cfg 'llvm_component="bitreader"' 
--cfg 'llvm_component="bitwriter"' --cfg 'llvm_component="coverage"' 
--cfg 'llvm_component="instrumentation"' --cfg 'llvm_component="ipo"' 
--cfg 'llvm_component="linker"' --cfg 'llvm_component="lto"' --cfg 
'llvm_component="mips"' --cfg 'llvm_component="powerpc"' --cfg 
'llvm_component="riscv"' --cfg 'llvm_component="x86"' -l 
static=llvm-wrapper -l static=LLVMX86TargetMCA -l static=LLVMMCA -l 
static=LLVMX86Disassembler -l static=LLVMX86AsmParser -l 
static=LLVMX86CodeGen -l static=LLVMX86Desc -l static=LLVMX86Info -l 
static=LLVMRISCVDisassembler -l static=LLVMRISCVAsmParser -l 
static=LLVMRISCVCodeGen -l static=LLVMRISCVDesc -l static=LLVMRISCVInfo 
-l static=LLVMPowerPCDisassembler -l static=LLVMPowerPCAsmParser -l 
static=LLVMPowerPCCodeGen -l static=LLVMPowerPCDesc -l 
static=LLVMPowerPCInfo -l static=LLVMMipsDisassembler -l 
static=LLVMMipsAsmParser -l static=LLVMMipsCodeGen -l 
static=LLVMMipsDesc -l static=LLVMMipsInfo -l static=LLVMLTO -l 
static=LLVMPasses -l static=LLVMCoroutines -l static=LLVMObjCARCOpts -l 
static=LLVMExtensions -l static=LLVMCoverage -l 
static=LLVMARMDisassembler -l static=LLVMARMAsmParser -l 
static=LLVMARMCodeGen -l static=LLVMipo -l static=LLVMInstrumentation -l 
static=LLVMVectorize -l static=LLVMLinker -l static=LLVMIRReader -l 
static=LLVMAsmParser -l static=LLVMFrontendOpenMP -l static=LLVMARMDesc 
-l static=LLVMARMUtils -l static=LLVMARMInfo -l 
static=LLVMAArch64Disassembler -l static=LLVMMCDisassembler -l 
static=LLVMAArch64AsmParser -l static=LLVMAArch64CodeGen -l 
static=LLVMCFGuard -l static=LLVMGlobalISel -l static=LLVMSelectionDAG 
-l static=LLVMAsmPrinter -l static=LLVMDebugInfoMSF -l 
static=LLVMCodeGen -l static=LLVMTarget -l static=LLVMScalarOpts -l 
static=LLVMInstCombine -l static=LLVMAggressiveInstCombine -l 
static=LLVMTransformUtils -l static=LLVMBitWriter -l static=LLVMAnalysis 
-l static=LLVMProfileData -l static=LLVMDebugInfoDWARF -l 
static=LLVMObject -l static=LLVMTextAPI -l static=LLVMMCParser -l 
static=LLVMBitReader -l static=LLVMCore -l static=LLVMRemarks -l 
static=LLVMBitstreamReader -l static=LLVMAArch64Desc -l 
static=LLVMAArch64Utils -l static=LLVMAArch64Info -l static=LLVMMC -l 
static=LLVMDebugInfoCodeView -l static=LLVMBinaryFormat -l 
static=LLVMSupport -l static=LLVMDemangle -l dylib=rt -l dylib=dl -l 
dylib=pthread -l dylib=m -l static=stdc++` (exit status: 1)
| warning: build failed, waiting for other jobs to finish...
|     Building [====================>    ] 186/218: rustc_ast_passes, 
rustc_e...
|     Building [====================>    ] 187/218: rustc_expand, 
rustc_parse...
|     Building [====================>    ] 188/218: rustc_expand, 
rustc_parse...
|     Building [====================>    ] 189/218: rustc_parse, 
rustc_builti...
|     Building [====================>    ] 190/218: rustc_parse, 
rustc_middle
|     Building [====================>    ] 191/218: rustc_middle
| error: build failed
| command did not execute successfully: 
"/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rust-snapshot/bin/cargo" 
"build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" 
"-j" "16" "-v" "--release" "--frozen" "--features" "llvm max_level_info" 
"--manifest-path" 
"/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/compiler/rustc/Cargo.toml" 
"--message-format" "json-render-diagnostics"
| expected success, got: exit status: 101
| Traceback (most recent call last):
|   File 
"/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/src/bootstrap/bootstrap.py", 
line 1341, in <module>
|     main()
|   File 
"/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/src/bootstrap/bootstrap.py", 
line 1324, in main
|     bootstrap(help_triggered)
|   File 
"/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/src/bootstrap/bootstrap.py", 
line 1310, in bootstrap
|     run(args, env=env, verbose=build.verbose, is_bootstrap=True)
|   File 
"/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/src/bootstrap/bootstrap.py", 
line 185, in run
|     raise RuntimeError(err)
| RuntimeError: failed to run: 
/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/rustc-1.61.0-src/build/bootstrap/debug/bootstrap 
-j 16 build --stage 2 --verbose
| WARNING: 
/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/temp/run.do_compile.175104:179 
exit 1 from 'python3 src/bootstrap/bootstrap.py -j 16 "$@" --verbose'
| WARNING: Backtrace (BB generated script):
|     #1: rust_runx, 
/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/temp/run.do_compile.175104, 
line 179
|     #2: do_compile, 
/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/temp/run.do_compile.175104, 
line 162
|     #3: main, 
/home/pokybuild/yocto-worker/qemumips-alt/build/build/tmp/work/x86_64-linux/rust-native/1.61.0-r0/temp/run.do_compile.175104, 
line 202
NOTE: recipe rust-native-1.61.0-r0: task do_compile: Failed
==========================================

The build error is solved by adding the libstdc++.a library on the Host 
(in my case Ubuntu) machine. Now, I am working on to add this library to 
the Yocto nativesdk sysroot to avoid the dependency on the Host machine. 
I made several attempts to add the libstdc++ lib to the nativesdk 
sysroot before the rust / rust-llvm recipe 'do_compile' task is 
executed. In the build directory I can see the libstdc++.a is available 
but it is not considered by the rust recipe and still the above mentoned 
error is appearing. When I added dependencies, I observed  errors like 
'nothing provides libstdc++ / libstdc++-static / libstdc++-staticdev / 
virtual/nativesdk-libstdc++-staticdev ... etc'.

_Below are the few locations in build/tmp/work/ directory where 
libstdc++.a lib is available._
/./x86_64-nativesdk-pokysdk-linux/meta-environment-qemux86-64/1.0-r8/recipe-sysroot/usr/lib/libstdc++.a//
//./x86_64-nativesdk-pokysdk-linux/rust-cross-canadian-x86-64/1.61.0-r0/recipe-sysroot/usr/lib/libstdc++.a//
//./x86_64-nativesdk-pokysdk-linux/rust-tools-cross-canadian-x86-64/1.61.0-r0/recipe-sysroot/usr/lib/libstdc++.a/


Could someone give some hints on which recipe should provide the 
libstdc++-static lib and how can I made it is considered by the rust recipe?

The link 
_https://github.com/rust-lang/rust/issues/94983#issue-1170386860_ 
describes the libstdc++ dependency with rust update.




Thanks,
Sundeep K.


On 13-06-2022 18:56, Alexander Kanavin wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
>
> To get started quicker, I have a recipe update commit on top of this
> branch, which you are welcome to cherry-pick:
> https://git.yoctoproject.org/poky-contrib/log/?h=akanavin/package-version-updates-later
>
> Alex
>
> On Mon, 13 Jun 2022 at 15:01, Randy MacLeod<randy.macleod@windriver.com>  wrote:
>> On 2022-06-13 04:15, Alexander Kanavin wrote:
>>> Rust 1.61 is held by rust-native regressing on red hat distros; fedora
>>> 34/35, centos/alma 8 all show this:
>>> https://autobuilder.yoctoproject.org/typhoon/#/builders/102/builds/3151
>>>
>>> Alex
>> Thanks Alex.
>>
>>
>> Naveen, Sundeep,
>>
>> It looks like there's been a change to how or if libstdc++-static is used:
>>
>> https://github.com/rust-lang/rust/issues/97138
>>
>>
>> This change is part of 1.61:
>>
>> https://github.com/rust-lang/rust/pull/94832
>>
>> so perhaps we need to change our recipe. Anyway, I only took a quick look.
>> Please work on this issue ASAP.
>>
>> ../Randy
>>
>>
>>> On Wed, 1 Jun 2022 at 18:19, Auto Upgrade Helper<auh@yoctoproject.org>  wrote:
>>>> Hello,
>>>>
>>>> this email is a notification from the Auto Upgrade Helper
>>>> that the automatic attempt to upgrade the recipe *rust-llvm* to *1.61.0* has Failed (devtool error).
>>>>
>>>> Detailed error information:
>>>>
>>>> The following devtool command failed:  finish -f rust-llvm /home/pokybuild/yocto-worker/auh/build/build/poky/meta/recipes-devtools/rust
>>>> NOTE: Starting bitbake server...
>>>> WARNING: Host distribution "almalinux-8.6" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
>>>> Loading cache...done.
>>>> Loaded 1643 entries from dependency cache.
>>>> Parsing recipes...done.
>>>> Parsing of 884 .bb files complete (883 cached, 1 parsed). 1644 targets, 35 skipped, 0 masked, 0 errors.
>>>>
>>>> Summary: There was 1 WARNING message.
>>>>
>>>> ERROR: Traceback (most recent call last):
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/cookerdata.py", line 162, in wrapped
>>>>       return func(fn, *args)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/cookerdata.py", line 187, in parse_config_file
>>>>       return bb.parse.handle(fn, data, include)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/parse/__init__.py", line 107, in handle
>>>>       return h['handle'](fn, data, include)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 118, in handle
>>>>       abs_fn = resolve_file(fn, data)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/parse/__init__.py", line 133, in resolve_file
>>>>       raise IOError(errno.ENOENT, "file %s not found" % fn)
>>>> FileNotFoundError: [Errno 2] file /home/pokybuild/yocto-worker/auh/build/build/poky/meta/recipes-devtools/rust/conf/layer.conf not found
>>>>
>>>> ERROR: Unable to parse /home/pokybuild/yocto-worker/auh/build/build/poky/meta/recipes-devtools/rust/conf/layer.conf: [Errno 2] file /home/pokybuild/yocto-worker/auh/build/build/poky/meta/recipes-devtools/rust/conf/layer.conf not found
>>>> Traceback (most recent call last):
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/cookerdata.py", line 162, in wrapped
>>>>       return func(fn, *args)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/cookerdata.py", line 187, in parse_config_file
>>>>       return bb.parse.handle(fn, data, include)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/parse/__init__.py", line 107, in handle
>>>>       return h['handle'](fn, data, include)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 118, in handle
>>>>       abs_fn = resolve_file(fn, data)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/parse/__init__.py", line 133, in resolve_file
>>>>       raise IOError(errno.ENOENT, "file %s not found" % fn)
>>>> FileNotFoundError: [Errno 2] file /home/pokybuild/yocto-worker/auh/build/build/poky/meta/recipes-devtools/rust/conf/layer.conf not found
>>>>
>>>> During handling of the above exception, another exception occurred:
>>>>
>>>> Traceback (most recent call last):
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/scripts/devtool", line 334, in <module>
>>>>       ret = main()
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/scripts/devtool", line 321, in main
>>>>       ret = args.func(args, config, basepath, workspace)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/scripts/lib/devtool/standard.py", line 2108, in finish
>>>>       updated, appendfile, removed = _update_recipe(args.recipename, workspace, rd, args.mode, appendlayerdir, wildcard_version=True, no_remove=False, no_report_remove=removing_original, initial_rev=args.initial_rev, dry_run_outdir=dry_run_outdir, no_overrides=args.no_overrides, force_patch_refresh=args.force_patch_refresh)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/scripts/lib/devtool/standard.py", line 1814, in _update_recipe
>>>>       updated, appendf, removed = _update_recipe_patch(recipename, workspace, srctree, crd, appendlayerdir, wildcard_version, no_remove, no_report_remove, initial_rev, dry_run_outdir, force_patch_refresh)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/scripts/lib/devtool/standard.py", line 1671, in _update_recipe_patch
>>>>       redirect_output=dry_run_outdir)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/meta/lib/oe/recipeutils.py", line 705, in bbappend_recipe
>>>>       appendpath, pathok = get_bbappend_path(rd, destlayerdir, wildcardver)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/meta/lib/oe/recipeutils.py", line 632, in get_bbappend_path
>>>>       confdata = bb.cookerdata.parse_config_file(destlayerconf, confdata)
>>>>     File "/home/pokybuild/yocto-worker/auh/build/build/poky/bitbake/lib/bb/cookerdata.py", line 167, in wrapped
>>>>       raise bb.BBHandledException()
>>>> bb.BBHandledException
>>>>
>>>>
>>>> Please review the attached files for further information and build/update failures.
>>>> Any problem please file a bug athttps://bugzilla.yoctoproject.org/enter_bug.cgi?product=Automated%20Update%20Handler
>>>>
>>>> Regards,
>>>> The Upgrade Helper
>>>>
>>>> 
>>>>
>> --
>> # Randy MacLeod
>> # Wind River Linux
>>
> .


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

  reply	other threads:[~2022-06-22  6:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01 16:18 [AUH] rust-llvm: upgrading to 1.61.0 FAILED auh
2022-06-13  8:15 ` [OE-core] " Alexander Kanavin
2022-06-13 13:01   ` Randy MacLeod
2022-06-13 13:26     ` Alexander Kanavin
2022-06-22  6:24       ` Sundeep KOKKONDA [this message]
2022-06-22  8:32         ` Alexander Kanavin
2022-06-22 15:51           ` Sundeep KOKKONDA
     [not found]         ` <16FAE43C2CB492E0.16268@lists.openembedded.org>
2022-06-22  9:01           ` Alexander Kanavin
2022-06-22 13:16         ` 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=429629c2-95d3-7a9f-df3f-e8ddf2ba5b2f@gmail.com \
    --to=sundeep.kokkonda@gmail.com \
    --cc=alex.kanavin@gmail.com \
    --cc=naveen.gowda@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=randy.macleod@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox