[yocto] LLVM: error adding symbols: File in wrong format

Khem Raj raj.khem at gmail.com
Wed Jul 11 13:34:54 PDT 2018


Hi Giordon

On Tue, Jul 10, 2018 at 10:36 AM Giordon Stark <kratsg at gmail.com> wrote:
>
> Hi all,
>
> | /local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/root/6.14.00-r0/recipe-sysroot-native/usr/lib/libLLVMSupport.a: error adding symbols: File in wrong format
> | clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
> | interpreter/llvm/src/tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/build.make:95: recipe for target 'interpreter/llvm/src/bin/clang-tblgen' failed
> | make[2]: *** [interpreter/llvm/src/bin/clang-tblgen] Error 1
> | make[2]: Leaving directory '/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/root/6.14.00-r0/build'
> | CMakeFiles/Makefile2:791: recipe for target 'interpreter/llvm/src/tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/all' failed
> | make[1]: *** [interpreter/llvm/src/tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/all] Error 2
> | make[1]: *** Waiting for unfinished jobs....
>
> Here's the full log: https://gist.github.com/3403addf74b5e902adec93b75fb0e138
>
> Any ideas how to get a more verbose invocation if needed? I suspect the error is due to some pre-built libraries being shipped in this recipe, but I'm not sure what's causing the error in the first place.
>

it seems to be linking with native llvm libraries which might not be intended.

> Note: I am using meta-clang. The recipe I'm using looks like:
>
> SUMMARY = "Numerical data analysis framework (OO)"
> DESCRIPTION = "Object oriented framework for large scale data analysis"
> HOMEPAGE = "http://root.cern.ch"
> LICENSE = "LGPLv2.1"
> LIC_FILES_CHKSUM = "file://LICENSE;md5=5ec773ab82cbea1f17ec5b98e8ce60cf"
> SRC_URI = "https://root.cern.ch/download/root_v${PV}.source.tar.gz"
>
> S = "${WORKDIR}/${BPN}-${PV}"
>
> TOOLCHAIN = "clang"
> #TARGET_CXXFLAGS_append_toolchain-clang = " -stdlib=libc++ "
>
> DEPENDS += "llvm-native libpcre lz4 libx11 libxpm libxft gsl fftw libatomic-ops freetype glew xrootd"
>

it seems you really need llvm for target in dependencies so please
remove llvm-native from DEPENDS
and add clang to it.

> inherit cmake pkgconfig pythonnative
>
>
> do_configure_prepend(){
> export FC=${GFORTRAN}
> }
>
> EXTRA_OECMAKE = "\
>     -Drootfit=ON \
>     -Dminuit2=ON \
>     -Dpython=ON \
>     -Dssl=ON \
>     -Dxrootd=ON \
>     -Dbuiltin_freetype=OFF \
>     -Dbuiltin_llvm=OFF \
>     -Dbuiltin_glew=OFF \
>     -Dastiff=OFF \
>     -Dasimage=OFF \
>     -Dbuiltin_afterimage=OFF \
>     -Dalien=OFF \
>     -Dvdt=OFF \
> "
>
> --
> Giordon Stark
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


More information about the yocto mailing list