Actions
Bug #6384
openrust: configure fails to persistently detect/remember cbindgen location
Affected Versions:
Effort:
Difficulty:
Label:
Description
I am compiling suricata 7.0.2-DEV for OpenWrt x86-64, with 7.0.1 stable release my OpenWrt specific MakeFile for going well (compiled & run fine).
That's because the rust-bindings.h inside rust/dist dir is already on the stable release, but as per-git, I am getting the following :
make gen/rust-bindings.h make[5]: Entering directory '/home/username/works/openwrt/build_dir/target-x86_64_glibc_custom/suricata-7.0.2/rust' cbindgen --config /home/username/works/openwrt/build_dir/target-x86_64_glibc_custom/suricata-7.0.2/rust/cbindgen.toml \ --quiet --verify --output /home/username/works/openwrt/build_dir/target-x86_64_glibc_custom/suricata-7.0.2/rust/gen/rust-bindings.h || true /bin/bash: line 1: cbindgen: command not found make[5]: Leaving directory '/home/username/works/openwrt/build_dir/target-x86_64_glibc_custom/suricata-7.0.2/rust' As in git/7.0.2-DEV we need to generate the rust-bindings.h, I've found that configure at the stage of "make gen/rust-bindings.h" seems failed to "remember" the previously found/installed "cbindgen"
From Configuring :
checking for cbindgen... /home/username/works/openwrt/staging_dir/target-x86_64_glibc_custom/host/cargo/bin/cbindgen
From config.log :
ac_cv_path_CBINDGEN=/home/username/works/openwrt/staging_dir/target-x86_64_glibc_custom/host/cargo/bin/cbindgen CBINDGEN='/home/username/works/openwrt/staging_dir/target-x86_64_glibc_custom/host/cargo/bin/cbindg HAVE_CBINDGEN_FALSE='#' HAVE_CBINDGEN_TRUE='' configure:30078: checking for cbindgen configure:30101: found /home/username/works/openwrt/staging_dir/target-x86_64_glibc_custom/host/cargo/bin/cbindgen configure:30114: result: /home/username/works/openwrt/staging_dir/target-x86_64_glibc_custom/host/cargo/bin/cbindgen
Notable most important lines from Suricata OpenWrt package Makefile :
define Build/Configure ( \ cd $(PKG_BUILD_DIR) ; \ git clone https://github.com/OISF/libhtp.git && \ git clone https://github.com/OISF/suricata-update.git ; \ $(CONFIGURE_VARS) cargo install --root $(CARGO_HOME) cbindgen ; \ cd $(PKG_BUILD_DIR) && $(CONFIGURE_VARS) ./autogen.sh && $(CONFIGURE_VARS) ./configure $(CONFIGURE_ARGS) ; \ ) $(call Build/Configure/Default) endef
Files
Updated by Aditya Nugraha about 1 year ago
- File 001-cbindgen.patch 001-cbindgen.patch added
Fixed with patch file above, feel free to submit or push it upstream.
Updated by Victor Julien 4 months ago
- Subject changed from Configure seems failed to persistently detect/remember cbindgen location to rust: configure fails to persistently detect/remember cbindgen location
- Status changed from New to Assigned
- Assignee changed from OISF Dev to Jason Ish
- Priority changed from High to Normal
- Target version changed from TBD to 8.0.0-beta1
Maybe needs a backport too?
Actions