Actions
Bug #7344
openbuild: build can sometimes fail copying the lua headers into place
Affected Versions:
Effort:
Difficulty:
Label:
Description
During make
, we copy the Lua headers into a known location using this Makefile
line:
cp -a $(RUST_SURICATA_LIBDIR)/build/suricata-lua-sys-*/out/lua/*.h \ $(abs_top_builddir)/rust/gen/
after repeated builds, due to how Rust builds, one can end up with multiple directories matching the
suricata-lua-sys-*
pattern resulting in errors like:cp -a ../rust/target/debug/build/suricata-lua-sys-*/out/lua/*.h \ /home/jason/oisf/dev/suricata/bindgen/rust/gen/ cp: will not overwrite just-created '/home/jason/oisf/dev/suricata/bindgen/rust/gen/lapi.h' with '../rust/target/debug/build/suricata-lua-sys-eab3deb07b92b383/out/lua/lapi.h' cp: will not overwrite just-created '/home/jason/oisf/dev/suricata/bindgen/rust/gen/lauxlib.h' with '../rust/target/debug/build/suricata-lua-sys-eab3deb07b92b383/out/lua/lauxlib.h'
which require a
make clean
to resolve.
The fix is to copy from one source directory, however this is only known during the build so best done from build.rs
which knows exactly which directory in the target/
is the latest one.
No data to display
Actions