Bug #3362
closedcross compiling not affecting rust component of surrcata
Description
When configuring suricata v5.0.0 for cross compilation, the --target flag for the cargo command in omitted, thus the rust component of suricata (which builds libsuricata.a) is compiled for the build machine and not for the host
repro steps assuming suricata's compile tools and dependencies are met and a cross compiler is installed with $CC = arm-unknown-linux-gnueabihf-gcc:
# cd suricata-suricata-5.0.0
# ~/autogen.sh
# ~/configure --host=arm-unknown-linux-gnueabihf
# make
... notice the build command for libsuricata.a is missing the --target arm-unknown-linux-gnueabihf argumnent
cd ../rust && RUSTUP_HOME=~/.rustup \
CARGO_HOME="~/.cargo" \
CARGO_TARGET_DIR="~/suricata-suricata-5.0.0/rust/target" \
~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin//cargo build --release \
--features " "
proposed fix inside attachment: suricata-x-compile.patch
NOTE: changes in configure.ac, lines 2437-2448 are taken from another BUG: https://redmine.openinfosecfoundation.org/issues/3073
Files
Updated by Andreas Herz almost 5 years ago
Could you commit the patch via a PR on our github? see https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Contributing
Updated by Ciprian Popa almost 5 years ago
Sure. Created pull request with id 4411: https://github.com/OISF/suricata/pull/4411
Updated by Andreas Herz almost 5 years ago
- Assignee set to Ciprian Popa
- Target version set to TBD
Updated by Jason Ish almost 5 years ago
- Status changed from New to Closed
- Target version changed from TBD to 5.0.1
Merged into master with https://github.com/OISF/suricata/pull/4431.
Commit c9cd7559fd5d7cf4f2d501b70839321c7c4a5eb9.