I am having trouble configuring my SDK to use the meta-clang compiler-rt component properly.
How do I configure my build so meta-clang brings in compiler-rt and generates the libclang_rt.binutils-x86_64.a library I require? When I attempt to build in "compiler-rt" component I get the CMAKE Error shown below. No matter how I try, for example: TOOLCHAIN_TARGET_TASK_append = "compiler-rt-static-dev compiler-rt-dev" Or: SDK_EXTRA_TOOLS = " \ nativesdk-cmake \ nativesdk-clang \ nativesdk-compiler-rt \ " I get the "cmake" error described below. (1) What Is this the correct method to add this components to my SDK ? (2) I do not understand how to resolve this , all are yocto based components, the only llvm components are pulled in by meta-clang, what am I expected to edit to resolve ?, and how ? Can someone explain to me what this error is attempting to convey, and what I am doing wrong ? (3) Is it correct to expect the cmake and clang components to work together under yocto? (4) I do not want the tools built into my kernel just the SDK for development, Is there better way to do what I want to do here ? Note: My target and host systems are both x86-64... And, yes, the "-rtlib-libgcc" works for my basic test code and bypasses requiring compiler-rt, but I would like to understand what is going on below and be able to build correctly... Synopsis of issue: ----------------------- When I build my SDK, I setup the following: SDKMACHINE = "x86_64" SDKIMAGE_FEATURES_append = " staticdev-pkgs" TOOLCHAIN_HOST_TASK_append = "${SDK_EXTRA_TOOLS}" SDK_EXTRA_TOOLS = " \ nativesdk-cmake \ nativesdk-clang \ " require conf/distro/include/yocto-uninative.inc INHERIT += "uninative" My SDK builds and installs without issue... Running a very basic example produces the following issue: 09:22 smonsees@yix490016 ~/yocto/test>make hello x86_64-poky-linux-clang -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -mlittle-endian --sysroot=/disk0/scratch/smonsees/yocto/testSDK/sysroots/corei7-64-poky-linux -O2 -pipe -g -feliminate-unused-debug-types -ansi -c hello.c x86_64-poky-linux-clang -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -mlittle-endian --sysroot=/disk0/scratch/smonsees/yocto/testSDK/sysroots/corei7-64-poky-linux -O2 -pipe -g -feliminate-unused-debug-types -ansi hello.o -o hello clang-5.0: warning: argument unused during compilation: '-ansi' [-Wunused-command-line-argument] /disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-ld: cannot find /disk0/scratch/smonsees/yocto/testSDK/sysroots/corei7-64-poky-linux/usr/lib/clang/5.0.1/lib/linux/libclang_rt.builtins-x86_64.a: No such file or directory clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [hello] Error 1 09:22 smonsees@yix490016 ~/yocto/test> The file in question does not exist on my system. If I add "nativesdk-compiler-rt" like so: SDK_EXTRA_TOOLS = " \ nativesdk-cmake \ nativesdk-clang \ nativesdk-compiler-rt \ " I get the following error: Log data follows: | DEBUG: Executing shell function do_configure | -- The C compiler identification is GNU 7.3.0 | -- The CXX compiler identification is GNU 7.3.0 | -- The ASM compiler identification is GNU | -- Found assembler: | /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/s | bcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler | -rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_6 | 4-pokysdk-linux/x86_64-pokysdk-linux-gcc | -- Check for working C compiler: | /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/s | bcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler | -rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_6 | 4-pokysdk-linux/x86_64-pokysdk-linux-gcc | -- Check for working C compiler: | /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/s | bcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler | -rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_6 | 4-pokysdk-linux/x86_64-pokysdk-linux-gcc -- works | -- Detecting C compiler ABI info | -- Detecting C compiler ABI info - done | -- Detecting C compile features | -- Detecting C compile features - done | -- Check for working CXX compiler: | /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/s | bcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler | -rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_6 | 4-pokysdk-linux/x86_64-pokysdk-linux-g++ | -- Check for working CXX compiler: | /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/s | bcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler | -rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_6 | 4-pokysdk-linux/x86_64-pokysdk-linux-g++ -- works | -- Detecting CXX compiler ABI info | -- Detecting CXX compiler ABI info - done | -- Detecting CXX compile features | -- Detecting CXX compile features - done | -- Looking for unwind.h | -- Looking for unwind.h - found | CMake Error at CMakeLists.txt:38 (find_package): | By not providing "FindLLVM.cmake" in CMAKE_MODULE_PATH this project has | asked CMake to find a package configuration file provided by "LLVM", but | CMake did not find one. | | Could not find a package configuration file provided by "LLVM" with any of | the following names: | | LLVMConfig.cmake | llvm-config.cmake | | Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set | "LLVM_DIR" to a directory containing one of the above files. If "LLVM" | provides a separate development package or SDK, be sure it has been | installed. | | | -- Configuring incomplete, errors occurred! | See also "/disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/build/CMakeFiles/CMakeOutput.log". | WARNING: /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/run.do_configure.25988:1 exit 1 from 'cmake $oecmake_sitefile /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/git -DCMAKE_INSTALL_PREFIX:PATH=/opt/limws/2.4.1/sysroots/x86_64-pokysdk-linux/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_SBINDIR:PATH=bin -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec -DCMAKE_INSTALL_SYSCONFDIR:PATH=/opt/limws/2.4.1/sysroots/x86_64-pokysdk-linux/etc -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=../com -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/opt/limws/2.4.1/sysroots/x86_64-pokysdk-linux/var -DCMAKE_INSTALL_LIBDIR:PATH=lib -DCMAKE_INSTALL_INCLUDEDIR:PATH=include -DCMAKE_INSTALL_DATAROOTDIR:PATH=share -DCMAKE_INSTALL_SO_NO_EXE=0 -DCMAKE_TOOLCHAIN_FILE=/disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/toolchain.cmake -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 -DCOMPILER_RT_STANDALONE_BUILD=ON -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=x86_64-pokysdk-linux -DCOMPILER_RT_BUILD_XRAY=OFF -G Ninja ${PACKAGECONFIG_CONFARGS} -DLLVM_TABLEGEN=/disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/llvm-tblgen -DCLANG_TABLEGEN=/disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/clang-tblgen -Wno-dev' | ERROR: Function failed: do_configure (log file is located at | /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/s | bcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler | -rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/log.do_configure.25988) ERROR: Task (virtual:nativesdk:/disk0/scratch/smonsees/yocto/workspace_2/poky/../meta-clang/recipes-devtools/clang/compiler-rt_git.bb:do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 5382 tasks of which 5341 didn't need to be rerun and 1 failed. Thanks, Steve
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#50344): https://lists.yoctoproject.org/g/yocto/message/50344 Mute This Topic: https://lists.yoctoproject.org/mt/76393119/21656 Mute #sdk: https://lists.yoctoproject.org/g/yocto+yocto/mutehashtag/sdk Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-