Project

General

Profile

Actions

Bug #5039

closed
DH

suricata 6.0.4: hard-coded linker results in errors

Bug #5039: suricata 6.0.4: hard-coded linker results in errors

Added by Donald Hoskins about 4 years ago. Updated over 3 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

DH Updated by Donald Hoskins about 4 years ago Actions #1

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

VJ Updated by Victor Julien about 4 years ago Actions #2

  • Target version changed from 6.0.4 to TBD
  • Affected Versions 6.0.4 added

DH Updated by Donald Hoskins about 4 years ago Actions #3

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

VJ Updated by Victor Julien about 4 years ago Actions #4

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

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

DH Updated by Donald Hoskins about 4 years ago Actions #5

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.

VJ Updated by Victor Julien over 3 years ago Actions #6

  • Target version set to Packaging/PPA
Actions

Also available in: PDF Atom