can not build clang toolchains in yocto 5.4-zeus

cancel
Showing results for 
Search instead for 
Did you mean: 

can not build clang toolchains in yocto 5.4-zeus

Jump to solution
1,259 Views
gonewithwind-peter
Senior Contributor I

hi all,

I am playing imx8qm iwave board with yocto 5.4-zeus , I neeed clang toolchains. I have added 

TOOLCHAIN = " clang"   in local.conf,

but after  bitbake imx-image-full -c populate_sdk to generate the toolchain,

but there is no clang after installing the toolchains.

before I played  yocto L4.14.98-2.0.0_GA . it worked well.

why yocto 5.4-zeus no clang toolchains?

 

any help ?

Thank you

0 Kudos
1 Solution
1,229 Views
gonewithwind-peter
Senior Contributor I

after I remove CORE_IMAGE_EXTRA_INSTALL += " chromium-ozone-wayland" in local.conf.

clang toolchain can build and work well.

View solution in original post

10 Replies
360 Views
josephwu1
Contributor II

can you show the detail steps for build clang sdk?

thanks

0 Kudos
309 Views
gonewithwind-peter
Senior Contributor I

hi

@josephwu1 

I have done that work. I am not wotking for it new.

I think that detail steps for build clang sdk as normal toolchain(c, c++) :

 

add TOOLCHAIN = " clang"   in local.conf,

bitbake imx-image-full -c populate_sdk

to generate the toolchain, 

after that  run  that big toolchain XXXXX.sh .

you can search how to build normal toolchain c(c++). for me , I need to add clang.

0 Kudos
267 Views
josephwu1
Contributor II

my step is below, but still error, can you help me to fix it.

  1. repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-hardknott -m imx-5.10.72-2.2.0.xml && repo sync
  2. EULA=1 DISTRO=fsl-imx-xwayland MACHINE=imx6ull14x14evk source imx-setup-release.sh -b build_imx6ull14x14evk
  3. vi conf/local.conf ===> add TOOLCHAIN = "clang"
  4. bitbake imx-image-full -c populate_sdk

 

4.18-r0/recipe-sysroot-native/usr/include -isystem/home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -O2 -pipe -c -o xalloc-die.o ../../m4-1.4.18/lib/xalloc-die.c
| gcc -I. -I../../m4-1.4.18/lib -isystem/home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -isystem/home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -O2 -pipe -c -o gl_xlist.o ../../m4-1.4.18/lib/gl_xlist.c
| make[3]: *** [Makefile:1915: c-stack.o] Error 1
| make[3]: *** Waiting for unfinished jobs....
| make[3]: Leaving directory '/home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
| make[2]: *** [Makefile:1674: all] Error 2
| make[2]: Leaving directory '/home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
| make[1]: *** [Makefile:1572: all-recursive] Error 1
| make[1]: Leaving directory '/home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build'
| make: *** [Makefile:1528: all] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/run.do_compile.1597754:186 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
| #1: bbfatal_log, /home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/run.do_compile.1597754, line 186
| #2: die, /home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/run.do_compile.1597754, line 170
| #3: oe_runmake, /home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/run.do_compile.1597754, line 165
| #4: autotools_do_compile, /home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/run.do_compile.1597754, line 160
| #5: do_compile, /home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/run.do_compile.1597754, line 155
| #6: main, /home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/run.do_compile.1597754, line 199
| ERROR: Execution of '/home/fluoride12/samsung/temp1/build_imx6ull14x14evk/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/run.do_compile.1597754' failed with exit code 1
ERROR: Task (/home/fluoride12/samsung/temp1/sources/poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb:do_compile) failed with exit code '1'

0 Kudos
250 Views
gonewithwind-peter
Senior Contributor I

@josephwu1 

I followed your  steps. It works. this is no error. on ubuntu-18.04

but after install the toolchain .sh as below , and printenv | grep clang . there is no clang.

first you try to pass  bitbake to try again

 

fsl-imx-xwayland-glibc-x86_64-imx-image-full-cortexa7t2hf-neon-imx6ull14x14evk-toolchain-5.10-hardknott.sh

 

 

