All of lore.kernel.org
 help / color / mirror / Atom feed
* #sdk -Standard SDK build with cmake and meta-clang gives error when I attempt topull in compiler-rt
@ 2020-08-24 19:50 Monsees, Steven C (US)
  2020-08-24 21:02 ` [yocto] " Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Monsees, Steven C (US) @ 2020-08-24 19:50 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 8654 bytes --]


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



[-- Attachment #2: Type: text/html, Size: 16073 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto] #sdk -Standard SDK build with cmake and meta-clang gives error when I attempt topull in compiler-rt
  2020-08-24 19:50 #sdk -Standard SDK build with cmake and meta-clang gives error when I attempt topull in compiler-rt Monsees, Steven C (US)
@ 2020-08-24 21:02 ` Khem Raj
  2020-08-25 10:47   ` Monsees, Steven C (US)
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2020-08-24 21:02 UTC (permalink / raw)
  To: Monsees, Steven C (US); +Cc: yocto

On Mon, Aug 24, 2020 at 12:50 PM Monsees, Steven C (US) via
lists.yoctoproject.org
<steven.monsees=baesystems.com@lists.yoctoproject.org> wrote:
>
>
>
> 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"
>

this should bring the compiler-rt .a files into target sysroot
>
>
> Or:
>
>
>
> SDK_EXTRA_TOOLS = "  \
>
>     nativesdk-cmake \
>
>     nativesdk-clang \
>
>     nativesdk-compiler-rt \

nativesdk compile-rt may not be needed.

>
>     "
>
> 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

this tells me that somehow compiler-rt-static-dev is not included or
is missing this libclang_rt.builtins-x86_64.a

>
> 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
>
>
>
>
>
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: #sdk -Standard SDK build with cmake and meta-clang gives error when I attempt topull in compiler-rt
  2020-08-24 21:02 ` [yocto] " Khem Raj
@ 2020-08-25 10:47   ` Monsees, Steven C (US)
  2020-08-25 19:25     ` Monsees, Steven C (US)
  2020-08-26  6:43     ` [yocto] " Khem Raj
  0 siblings, 2 replies; 6+ messages in thread
From: Monsees, Steven C (US) @ 2020-08-25 10:47 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 5567 bytes --]

I think there is a problem with compiler-rt component and cmake…

Doing bitbake compiler-rt produces:

Initialising tasks: 100% |#####################################################| Time: 0:00:00

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

ERROR: compiler-rt-5.0.1+gitAUTOINC+4b38c4038a-r0 do_configure: Function failed: do_configure (log file is located at /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/log.do_configure.17534)

ERROR: Logfile of failure stored in: /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/log.do_configure.17534

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/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc

| -- Check for working C compiler: /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc

| -- Check for working C compiler: /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-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/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++

| -- Check for working CXX compiler: /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-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/corei7-64-poky-linux/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/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/run.do_configure.17534:1 exit 1 from 'cmake $oecmake_sitefile /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/git -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_SBINDIR:PATH=sbin -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=../com -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/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/corei7-64-poky-linux/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-poky-linux -DCOMPILER_RT_BUILD_XRAY=OFF -G Ninja ${PACKAGECONFIG_CONFARGS} -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/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/log.do_configure.17534)

ERROR: Task (/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 495 tasks of which 488 didn't need to be rerun and 1 failed.

Summary: 1 task failed:

/disk0/scratch/smonsees/yocto/workspace_2/poky/../meta-clang/recipes-devtools/clang/compiler-rt_git.bb:do_configure

[-- Attachment #2: Type: text/html, Size: 12747 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: #sdk -Standard SDK build with cmake and meta-clang gives error when I attempt topull in compiler-rt
  2020-08-25 10:47   ` Monsees, Steven C (US)
@ 2020-08-25 19:25     ` Monsees, Steven C (US)
  2020-08-26  6:43     ` [yocto] " Khem Raj
  1 sibling, 0 replies; 6+ messages in thread
From: Monsees, Steven C (US) @ 2020-08-25 19:25 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

How can I resolve the "cmake" error we are seeing ?

* 

What Is this the correct method to add/configure compiler-rt components to work in my SDK ?

* 

All are yocto based components, the only llvm components are pulled in by meta-clang, what am I expected to edit to resolve ?,  Can someone explain to me what this error is attempting to convey, and what I need to do to address ?

* 

Is it correct to expect the cmake and clang components to  be able to  work together under Yocto, under the SDK ?

Thanks,

Steve

