Re: #yocto llvm support and meta-clang #yocto


Monsees, Steven C (US)
 

There appears to be an issue with build zeus based meta-clang under zeus platform...

I followed steps off meta-clang page, and from the work I did with meta-clang under "Rocko" about a year ago, a lot has changed under the hood...

Working under zeus 3.0.4... EXT SDK appears fully functional, I require CLANG/LLVM for future development...

Never seen this error before, did I miss a patch or possibly a step ?

Clean build area...

(1) Add meta-clang to bblayers.conf

(2) Added EXT SDK Settings for meta-clang :

SDKIMAGE_FEATURES_append = " staticdev-pkgs"

SDK_EXTRA_TOOLS = " \
nativesdk-cmake \
nativesdk-clang \ <---Only appears to download/build llvm when present
"

TOOLCHAIN_HOST_TASK_append = "${SDK_EXTRA_TOOLS}"

The build is much slower due to "native-clang-9.0.1-r0 do_compile"...


EXT SDK build error seen:
=========================

10:12 smonsees@yix490038 /disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default> bitbake sbcb-defaultfs-full -c populate_sdk_ext
Parsing recipes: 100% |#################################################################################| Time: 0:01:25
Parsing of 2463 .bb files complete (0 cached, 2463 parsed). 3671 targets, 91 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.44.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "rhel-7.9"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "sbcb-default"
DISTRO = "limws"
DISTRO_VERSION = "3.0.4"
TUNE_FEATURES = "m64 corei7"
TARGET_FPU = ""
meta
meta-poky = "my_yocto_3.0.4:f2eb22a8783f1eecf99bd4042695bab920eed00e"
meta-perl
meta-python
meta-filesystems
meta-networking
meta-initramfs
meta-oe = "zeus:2b5dd1eb81cd08bc065bc76125f2856e9383e98b"
meta-clang = "zeus:f5355ca9b86fb5de5930132ffd95a9b352d694f9"
meta = "master:a32ddd2b2a51b26c011fa50e441df39304651503"
meta-intel = "zeus:d9942d4c3a710406b051852de7232db03c297f4e"
meta-intel = "v2019.02:f635a364c55f1fb12519aff54924a0a5b947091e"

