* Yocto standard SDK/cmake/ and meta-clang build issue
@ 2020-08-24 14:38 Monsees, Steven C (US)
2020-08-24 17:10 ` [yocto] " Mikko Rapeli
0 siblings, 1 reply; 2+ messages in thread
From: Monsees, Steven C (US) @ 2020-08-24 14:38 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 7775 bytes --]
I am having trouble with configuring my SDK for meta-clang...
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"
(1) Is this the correct method to add these components to my SDK ?
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/sbcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-pokysdk-linux/x86_64-pokysdk-linux-gcc
| -- Check for working C compiler: /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/x86_64-pokysdk-linux/x86_64-pokysdk-linux-gcc
| -- Check for working C compiler: /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/x86_64-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/sbcb-default/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-pokysdk-linux/x86_64-pokysdk-linux-g++
| -- Check for working CXX compiler: /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/x86_64-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/sbcb-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.
(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 ?
Thanks,
Steve
[-- Attachment #2: Type: text/html, Size: 29675 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [yocto] Yocto standard SDK/cmake/ and meta-clang build issue
2020-08-24 14:38 Yocto standard SDK/cmake/ and meta-clang build issue Monsees, Steven C (US)
@ 2020-08-24 17:10 ` Mikko Rapeli
0 siblings, 0 replies; 2+ messages in thread
From: Mikko Rapeli @ 2020-08-24 17:10 UTC (permalink / raw)
To: steven.monsees; +Cc: yocto
Hi,
On Mon, Aug 24, 2020 at 02:38:54PM +0000, Monsees, Steven C (US) via lists.yoctoproject.org wrote:
>
> I am having trouble with configuring my SDK for meta-clang...
>
> 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 \
I was wondering on same thing few days ago.
nativesdk-clang and clang-cross-canadian-aarch64 if your target arch is aarch64
bring a working clang compiler to the SDK.
I was also missing the clang-cross bit for a long time and scratching my
head.
Hope this helps,
-Mikko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-24 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-24 14:38 Yocto standard SDK/cmake/ and meta-clang build issue Monsees, Steven C (US)
2020-08-24 17:10 ` [yocto] " Mikko Rapeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox