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

2021-04-21 Thread Monsees, Steven C (US) via lists.yoctoproject.org

Khem:

There are at least 4 zeus released tags, can you vouch for one of them to work 
properly with meta-clang ?
Porting to dunfell might not be possible at this time...

Would it be possible to build the dunfell drop of meta-clang under zeus ?


Although we do not plan on using clang in the kernel, I did a quick build to 
see if I would get a similar error...
Seeing: error: unknown argument: '-maccumulate-outgoing-args' for kernel build

Any ideas what might be missing ?

Again Note: If I remove/comment out the line TOOLCHAIN ?= "clang" in 
conf/local.conf, 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.

Steps used to build a clean Kernel image with meta-clang...

(1) Added meta-clang to bblayers.conf

(2) Added Setting for meta-clang in conf/local.conf:

TOOLCHAIN ?= "clang"

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

EXT SDK build error seen:
=

13:36 smonsees@yix490038 
/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default> bitbake -k 
sbcb-defaultfs-fullParsing recipes: 100% 
|#|
 Time: 0:01:27
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"

Initialising tasks: 100% 
|##|
 Time: 0:00:05
Checking sstate mirror object availability: 100% 
|##| Time: 0:00:01
Sstate summary: Wanted 2137 Found 709 Missed 1428 Current 0 (33% match, 0% 
complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
ERROR: gnu-efi-3.0.9-r0 do_compile: oe_runmake failed
ERROR: gnu-efi-3.0.9-r0 do_compile: Execution of 
'/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/temp/run.do_compile.1840'
 failed with exit code 1:
mkdir -p 
/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/gnu-efi-3.0.9/x86_64/lib
make -C 
/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/gnu-efi-3.0.9/x86_64/lib
 -f 
/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/gnu-efi-3.0.9//lib/Makefile
 
SRCDIR=/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/gnu-efi-3.0.9//lib
 ARCH=x86_64
make[1]: Entering directory 
`/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/gnu-efi-3.0.9/x86_64/lib'
for sdir in ia32 x86_64 ia64 aarch64 arm mips64el runtime; do mkdir -p $sdir; 
done
x86_64-poky-linux-clang  -m64 -march=nehalem -mtune=generic  -msse4.2   
-mlittle-endian -Wno-error=unused-command-line-argument -Qunused-arguments 
--sysroot=/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/recipe-sysroot
 
-I/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/gnu-efi-3.0.9//lib
 
-I/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/gnu-efi-3.0.9//lib/../inc
 
-I/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/gnu-efi-3.0.9//lib/../inc/x86_64
 
-I/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0/gnu-efi-3.0.9//lib/../inc/protocol
  -O2 -pipe -g -feliminate-unused-debug-types 
-fmacro-prefix-map=/disk0/scratch/smonsees/yocto/workspace_3/builds2/sbcb-default/tmp/work/corei7-64-poky-linux/gnu-efi/3.0.9-r0=/usr/src/debug/gnu-efi/3.0.9-r0
  

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

2021-04-20 Thread Khem Raj
On Tue, Apr 20, 2021 at 12:18 PM Monsees, Steven C (US)
 wrote:
>
>
> 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...
>

I think for future development you should look into dunfell or newer
since those are supported releases.

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

clang toolchain has evolved rapidly in past few years and so you might
find major changes from release to release and also SDK builds are
relatively
new, I think dunfell and newer is where its properly working without
much issues.

>
> 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: 
>  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: 

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

2021-04-20 Thread Monsees, Steven C (US) via lists.yoctoproject.org

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: 
 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