Project

General

Profile

Actions

Bug #5039

closed

suricata 6.0.4: hard-coded linker results in errors

Added by Donald Hoskins almost 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

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


Files

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 3 years 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

Actions #2

Updated by Victor Julien almost 3 years ago

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

Updated by Donald Hoskins over 2 years ago

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

Actions #4

Updated by Victor Julien over 2 years 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 2 years 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.

Actions #6

Updated by Victor Julien about 2 years ago

  • Target version set to Packaging/PPA
Actions

Also available in: Atom PDF