suricata 6.0.4: hard-coded linker results in errors
As outlined here (https://forum.suricata.io/t/suricata-6-0-4-usr-bin-ld-error-adding-symbols-file-in-wrong-format/2179), I am cross-compiling suricata under the OpenWrt
While autorun.sh and configure successfully find the correct toolchain bins (including the linker), the suricata build system seems to hard-link to `/usr/bin/ld` to do it's linking. This makes cross-compiling impossible as the `/usr/bin/ld` for the build system is different from the build HOST (or the TARGET).
I've attached the build log, and I call configure with `--with-sysroot`.
Updated by Donald Hoskins 8 months ago
From the generated `Makefile` (attached):
LD = mips64-openwrt-linux-musl-ld.gold LDFLAGS = -L/home/grommish/openwrt/staging_dir/toolchain-mips64_octeonplus_64_gcc-11.2.0_musl/usr/lib -L/home/grommish/openwrt/staging_dir/toolchain-mips64_octeonplus_64_gcc-11.2.0_musl/lib -latomic -znow -zrelro -rdynamic -pie
Updated by Donald Hoskins 6 months ago
In this case, I'm the one who is figuring out how to get it to work within the OpenWrt environment (along with rust-lang). The issue was the way rust-lang was calling CARGO_HOME and/or RUSTFLAGS when cross-compiling.
This issue wasn't an issue, but there are still other issues that seem to actually be issues, if you're curious in some of the curiosities in Suricata6.0.4 on a mips64 box with a custom rust-lang tuple :) Feel free to check https://forum.suricata.io/t/allocating-host-hash-failed-max-host-memcap-is-smaller-than-projected-hash-size/2298/ as it actually does seem to be a legit issue that I was hesitant to bug-report originally due to the fact the unusual use-case I'm working in.
I appreciate all the help you, Jason Ish, and Jeff Lucovsky have been throughout the long journey to get Suricata5 (and then 6) in the OpenWrt package system.