Giter Site home page Giter Site logo

meta-rust / meta-rust Goto Github PK

View Code? Open in Web Editor NEW
194.0 24.0 119.0 1.17 MB

OpenEmbedded/Yocto layer for Rust and Cargo

License: MIT License

BitBake 21.99% PHP 2.11% Python 5.63% Shell 10.52% C++ 21.16% NASL 36.00% SourcePawn 0.64% HTML 1.94%
bitbake rust cargo yocto yocto-layer

meta-rust's Introduction

Introduction

This OpenEmbedded layer provides the rust compiler, tools for building packages (cargo), and a few example projects.

What works:

  • Building rust-native and cargo-native
  • Building Rust based projects with Cargo for the TARGET
    • e.g. rustfmt which is used by the CI system
  • -buildsdk and -crosssdk packages

What doesn't:

  • Using anything but x86_64 as the build environment
  • rust (built for target) issue #81

What's untested:

  • cargo (built for target)

Building a rust package

When building a rust package in bitbake, it's usually easiest to build with cargo using cargo.bbclass. If the package already has a Cargo.toml file (most rust packages do), then it's especially easy. Otherwise you should probably get the code building in cargo first.

Once your package builds in cargo, you can use cargo-bitbake to generate a bitbake recipe for it. This allows bitbake to fetch all the necessary dependent crates, as well as a pegged version of the crates.io index, to ensure maximum reproducibility.

NOTE: You will have to edit the generated recipe based on the comments contained within it

TODO

Pitfalls

  • TARGET_SYS must be different from BUILD_SYS. This is due to the way Rust configuration options are tracked for different targets. This is the reason we use the Yocto triples instead of the native Rust triples. See rust-lang/cargo#3349.

Dependencies

On the host:

  • Any -sys packages your project might need must have RDEPENDs for the native library.

On the target:

  • Any -sys packages your project might need must have RDEPENDs for the native library.

Maintainer(s) & Patch policy

Open a Pull Request.

The master branch supports the latest master of poky. When poky creates releases, we will create a branch with the same name as the poky release. This release branch should always work with that poky release. Note that these release branches will typically be less tested than the master branch.

All new patches against rust, rust-llvm, and cargo must have referenced upstream issues or PRs opened or an explanation why the patch cannot be upstreamed. This corresponds to the OpenEmbedded policy for other meta layers.

More info can be seen on the wiki.

Copyright

MIT OR Apache-2.0 - Same as rust

meta-rust's People

Contributors

akiernan avatar alistair23 avatar ashie avatar avrabe avatar be-neth avatar bkylerussell avatar cardoe avatar codyps avatar colinfinck avatar danc86 avatar derekstraka avatar dougreese avatar freax13 avatar hommeabeil avatar janderholm avatar jcreekmore avatar kazuki0824 avatar kraj avatar lexmark-tyhall avatar mlilien avatar nagos avatar otavio avatar posborne avatar rettichschnidi avatar shr-project avatar srwalter avatar theresevillafuerte avatar tylerwhall avatar weltling avatar zubairlk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meta-rust's Issues