[-- Attachment #2: Type: text/html, Size: 2682 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto] #sdk -Standard SDK build with cmake and meta-clang gives error when I attempt topull in compiler-rt
  2020-08-25 10:47   ` Monsees, Steven C (US)
  2020-08-25 19:25     ` Monsees, Steven C (US)
@ 2020-08-26  6:43     ` Khem Raj
  2020-08-27 14:50       ` Monsees, Steven C (US)
  1 sibling, 1 reply; 6+ messages in thread
From: Khem Raj @ 2020-08-26  6:43 UTC (permalink / raw)
  To: steven.monsees, yocto



On 8/25/20 3:47 AM, Monsees, Steven C (US) via lists.yoctoproject.org wrote:
> I think there is a problem with compiler-rt component and cmake…
> 

it seems to be using gcc to compile, perhaps you can add TOOLCHAIN = 
"claing" inside compiler-rt recipe and see if it makes progress.

> Doing bitbake compiler-rt produces:
> 
> Initialising tasks: 100% 
> |#####################################################| Time: 0:00:00
> 
> NOTE: Executing SetScene Tasks
> 
> NOTE: Executing RunQueue Tasks
> 
> ERROR: compiler-rt-5.0.1+gitAUTOINC+4b38c4038a-r0 do_configure: Function 
> failed: do_configure (log file is located at 
> /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/log.do_configure.17534)
> 
> ERROR: Logfile of failure stored in: 
> /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/log.do_configure.17534
> 
> 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/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc
> 
> | -- Check for working C compiler: 
> /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc
> 
> | -- Check for working C compiler: 
> /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-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/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++
> 
> | -- Check for working CXX compiler: 
> /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-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/corei7-64-poky-linux/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/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/run.do_configure.17534:1 
> exit 1 from 'cmake $oecmake_sitefile 
> /disk0/scratch/smonsees/yocto/workspace_2/meta-bae/meta-limws/builds/sbcb-default/tmp/work/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/git 
> -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_BINDIR:PATH=bin 
> -DCMAKE_INSTALL_SBINDIR:PATH=sbin 
> -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec 
> -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc 
> -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=../com 
> -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/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/corei7-64-poky-linux/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-poky-linux 
> -DCOMPILER_RT_BUILD_XRAY=OFF -G Ninja ${PACKAGECONFIG_CONFARGS} -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/corei7-64-poky-linux/compiler-rt/5.0.1+gitAUTOINC+4b38c4038a-r0/temp/log.do_configure.17534)
> 
> ERROR: Task 
> (/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 495 tasks of which 488 didn't need to be 
> rerun and 1 failed.
> 
> Summary: 1 task failed:
> 
>    
> /disk0/scratch/smonsees/yocto/workspace_2/poky/../meta-clang/recipes-devtools/clang/compiler-rt_git.bb:do_configure
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: #sdk -Standard SDK build with cmake and meta-clang gives error when I attempt topull in compiler-rt
  2020-08-26  6:43     ` [yocto] " Khem Raj
@ 2020-08-27 14:50       ` Monsees, Steven C (US)
  0 siblings, 0 replies; 6+ messages in thread
From: Monsees, Steven C (US) @ 2020-08-27 14:50 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 2251 bytes --]

The following patch was the problem with the compiler-rt component of meta-clang:

under : meta-clang/recipes-devtools/clang/compiler-rt  -

*0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch*

You are using this to block build based on fail, even though the environment is apparently setup correctly... this appears to be an unnecessary check...

Everything builds correctly if we ignore this check by passing "QUIET"...

bitbake - clang-native, nativesdk-clang, and compiler-rt, all built correctly, plus my SDK builds and the linker issue has been resolved.

===

From 6bfcd697851219f35688299c32e7068fad50c6f5 Mon Sep 17 00:00:00 2001
From: Khem Raj < raj.khem@gmail.com >
Date: Thu, 19 May 2016 23:11:45 -0700
Subject: [PATCH 2/5] Simplify cross-compilation. Don't use native-compiled
llvm-config.

Note: AddLLVM.cmake does not expose the LLVM source directory.
So if you want to run the test suite, you need to either:

1) set LLVM_MAIN_SRC_DIR explicitly (to find lit.py)
2) change AddLLVM.cmake to point to an installed 'lit'.
3) add_subdirectory(compiler-rt/test) from clang instead of compiler-rt.

https://us.codeaurora.org/patches/quic/llvm/50683/compiler-rt-cross-compilation.patch

Signed-off-by: Greg Fitzgerald < gregf@codeaurora.org >
Signed-off-by: Khem Raj < raj.khem@gmail.com >
---
CMakeLists.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b953b212..571aee7ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,7 +62,15 @@ set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN
"Build for a bare-metal target.")

if (COMPILER_RT_STANDALONE_BUILD)
-  load_llvm_config()
*+  find_package(LLVM REQUIRED) <---SHOULD BE Passing "QUIET"*
+  list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
+
+  # Variables that AddLLVM.cmake depends on (included by AddCompilerRT)
+  set(LLVM_TOOLS_BINARY_DIR "${LLVM_INSTALL_PREFIX}/bin")
+  set(LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}/lib")
+
+  set(LLVM_LIBRARY_OUTPUT_INTDIR
+    ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})

# Find Python interpreter.
set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5)
--
2.16.1

===

[-- Attachment #2: Type: text/html, Size: 3123 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-27 14:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 19:50 #sdk -Standard SDK build with cmake and meta-clang gives error when I attempt topull in compiler-rt Monsees, Steven C (US)
2020-08-24 21:02 ` [yocto] " Khem Raj
2020-08-25 10:47   ` Monsees, Steven C (US)
2020-08-25 19:25     ` Monsees, Steven C (US)
2020-08-26  6:43     ` [yocto] " Khem Raj
2020-08-27 14:50       ` Monsees, Steven C (US)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.