bitbake imx-image-full -c populate_sdk
WARNING: You have included the meta-virtualization layer, but 'virtualization' has not been enabled in your DISTRO_FEATURES. Some bbappend files may not take effect. See the meta-virtualization README for details on enabling virtualization support.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 775 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:29
Parsing of 3341 .bb files complete (529 cached, 2812 parsed). 4951 targets, 330 skipped, 3 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.50.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-18.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "imx6ull14x14evk"
DISTRO = "fsl-imx-xwayland"
DISTRO_VERSION = "5.10-hardknott"
TUNE_FEATURES = "arm vfp cortexa7 neon thumb callconvention-hard"
TARGET_FPU = "hard"
meta
meta-poky = "HEAD:269265c00091fa65f93de6cad32bf24f1e7f72a3"
meta-oe
meta-multimedia
meta-python = "HEAD:f44e1a2b575826e88b8cb2725e54a7c5d29cf94a"
meta-freescale = "HEAD:469d6c958c76ea235b3d3c1527e797ce3a7392e3"
meta-freescale-3rdparty = "HEAD:f8150f3b37cb83cba1f9e2378e57bb63e02d4610"
meta-freescale-distro = "HEAD:e6daa26ba1f748326546063d63a085ae671827d9"
meta-bsp
meta-sdk
meta-ml
meta-v2x = "HEAD:a38040cc159f0ef9fc177358932c2c75257c59e9"
meta-nxp-demo-experience = "HEAD:9dcc11ea9f525cffedbb28895e0abb443e56c3e0"
meta-chromium = "HEAD:8be1d3a0ba0cf32e61144900597207af5698c10d"
meta-clang = "HEAD:b0d805060791006d651efd3d7ae3dd5add8f70fe"
meta-gnome
meta-networking
meta-filesystems = "HEAD:f44e1a2b575826e88b8cb2725e54a7c5d29cf94a"
meta-qt5 = "HEAD:43f8f539d40070a70fe89136db89bf5bb1dfe7ed"
meta-python2 = "HEAD:8db9e4f6ceae33d7a4f55453d31e69f9858af4eb"
meta-virtualization = "HEAD:7f719ef40896b6c78893add8485fda995b00d51d"

Initialising tasks: 100% |#######################################| Time: 0:00:08
Sstate summary: Wanted 2856 Local 0 Network 0 Missed 2856 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
WARNING: libpcre2-native-10.36-r0 do_fetch: Failed to fetch URL https://ftp.pcre.org/pub/pcre/pcre2-10.36.tar.bz2, attempting MIRRORS if available
WARNING: libpcre-8.44-r0 do_fetch: Failed to fetch URL https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.bz2, attempting MIRRORS if available
WARNING: strace-5.11-r0 do_fetch: Failed to fetch URL https://strace.io/files/5.11/strace-5.11.tar.xz, attempting MIRRORS if available
WARNING: quitindicators-1.0.1-r0 do_fetch: Failed to fetch URL http://quitcoding.com/download/QUItIndicators_1.0.1.tar.gz, attempting MIRRORS if available
WARNING: apt-2.2.2-r0 do_fetch: Failed to fetch URL http://ftp.debian.org/debian/pool/main/a/apt/apt_2.2.2.tar.xz, attempting MIRRORS if available
WARNING: cpuburn-arm-1.0+gitAUTOINC+ad7e646700-r0 do_fetch: Failed to fetch URL git://github.com/ssvb/cpuburn-arm.git, attempting MIRRORS if available
WARNING: firmwared-0+gitAUTOINC+2e6b5db43d-r0 do_fetch: Failed to fetch URL git://github.com/teg/firmwared.git, attempting MIRRORS if available
Currently 16 running tasks (3649 of 8094) 45% |############# |
Currently 16 running tasks (3654 of 8094) 45% |############# |
Currently 12 running tasks (7963 of 8094) 98% |############################## |
Currently 12 running tasks (7963 of 8094) 98% |############################## |
Currently 12 running tasks (7963 of 8094) 98% |############################## |
Currently 12 running tasks (7963 of 8094) 98% |############################## |
Currently 12 running tasks (7963 of 8094) 98% |############################## |
Currently 12 running tasks (7966 of 8094) 98% |############################## |
NOTE: Tasks Summary: Attempted 8094 tasks of which 0 didn't need to be rerun and all succeeded.

