Closed megaparanoik closed 5 years ago
if you dont need sanitizers just disable them
I have disabled sanitizers by EXTRA_OECMAKE_append = " -DCOMPILER_RT_BUILD_SANITIZERS=OFF" in compiler-rt_git.bb and now compiler-rt is buildable.
But I ran into the problem with libcxx_git.bb It fails on do.configure step. the CMakeError.log contains a lot of errors as follow:
Run Build Command:"/home/alex/temp/poky/build/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/libcxx/5.0.1+gitAUTOINC+1368f4044e_598ae4fa2e_5df6b5da0d_29d1624468-r0/recipe-sysroot-native/usr/bin/ninja" "cmTC_fe993"
[1/2] Building C object CMakeFiles/cmTC_fe993.dir/CheckIncludeFile.c.o
FAILED: CMakeFiles/cmTC_fe993.dir/CheckIncludeFile.c.o
/home/alex/temp/poky/build/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/libcxx/5.0.1+gitAUTOINC+1368f4044e_598ae4fa2e_5df6b5da0d_29d1624468-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-clang -march=armv7-a -mfpu=neon -mfloat-abi=hard -mlittle-endian -D__extern_always_inline=inline -no-integrated-as -Wno-error=unused-command-line-argument -Qunused-arguments -fstack-protector-strong -pie -fPIE -D_FORTIFY_SOURCE=2 -Wa,--noexecstack -Wformat -Wformat-security -Werror=format-security --sysroot=/home/alex/temp/poky/build/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/libcxx/5.0.1+gitAUTOINC+1368f4044e_598ae4fa2e_5df6b5da0d_29d1624468-r0/recipe-sysroot -O2 -Wa,--noexecstack -fexpensive-optimizations -frename-registers -fomit-frame-pointer -ftree-vectorize -finline-functions -finline-limit=64 -Wno-error=maybe-uninitialized -Wno-error=unused-result -march=armv7-a -mfpu=neon -mfloat-abi=hard -mlittle-endian -D__extern_always_inline=inline -no-integrated-as -Wno-error=unused-command-line-argument -Qunused-arguments -fstack-protector-strong -pie -fPIE -D_FORTIFY_SOURCE=2 -Wa,--noexecstack -Wformat -Wformat-security -Werror=format-security --sysroot=/home/alex/temp/poky/build/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/libcxx/5.0.1+gitAUTOINC+1368f4044e_598ae4fa2e_5df6b5da0d_29d1624468-r0/recipe-sysroot -fPIC -o CMakeFiles/cmTC_fe993.dir/CheckIncludeFile.c.o -c CheckIncludeFile.c
clang-5.0: warning: optimization flag '-fexpensive-optimizations' is not supported [-Wignored-optimization-argument]
clang-5.0: warning: optimization flag '-frename-registers' is not supported [-Wignored-optimization-argument]
clang-5.0: warning: optimization flag '-finline-limit=64' is not supported [-Wignored-optimization-argument]
warning: unknown warning option '-Werror=maybe-uninitialized'; did you mean '-Werror=uninitialized'? [-Wunknown-warning-option]
CheckIncludeFile.c:1:10: fatal error: 'malloc/malloc.h' file not found
#include <malloc/malloc.h>
^~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
ninja: build stopped: subcommand failed.
It looks like there is some issue with paths
Could you please direct me on what I have to check to determine the root of the error with libcxx. Thanks!
Try adding following in libcxx recipe
DEPENDS_append_class-target = " compiler-rt clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs"
INHIBIT_DEFAULT_DEPS = "1"
Unfortunately, it has no effect.
I spent some time and made an experiment. I downloaded clean repos for poky/openembedded/clan/raspberrypi, switched to rocko branch. And was surprised that build was completely successful.
This looks like my yocto has conflicts, but I can't determine what exactly.
Should I provide additional CMake/Yocto Error/LOG files?
hmm interesting, if you have logs from bad and good builds for failing package then it would be helpful..
Thank you for your support! Here is zip with logs for "bad" and "good" builds of libcxx recipe. libcxx_logs.zip
So I see early failures of compiler checks e.g.
--- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Failed
+-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success
This means clang compiler was not installed correctly. Perhaps CMakeError.log
has more details
as to why it failed.
closing based on https://github.com/kraj/meta-clang/issues/214#issuecomment-554000836
Hi! I'm trying to build meta-electron which has a dependence on clang. But the build process fails on compiler-rt stage with a message "clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)"
Target is armv7a Yocto - Rocko meta-clang - Rocko branch
Exact fail from log.do_compile:
Please, give some advice on how to solve this issue.