[poky][meta-clang][musl][kirkstone] Poky with clang coverage using musl

Hope Sneddon <[email protected]>
Newsgroups org.yoctoproject.lists.poky
Message-ID <SL2P216MB12770013288A1C8854867E7E99F02@SL2P216MB1277.KORP216.PROD.OUTLOOK.COM>
Hi Poky community,
This is a pretty edge-case poky setup, I am trying to implement poky with clang (including code coverage flags) as the compiler and musl as the standard C library. With this setup on kirkstone (current release distro -1), I am getting the following consistent error:
| /home/user/dev/poky/build/tmp/work/cortexa57-poky-linux-musl/musl/1.2.3+gitAUTOINC+7a43f6fea9-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux-musl/aarch64-poky-linux-musl-ld: cannot find /home/user/dev/poky/build/tmp/work/cortexa57-poky-linux-musl/musl/1.2.3+gitAUTOINC+7a43f6fea9-r0/recipe-sysroot/usr/lib/clang/14.0.6/lib/linux/libclang_rt.profile-aarch64.a: No such file or directory
| clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
| make: *** [Makefile:163: lib/libc.so] Error 1
| ERROR: oe_runmake failed
| WARNING: /home/user/dev/poky/build/tmp/work/cortexa57-poky-linux-musl/musl/1.2.3+gitAUTOINC+7a43f6fea9-r0/temp/run.do_compile.97139:168 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
|       #1: bbfatal_log, /home/user/dev/poky/build/tmp/work/cortexa57-poky-linux-musl/musl/1.2.3+gitAUTOINC+7a43f6fea9-r0/temp/run.do_compile.97139, line 168
|       #2: die, /home/user/dev/poky/build/tmp/work/cortexa57-poky-linux-musl/musl/1.2.3+gitAUTOINC+7a43f6fea9-r0/temp/run.do_compile.97139, line 152
|       #3: oe_runmake, /home/user/dev/poky/build/tmp/work/cortexa57-poky-linux-musl/musl/1.2.3+gitAUTOINC+7a43f6fea9-r0/temp/run.do_compile.97139, line 147
|       #4: do_compile, /home/user/dev/poky/build/tmp/work/cortexa57-poky-linux-musl/musl/1.2.3+gitAUTOINC+7a43f6fea9-r0/temp/run.do_compile.97139, line 142
|       #5: main, /home/user/dev/poky/build/tmp/work/cortexa57-poky-linux-musl/musl/1.2.3+gitAUTOINC+7a43f6fea9-r0/temp/run.do_compile.97139, line 181
ERROR: Task (/home/user/dev/poky/build/../meta/recipes-core/musl/musl_git.bb:do_compile) failed with exit code '1'

It appears that the clang build is not making it into the target directory from the native host… I have searched the internet for what configuration element I am missing and have yet to find anything that progresses beyond this oe_runmake error. I have included my configuration above the standard poky setup below:
/home/user/dev/poky/build/conf/local.conf:
MACHINE = "qemuarm64"
SDKMACHINE = "x86_64"
TCLIBC ?= "musl"

TOOLCHAIN = "clang"
TARGET_CPPFLAGS:prepend:class-target:toolchain-clang = "-fprofile-instr-generate -fcoverage-mapping -v "
RUNTIME = "llvm"
CLANGSDK = "1"

/home/user/poky/meta/conf/bblayer.conf:
BBLAYERS += "${TOPDIR}/../meta-clang"

/home/user/dev/poky/meta-clang/recipes-devtools/clang/llvm-project-source.inc
CLANG_EXTRA_OE_VENDORS ?= "${TARGET_VENDOR} ${SDK_VENDOR} -poky"

/home/user/dev/poky/musl/configure
wrapper=yes
gcc_wrapper=no
clang_wrapper=yes

/home/user/dev/poky/musl/INSTALL
CC=musl-clang ./configure ...

Even some guidance on getting more logging information on the error would be helpful as invoking clang with -v doesn’t seem to produce more useful information on the source of the linking error either.

Thank you,
Hope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.