-
Notifications
You must be signed in to change notification settings - Fork 79
Description
I want to target compile RedisJSON https://github.com/RedisJSON/RedisJSON
Building machine OS: Ubuntu 18.04.5 LTS
Target MACHINE is var-som-mx6 (NXP i.MX6Q)
Added meta-rust-bin layer in build/conf/bblayers.conf
On host OS build pass just fine with cargo build --release against git clone of RedisJSON
That's my Bitbake recipe:
SUMMARY = "Redis JSON"
DESCRIPTION = "Redis JSON plugin."
HOMEPAGE = "http://redis.io"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=e75c8f72bbc9c3744174aaf54faf3bd4"
SRC_URI="git://github.com/RedisJSON/RedisJSON.git;protocol=git;"
SRCREV = "2d9ac841a3e6365016c68fe1b1b1f7762277bf6c"
#BB_STRICT_CHECKSUM = "0"
MIRRORS=""
inherit cargo
S = "${WORKDIR}/git"
#do_compile () {
# cargo build --release
#}
#BBCLASSEXTEND = "native"
Compilation fail with next log:
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: which rustc: /home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/recipe-sysroot-native/usr/bin/rustc
| NOTE: rustc --version rustc 1.54.0 (a178d0322 2021-07-26)
| NOTE: which cargo: /home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/recipe-sysroot-native/usr/bin/cargo
| NOTE: cargo --version cargo 1.54.0 (5ae8d74b3 2021-06-22)
| NOTE: cargo build --verbose --manifest-path /home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/git/Cargo.toml --target=armv7-unknown-linux-gnueabihf --release
| Fresh autocfg v1.0.1
| Fresh unicode-xid v0.2.2
| Fresh version_check v0.9.3
| Fresh glob v0.3.0
| Fresh cfg-if v1.0.0
| Fresh funty v1.1.0
| Fresh wyz v0.2.0
| Fresh tap v1.0.1
| Fresh regex-syntax v0.6.25
| Fresh unicode-width v0.1.8
| Fresh strsim v0.8.0
| Fresh vec_map v0.8.2
| Fresh ansi_term v0.11.0
| Fresh humantime v2.1.0
| Fresh termcolor v1.1.2
| Fresh lazycell v1.3.0
| Fresh hashbrown v0.11.2
| Fresh peeking_take_while v0.1.2
| Fresh lazy_static v1.4.0
| Fresh shlex v1.0.0
| Fresh rustc-hash v1.1.0
| Fresh unicode-xid v0.0.4
| Fresh unicode-segmentation v1.8.0
| Fresh itoa v0.4.8
| Fresh cc v1.0.69
| Fresh ppv-lite86 v0.2.10
| Fresh quote v0.3.15
| Fresh linked-hash-map v0.5.4
| Fresh hex v0.3.2
| Fresh bitflags v1.3.2
| Fresh md5 v0.6.1
| Fresh array_tool v1.0.3
| Fresh byteorder v1.4.3
| Fresh libloading v0.7.0
| Fresh textwrap v0.11.0
| Fresh libc v0.2.100
| Fresh synom v0.11.3
| Fresh heck v0.3.3
| Fresh proc-macro2 v1.0.28
| Fresh memchr v2.3.4
| Fresh radium v0.5.3
| Fresh ryu v1.0.5
| Fresh log v0.4.14
| Fresh quote v1.0.9
| Fresh aho-corasick v0.7.15
| Fresh bitvec v0.19.5
| Fresh atty v0.2.14
| Fresh which v3.1.1
| Fresh clang-sys v1.2.0
| Fresh getrandom v0.1.16
| Fresh indexmap v1.7.0
| Fresh num-traits v0.2.14
| Fresh syn v0.11.11
| Fresh time v0.1.44
| Fresh syn v1.0.75
| Fresh nom v6.2.1
| Fresh regex v1.4.6
| Fresh clap v2.33.3
| Fresh rand_core v0.5.1
| Fresh num-integer v0.1.44
| Fresh num-traits v0.1.43
| Fresh env_logger v0.8.4
| Fresh cexpr v0.5.0
| Fresh serde_derive v1.0.128
| Fresh rand_chacha v0.2.2
| Fresh enum-primitive-derive v0.1.2
| Fresh strum_macros v0.21.1
| Fresh chrono v0.4.19
| Fresh bindgen v0.59.1
| Fresh serde v1.0.128
| Fresh rand v0.7.3
| Fresh serde_json v1.0.66
| Compiling redis-module v0.23.0
| Fresh jsonpath_lib v0.2.6 (https://github.com/RedisJSON/jsonpath.git?branch=generic_json_path#14af7aa5)
| Fresh bson v0.14.1
| Running/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/target/release/build/redis-module-96a8b1c787effaba/build-script-build
| error: failed to run custom build command forredis-module v0.23.0
|
| Caused by:
| process didn't exit successfully:/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/target/release/build/redis-module-96a8b1c787effaba/build-script-build
(exit status: 101)
| --- stdout
| TARGET = Some("armv7-unknown-linux-gnueabihf")
| OPT_LEVEL = Some("3")
| HOST = Some("x86_64-unknown-linux-gnu")
| CC_armv7-unknown-linux-gnueabihf = None
| CC_armv7_unknown_linux_gnueabihf = None
| TARGET_CC = Some("/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/wrappers/cc-wrapper.sh")
| CFLAGS_armv7-unknown-linux-gnueabihf = None
| CFLAGS_armv7_unknown_linux_gnueabihf = None
| TARGET_CFLAGS = Some(" -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0=/usr/src/debug/redisjson/1.0.8-r0 -fdebug-prefix-map=/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/recipe-sysroot= -fdebug-prefix-map=/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/recipe-sysroot-native= ")
| CRATE_CC_NO_DEFAULTS = None
| DEBUG = Some("true")
| CARGO_CFG_TARGET_FEATURE = None
| running: "/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/wrappers/cc-wrapper.sh" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-march=armv7-a" "-O2" "-pipe" "-g" "-feliminate-unused-debug-types" "-fdebug-prefix-map=/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0=/usr/src/debug/redisjson/1.0.8-r0" "-fdebug-prefix-map=/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/recipe-sysroot=" "-fdebug-prefix-map=/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/recipe-sysroot-native=" "-I" "src/include/" "-DREDISMODULE_EXPERIMENTAL_API" "-o" "/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/target/armv7-unknown-linux-gnueabihf/release/build/redis-module-ee71a5412677483f/out/src/redismodule.o" "-c" "src/redismodule.c"
| exit status: 0
| AR_armv7-unknown-linux-gnueabihf = None
| AR_armv7_unknown_linux_gnueabihf = None
| TARGET_AR = None
| AR = Some("arm-fslc-linux-gnueabi-ar")
| running: "arm-fslc-linux-gnueabi-ar" "cq" "/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/target/armv7-unknown-linux-gnueabihf/release/build/redis-module-ee71a5412677483f/out/libredismodule.a" "/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/target/armv7-unknown-linux-gnueabihf/release/build/redis-module-ee71a5412677483f/out/src/redismodule.o"
| exit status: 0
| running: "arm-fslc-linux-gnueabi-ar" "s" "/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/target/armv7-unknown-linux-gnueabihf/release/build/redis-module-ee71a5412677483f/out/libredismodule.a"
| exit status: 0
| cargo:rustc-link-lib=static=redismodule
| cargo:rustc-link-search=native=/home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/target/armv7-unknown-linux-gnueabihf/release/build/redis-module-ee71a5412677483f/out
|
| --- stderr
| /usr/include/sys/types.h:145:10: fatal error: 'stddef.h' file not found
| /usr/include/sys/types.h:145:10: fatal error: 'stddef.h' file not found, err: true
| thread 'main' panicked at 'error generating bindings: ()', /home/optix/thud/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/redisjson/1.0.8-r0/cargo_home/registry/src/github.com-1ecc6299db9ec823/redis-module-0.23.0/build.rs:76:10
| stack backtrace:
| 0: rust_begin_unwind
| at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:515:5
| 1: core::panicking::panic_fmt
| at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/panicking.rs:92:14
| 2: core::result::unwrap_failed
| at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/result.rs:1355:5
| 3: core::result::Result<T,E>::expect
| at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/result.rs:997:23
| 4: build_script_build::main
| at ./build.rs:68:20
| 5: core::ops::function::FnOnce::call_once
| at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/function.rs:227:5
| note: Some details are omitted, run withRUST_BACKTRACE=full
for a verbose backtrace.
| WARNING: exit code 101 from a shell command.
NOTE: I do not want to install rustc and cargo into SYSROOT.
Any ideas from where failed compilation ?