Re: [poky][meta-clang][musl][kirkstone] Poky with clang coverage using musl
Khem Raj <[email protected]>
| Newsgroups | org.yoctoproject.lists.poky |
|---|---|
| Message-ID | <CAMKF1sppGW4HwCMdpttk7KjWmxeJ+RQXnK4nSthqpNrzErMpMw@mail.gmail.com> |
On Wed, May 29, 2024 at 5:00 AM Hope Sneddon via lists.yoctoproject.org <[email protected]> wrote: > > > 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 > profiling is covered by a packageconfig option see https://github.com/kraj/meta-clang/blob/kirkstone/recipes-devtools/clang/compiler-rt_git.bb#L50 Most likely thats the issue here, however I will also say that its not a default tested option set so there might be more problems you might face once you enable it, clang toolchain is more and more single tree build these days where there might be dependencies which are hard to express in a cross build system like OE/yocto e.g. freshly baked tools in build areas etc. expected to exist before some of these options can be enabled, > | 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 ... > > Performing this setup with glibc largely works except for missing a runtime library. But the linking/ compatibility error with musl seems to be more severe than glibc. > > 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 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#13360): https://lists.yoctoproject.org/g/poky/message/13360 > Mute This Topic: https://lists.yoctoproject.org/mt/106367207/1997914 > Group Owner: [email protected] > Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]] > -=-=-=-=-=-=-=-=-=-=-=- >