0 Kudos
232 Views
josephwu1
Contributor II

ok, thanks your quickly response.

my failure happened on ubuntu 22.04, i can try 18.04.

thanks.

206 Views
gonewithwind-peter
Senior Contributor I

@josephwu1 

welcome

0 Kudos
256 Views
gonewithwind-peter
Senior Contributor I

@josephwu1 

let me download the source code to try to repeat you error.

you can search solutions online at same time

0 Kudos
1,249 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello jin1,

I think whats missing it dependency on C++ runtime. default is libstdc++ so I guess you have to add a dependency on gcc-runtime

 

Regards

 

0 Kudos
1,242 Views
gonewithwind-peter
Senior Contributor I

Thank you 

@Bio_TICFSL 

I found one issue , I forgot to add meta-clang into the source code , but after  adding it and adding TOOLCHAIN ?= " clang"   in local.conf, there is still a error to build

bitbake imx-image-full  (I want to build it successfully ,and then to build bitbake imx-image-full -c populate_sdk)

:

my host is ubuntu 18.04

ERROR: nn-imx-1.0.4-r0 do_configure: oe_runmake failed

ERROR: nn-imx-1.0.4-r0 do_configure: Execution of '/home/rnd2/work/iw-5.4.24/iwg27s-release-bsp/build_imx8qm/tmp/work/aarch64-poky-linux/nn-imx/1.0.4-r0/temp/run.do_configure.24114' failed with exit code 1:

remove *.so and *.o

rm: cannot remove '*.o': No such file or directory

makefile:20: recipe for target 'clean' failed

make: *** [clean] Error 1

WARNING: exit code 1 from a shell command.

 

ERROR: Logfile of failure stored in: /home/rnd2/work/iw-5.4.24/iwg27s-release-bsp/build_imx8qm/tmp/work/aarch64-poky-linux/nn-imx/1.0.4-r0/temp/log.do_configure.24114

Log data follows:

| DEBUG: Executing shell function do_configure

| NOTE: make SDKTARGETSYSROOT=/home/rnd2/work/iw-5.4.24/iwg27s-release-bsp/build_imx8qm/tmp/work/aarch64-poky-linux/nn-imx/1.0.4-r0/recipe-sysroot AQROOT=/home/rnd2/work/iw-5.4.24/iwg27s-release-bsp/build_imx8qm/tmp/work/aarch64-poky-linux/nn-imx/1.0.4-r0/git clean

| remove *.so and *.o

| rm: cannot remove '*.o': No such file or directory

| makefile:20: recipe for target 'clean' failed

| make: *** [clean] Error 1

| ERROR: oe_runmake failed

| WARNING: exit code 1 from a shell command.

| ERROR: Execution of '/home/rnd2/work/iw-5.4.24/iwg27s-release-bsp/build_imx8qm/tmp/work/aarch64-poky-linux/nn-imx/1.0.4-r0/temp/run.do_configure.24114' failed with exit code 1:

| remove *.so and *.o

| rm: cannot remove '*.o': No such file or directory

| makefile:20: recipe for target 'clean' failed

| make: *** [clean] Error 1

| WARNING: exit code 1 from a shell command.

|

ERROR: Task (/home/rnd2/work/iw-5.4.24/iwg27s-release-bsp/sources/meta-imx/meta-ml/recipes-libraries/nn-imx/nn-imx_1.0.4.bb:do_configure) failed with exit code '1'

why nn-imx can not pass builing? before there was no TOOLCHAIN ?= " clang"   in local.conf, it's OK to build image and normal toolchains.

 

any more help?

Thank you

0 Kudos
1,230 Views
gonewithwind-peter
Senior Contributor I

after I remove CORE_IMAGE_EXTRA_INSTALL += " chromium-ozone-wayland" in local.conf.

clang toolchain can build and work well.