Chirpstack gateway OS: Yocto build failure

Hi,

I was trying to build the gateway OS and I could not get past this error:

Steps followed:

  1. git clone https://github.com/brocaar/chirpstack-gateway-os.git
  2. cd chirpstack-gateway-os
  3. make submodules
  4. make permissions
  5. source oe-init-build-env build bitbake
  6. bitbake chirpstack-gateway-os-base

The build failed at following task:
chirpstack-concentratord_3.0.2.bb:do_compile

Below is the detail build log for your reference. May I request to help me resolve this?

| Running rustc --crate-name async_trait --edition=2018 /home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/cargo_home/registry/src/github.com-1ecc6299db9ec823/async-trait-0.1.24/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -Cembed-bitcode=no -C debuginfo=2 -C metadata=6c5a76feb53889c2 -C extra-filename=-6c5a76feb53889c2 --out-dir /home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps -C linker=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/wrappers/linker-native-wrapper.sh -L dependency=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps --extern proc_macro2=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps/libproc_macro2-517717b2eeea032e.rlib --extern quote=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps/libquote-80f3914f530d27d8.rlib --extern syn=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps/libsyn-12b9455517cbcce0.rlib --extern proc_macro --cap-lints allow
| Running rustc --crate-name serde_derive /home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/cargo_home/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.104/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -Cembed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' -C metadata=cde67fa097453f12 -C extra-filename=-cde67fa097453f12 --out-dir /home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps -C linker=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/wrappers/linker-native-wrapper.sh -L dependency=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps --extern proc_macro2=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps/libproc_macro2-517717b2eeea032e.rlib --extern quote=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps/libquote-80f3914f530d27d8.rlib --extern syn=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps/libsyn-12b9455517cbcce0.rlib --extern proc_macro --cap-lints allow
| Compiling rand v0.7.3
| Compiling simple_logger v1.5.0
| Running rustc --crate-name rand --edition=2018 /home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/cargo_home/registry/src/github.com-1ecc6299db9ec823/rand-0.7.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -Cembed-bitcode=no -C debuginfo=2 --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="getrandom"' --cfg 'feature="getrandom_package"' --cfg 'feature="libc"' --cfg 'feature="std"' -C metadata=889bc72257887270 -C extra-filename=-889bc72257887270 --out-dir /home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps --target armv7-unknown-linux-gnueabihf -C linker=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/wrappers/linker-wrapper.sh -L dependency=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps -L dependency=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps --extern getrandom_package=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps/libgetrandom-2591183458f44a4f.rmeta --extern libc=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps/liblibc-e8a1de2073893db9.rmeta --extern rand_chacha=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps/librand_chacha-45e16364f51a5282.rmeta --extern rand_core=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps/librand_core-ec4794005c662fe2.rmeta --cap-lints allow
| Running rustc --crate-name simple_logger /home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/cargo_home/registry/src/github.com-1ecc6299db9ec823/simple_logger-1.5.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -Cembed-bitcode=no -C debuginfo=2 --cfg 'feature="chrono"' --cfg 'feature="colored"' --cfg 'feature="default"' -C metadata=a907341d199030e9 -C extra-filename=-a907341d199030e9 --out-dir /home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps --target armv7-unknown-linux-gnueabihf -C linker=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/wrappers/linker-wrapper.sh -L dependency=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps -L dependency=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/deps --extern chrono=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps/libchrono-da23d2684eb9d7f2.rmeta --extern colored=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps/libcolored-4903e3bd1a8e9b31.rmeta --extern log=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/armv7-unknown-linux-gnueabihf/release/deps/liblog-245b42fd488bc8eb.rmeta --cap-lints allow
| The following warnings were emitted during compilation:
|
| warning: gcc: error: unrecognized command line option ‘-fmacro-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1=/usr/src/debug/chirpstack-concentratord/3.0.2-r1’
|
| error: failed to run custom build command for libloading v0.5.2
|
| Caused by:
| process didn’t exit successfully: /home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/build/libloading-cb7b018aa809cc7e/build-script-build (exit code: 1)
| — stdout
| cargo:rustc-link-lib=dl
| TARGET = Some(“x86_64-unknown-linux-gnu”)
| OPT_LEVEL = Some(“3”)
| HOST = Some(“x86_64-unknown-linux-gnu”)
| CC_x86_64-unknown-linux-gnu = None
| CC_x86_64_unknown_linux_gnu = None
| HOST_CC = None
| CC = Some("/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/wrappers/cc-native-wrapper.sh")
| CFLAGS_x86_64-unknown-linux-gnu = None
| CFLAGS_x86_64_unknown_linux_gnu = None
| HOST_CFLAGS = None
| CFLAGS = Some(" -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1=/usr/src/debug/chirpstack-concentratord/3.0.2-r1 -fdebug-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1=/usr/src/debug/chirpstack-concentratord/3.0.2-r1 -fdebug-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/recipe-sysroot= -fdebug-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/recipe-sysroot-native= ")
| CRATE_CC_NO_DEFAULTS = None
| DEBUG = Some(“true”)
| CARGO_CFG_TARGET_FEATURE = Some(“fxsr,sse,sse2”)
| running: “/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/wrappers/cc-native-wrapper.sh” “-O3” “-ffunction-sections” “-fdata-sections” “-fPIC” “-g” “-fno-omit-frame-pointer” “-m64” “-O2” “-pipe” “-g” “-feliminate-unused-debug-types” “-fmacro-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1=/usr/src/debug/chirpstack-concentratord/3.0.2-r1” “-fdebug-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1=/usr/src/debug/chirpstack-concentratord/3.0.2-r1” “-fdebug-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/recipe-sysroot=” “-fdebug-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/recipe-sysroot-native=” “-o” “/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/build/libloading-8b4570a569a949e1/out/src/os/unix/global_static.o” “-c” “src/os/unix/global_static.c”
| cargo:warning=gcc: error: unrecognized command line option ‘-fmacro-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1=/usr/src/debug/chirpstack-concentratord/3.0.2-r1’
| exit code: 1
|
| — stderr
|
|
| error occurred: Command “/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/wrappers/cc-native-wrapper.sh” “-O3” “-ffunction-sections” “-fdata-sections” “-fPIC” “-g” “-fno-omit-frame-pointer” “-m64” “-O2” “-pipe” “-g” “-feliminate-unused-debug-types” “-fmacro-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1=/usr/src/debug/chirpstack-concentratord/3.0.2-r1” “-fdebug-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1=/usr/src/debug/chirpstack-concentratord/3.0.2-r1” “-fdebug-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/recipe-sysroot=” “-fdebug-prefix-map=/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/recipe-sysroot-native=” “-o” “/home/ravi/chirpstack-gateway-os/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/chirpstack-concentratord/3.0.2-r1/target/release/build/libloading-8b4570a569a949e1/out/src/os/unix/global_static.o” “-c” “src/os/unix/global_static.c” with args “cc-native-wrapper.sh” did not execute successfully (status code exit code: 1).
|
|
| warning: build failed, waiting for other jobs to finish…
| error: build failed
| WARNING: exit code 101 from a shell command.
|
ERROR: Task (/home/ravi/chirpstack-gateway-os/layers/chirpstack/meta-chirpstack/recipes-chirpstack/chirpstack-concentratord/chirpstack-concentratord_3.0.2.bb:do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 3494 tasks of which 3493 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/ravi/chirpstack-gateway-os/layers/chirpstack/meta-chirpstack/recipes-chirpstack/chirpstack-concentratord/chirpstack-concentratord_3.0.2.bb:do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Same problem here. Have you fixed it?

Are you trying to build within the provided Docker environment? Also, there is an issue with the current master, this is related to: https://github.com/openembedded/meta-openembedded/issues/285