logdna-agent-v2
logdna-agent-v2 copied to clipboard
Do we have plan to support s390 arch?
Since logdna-agent is deprecated soon, we want to use v2 instead. But v2 does not support s390, do we have a plan to support it?
This is the error message when building logdna-agent-v2 on s390:
cargo build --release
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /root/zhangli/logdna-agent-v2/bin/Cargo.toml
workspace: /root/zhangli/logdna-agent-v2/Cargo.toml
Compiling ring v0.16.20
Compiling tikv-jemalloc-sys v0.5.1+5.3.0-patched
Compiling pcre2-sys v0.2.4 (https://github.com/logdna/rust-pcre2.git?branch=0.2#8096355b)
Compiling rayon-core v1.9.3
error: failed to run custom build command for `ring v0.16.20`
Caused by:
process didn't exit successfully: `/root/zhangli/logdna-agent-v2/target/release/build/ring-e9310a4045e1ec66/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /root/.cargo/registry/src/github.com-eae4ba8cbf2ce1c7/ring-0.16.20/build.rs:358:10
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:
warning: pcre2/src/pcre2_jit_compile.c:81:2: error: #error Unsupported architecture
warning: 81 | #error Unsupported architecture
warning: | ^~~~~
warning: In file included from pcre2/src/pcre2_jit_compile.c:12706:
warning: pcre2/src/pcre2_jit_misc.c: In function ‘pcre2_jit_free_unused_memory_8’:
warning: pcre2/src/pcre2_jit_misc.c:113:1: warning: implicit declaration of function ‘sljit_free_unused_memory_exec’; did you mean ‘pcre2_jit_free_unused_memory_32’? [-Wimplicit-function-declaration]
warning: 113 | sljit_free_unused_memory_exec();
warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: | pcre2_jit_free_unused_memory_32
warning: In file included from pcre2/src/sljit/sljitLir.c:27,
warning: from pcre2/src/pcre2_jit_compile.c:78:
warning: pcre2/src/pcre2_jit_compile.c: At top level:
warning: pcre2/src/sljit/sljitLir.h:1456:36: warning: ‘sljit_get_float_register_index’ declared ‘static’ but never defined [-Wunused-function]
warning: 1456 | SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg);
warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: failed to run custom build command for `pcre2-sys v0.2.4 (https://github.com/logdna/rust-pcre2.git?branch=0.2#8096355b)`
Hi, yeh the ring dependency is going to be the awkward thing to fix for s390. Ring is the defacto standard crypto primitive library within the rust ecosystem, based on the crypto primitives from boring ssl, it's platform support isn't 100% as you have discovered.
We'll have to:
- Rewrite logdna-rust to support other TLS libraries
- Fix or replace any dependencies that have a transitive
ring
dependency - Add a feature to allow us to select the crypto backend across all of our dependencies at compile time.
- Set up a cross compile build chain that supports s390 as we don't have any s390 hardware
- Fix any additional fallout from the port (for example from the trace provided we'll have to add a feature to allow us to disable pcre's acceleration features)
- Test, a lot, as s390 is going to be something of a unicorn compared to our other supported architectures
We have a general "port the agent to s390x" ticket in our backlog, but the actual work involved hasn't been scoped
@c-nixon Thanks for the information.
@c-nixon Will you have a forecast or timeline to work on s390x support?
we're also interested in this for ppc64le. has anything progressed, or anything we can do to help?
@clnperez contributions are welcome. specifically - to resolve build problems on these ^^^ targets.