Can?t build suricata 8.0.0 in buildroot
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Alexander,
Quoted 22 lines · Alexander
Hello guys,
?
I would like to report a problem.
I am trying to build suricata 8.0.0 in buildroot. And I get the error listed at the see attached file build.log . But when I build Suricata 8.0.0 locally, everything builds without problems. The question is: What should be fixed in suricata 8.0.0 or in buildroot so that it builds in buildroot?
Thank you for any hint/help
?
This question was also asked on the suricata forum
https://forum.suricata.io/t/cant-build-suricata-8-0-0-in-buildroot/5890
but no solution has been found yet.
?
Additional information:
?
? * host machine (OS/release): Ubuntu 24.04.1 LTS
?
? ? $ uname -a
? ? Linux adymov-desktop 6.8.0-71-generic #71-Ubuntu SMPPREEMPT_DYNAMICTue Jul 22 16:52:38 UTC 2025x86_64x86_64x86_64GNU/Linux
?
? * version of Buildroot: 2025.02
? * target for which the build fails : make all . The .config file is also attached to this email.
? * package(s) for which the build fails : suricata
Quoted 8 lines
? * the command that fails and its output: see attached file build.log
? * any information you think that may be relevant:
?
To reproduce the problem, you need to make changes to the filebuildroot/package/suricata/suricata.mk?
?SURICATA_VERSION = 6.0.19
?change to
?SURICATA_VERSION = 8.0.0
- The latest version of suricata is now 8.0.1
- You need to rebase the patches in package/suricata
- Suricata 8 depends on pcre2, instead of pcre
Quoted 4 lines
and run the build.
?
As a result we get an error (see attached file build.log):
?
Quoted 8 lines
? = note:
/usr/bin/ld: cannot find/lib64/libc.so.6: No such file or directory
? ? ? ? ? collect2: error: ld returned 1 exit status
error: could not compilesuricata-htp(lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
?
////////////
?
The problem is that it is impossible to build the suricata-htp library written in RUST. The library suricata-htp appeared in suricata 8. It is strange that the build calls the linker from host machine/usr/bin/ldinstead of the same from the buildroot directory. Apparently, this is why the linker tries to find libc in the/lib64/directory.
Cargo intentionally calls the compiler on the build machine, see [1]
If you prepend the failing command with the environment variable mentioned in the text:
$ PATH=/home/data/test/kernel617/host/bin:$PATH $ cd build/suricata-8.0.1/rust $ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-buildroot-linux-gnu-cc /home/data/test/kernel617/host/bin/cargo build --release --features "ja3 ja4 " --target x86_64-unknown-linux-gnu
the cargo build step succeeds.
Setting this variable should be possible via SURICATA_MAKE_ENV, the target triplet seems to come from $(RUSTC_TARGET_NAME).
Quoted 4 lines
?
Thank you for any hint/help
?
Best regards, Alexander.
Kind regards,
Andreas
[1] https://rustprojectprimer.com/building/cross.html
_______________________________________________
buildroot mailing list [email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot