Comments (18)
@kreinhar you actually have a Pi One B Version 2 no a raspberry pi 2. Its the same processor as the pi Zero, thus the issue is consistent.
from thin-edge.io.
@abelikt
Thank you so much for the support. Finally the move of my virtual ubuntu from VirtualBox to Hyper V and your hints made the compilation successfull
from thin-edge.io.
Got the same on a pi zero. Might be due to the different arm version.
PI 2 version 7
Pi Zero version 6
PI 3&4 version 8
from thin-edge.io.
Hello @kreinhar,
that is a strange error you observe there. I also tried to use a Raspberry Pi 2 Model B V1.1 and I have no problems there.
What is the exact Rpi version that you are using? It's at the end of cat /proc/cpuinfo
.
Mine has:
Hardware : BCM2835
Revision : a01041
Model : Raspberry Pi 2 Model B Rev 1.1
Do you get the same issue when you are just running tedge help
?
Is there more info about the error in the log? E.g. when you run: sudo journalctl -xe
from thin-edge.io.
hi @abelikt
this is my output
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
Hardware : BCM2835
Revision : 000d
Model : Raspberry Pi Model B Rev 2
pi@raspberrypi:~ $ tedge
Speicherzugriffsfehler
pi@raspberrypi:~ $ tedge help
Speicherzugriffsfehler
pi@raspberrypi:~ $
and no additional info in the log
strange behaviour
from thin-edge.io.
tedge will not even compile under pi zero
pi@pizero:~ $ cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 997.08
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : BCM2835
Revision : 9000c1
Serial : 00000000fd583578
Model : Raspberry Pi Zero W Rev 1.1
Compiling tedge v0.1.0 (/home/pi/thin-edge.io/tedge)
error: could not compile tedge
Caused by:
process didn't exit successfully: rustc --crate-name tedge --edition=2018 tedge/src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C metadata=a88fb3914159a233 -C extra-filename=-a88fb3914159a233 --out-dir /home/pi/thin-edge.io/target/release/deps -L dependency=/home/pi/thin-edge.io/target/release/deps --extern anyhow=/home/pi/thin-edge.io/target/release/deps/libanyhow-19a434c6caa4830e.rlib --extern chrono=/home/pi/thin-edge.io/target/release/deps/libchrono-38f463518682cd4d.rlib --extern futures=/home/pi/thin-edge.io/target/release/deps/libfutures-66160add4ae2bd64.rlib --extern mqtt_client=/home/pi/thin-edge.io/target/release/deps/libmqtt_client-19ab5d2a5c7bfe88.rlib --extern rcgen=/home/pi/thin-edge.io/target/release/deps/librcgen-f3425b6845857840.rlib --extern reqwest=/home/pi/thin-edge.io/target/release/deps/libreqwest-9f9bb565d8ff1cef.rlib --extern rpassword=/home/pi/thin-edge.io/target/release/deps/librpassword-ef623f9d1098783f.rlib --extern serde=/home/pi/thin-edge.io/target/release/deps/libserde-6c48347b98e21383.rlib --extern sha1=/home/pi/thin-edge.io/target/release/deps/libsha1-01365bc7f971840e.rlib --extern structopt=/home/pi/thin-edge.io/target/release/deps/libstructopt-3c215bb0c405ecaf.rlib --extern tedge_config=/home/pi/thin-edge.io/target/release/deps/libtedge_config-0d46ca8341573335.rlib --extern tempfile=/home/pi/thin-edge.io/target/release/deps/libtempfile-cd99a11e162e08e1.rlib --extern thiserror=/home/pi/thin-edge.io/target/release/deps/libthiserror-6d3f9f63e3ca7fe0.rlib --extern tokio=/home/pi/thin-edge.io/target/release/deps/libtokio-47fc20bb92f9e7e8.rlib --extern toml=/home/pi/thin-edge.io/target/release/deps/libtoml-634f20dc249acf85.rlib --extern url=/home/pi/thin-edge.io/target/release/deps/liburl-795dfe39e38c86ca.rlib --extern users=/home/pi/thin-edge.io/target/release/deps/libusers-7be366427005d0e4.rlib --extern which=/home/pi/thin-edge.io/target/release/deps/libwhich-4c982efcca77e586.rlib --extern x509_parser=/home/pi/thin-edge.io/target/release/deps/libx509_parser-481a03c0f6d67673.rlib --extern zeroize=/home/pi/thin-edge.io/target/release/deps/libzeroize-a3548f032ba7caa3.rlib -L native=/home/pi/thin-edge.io/target/release/build/ring-a555573fe87896a7/out
(signal: 9, SIGKILL: kill)
from thin-edge.io.
Perhaps this helps: http://idoroseman.com/running-rust-on-raspberry-pi-zero/
from thin-edge.io.
Rust seem to work on the PI Zero in general. Event though it took about 6 hours, the aprox 270 dependency rust libs compiled on the pi zero without a problem. Only tedge build fails.
from thin-edge.io.
Hey @kreinhar and @mstoffel-sag we followed up this problem. The root cause seems to be the library ring that is currently not supporting ARMv6. This library is partly implemented in Assembler, so it's not going to support ARMv6 any time soon. That means that as of now thin-edge.io is also not working on ARMv6.
As these devices are currently not in our focus, the maintainers will talk if we want to change something in that regard or if we stick to this decision.
If you are looking for small supported devices maybe the Raspberry PI Compute Modules and devices based on them are the right thing for you. CM3 and later are based on ARMv8.
from thin-edge.io.
Hey @kreinhar and @mstoffel-sag we have good news on this. We tried again to get it working and were successful:
rustup target add arm-unknown-linux-gnueabihf
cargo deb -p tedge --target arm-unknown-linux-gnueabihf
cargo deb -p tedge_mapper --target arm-unknown-linux-gnueabihf
With the debian packages coming out of the above commands, we tried on Raspberry Pi Zero W and it worked. This build target should also work for Raspberry Pi 1.
Please confirm if this works for you.
from thin-edge.io.
It seems that this has been resolved, we can reopen if we find new issues with armv6.
from thin-edge.io.
@itsyitsy @mstoffel-sag
I'm not able to compile the Thin-Edge with the above mentioned comments from 21.04.2021.
I used the Version 0.5.3 to compile and followed the instructions on the docs page to compile it on my ubuntu 20 VM.
The error is:
error: failed to run custom build command for ring v0.16.20
So it is still the problem with the ring library.
from thin-edge.io.
Hello @kreinhar,
To compile the ring crate you also need to have a gcc toolchain installed.
I can compile for target arm-unknown-linux-gnueabihf when I also use a custom linker:
export CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=/usr/bin/arm-linux-gnueabihf-gcc-10
If that does not help, please post your build log.
You can also try to use one of the (in-official) binaries, that we build and attach to the build workflow:
https://github.com/thin-edge/thin-edge.io/actions/workflows/build-workflow.yml
E.g. this one: https://github.com/thin-edge/thin-edge.io/actions/runs/1880777899
In your case its probably this archvie: debian-packages-arm-unknown-linux-gnueabihf
Hope it helps:
@itsyitsy @mstoffel-sag I'm not able to compile the Thin-Edge with the above mentioned comments from 21.04.2021. I used the Version 0.5.3 to compile and followed the instructions on the docs page to compile it on my ubuntu 20 VM.
The error is:
error: failed to run custom build command for
ring v0.16.20
So it is still the problem with the ring library.
from thin-edge.io.
nop still not working
error: failed to run custom build command for
ring v0.16.20`
Caused by:
process didn't exit successfully: /home/kreinhardt/thin-edge.io/target/release/build/ring-9b3ae2268c347658/build-script-build
(exit status: 101)
--- stdout
OPT_LEVEL = Some("z")
TARGET = Some("arm-unknown-linux-gnueabihf")
HOST = Some("x86_64-unknown-linux-gnu")
CC_arm-unknown-linux-gnueabihf = None
CC_arm_unknown_linux_gnueabihf = None
TARGET_CC = None
CC = None
CROSS_COMPILE = None
CFLAGS_arm-unknown-linux-gnueabihf = None
CFLAGS_arm_unknown_linux_gnueabihf = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = None
--- stderr
running "arm-linux-gnueabihf-gcc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=armv6" "-marm" "-mfpu=vfp" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/home/kreinhardt/thin-edge.io/target/arm-unknown-linux-gnueabihf/release/build/ring-d24edd317d2f6c26/out/aesv8-armx-linux32.o" "/home/kreinhardt/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux32.S"
thread 'main' panicked at 'failed to execute ["arm-linux-gnueabihf-gcc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=armv6" "-marm" "-mfpu=vfp" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/home/kreinhardt/thin-edge.io/target/arm-unknown-linux-gnueabihf/release/build/ring-d24edd317d2f6c26/out/aesv8-armx-linux32.o" "/home/kreinhardt/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux32.S"]: No such file or directory (os error 2)', /home/kreinhardt/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:653:9
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
cargo-deb: build failed`
from thin-edge.io.
Hi, I cannot reproduce it here anymore, but my notes tell me that I also had set the C compiler to compile aesv8-armx-linux32.S.
Can you also try to set this variable?
export TARGET_CC=/usr/bin/arm-linux-gnueabihf-gcc
You will also need an arm gcc : gcc-arm-linux-gnueabihf
from thin-edge.io.
Another approach:
In our workflows we use cargo cross, also due to the issues with ring. cargo cross pulls the complete toolchain in a docker image and compiles there:
cross build --target arm-unknown-linux-gnueabihf
Though, there is an issue with strippping. So we strip the binaries in the workflows:
arm-linux-gnueabihf-strip <binary-name>
Then, if needed, you can build the debian package with the stripped binaries:
cargo deb -p tedge --no-build --no-strip
from thin-edge.io.
@abelikt
step by step ahead we are going further on . ring compilation fixed. But got a new error by compiling apama.
Compiling tedge_apama_plugin v0.5.3 (/home/kreinhardt/thin-edge.io/plugins/tedge_apama_plugin)
Compiling tedge_dummy_plugin v0.5.3 (/home/kreinhardt/thin-edge.io/plugins/tedge_dummy_plugin)
error: linking with cc
failed: exit status: 1
|
= note: "cc" "/home/kreinhardt/thin-edge.io/target/arm-unknown-linux-gnueabihf/release/deps/tedge_dummy_plugin-14625594f374e240.tedge_dummy_plugin.c30cea90-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/kreinhardt/thin-edge.io/target/arm-unknown-linux-gnueabihf/release/deps" "-L" "/home/kreinhardt/thin-edge.io/target/release/deps" "-L" "/home/kreinhardt/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "-Wl,--start-group" "-Wl,--end-group" "-Wl,-Bstatic" "/home/kreinhardt/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcompiler_builtins-09056207a54fd748.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/kreinhardt/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "-o" "/home/kreinhardt/thin-edge.io/target/arm-unknown-linux-gnueabihf/release/deps/tedge_dummy_plugin-14625594f374e240" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
32a07bf.tedge_apama_plugin.a548066a-cgu.0.rcgu.o: relocations in generic ELF (EM: 40)
/usr/bin/ld: /home/kreinhardt/thin-edge.io/target/arm-unknown-linux-gnueabihf/release/deps/tedge_apama_plugin-8ce8302ef32a07bf.tedge_apama_plugin.a548066a-cgu.0.rcgu.o: relocations in generic ELF (EM: 40)
/usr/bin/ld: /home/kreinhardt/thin-edge.io/target/arm-unknown-linux-gnueabihf/release/deps/tedge_apama_plugin-8ce8302ef32a07bf.tedge_apama_plugin.a548066a-cgu.0.rcgu.o: relocations in generic ELF (EM: 40)
/usr/bin/ld: /home/kreinhardt/thin-edge.io/target/arm-unknown-linux-gnueabihf/release/deps/tedge_apama_plugin-8ce8302ef32a07bf.tedge_apama_plugin.a548066a-cgu.0.rcgu.o: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
from thin-edge.io.
Hi @kreinhar,
for me this looks already like a linker error. It looks like the wrong linker is used. Have you tried to also set the linker like I wrote above?
With my arm toolchain, theese work:
export CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=/usr/bin/arm-linux-gnueabihf-gcc
export CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=/usr/bin/arm-linux-gnueabihf-gcc-10
Instead of gcc you can also try the linker directly: /usr/bin/arm-linux-gnueabihf-ld
When this works out you also can configure target.<triple>.linker
in your cargo config like explained in https://doc.rust-lang.org/cargo/reference/config.html.
from thin-edge.io.
Related Issues (20)
- use socket activated service to launch c8y-remote-access-plugin when using systemd HOT 2
- unacknowledged local command requests are difficult to clear when MQTT broker persistence is not configured
- tedge reconnect c8y displays an erroneous warning about invalid configured URL and a former tenant HOT 2
- easily add/remove values to existing tedge config properties of an array type
- Allow running thin-edge.io components under user's account
- Publish registration and capabilities on te topics when connecting to the MQTT broker
- tedge init: only create multi-call binary symlinks if they do not exist HOT 2
- Simplify the operation handling code by replacing fragmented control flow with regular async/await
- Remove adduser dependency declaration from tedge debian package HOT 1
- Device Under Test - fully controllable online HOT 1
- c8y-remote-access-plugin init using non-standard/non-root user
- c8y-remote-access-plugin connection fails if installed in non-default location HOT 2
- sending an initial corrupt telemetry message to a child device prevents device being registered HOT 1
- c8y-remote-access-plugin connection fails due to unexpected argument HOT 2
- Installing and joining ZeroTier Network
- RAUC firmware_update workflow state was executed twice by thin-edge.io HOT 3
- bridge status is not published as a service to the cloud in 1.1.0 HOT 1
- backoff strategy for the in-built bridge HOT 5
- mosquitto broker limitation prevents offline configuration HOT 3
- c8y-mapper ignores any bridge status updates after registration and always reports "up" at registration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thin-edge.io.