runstrip/strip fails on some rust dylibs due to `Unable to recognise the format of the input file`

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/liblog-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/liblog-bitbake-1.2.0-r0.so'
)
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/librbml-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/librbml-bitbake-1.2.0-r0.so'
)
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libgraphviz-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libgraphviz-bitbake-1.2.0-r0.so'
)
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libserialize-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libserialize-bitbake-1.2.0-r0.so'
)
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libstd-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libstd-bitbake-1.2.0-r0.so'
)
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libflate-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libflate-bitbake-1.2.0-r0.so'
)
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libterm-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libterm-bitbake-1.2.0-r0.so'
)
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libtest-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libtest-bitbake-1.2.0-r0.so'
)
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libarena-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libarena-bitbake-1.2.0-r0.so'
)
ERROR: runstrip: ''strip' --remove-section=.comment --remove-section=.note --strip-unneeded '/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libgetopts-bitbake-1.2.0-r0.so'' strip command failed with 1 (strip: Unable to recognise the format of the input file `/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.2.0-r0/sysroot-destdir/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/rustlib/arm-poky-linux-gnueabi/lib/libgetopts-bitbake-1.2.0-r0.so'
)
NOTE: Tasks Summary: Attempted 4130 tasks of which 4104 didn't need to be rerun and all succeeded.

MACHINE="qemuarm" + TCLIBC="musl" results in rust-hello-world failing to run

root@qemuarm:~# RUST_BACKTRACE=1 rust-hello-world 
thread '<unnamed>' panicked at 'failed to allocate a guard page', /home/x/obj/y/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/libstd/sys/unix/thread.rs:252
stack backtrace:
   1:    0x19c23 - <unknown>
   2:    0x19c23 - <unknown>
   3:    0x19c23 - <unknown>
[... repeats the same thing to 100 frames ...]
  • poky: dfc016fbf13e62f7767edaf7abadf1d1b72680b2
  • meta-openembedded: 7e4f22517ada29f634970721481f0a7de1f3bffd
  • meta-rust: latest + #64

local.conf has this appended to it (I'm testing with gcc 6 as I type this):

GCCVERSION = "5.%"
MACHINE = "qemuarm"
TCLIBC = "musl"
IMAGE_INSTALL_append = " rust-hello-world"

BUILD_CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0"
TARGET_CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0"
CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0"

BUILD_CXXFLAGS_remove_pn-gcc-runtime = "-D_GLIBCXX_USE_CXX11_ABI=0"
TARGET_CXXFLAGS_remove_pn-gcc-runtime = "-D_GLIBCXX_USE_CXX11_ABI=0"
CXXFLAGS_remove_pn-gcc-runtime = "-D_GLIBCXX_USE_CXX11_ABI=0"

Image is core-image-minimal.

running via runqemu qemuarm serial.

rust-cross build failure due to missing llvm symbols using `cxx11` references

Doesn't happen on all systems. I've observed this on arch linux, but not on gentoo. Might depend on whether the system gcc has the new cxx11 abi enabled.

Probably due to uninative.bbclass from selectively disabling gcc's new cxx11 abi & cross.bbclass having a different *_CXXFLAGS compared to native.bbclass

# https://wiki.debian.org/GCC5
# We may see binaries built with gcc5 run or linked into gcc4 environment
# so use the older libstdc++ standard for now until we don't support gcc4
# on the host system.
BUILD_CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0"

Full error output

| error: linking with `gcc` failed: exit code: 1
| note: "gcc" "-Wl,--enable-new-dtags" "-Wl,--as-needed" "-m64" "-L" "x86_64-linux/stage0/lib/rustlib/x86_64-linux/lib" "x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/bin/rustc.0.o" "-o" "x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/bin/rustc" "-Wl,--gc-sections" "-Wl,-O1" "-nodefaultlibs" "-L" "x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-L" "/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib" "-L" "x86_64-linux/stage0/lib/rustlib/x86_64-linux/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_driver-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_passes-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_borrowck-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_privacy-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_typeck-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_lint-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_resolve-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "syntax_ext-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_plugin-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_metadata-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_trans-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_platform_intrinsics-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_mir-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_data_structures-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_back-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "flate-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "getopts-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "arena-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "fmt_macros-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "graphviz-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_front-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "syntax-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "term-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rustc_llvm-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "rbml-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "serialize-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "log-ca1c970e" "-L" "/home/cody/obj/y/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib" "-l" "std-ca1c970e" "-l" "pthread" "-l" "edit" "-l" "dl" "-l" "m" "-l" "stdc++" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-Wl,-rpath,$ORIGIN/../lib" "-Wl,-rpath,/usr/local/lib/rustlib/x86_64-linux/lib" "-l" "compiler-rt" "-L/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib" "-L/home/cody/obj/y/tmp/sysroots/x86_64-linux/lib" "-Wl,-rpath-link,/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib" "-Wl,-rpath-link,/home/cody/obj/y/tmp/sysroots/x86_64-linux/lib" "-Wl,-rpath,/home/cody/obj/y/tmp/sysroots/x86_64-linux/usr/lib" "-Wl,-rpath,/home/cody/obj/y/tmp/sysroots/x86_64-linux/lib" "-Wl,-O1" "-Wl,-rpath=../../lib"
| note: x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib/librustc_llvm-ca1c970e.so: undefined reference to `llvm::TargetRegistry::lookupTarget(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
| x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib/librustc_llvm-ca1c970e.so: undefined reference to `llvm::RTDyldMemoryManager::getSymbolAddressInProcess(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
| x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib/librustc_llvm-ca1c970e.so: undefined reference to `llvm::sys::DynamicLibrary::getPermanentLibrary(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
| x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib/librustc_llvm-ca1c970e.so: undefined reference to `llvm::createPrintModulePass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
| x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib/librustc_llvm-ca1c970e.so: undefined reference to `llvm::report_fatal_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
| x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib/librustc_llvm-ca1c970e.so: undefined reference to `llvm::SectionMemoryManager::finalizeMemory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
| x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib/librustc_llvm-ca1c970e.so: undefined reference to `llvm::Triple::normalize[abi:cxx11](llvm::StringRef)'
| x86_64-linux/stage0/lib/arm-poky-linux-gnueabi/rustlib/x86_64-linux/lib/librustc_llvm-ca1c970e.so: undefined reference to `llvm::RTDyldMemoryManager::getPointerToNamedFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'

Yocto versioned branches

So meta-rust always had the development happening on a master branch but for work I need to be able to ship things based on Yocto release branches (e.g. fido, jethro, kergoth) so I'd like to push those branches into this repo now. Previously they've been here:

https://github.com/starlab-io/meta-rust/tree/fido
https://github.com/starlab-io/meta-rust/tree/jethro

They diverged from meta-rust a little bit but now that we're all working together on this project I see future named branches just forking from master. Sound ok to everyone? @jmesmon @derekstraka @srwalter

bitbake does not always re-generate some configuration files for rust when variables affecting contents change

Seems like bitbake isn't aware of the variables our python functions depend on, and as a result the platform config (mk fragments) and targets (json) aren't always re-generated when they should be.

As a work-around, one can likely rm some stamps for the tasks in question, or just blow away tmp, but ideally we'd convince bitbake to know that the task needs to be re-run.

I'm not sure how bitbake automatically detects variable dependencies & if we can modify our tasks so that works. We can manually list our dependencies via vardeps, but ideally we'd avoid being quite that error prone.

With latest poky, rust cross builds no longer are suffixed with `${TARGET_ARCH}`

ie: rust-cross-arm becomes rust-cross.

This is due to some changes in how BBCLASSEXTEND and variable tracking work. Essentially, our PN_class-cross is being overridden by the internal BBCLASSEXTEND machinery.

Assuming the ${TARGET_ARCH} suffix is required (it was just copied from how gcc's -cross does it), without a fix for this in bitbake, we'll need to switch to using seperate .bb files instead of BBCLASSEXTEND.

Packages fail to build with 'ccache'

Build fails when 'ccache' is used to build packages; e.g. 'rust-native':

| error: could not exec the linker ccache gcc: No such file or directory (os error 2)

or cargo:

| running: "ccache gcc" "-O3" "-ffunction-sections" ...
| failed to execute command: No such file or directory (os error 2)
| Is ccache gcc not installed?

Parse errors while determining build dependencies

While using the master-next branches for poky and meta-oe, the following errors were observed during the recipe parse:

WARNING: Exception during build_dependencies for DEPENDS
ERROR: ExpansionError during parsing /var/build/poky/meta-rust/recipes-core/udev/libudev-sys-rs_0.1.1.bb: Failure expanding variable DEPENDS, expression was virtual/x86_64-poky-linux-gcc virtual/x86_64-poky-linux-compilerlibs virtual/libc libc-rs udev rustlib patchelf-native ${@rust_base_dep(d)} which triggered exception TypeError: getVar() takes at least 3 arguments (2 given)

The issue occurs in OVERLAP_DEPS - get_overlap_deps and BASEDEPENDS - get_overlap_deps

Native linker not found when building libgit2_git

I haven't tried forcing to the versioned libgit2 (by default bitbake picks the git version). Here's the failing part of the build for me using the latest meta-rust:

CMAKE_AR-NOTFOUND cr libgit2.a  CMakeFiles/git2.dir/src/pack-objects.c.o ...
Error running link command: No such file or directory

Cargo not finding deps after upgrade to 1.10

I'm having trouble using bitbake to compile a project after upgrading to rust 1.10

The error I see is:

DEBUG: Executing python function externalsrc_compile_prefunc
NOTE: sota-client: compiling from external source tree /home/alex/work/pro/poky/meta-oim/recipes-oim/sota-client/../../../../client/rvi_sota_client
DEBUG: Python function externalsrc_compile_prefunc finished
DEBUG: Executing shell function do_compile
NOTE: cargo = /home/alex/work/pro/poky/build/tmp/sysroots/x86_64-linux/usr/bin/cargo
NOTE: rustc = /home/alex/work/pro/poky/build/tmp/sysroots/x86_64-linux/usr/bin/rustc
NOTE: cargo build -v --target x86_64-poky-linux --release
error: no matching package named `getopts` found (required by `sota_client`)
location searched: registry https://github.com/rust-lang/crates.io-index
version required: = 0.2.14
WARNING: exit code 101 from a shell command.
ERROR: Function failed: do_compile (log file is located at /home/alex/work/pro/poky/build/tmp/work/core2-64-poky-linux/sota-client/1.0-10/temp/log.do_compile.32405)

Here getopts fails, but every time I try to build it names a different package from the Cargo.toml. If I run it a few more times the packages that fail are: toml, lazy_static, chan, rustc-serialize, etc.

It seems to not have a local cargo registry, or possibly can't find the one that is there?

When I open up a devshell I see $CARGO_HOME=/home/alex/work/pro/poky/build/tmp/work/core2-64-poky-linux/sota-client/1.0-10/cargo_home

$ ls $CARGO_HOME
config  git  registry

The config file has a local-registry path that doesn't seem to exist:

cat $CARGO_HOME/config
paths = [
]
[source.local]
local-registry = "/home/alex/work/pro/poky/build/tmp/work/core2-64-poky-linux/sota-client/1.0-10/cargo_registry"
[source.crates-io]
replace-with = "local"
registry = "https://github.com/rust-lang/crates.io-index"
$ ls /home/alex/work/pro/poky/build/tmp/work/core2-64-poky-linux/sota-client/1.0-10/cargo_registry
ls: cannot access '/home/alex/work/pro/poky/build/tmp/work/core2-64-poky-linux/sota-client/1.0-10/cargo_registry': No such file or directory

There's another registry under $CARGO_HOME, but it just has a lockfile:

ls -a $CARGO_HOME/registry/index/github.com-1ecc6299db9ec823/
.  ..  .cargo-index-lock

I get the same result from fresh bitbakes on different machines, and the project builds successfully on 1.7, or 1.10 from multirust.

Any idea what's up? If you need any more info just let me know.

Cheers!

(In case you need it, here's the recipe, and here's the rust project I'm trying to build.)

Building rust-native from scratch causes errors

#15 introduced a patch that now causes issues during the build:

WARNING: rust-llvm-native-1.5.0-r0 do_unpack: rust-llvm-native: the directory ${TMPDIR}/work-shared/${SOURCE_NAME}-${PV}-${PR}/rustc-${PV}/src/llvm (/var/build/build/tmp/work-shared/rust-1.5.0-r0/rustc-1.5.0/src/llvm) pointed to by the S variable doesn't exist - please set S within the recipe to point to where the source has been unpacked to

Update the shared-source-use.bbclass to block at patch rather than configure

Build errors in rust-bin class

Building items that inherit from rust-bin have compile errors:
Poky version: 16eeccd7029edec5043c0f38bfb1d333ab093b6f

Log data follows:
| DEBUG: Executing shell function do_compile
| /var/build/build/tmp/work/core2-64-poky-linux/libc-rs/0.1.8-r0/temp/run.do_compile.26939: 107: [: dylib: unexpected operator
| /var/build/build/tmp/work/core2-64-poky-linux/libc-rs/0.1.8-r0/temp/run.do_compile.26939: 109: local: -a: bad variable name
| WARNING: exit code 2 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /var/build/build/tmp/work/core2-64-poky-linux/libc-rs/0.1.8-r0/temp/log.do_compile.26939)

It appears to be related to oe_compile_rust_lib

Compilation of rust-cross fails for QEMUx86-64

Hi,

I noticed that do_compile of recipe rust-cross.bb for QEMUx86-64 fails with the following errors due to undefined reference from LLVM:

| note: x86_64-linux/stage0/lib/x86_64-poky-linux/rustlib/x86_64-linux/lib/librustc_llvm-e8edd0fd.so: undefined reference to `llvm::TargetRegistry::lookupTarget(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
| x86_64-linux/stage0/lib/x86_64-poky-linux/rustlib/x86_64-linux/lib/librustc_llvm-e8edd0fd.so: undefined reference to `llvm::RTDyldMemoryManager::getSymbolAddressInProcess(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
| x86_64-linux/stage0/lib/x86_64-poky-linux/rustlib/x86_64-linux/lib/librustc_llvm-e8edd0fd.so: undefined reference to `llvm::sys::DynamicLibrary::getPermanentLibrary(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
| x86_64-linux/stage0/lib/x86_64-poky-linux/rustlib/x86_64-linux/lib/librustc_llvm-e8edd0fd.so: undefined reference to `llvm::createPrintModulePass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
| x86_64-linux/stage0/lib/x86_64-poky-linux/rustlib/x86_64-linux/lib/librustc_llvm-e8edd0fd.so: undefined reference to `llvm::report_fatal_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
| x86_64-linux/stage0/lib/x86_64-poky-linux/rustlib/x86_64-linux/lib/librustc_llvm-e8edd0fd.so: undefined reference to `llvm::SectionMemoryManager::finalizeMemory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
| x86_64-linux/stage0/lib/x86_64-poky-linux/rustlib/x86_64-linux/lib/librustc_llvm-e8edd0fd.so: undefined reference to `llvm::Triple::normalize[abi:cxx11](llvm::StringRef)'
| x86_64-linux/stage0/lib/x86_64-poky-linux/rustlib/x86_64-linux/lib/librustc_llvm-e8edd0fd.so: undefined reference to `llvm::RTDyldMemoryManager::getPointerToNamedFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
| collect2: error: ld returned 1 exit status

I am using the latest version of the master branch on meta-rust with Poky release Krogoth 2.1.

Best regards, Leon

Cargo couldn't fetch a repo

Hi. I'm observing this in yocto devshell

bitbake -c devshell some_recipe
cargo new test && cd test

My Cargo.toml

[package]
name = "test"
version = "0.1.0"
authors = ["kteza1 <[email protected]>"]

[dependencies.mosquitto]
git = "https://github.com/kteza1/mosquitto-rs"

build

cargo  build --verbose
    Updating git repository `https://github.com/kteza1/mosquitto-rs`
Unable to update https://github.com/kteza1/mosquitto-rs#40a1202b

Caused by:
  failed to fetch into /home/ubuntu/data/s340-dev-build/build/tmp/work/armv7ahf-vfp-neon-poky-linux-gnueabi/vcu-cloud-connect/1.0-r0/cargo_home/git/db/mosquitto-rs-e9af7a6f8dc35151

Caused by:
  [12/-1] Unsupported URL protocol

What might be the reason for this? Any temporary fix ?

Upgrade to 1.10 stable

There is a new stable version 1.8 on the road and it would be great to have an update of meta-rust.

re-merge rust-llvm-native & rust-native

Now that we build std for target instead of rebuilding the whole compiler, splitting out rust-llvm doesn't save us any build time.

Should we merge them back together?

Continuous Integration Testing

We need to get some form of CI for this project. In the past I tried to use Travis CI but bumped up against the 1 hour time limit every time.

meta-rust not appendable from outside

I'm trying to build genivi-dev-platform here and while the main issue I encountered was version of Rust (1.7.0) GDP tracks doesn't build against gcc 6.2 I have here, I also encountered a few other issues while trying to patch it up, which seem unlikely to be specific to my distro (version) and will be filling tickets for them. Here is the first one:

The issue is that if you try to apply a patch to rust source tree from an external (to meta-rust) dir, bitbake attempts to apply the patch before populating the rust source tree and hence fails:

ERROR: rust-native-1.7.0-r0 do_patch: Command Error: 'quilt --quiltrc /home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/tmp/sysroots/x86_64-linux/etc/quiltrc push' exited with 1  Output:
Applying patch 0001-Fix-build-against-gcc-6.2.patch
can't find file to patch at input line 15
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 0f47b30e9d2670cd477ef291a4f42b83e0c70be6 Mon Sep 17 00:00:00 2001
|From: Zeeshan Ali <[email protected]>
|Date: Tue, 15 Nov 2016 13:11:31 +0100
|Subject: [PATCH] Fix build against gcc 6.2
|
|---
| src/libbacktrace/dwarf.c |  4 ++--
| src/rt/miniz.c           | 12 ++++++++++--
| 2 files changed, 12 insertions(+), 4 deletions(-)
|
|diff --git a/src/libbacktrace/dwarf.c b/src/libbacktrace/dwarf.c
|index 55b8d7d..b5831e9 100644
|--- a/src/libbacktrace/dwarf.c
|+++ b/src/libbacktrace/dwarf.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 37
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/rt/miniz.c b/src/rt/miniz.c
|index 2b803b0..0b51856 100644
|--- a/src/rt/miniz.c
|+++ b/src/rt/miniz.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
Patch 0001-Fix-build-against-gcc-6.2.patch does not apply (enforce with -f)
ERROR: rust-native-1.7.0-r0 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/tmp/work/x86_64-linux/rust-native/1.7.0-r0/temp/log.do_patch.13065

To reproduce against gdp, place this in meta-genivi-dev/meta-genivi-dev/recipes-devtools/rust/rust.bbappend file:

FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"

SRC_URI_append = " \
    file://0001-Fix-build-against-gcc-6.2.patch \
"

And this in meta-genivi-dev/meta-genivi-dev/recipes-devtools/rust/rust/0001-Fix-build-against-gcc-6.2.patch :

From 0f47b30e9d2670cd477ef291a4f42b83e0c70be6 Mon Sep 17 00:00:00 2001
From: Zeeshan Ali <[email protected]>
Date: Tue, 15 Nov 2016 13:11:31 +0100
Subject: [PATCH] Fix build against gcc 6.2

---
 src/libbacktrace/dwarf.c |  4 ++--
 src/rt/miniz.c           | 12 ++++++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/libbacktrace/dwarf.c b/src/libbacktrace/dwarf.c
index 55b8d7d..b5831e9 100644
--- a/src/libbacktrace/dwarf.c
+++ b/src/libbacktrace/dwarf.c
@@ -2881,7 +2881,7 @@ dwarf_fileline (struct backtrace_state *state, uintptr_t pc,
     }
   else
     {
-      struct dwarf_data **pp;
+      UNUSED struct dwarf_data **pp;
 
       pp = (struct dwarf_data **) (void *) &state->fileline_data;
       while (1)
@@ -3011,7 +3011,7 @@ backtrace_dwarf_add (struct backtrace_state *state,
     {
       while (1)
 	{
-	  struct dwarf_data **pp;
+	  UNUSED struct dwarf_data **pp;
 
 	  pp = (struct dwarf_data **) (void *) &state->fileline_data;
 
diff --git a/src/rt/miniz.c b/src/rt/miniz.c
index 2b803b0..0b51856 100644
--- a/src/rt/miniz.c
+++ b/src/rt/miniz.c
@@ -575,7 +575,10 @@ tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_nex
       {
         mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i;
         r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32);
-        for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8;
+        for ( i = 0; i <= 143; ++i) *p++ = 8;
+        for ( ; i <= 255; ++i) *p++ = 9;
+        for ( ; i <= 279; ++i) *p++ = 7;
+        for ( ; i <= 287; ++i) *p++ = 8;
       }
       else
       {
@@ -1393,7 +1396,12 @@ static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahe
         if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break;
       TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
     }
-    if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
+    if (!dist) break;
+    p = s;
+    q = d->m_dict + probe_pos;
+    for (probe_len = 0; probe_len < max_match_len; probe_len++)
+      if (*p++ != *q++)
+        break;
     if (probe_len > match_len)
     {
       *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return;
-- 
2.9.3

Then run a clean build (important) and you should arrive at the error above. (NOTE: the patch itself is known to break the build but test is about it getting applied, not actually fixing the build).

GDP is currently tracking f13ac9d on krogoth branch.

build system is assumed to be linux-x86_64

For rust & cargo we download snapshots to bootstrap. Right now, these are hardcoded to the linux-x86_64 versions. rust & cargo provide a few other architectures (linux-i686 being the most probably useful), so it'd be useful if:

  • We failed early when we can't support the build system
  • We download snapshots based on the build os & build arch.

libstd-rs fails with "libcompiler-rt.a: ...... recompile with -fPIC" when building for MIPS

I'm trying to make meta-rust work with a mips32r2 little endian target. Things are progressing nicely and I've managed to build rust properly.

However the libstd-rs recipe failes with the following error:

....../usr/lib/libcompiler-rt.a(mulodi4.o): relocation R_MIPS_26 against `__divdi3@@GLIBC_2.0' can not be used when making a shared object; recompile with -fPIC

I did as told and added -fPIC to COMMON_INCLUDES= in compiler-rt/make/config.mk and now things work well enough. I am able to build and run the rust-hello-world recipe on target.

Does anyone have an idea why -fPIC is not added by default. Should it? If it should, what is the best practice? I don't think COMMON_INCLUDES is the proper place after all.

Update to rust 1.12

Anyone know when 1.12 is due? Might make sense to plan ahead and target that.

rust shared source / package split

So I'll be real honest and admit that I don't understand why we do the shared source and split up so much of the configuration. I find the setup here a bit complex and hard to manage. In Gentoo where I maintain the Rust packages as well I've got everything split into a rustllvm and rust. I extract the tarball twice. I build the target mk files within the sources rather than try to provide an alternative directory. Effectively all I'm patching in Gentoo is the fetching of the stage0 tarball since I have the package manager do that and place it in the right location. What I'm getting at is can we refactor into a similar setup since to me conceptually it will be easier to make version bumps or what am I missing behind some of the separation and other patches.

/cc @jmesmon @derekstraka @srwalter

Project automation

  • auto-assign PRs to someone with commit access
  • auto-assign Issues so someone is pinged to glance at them
  • build testing (travis? buildbot host? something else?)
  • bors/homu/etc like setup for merging PRs.

rust-cross-${ARCH} fails to build with latest poky

With poky after 438d6d6e7d8ca1a9d566bbea5b917a2b00a31f4e poky defines an EXTRA_OECONF_append to '--disable-static' causing the following back trace in rust-cross

| configure: calculating relative paths to prefix = /var/build/build/tmp/sysroots/x86_64-linux/usr
| configure:
| configure:
| configure: validating /var/build/build/tmp/work-shared/rust-1.5.0-r0/rustc-1.5.0/configure args
| configure:
| configure: error: Option '--disable-static' is not recognized
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /var/build/build/tmp/work/x86_64-linux/rust-cross-x86_64/1.5.0-r0/temp/log.do_configure.11962)
ERROR: Task 134 (/var/build/poky/meta-rust/recipes/rust/rust-cross.bb, do_configure) failed with exit code '1'

The OECONF needs to be filtered or a DISABLE_STATIC_pn-rust-cross-${ARCH} will need to be added.

As a work around the file poky/meta/conf/distro/include/no-static-libs.inc can be modified to remove the extra append.

add fetcher support for crates.io

Should be similar to the npm fetcher implimented in bitbake-npm.

Would allow us to avoid using git sources when patching up cargo, and could make it much more convenient to build some packages.

failure in docker

Hi. I'm trying to use meta-rust in a docker container. bitbake rust-hello-world is throwing this error

x86_64-linux/stage1/bin/arm-poky-linux-gnueabi/rustc: symbol lookup error: /home/build/buildbot/slave-jethro/jeth/main/build/tmp/work/x86_64-linux/rust-cross-a
rm/1.7.0-r0/build/x86_64-linux/stage1/lib/arm-poky-linux-gnueabi/libterm-6a154fe0.so: undefined symbol: _ZN2io5error18Error.error..Error11description20h97638b304e7c4d084tgE

| x86_64-linux/stage1/bin/arm-poky-linux-gnueabi/rustc: symbol lookup error: /home/build/buildbot/slave-jethro/jeth/main/build/tmp/work/x86_64-linux/rust-cross-arm/1.7.0-r0/build/x86_64-linux/stage1/lib/arm-poky-linux-gnueabi/libterm-6a154fe0.so: undefined symbol: _ZN2io5error18Error.error..Error11description20h97638b304e7c4d084tgE

Any insights?

Cargo build error

Hi. I'm facing this error while doing bitbake cargo.

DEBUG: Executing shell function do_compile
NOTE: make -j 36 -e MAKEFLAGS= ARGS=--verbose
/usr/bin/python src/etc/dl-snapshot.py x86_64-linux
running: curl -o target/dl/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz https://static.rust-lang.org/cargo-dist/2015-04-02/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/manifest.in
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/LICENSE-MIT
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/README.md
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/LICENSE-APACHE
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/LICENSE-THIRD-PARTY
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/share/man/man1/cargo.1
extracting cargo-nightly-x86_64-unknown-linux-gnu/cargo/bin/cargo
touch target/snapshot/bin/cargo
/home/ubuntu/data/ather-build/build/tmp/sysroots/x86_64-linux/usr/bin/rustc -V
rustc 1.5.0-dev
target/snapshot/bin/cargo --version
cargo 0.0.1-pre-nightly (84d6d2c 2015-03-31) (built 2015-04-01)
target/snapshot/bin/cargo build --target x86_64-linux --release  --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
Failed to parse registry's information for: url

Caused by:
  the given version requirement is not implemented, yet
make: *** [cargo-x86_64-linux] Error 101
ERROR: oe_runmake failed
WARNING: exit code 1 from a shell command.
ERROR: Function failed: do_compile (log file is located at /home/ubuntu/data/ather-build/build/tmp/work/x86_64-linux/cargo-native/0.7.0-r0/temp/log.do_compile.51984)

Any work arounds for this?

Update libgit2 and push into meta-openembedded

The libgit2 recipes can be updated to the latest version and pushed into meta-openembedded. They can then be removed from meta-rust. There are a few other consumers of the library that would benefit from it being in meta-openembedded instead of maintained in this layer.

document some type of practice for issue tagging (or not tagging)

At the moment, I've occasionally created 'S-' and 'R-' tags for 'status' and 'releases' respectively. I'm not sure if there is some standard for these. Rust itself appears to use quite a lot of tags for their issues, but I'm not sure where (or if) the exact meaning of most of these is documented.

This is something we should probably add to the readme.

Remove internet access in do_compile for rust and cargo

Doing internet access in do_compile is not a good play with yocto

  • prevent sstate, and local_mirrors to work correctly
  • does not work with corporate proxies, as http_proxy variable is only available in do_fetch

I first created #83 as a workaround for the proxy issue, but know I think it was not a good idea for the above reason.

Creating this as an issue so that it is easier for downstream user to understand the situation and help.

Rust recipe not able to clean itself

This one I can reproduce on Ubuntu 16.04 (gcc 5.4) host. After building GDP (for RPI3 target here) successfully (along with rust layers), I tried cleaning up only the rust layers to rebuild and it ends up with an error when I build rust afterwards:

$ bitbake -c cleansstate rust-llvm-native
# skipping details
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.
$ bitbake -c cleansstate rust
# skipping details
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.
$ bitbake  rust
Loading cache: 100% |#################################################################################################################################################################################################################################| ETA:  00:00:00
Loaded 2297 entries from dependency cache.
Parsing recipes: 100% |###############################################################################################################################################################################################################################| Time: 00:00:01
Parsing of 1727 .bb files complete (1726 cached, 1 parsed). 2297 targets, 324 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.30.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-16.04"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "raspberrypi3"
DISTRO            = "poky-ivi-systemd"
DISTRO_VERSION    = "11.0+snapshot-20161116"
TUNE_FEATURES     = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard cortexa7"
TARGET_FPU        = "hard"
meta              
meta-yocto        
meta-yocto-bsp    = "HEAD:12eb72ee3b02f826a156ff4e396c770f2b93571e"
meta-ivi          
meta-ivi-bsp      = "HEAD:fa4a1314e536450ad1ccfe33499b5601ac4e68c1"
meta-oe           
meta-filesystems  
meta-ruby         = "HEAD:247b1267bbe95719cd4877d2d3cfbaf2a2f4865a"
meta-qt5          = "HEAD:d715f2c1d340fa38f8a9860acc73de5e14a38b75"
meta-genivi-dev   = "HEAD:be76d217d91c8323fd2251c1c4a53d6da1a55c84"
meta-rust         = "HEAD:f13ac9d48ae928b761d7be204fa8f877d41e7099"
meta-oic          = "HEAD:69146eaf8bc05c74c377e731b7e16d82854a4659"
meta-erlang       = "HEAD:4d7eacc8e6593934ed5b0c8abc3d3e9dc339d849"
meta-rvi          = "HEAD:de9d548fe35e2cee8688faaae910b4f6f7fea17e"
meta-raspberrypi-gdp = "HEAD:be76d217d91c8323fd2251c1c4a53d6da1a55c84"
meta-raspberrypi  = "HEAD:a5f9b07a820d50ae5fb62e07306cd4e72d8638a9"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: rust-llvm-1.7.0-r0 do_compile: oe_runmake failed
ERROR: rust-llvm-1.7.0-r0 do_compile: Function failed: do_compile (log file is located at /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/temp/log.do_compile.17350)
ERROR: Logfile of failure stored in: /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/temp/log.do_compile.17350
Log data follows:
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'arm-32', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function do_compile
| NOTE: make -j 12
| llvm[0]: Constructing LLVMBuild project information.
| checking for x86_64-pc-linux-gnu-clang... gcc
| checking for C compiler default output file name... a.out
| checking whether the C compiler works... yes
| checking whether we are cross compiling... no
| checking for suffix of executables...
| checking for suffix of object files... o
| checking whether we are using the GNU C compiler... yes
| checking whether gcc accepts -g... yes
| checking for gcc option to accept ISO C89... none needed
| checking whether we are using the GNU C++ compiler... yes
| checking whether g++ accepts -g... yes
| checking how to run the C preprocessor... arm-poky-linux-gnueabi-gcc -E --sysroot=/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/sysroots/raspberrypi3  -march=armv7ve -marm -mfpu=neon-vfpv4  -mfloat-abi=hard -mcpu=cortex-a7
| checking whether GCC or Clang is our host compiler... gcc
| checking build system type... x86_64-pc-linux-gnu
| checking host system type... x86_64-pc-linux-gnu
| checking target system type... x86_64-pc-linux-gnu
| checking type of operating system we're going to host on... Linux
| checking type of operating system we're going to target... Linux
| checking target architecture... x86_64
| checking whether GCC is new enough... yes
| checking optimization flags... -O3
| checking for GNU make... make
| checking whether ln -s works... yes
| checking for nm... /usr/bin/nm
| checking for cmp... /usr/bin/cmp
| checking for cp... /bin/cp
| checking for date... /bin/date
| checking for find... /usr/bin/find
| checking for grep... /bin/grep
| checking for mkdir... /bin/mkdir
| checking for mv... /bin/mv
| checking for x86_64-pc-linux-gnu-ranlib... arm-poky-linux-gnueabi-ranlib
| checking for x86_64-pc-linux-gnu-ar... ar
| checking for rm... /bin/rm
| checking for sed... /bin/sed
| checking for tar... /bin/tar
| checking for pwd... /bin/pwd
| checking for dot... echo dot
| checking for a BSD-compatible install... /usr/bin/install -c
| checking for bzip2... /bin/bzip2
| checking for cat... /bin/cat
| checking for doxygen... no
| checking for groff... /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/sysroots/x86_64-linux/usr/bin/groff
| checking for gzip... /bin/gzip
| checking for pdfroff... /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/sysroots/x86_64-linux/usr/bin/pdfroff
| checking for zip... /usr/bin/zip
| checking for go... /usr/bin/go
| checking for ocamlfind... no
| checking for gas... no
| checking for as... /usr/bin/as
| checking for linker version... 2.26.1
| checking for compiler -Wl,-R<path> option... yes
| checking for compiler -rdynamic option... yes
| checking for compiler -Wl,--version-script option... yes
| checking for grep that handles long lines and -e... (cached) /bin/grep
| checking for egrep... /bin/grep -E
| checking for ANSI C header files... yes
| checking for sys/types.h... yes
| checking for sys/stat.h... yes
| checking for stdlib.h... yes
| checking for string.h... yes
| checking for memory.h... yes
| checking for strings.h... yes
| checking for inttypes.h... yes
| checking for stdint.h... yes
| checking for unistd.h... yes
| checking errno.h usability... yes
| checking errno.h presence... yes
| checking for errno.h... yes
| checking tool compatibility... ok
| checking optional compiler flags... -Wno-variadic-macros -Wno-missing-field-initializers   -Wno-maybe-uninitialized -Wno-comment
| checking for python... /usr/bin/python
| checking for python >= 2.7... /usr/bin/python (2.7.12)
| checking for sin in -lm... yes
| checking for library containing dlopen... -ldl
| checking for library containing clock_gettime... none required
| checking for library containing setupterm... -ltinfo
| checking for library containing el_init... no
| checking for library containing mallinfo... none required
| checking for pthread_mutex_init in -lpthread... yes
| checking for library containing pthread_mutex_lock... none required
| checking for library containing pthread_rwlock_init... none required
| checking for library containing pthread_getspecific... none required
| checking for compress2 in -lz... yes
| checking for xml2-config... xml2-config
| checking for libxml2 includes... ERROR: /usr/bin/xml2-config should not be used, use an alternative such as pkg-config
| --should-not-have-used-/usr/bin/xml2-config
| checking for xmlReadFile in -lxml2... yes
| checking for dirent.h that defines DIR... yes
| checking for library containing opendir... none required
| checking for MAP_ANONYMOUS vs. MAP_ANON... yes
| checking whether stat file-mode macros are broken... no
| checking for sys/wait.h that is POSIX.1 compatible... yes
| checking whether time.h and sys/time.h may both be included... yes
| checking for cxxabi.h... yes
| checking dlfcn.h usability... yes
| checking dlfcn.h presence... yes
| checking for dlfcn.h... yes
| checking execinfo.h usability... yes
| checking execinfo.h presence... yes
| checking for execinfo.h... yes
| checking fcntl.h usability... yes
| checking fcntl.h presence... yes
| checking for fcntl.h... yes
| checking for inttypes.h... (cached) yes
| checking link.h usability... yes
| checking link.h presence... yes
| checking for link.h... yes
| checking malloc.h usability... yes
| checking malloc.h presence... yes
| checking for malloc.h... yes
| checking setjmp.h usability... yes
| checking setjmp.h presence... yes
| checking for setjmp.h... yes
| checking signal.h usability... yes
| checking signal.h presence... yes
| checking for signal.h... yes
| checking for stdint.h... (cached) yes
| checking termios.h usability... yes
| checking termios.h presence... yes
| checking for termios.h... yes
| checking for unistd.h... (cached) yes
| checking utime.h usability... yes
| checking utime.h presence... yes
| checking for utime.h... yes
| checking sys/mman.h usability... yes
| checking sys/mman.h presence... yes
| checking for sys/mman.h... yes
| checking sys/param.h usability... yes
| checking sys/param.h presence... yes
| checking for sys/param.h... yes
| checking sys/resource.h usability... yes
| checking sys/resource.h presence... yes
| checking for sys/resource.h... yes
| checking sys/time.h usability... yes
| checking sys/time.h presence... yes
| checking for sys/time.h... yes
| checking sys/uio.h usability... yes
| checking sys/uio.h presence... yes
| checking for sys/uio.h... yes
| checking sys/ioctl.h usability... yes
| checking sys/ioctl.h presence... yes
| checking for sys/ioctl.h... yes
| checking malloc/malloc.h usability... no
| checking malloc/malloc.h presence... no
| checking for malloc/malloc.h... no
| checking mach/mach.h usability... no
| checking mach/mach.h presence... no
| checking for mach/mach.h... no
| checking valgrind/valgrind.h usability... no
| checking valgrind/valgrind.h presence... no
| checking for valgrind/valgrind.h... no
| checking fenv.h usability... yes
| checking fenv.h presence... yes
| checking for fenv.h... yes
| checking whether FE_ALL_EXCEPT is declared... yes
| checking whether FE_INEXACT is declared... yes
| checking pthread.h usability... yes
| checking pthread.h presence... yes
| checking for pthread.h... yes
| checking zlib.h usability... yes
| checking zlib.h presence... yes
| checking for zlib.h... yes
| checking CrashReporterClient.h usability... no
| checking CrashReporterClient.h presence... no
| checking for CrashReporterClient.h... no
| checking __crashreporter_info__... no
| checking for HUGE_VAL sanity... yes
| checking for pid_t... yes
| checking for size_t... yes
| checking whether struct tm is in sys/time.h or time.h... time.h
| checking for int64_t... yes
| checking for uint64_t... yes
| checking for backtrace... yes
| checking for getcwd... yes
| checking for getpagesize... yes
| checking for getrusage... yes
| checking for getrlimit... yes
| checking for setrlimit... yes
| checking for gettimeofday... yes
| checking for isatty... yes
| checking for mkdtemp... yes
| checking for mkstemp... yes
| checking for mktemp... yes
| checking for posix_spawn... yes
| checking for pread... yes
| checking for realpath... yes
| checking for sbrk... yes
| checking for setrlimit... (cached) yes
| checking for strerror... yes
| checking for strerror_r... yes
| checking for setenv... yes
| checking for strtoll... yes
| checking for strtoq... yes
| checking for sysconf... yes
| checking for malloc_zone_statistics... no
| checking for setjmp... yes
| checking for longjmp... yes
| checking for sigsetjmp... no
| checking for siglongjmp... yes
| checking for writev... yes
| checking for futimes... yes
| checking for futimens... yes
| checking if printf has the %a format character... yes
| checking for srand48/lrand48/drand48 in <stdlib.h>... yes
| checking whether arc4random is declared... no
| checking whether strerror_s is declared... no
| checking for stdlib.h... (cached) yes
| checking for unistd.h... (cached) yes
| checking for getpagesize... (cached) yes
| checking for working mmap... yes
| checking for mmap of files... yes
| checking if /dev/zero is needed for mmap... no
| checking for GCC atomic builtins... yes
| checking for 32-bit userspace on 64-bit system... no
| checking for __dso_handle... yes
| checking for compiler -fvisibility-inlines-hidden option... yes
| configure: creating ./config.status
| config.status: creating include/llvm/Config/Targets.def
| config.status: creating include/llvm/Config/AsmPrinters.def
| config.status: creating include/llvm/Config/AsmParsers.def
| config.status: creating include/llvm/Config/Disassemblers.def
| config.status: creating Makefile.config
| config.status: creating llvm.spec
| config.status: creating docs/doxygen.cfg
| config.status: creating bindings/ocaml/llvm/META.llvm
| config.status: creating include/llvm/Config/config.h
| config.status: creating include/llvm/Config/llvm-config.h
| config.status: creating include/llvm/Support/DataTypes.h
| config.status: executing setup commands
| config.status: executing Makefile commands
| config.status: executing Makefile.common commands
| config.status: executing examples/Makefile commands
| config.status: executing lib/Makefile commands
| config.status: executing test/Makefile commands
| config.status: executing test/Makefile.tests commands
| config.status: executing unittests/Makefile commands
| config.status: executing tools/Makefile commands
| config.status: executing utils/Makefile commands
| config.status: executing projects/Makefile commands
| config.status: executing bindings/Makefile commands
| config.status: executing bindings/ocaml/Makefile.ocaml commands
| make[1]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools'
| llvm[1]: (build tools): Constructing LLVMBuild project information.
| make[2]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/lib/Support'
| llvm[2]: (build tools): Compiling APFloat.cpp for Release build
| llvm[2]: (build tools): Compiling APInt.cpp for Release build
| llvm[2]: (build tools): Compiling APSInt.cpp for Release build
| llvm[2]: (build tools): Compiling ARMBuildAttrs.cpp for Release build
| llvm[2]: (build tools): Compiling ARMWinEH.cpp for Release build
| llvm[2]: (build tools): Compiling Allocator.cpp for Release build
| llvm[2]: (build tools): Compiling Atomic.cpp for Release build
| llvm[2]: (build tools): Compiling BlockFrequency.cpp for Release build
| llvm[2]: (build tools): Compiling BranchProbability.cpp for Release build
| llvm[2]: (build tools): Compiling COM.cpp for Release build
| llvm[2]: (build tools): Compiling CommandLine.cpp for Release build
| llvm[2]: (build tools): Compiling Compression.cpp for Release build
| llvm[2]: (build tools): Compiling ConvertUTF.c for Release build
| llvm[2]: (build tools): Compiling ConvertUTFWrapper.cpp for Release build
| llvm[2]: (build tools): Compiling CrashRecoveryContext.cpp for Release build
| llvm[2]: (build tools): Compiling DAGDeltaAlgorithm.cpp for Release build
| llvm[2]: (build tools): Compiling DataExtractor.cpp for Release build
| llvm[2]: (build tools): Compiling DataStream.cpp for Release build
| llvm[2]: (build tools): Compiling Debug.cpp for Release build
| llvm[2]: (build tools): Compiling Dwarf.cpp for Release build
| llvm[2]: (build tools): Compiling DeltaAlgorithm.cpp for Release build
| llvm[2]: (build tools): Compiling DynamicLibrary.cpp for Release build
| llvm[2]: (build tools): Compiling Errno.cpp for Release build
| llvm[2]: (build tools): Compiling ErrorHandling.cpp for Release build
| llvm[2]: (build tools): Compiling FileOutputBuffer.cpp for Release build
| llvm[2]: (build tools): Compiling FileUtilities.cpp for Release build
| llvm[2]: (build tools): Compiling FoldingSet.cpp for Release build
| llvm[2]: (build tools): Compiling FormattedStream.cpp for Release build
| llvm[2]: (build tools): Compiling GraphWriter.cpp for Release build
| llvm[2]: (build tools): Compiling Hashing.cpp for Release build
| llvm[2]: (build tools): Compiling Host.cpp for Release build
| llvm[2]: (build tools): Compiling IntEqClasses.cpp for Release build
| llvm[2]: (build tools): Compiling IntervalMap.cpp for Release build
| llvm[2]: (build tools): Compiling IntrusiveRefCntPtr.cpp for Release build
| llvm[2]: (build tools): Compiling LEB128.cpp for Release build
| llvm[2]: (build tools): Compiling LineIterator.cpp for Release build
| llvm[2]: (build tools): Compiling Locale.cpp for Release build
| llvm[2]: (build tools): Compiling LockFileManager.cpp for Release build
| llvm[2]: (build tools): Compiling MD5.cpp for Release build
| llvm[2]: (build tools): Compiling ManagedStatic.cpp for Release build
| llvm[2]: (build tools): Compiling MathExtras.cpp for Release build
| llvm[2]: (build tools): Compiling Memory.cpp for Release build
| llvm[2]: (build tools): Compiling MemoryBuffer.cpp for Release build
| llvm[2]: (build tools): Compiling MemoryObject.cpp for Release build
| llvm[2]: (build tools): Compiling Mutex.cpp for Release build
| llvm[2]: (build tools): Compiling Options.cpp for Release build
| llvm[2]: (build tools): Compiling Path.cpp for Release build
| llvm[2]: (build tools): Compiling PluginLoader.cpp for Release build
| llvm[2]: (build tools): Compiling PrettyStackTrace.cpp for Release build
| llvm[2]: (build tools): Compiling Process.cpp for Release build
| llvm[2]: (build tools): Compiling Program.cpp for Release build
| llvm[2]: (build tools): Compiling RWMutex.cpp for Release build
| llvm[2]: (build tools): Compiling RandomNumberGenerator.cpp for Release build
| llvm[2]: (build tools): Compiling Regex.cpp for Release build
| llvm[2]: (build tools): Compiling ScaledNumber.cpp for Release build
| llvm[2]: (build tools): Compiling SearchForAddressOfSpecialSymbol.cpp for Release build
| llvm[2]: (build tools): Compiling Signals.cpp for Release build
| llvm[2]: (build tools): Compiling SmallPtrSet.cpp for Release build
| llvm[2]: (build tools): Compiling SmallVector.cpp for Release build
| llvm[2]: (build tools): Compiling SourceMgr.cpp for Release build
| llvm[2]: (build tools): Compiling SpecialCaseList.cpp for Release build
| llvm[2]: (build tools): Compiling Statistic.cpp for Release build
| llvm[2]: (build tools): Compiling StreamingMemoryObject.cpp for Release build
| llvm[2]: (build tools): Compiling StringExtras.cpp for Release build
| llvm[2]: (build tools): Compiling StringMap.cpp for Release build
| llvm[2]: (build tools): Compiling StringPool.cpp for Release build
| llvm[2]: (build tools): Compiling StringRef.cpp for Release build
| llvm[2]: (build tools): Compiling StringSaver.cpp for Release build
| llvm[2]: (build tools): Compiling SystemUtils.cpp for Release build
| llvm[2]: (build tools): Compiling TargetParser.cpp for Release build
| llvm[2]: (build tools): Compiling TargetRegistry.cpp for Release build
| llvm[2]: (build tools): Compiling ThreadLocal.cpp for Release build
| llvm[2]: (build tools): Compiling Threading.cpp for Release build
| llvm[2]: (build tools): Compiling TimeValue.cpp for Release build
| llvm[2]: (build tools): Compiling Timer.cpp for Release build
| llvm[2]: (build tools): Compiling ToolOutputFile.cpp for Release build
| llvm[2]: (build tools): Compiling Triple.cpp for Release build
| llvm[2]: (build tools): Compiling Twine.cpp for Release build
| llvm[2]: (build tools): Compiling Unicode.cpp for Release build
| llvm[2]: (build tools): Compiling Valgrind.cpp for Release build
| llvm[2]: (build tools): Compiling Watchdog.cpp for Release build
| llvm[2]: (build tools): Compiling YAMLParser.cpp for Release build
| llvm[2]: (build tools): Compiling YAMLTraits.cpp for Release build
| llvm[2]: (build tools): Compiling circular_raw_ostream.cpp for Release build
| llvm[2]: (build tools): Compiling raw_os_ostream.cpp for Release build
| llvm[2]: (build tools): Compiling raw_ostream.cpp for Release build
| llvm[2]: (build tools): Compiling regcomp.c for Release build
| llvm[2]: (build tools): Compiling regerror.c for Release build
| llvm[2]: (build tools): Compiling regexec.c for Release build
| llvm[2]: (build tools): Compiling regfree.c for Release build
| llvm[2]: (build tools): Compiling regstrlcpy.c for Release build
| llvm[2]: (build tools): Building Release Archive Library libLLVMSupport.a
| make[2]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/lib/Support'
| make[2]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/lib/TableGen'
| llvm[2]: (build tools): Compiling Error.cpp for Release build
| llvm[2]: (build tools): Compiling Main.cpp for Release build
| llvm[2]: (build tools): Compiling Record.cpp for Release build
| llvm[2]: (build tools): Compiling SetTheory.cpp for Release build
| llvm[2]: (build tools): Compiling StringMatcher.cpp for Release build
| llvm[2]: (build tools): Compiling TGLexer.cpp for Release build
| llvm[2]: (build tools): Compiling TGParser.cpp for Release build
| llvm[2]: (build tools): Compiling TableGenBackend.cpp for Release build
| llvm[2]: (build tools): Building Release Archive Library libLLVMTableGen.a
| make[2]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/lib/TableGen'
| make[2]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils'
| make[3]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/llvm-lit'
| make[3]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/PerfectShuffle'
| make[3]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/unittest'
| llvm[3]: (build tools): Compiling PerfectShuffle.cpp for Release build
| make[3]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/yaml-bench'
| llvm[3]: (build tools): Creating 'llvm-lit' script...
| make[3]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/count'
| make[3]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/fpcmp'
| make[3]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/not'
| make[3]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/llvm-lit'
| llvm[3]: (build tools): Compiling count.c for Release build
| llvm[3]: (build tools): Compiling YAMLBench.cpp for Release build
| make[3]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/FileCheck'
| llvm[3]: (build tools): Compiling fpcmp.cpp for Release build
| llvm[3]: (build tools): Compiling not.cpp for Release build
| llvm[3]: (build tools): Compiling FileCheck.cpp for Release build
| make[4]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/unittest/googletest'
| make[4]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/unittest/UnitTestMain'
| make[3]: Entering directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/TableGen'
| llvm[4]: (build tools): Compiling src/gtest-all.cc for Release build
| llvm[4]: (build tools): Compiling TestMain.cpp for Release build
| llvm[3]: (build tools): Compiling AsmMatcherEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling AsmWriterEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling AsmWriterInst.cpp for Release build
| llvm[3]: (build tools): Compiling CTagsEmitter.cpp for Release build
| llvm[3]: (build tools): Linking Release executable count (without symbols)
| llvm[3]: (build tools): ======= Finished Linking Release Executable count (without symbols)
| make[3]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/count'
| llvm[3]: (build tools): Compiling CallingConvEmitter.cpp for Release build
| llvm[3]: (build tools): Linking Release executable not (without symbols)
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/lib/libLLVMSupport.a: error adding symbols: Archive has no index; run ranlib to add one
| collect2: error: ld returned 1 exit status
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:1434: recipe for target '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/not' failed
| make[3]: *** [/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/not] Error 1
| make[3]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/not'
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:939: recipe for target 'not/.makeall' failed
| make[2]: *** [not/.makeall] Error 2
| make[2]: *** Waiting for unfinished jobs....
| llvm[3]: (build tools): Compiling CodeEmitterGen.cpp for Release build
| llvm[3]: (build tools): Linking Release executable llvm-PerfectShuffle (without symbols)
| llvm[3]: (build tools): ======= Finished Linking Release Executable llvm-PerfectShuffle (without symbols)
| make[3]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/PerfectShuffle'
| llvm[3]: (build tools): Compiling CodeGenDAGPatterns.cpp for Release build
| llvm[3]: (build tools): Linking Release executable fpcmp (without symbols)
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/lib/libLLVMSupport.a: error adding symbols: Archive has no index; run ranlib to add one
| collect2: error: ld returned 1 exit status
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:1434: recipe for target '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/fpcmp' failed
| make[3]: *** [/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/fpcmp] Error 1
| make[3]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/fpcmp'
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:939: recipe for target 'fpcmp/.makeall' failed
| make[2]: *** [fpcmp/.makeall] Error 2
| llvm[3]: (build tools): Compiling CodeGenInstruction.cpp for Release build
| llvm[4]: (build tools): Building Release Archive Library libgtest_main.a
| llvm[3]: (build tools): Compiling CodeGenMapTable.cpp for Release build
| make[4]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/unittest/UnitTestMain'
| llvm[3]: (build tools): Compiling CodeGenRegisters.cpp for Release build
| llvm[3]: (build tools): Linking Release executable yaml-bench (without symbols)
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/lib/libLLVMSupport.a: error adding symbols: Archive has no index; run ranlib to add one
| collect2: error: ld returned 1 exit status
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:1434: recipe for target '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/yaml-bench' failed
| make[3]: *** [/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/yaml-bench] Error 1
| make[3]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/yaml-bench'
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:939: recipe for target 'yaml-bench/.makeall' failed
| make[2]: *** [yaml-bench/.makeall] Error 2
| llvm[3]: (build tools): Compiling CodeGenSchedule.cpp for Release build
| llvm[3]: (build tools): Compiling CodeGenTarget.cpp for Release build
| llvm[3]: (build tools): Compiling DAGISelEmitter.cpp for Release build
| llvm[3]: (build tools): Linking Release executable FileCheck (without symbols)
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/lib/libLLVMSupport.a: error adding symbols: Archive has no index; run ranlib to add one
| collect2: error: ld returned 1 exit status
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:1434: recipe for target '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/FileCheck' failed
| make[3]: *** [/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/FileCheck] Error 1
| make[3]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/FileCheck'
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:939: recipe for target 'FileCheck/.makeall' failed
| make[2]: *** [FileCheck/.makeall] Error 2
| llvm[3]: (build tools): Compiling DAGISelMatcher.cpp for Release build
| llvm[3]: (build tools): Compiling DAGISelMatcherEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling DAGISelMatcherGen.cpp for Release build
| llvm[3]: (build tools): Compiling DAGISelMatcherOpt.cpp for Release build
| llvm[3]: (build tools): Compiling DFAPacketizerEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling DisassemblerEmitter.cpp for Release build
| llvm[4]: (build tools): Building Release Archive Library libgtest.a
| make[4]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/unittest/googletest'
| make[3]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/unittest'
| llvm[3]: (build tools): Compiling FastISelEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling FixedLenDecoderEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling InstrInfoEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling OptParserEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling IntrinsicEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling PseudoLoweringEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling RegisterInfoEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling SubtargetEmitter.cpp for Release build
| llvm[3]: (build tools): Compiling TableGen.cpp for Release build
| llvm[3]: (build tools): Compiling X86DisassemblerTables.cpp for Release build
| llvm[3]: (build tools): Compiling X86ModRMFilters.cpp for Release build
| llvm[3]: (build tools): Compiling X86RecognizableInstr.cpp for Release build
| llvm[3]: (build tools): Linking Release executable llvm-tblgen (without symbols)
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/lib/libLLVMTableGen.a: error adding symbols: Archive has no index; run ranlib to add one
| collect2: error: ld returned 1 exit status
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:1434: recipe for target '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/llvm-tblgen' failed
| make[3]: *** [/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/Release/bin/llvm-tblgen] Error 1
| make[3]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils/TableGen'
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:939: recipe for target 'TableGen/.makeall' failed
| make[2]: *** [TableGen/.makeall] Error 2
| make[2]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools/utils'
| /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/Makefile.rules:880: recipe for target 'all' failed
| make[1]: *** [all] Error 1
| make[1]: Leaving directory '/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/build/BuildTools'
| Makefile:110: recipe for target 'cross-compile-build-tools' failed
| make: *** [cross-compile-build-tools] Error 1
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/rust-llvm/1.7.0-r0/temp/log.do_compile.17350)
ERROR: Task 85 (/mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/../meta-rust/recipes-devtools/rust/rust-llvm.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 404 tasks of which 393 didn't need to be rerun and 1 failed.
No currently running tasks (404 of 420)

Summary: 1 task failed:
  /mnt/storage/zeenix/GDP/genivi-dev-platform/gdp-src-build/../meta-rust/recipes-devtools/rust/rust-llvm.bb, do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Since the build works fine the first time, I'm guessing Rust recipe is not doing a proper job of cleaning-up?

On Fedora 25 (with gcc 6.2), I had a different outcome but there I build didn't succeed the first time so can not be sure the symptoms on F25 are related to this bug or not:

WARNING: rust-llvm-native-1.7.0-r0 do_populate_lic: Could not copy license file /home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/LICENSE.TXT to /home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/tmp/work/x86_64-linux/rust-llvm-native/1.7.0-r0/license-destdir/rust-llvm-native/LICENSE.TXT: [Errno 2] No such file or directory: '/home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/tmp/work-shared/rust-1.7.0-r0/rustc-1.7.0/src/llvm/LICENSE.TXT'
ERROR: rust-llvm-native-1.7.0-r0 do_install: oe_runmake failed
ERROR: rust-llvm-native-1.7.0-r0 do_install: Function failed: do_install (log file is located at /home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/tmp/work/x86_64-linux/rust-llvm-native/1.7.0-r0/temp/log.do_install.11173)
ERROR: Logfile of failure stored in: /home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/tmp/work/x86_64-linux/rust-llvm-native/1.7.0-r0/temp/log.do_install.11173
Log data follows:
| DEBUG: Executing shell function do_install
| NOTE: make -j 8 DESTDIR=/home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/tmp/work/x86_64-linux/rust-llvm-native/1.7.0-r0/image install
| make: *** No rule to make target 'install'.  Stop.
| ERROR: oe_runmake failed
| ERROR: Function failed: do_install (log file is located at /home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/tmp/work/x86_64-linux/rust-llvm-native/1.7.0-r0/temp/log.do_install.11173)
ERROR: Task 2 (virtual:native:/home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/../meta-rust/recipes-devtools/rust/rust-llvm.bb, do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 59 tasks of which 52 didn't need to be rerun and 1 failed.
No currently running tasks (59 of 61)

Summary: 1 task failed:
  virtual:native:/home/zeenix/checkout/GDP/genivi-dev-platform/gdp-src-build/../meta-rust/recipes-devtools/rust/rust-llvm.bb, do_install
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Isn't this the same as reported in this comment? https://at.projects.genivi.org/jira/browse/GDP-375?focusedCommentId=14056&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14056 and AFAIK Robert Marshall uses Ubuntu, not Fedora.

Add krogoth branch

Yocto 2.1 is the current stable release. It would be nice if meta-rust had a krogoth branch to support 2.1

rust-native & rust-cross: "error: multiple dylib candidates for `std` found"

Need to be more careful about how we tell rustc's build process to search for libraries to link against, in particular we need to convince it not to search ${libdir} when doing the initial builds.

The problem there is the search of ${libdir} is:

  • necessary to find rust-llvm
  • is also part of our generated target.json (so invocations of the final rustc to build other things look in ${libdir}).

The recipe rust-cross-x86_64 is trying to install files into a shared area when those files already exist.

I'm upgrading from 1.7 to 1.10, and I get the following error with the latest master:

DEBUG: Python function do_populate_sysroot finished
DEBUG: Executing python function do_qa_staging
NOTE: QA checking staging
DEBUG: Python function do_qa_staging finished
DEBUG: Executing python function sstate_task_postfunc
DEBUG: Staging files from /opt/pro/poky/build/tmp/work/x86_64-linux/rust-cross-x86_64/1.10.0-r0/sysroot-destdir/opt/pro/poky/build/tmp/sysroots/x86_64-linux to /opt/pro/poky/build/tmp/sysroots/x86_64-linux
ERROR: The recipe rust-cross-x86_64 is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
   /opt/pro/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rustlib/x86_64-linux.json
 Matched in manifest-x86_64-rust-native.populate_sysroot
Please verify which recipe should provide the above files.
The build has stopped as continuing in this scenario WILL break things, if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error however switching DISTRO_FEATURES on an existing build directory is not supported, you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above.
ERROR: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.
DEBUG: Python function sstate_task_postfunc finished
ERROR: Function failed: sstate_task_postfunc

I destroyed my tmp/ dir, got same error, then removed the entire build/ dir, still the same error.

If i run find tmp/ -name x86_64-linux.json I get the following:

tmp/sysroots/x86_64-linux/usr/lib/rustlib/x86_64-linux.json
tmp/work/x86_64-linux/rust-cross-x86_64/1.10.0-r0/sysroot-destdir/opt/pro/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rustlib/x86_64-linux.json
tmp/work/x86_64-linux/rust-cross-x86_64/1.10.0-r0/image/opt/pro/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rustlib/x86_64-linux.json
tmp/work/x86_64-linux/rust-cross-x86_64/1.10.0-r0/targets/x86_64-linux.json
tmp/work/x86_64-linux/rust-native/1.10.0-r0/sysroot-destdir/opt/pro/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rustlib/x86_64-linux.json
tmp/work/x86_64-linux/rust-native/1.10.0-r0/image/opt/pro/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rustlib/x86_64-linux.json
tmp/work/x86_64-linux/rust-native/1.10.0-r0/targets/x86_64-linux.json

tmp/work/x86_64-linux/rust-native/1.10.0-r0/sysroot-destdir/opt/pro/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rustlib/x86_64-linux.json Seems to be the one that is there at tmp/sysroots/x86_64-linux/usr/lib/rustlib/x86_64-linux.json first.

Then it seems bitbake tries to write tmp/work/x86_64-linux/rust-cross-x86_64/1.10.0-r0/sysroot-destdir/opt/pro/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rustlib/x86_64-linux.json to the same location, causing the error.

Here's the rust-cross json file, and here's the rust-native json file. The only difference seems to be rust-cross json file has an extra "-Wl,-rpath=../../lib" in the post-link-args array.

So yeah, if you have any idea how to resolve this it'd be greatly appreciated.

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.