NOTE: Fetching uninative binary shim from file:///ede/tms/yocto/zeus/downloads/intel/x86_64-nativesdk-libc.tar.xz;sha256sum=a09922172c3a439105e0ae6b943daad2d83505b17da0aba97961ff433b8c21ab
Initialising tasks: 100% |##############################################################################| Time: 0:00:12
Checking sstate mirror object availability: 100% |######################################################| Time: 0:00:00
Sstate summary: Wanted 2490 Found 2157 Missed 333 Current 0 (86% match, 0% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
ERROR: sbcb-defaultfs-full-1.0-r0 do_sdk_depends: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:extend_recipe_sysroot(d)
0003:
File: '/disk0/scratch/smonsees/yocto/workspace_3/poky/meta/classes/staging.bbclass', lineno: 551, function: extend_recipe_sysroot
0547: dest = newmanifest[l]
0548: if l.endswith("/"):
0549: staging_copydir(l, targetdir, dest, seendirs)
0550: continue
*** 0551: staging_copyfile(l, targetdir, dest, postinsts, seendirs)
0552:
0553: bb.note("Installed into sysroot: %s" % str(msg_adding))
0554: bb.note("Skipping as already exists in sysroot: %s" % str(msg_exists))
0555:
File: '/disk0/scratch/smonsees/yocto/workspace_3/poky/meta/classes/staging.bbclass', lineno: 144, function: staging_copyfile
0140: if os.path.islink(c):
0141: linkto = os.readlink(c)
0142: if os.path.lexists(dest):
0143: if not os.path.islink(dest):
*** 0144: raise OSError(errno.EEXIST, "Link %s already exists as a file" % dest, dest)
0145: if os.readlink(dest) == linkto:
0146: return dest
0147: raise OSError(errno.EEXIST, "Link %s already exists to a different location? (%s vs %s)" % (dest, os.readlink(dest), linkto), dest)
0148: os.symlink(linkto, dest)
Exception: FileExistsError: [Errno 17] Link /disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/sbcb_default-poky-linux/sbcb-defaultfs-full/1.0-r0/recipe-sysroot/lib already exists as a file: '/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/sbcb_default-poky-linux/sbcb-defaultfs-full/1.0-r0/recipe-sysroot/lib'

ERROR: Logfile of failure stored in: /disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/sbcb_default-poky-linux/sbcb-defaultfs-full/1.0-r0/temp/log.do_sdk_depends.24732
ERROR: Task (/disk0/scratch/smonsees/yocto/workspace_3/poky/../meta-bae/meta-limws/meta-intel/recipes-core/images/sbcb-defaultfs-full.bb:do_sdk_depends) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6892 tasks of which 5539 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/disk0/scratch/smonsees/yocto/workspace_3/poky/../meta-bae/meta-limws/meta-intel/recipes-core/images/sbcb-defaultfs-full.bb:do_sdk_depends
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
13:01 smonsees@yix490038 /disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default>



Note: Modifying SDK_EXTRA_TOOLS by removing "nativesdk-clang", i.e.:

SDK_EXTRA_TOOLS = " \
nativesdk-cmake \
"

If I remove, the build is much faster, and it builds without the error, also appears not to require/include
"llvm" component in build.
I do not believe the full package was actually built/enabled, but no errors and image is functional.


13:09 smonsees@yix490038 /disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default> bitbake sbcb-defaultfs-full -c populate_sdk_ext
Parsing recipes: 100% |#################################################################################| Time: 0:01:26
Parsing of 2463 .bb files complete (0 cached, 2463 parsed). 3671 targets, 91 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.44.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "rhel-7.9"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "sbcb-default"
DISTRO = "limws"
DISTRO_VERSION = "3.0.4"
TUNE_FEATURES = "m64 corei7"
TARGET_FPU = ""
meta
meta-poky = "my_yocto_3.0.4:f2eb22a8783f1eecf99bd4042695bab920eed00e"
meta-perl
meta-python
meta-filesystems
meta-networking
meta-initramfs
meta-oe = "zeus:2b5dd1eb81cd08bc065bc76125f2856e9383e98b"
meta-clang = "zeus:f5355ca9b86fb5de5930132ffd95a9b352d694f9"
meta = "master:a32ddd2b2a51b26c011fa50e441df39304651503"
meta-intel = "zeus:d9942d4c3a710406b051852de7232db03c297f4e"
meta-intel = "v2019.02:f635a364c55f1fb12519aff54924a0a5b947091e"

NOTE: Fetching uninative binary shim from file:///ede/tms/yocto/zeus/downloads/intel/x86_64-nativesdk-libc.tar.xz;sha256sum=a09922172c3a439105e0ae6b943daad2d83505b17da0aba97961ff433b8c21ab
Initialising tasks: 100% |##############################################################################| Time: 0:00:12
Checking sstate mirror object availability: 100% |######################################################| Time: 0:00:00
Sstate summary: Wanted 2436 Found 2407 Missed 29 Current 0 (98% match, 0% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
NOTE: Tasks Summary: Attempted 6767 tasks of which 6223 didn't need to be rerun and all succeeded.
13:31 smonsees@yix490038 /disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default>

-----Original Message-----
From: Khem Raj <raj.khem@...>
Sent: Tuesday, April 20, 2021 12:02 PM
To: Monsees, Steven C (US) <steven.monsees@...>; Anton Antonov <anton.antonov@...>; yocto@...
Subject: Re: [yocto] #yocto llvm support

External Email Alert

This email has been sent from an account outside of the BAE Systems network.

Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access "Cybersecurity OneSpace Page" and report phishing by clicking the button "Report Phishing" on the Outlook toolbar.



On 4/20/21 7:00 AM, Monsees, Steven C (US) via lists.yoctoproject.org wrote:
I noticed similar behavior.

I am running zeus 3.0.4, "devtool sdk-install llvm" will get llvm
8.0.1.

When I build meta-clang, and I set TOOLCHAIN?="clang" in local.conf it
appears to grab llvm-project-source-9.0.1-9.0.1.
this is intentional, when you use meta-clang, then llvm is preferred from LLVM since them we have consistent version of llvm for clang and others.

*From:*yocto@... <yocto@...> *On
Behalf Of *Anton Antonov
*Sent:* Tuesday, April 20, 2021 9:51 AM
*To:* yocto@...
*Subject:* Re: [yocto] #yocto llvm support

*_External Email Alert_*

*This email has been sent from an account outside of the BAE Systems
network.*

Please treat the email with caution, especially if you are requested
to click on a link, decrypt/open an attachment, or enable macros.  For
further information on how to spot phishing, access "Cybersecurity
OneSpace Page" and report phishing by clicking the button "Report
Phishing" on the Outlook toolbar.


Hi Steven,

  I used meta-clang in my recipes and I noticed that:
1. The current release of poky uses LLVM v11.1.0 by default
(poky/meta/recipes-devtools/llvm/llvm_git.bb)
2. Meta-clang requires LLVM v12.0.0 (meta-clang/conf/layer.conf
defines LLVMVERSION = "12.0.0")

As a result just including meta-clang into bblayers.conf will require
bitbake to build a new version of LLVM and rebuild everything which
uses it

Anton




Join yocto@lists.yoctoproject.org to automatically receive all group messages.