Bug #5039


suricata 6.0.4: hard-coded linker results in errors

Added by Donald Hoskins almost 2 years ago. Updated 12 months ago.

Target version:
Affected Versions:


As outlined here (, I am cross-compiling suricata under the OpenWrt

While 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`.


suricata.log (259 KB) suricata.log Build log Donald Hoskins, 02/04/2022 05:31 AM
Makefile (34.1 KB) Makefile Donald Hoskins, 02/04/2022 06:26 AM
Actions #1

Updated by Donald Hoskins almost 2 years ago

From the generated `Makefile` (attached):

LD =
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

Actions #2

Updated by Victor Julien almost 2 years ago

  • Target version changed from 6.0.4 to TBD
  • Affected Versions 6.0.4 added
Actions #3

Updated by Donald Hoskins over 1 year ago

Victor, this can be closed. This appears to be an error with the build system.

Actions #4

Updated by Victor Julien over 1 year ago

  • Status changed from New to Closed
  • Target version deleted (TBD)

Do you have link to a ticket or discussion about it? Thanks!

Actions #5

Updated by Donald Hoskins over 1 year 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 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.

Actions #6

Updated by Victor Julien 12 months ago

  • Target version set to Packaging/PPA

Also available in: Atom PDF