Skip to contentSkip to conversation

package/snort3: needs gcc >= 8

PATCH In review Bernd Kuhls 2 participants 6 messages Sep 8 – Sep 16

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/snort3: needs gcc >= 8

Buildroot commit 5e78c6cf3323b4a45f84bcbc504f511dd268e270 bumped the package to version 3.11.1.0 which first included upstream commit
https://github.com/snort3/snort3/commit/a8484408d181aad8e78b0b1e44a5bc05206a44ae

which makes use of '#include <filesystem>' that requires gcc >= 8.

Fixes build error found by the Gitlab autobuilders with defconfig bootlin-aarch64-glibc-old which occured after removing ' = 0' from src/main/snort.h, line 72, which fixed a previous build error:

output/build/snort3-3.12.2.0/src/flow/dump_flows.cc:26:22:
fatal error: filesystem: No such file or directory #include <filesystem>

---
Series passed Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/commits/f4cb6546911bbbad6d372ec48f2ea849497f870d

 package/snort3/Config.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/snort3/Config.in +3 -3
index 4680b13a4d..9958199ba7 100644
@@ -5,7 +5,7 @@ config BR2_PACKAGE_SNORT3
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on !BR2_STATIC_LIBS # daq3
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # C++17 filesystem
 	depends on BR2_TOOLCHAIN_HAS_THREADS # daq3, hwloc
 	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_DAQ3
@@ -34,10 +34,10 @@ config BR2_PACKAGE_SNORT3
 
 	  https://www.snort.org/snort3
 
-comment "snort3 needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 4.9"
+comment "snort3 needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 8"
 	depends on !BR2_PACKAGE_LUA
 	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
 	depends on BR2_USE_MMU
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
 		BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_8
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/4 package/snort3: fix build error with numa support

Fixes:
https://autobuild.buildroot.net/results/e8a/e8a9d787973fd109c07c185103de1f9f7339d506/

---
Series passed Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/commits/f4cb6546911bbbad6d372ec48f2ea849497f870d

 .../0001-Rename-numa.h-to-numa_snort.h.patch  | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 package/snort3/0001-Rename-numa.h-to-numa_snort.h.patch
package/snort3/0001-Rename-numa.h-to-numa_snort.h.patch new file +79 -0
new file mode 100644
index 0000000000..ca8f7774f1
@@ -0,0 +1,79 @@
+From 3bb2a8fc1244fcbdf24235e541fa2a06a655dcea Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Tue, 8 Sep 2026 21:20:04 +0200
+Subject: [PATCH] Rename numa.h to numa_snort.h
+
+Fixes https://github.com/snort3/snort3/issues/368
+
+and a build error seen with gcc 15.1.0 by the buildroot autobuilders:
+https://autobuild.buildroot.net/results/e8a/e8a9d787973fd109c07c185103de1f9f7339d506/build-end.log
+
+/home/autobuild/autobuild/instance-44/output-1/build/snort3-3.11.1.0/src/main/numa.h:
+ In member function 'virtual int NumaWrapper::available()':
+/home/autobuild/autobuild/instance-44/output-1/build/snort3-3.11.1.0/src/main/numa.h:50:16:
+ error: 'numa_available' was not declared in this scope; did you mean 'available'?
+   50 |         return numa_available();
+
+/home/autobuild/autobuild/instance-44/output-1/build/snort3-3.11.1.0/src/main/numa.h:
+ In member function 'virtual int NumaWrapper::max_node()':
+/home/autobuild/autobuild/instance-44/output-1/build/snort3-3.11.1.0/src/main/numa.h:54:16:
+ error: 'numa_max_node' was not declared in this scope; did you mean 'max_node'?
+   54 |         return numa_max_node();
+
+Upstream: https://github.com/snort3/snort3/pull/479
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ src/main/CMakeLists.txt           | 2 +-
+ src/main/numa.cc                  | 2 +-
+ src/main/{numa.h => numa_snort.h} | 0
+ src/main/thread_config.h          | 2 +-
+ 4 files changed, 3 insertions(+), 3 deletions(-)
+ rename src/main/{numa.h => numa_snort.h} (100%)
+
+diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
+index 117612b94..e4e816d15 100644
+--- a/src/main/CMakeLists.txt
++++ b/src/main/CMakeLists.txt
+@@ -23,7 +23,7 @@ endif ( ENABLE_SHELL )
+ add_subdirectory(test)
+ 
+ if ( HAVE_NUMA )
+-    set ( NUMA_SOURCES numa.h numa.cc)
++    set ( NUMA_SOURCES numa_snort.h numa.cc)
+ endif( HAVE_NUMA )
+ 
+ add_library (main OBJECT
+diff --git a/src/main/numa.cc b/src/main/numa.cc
+index 259f776b7..5cb23e26b 100644
+--- a/src/main/numa.cc
++++ b/src/main/numa.cc
+@@ -17,7 +17,7 @@
+ //--------------------------------------------------------------------------
+ // numa.cc author Denys Zikratyi <[email protected]>
+ 
+-#include "numa.h"
++#include "numa_snort.h"
+ 
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+diff --git a/src/main/numa.h b/src/main/numa_snort.h
+similarity index 100%
+rename from src/main/numa.h
+rename to src/main/numa_snort.h
+diff --git a/src/main/thread_config.h b/src/main/thread_config.h
+index 93bfe63d2..8134da8bf 100644
+--- a/src/main/thread_config.h
++++ b/src/main/thread_config.h
+@@ -26,7 +26,7 @@
+ #include "main/thread.h"
+ 
+ #ifdef HAVE_NUMA
+-#include "numa.h"
++#include "numa_snort.h"
+ #endif
+ 
+ struct CpuSet;
+-- 
+2.47.3
+
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/4] package/snort3: fix build error with numa support

Quoted 4 lines · Bernd Kuhls

Fixes:
https://autobuild.buildroot.net/results/e8a/e8a9d787973fd109c07c185103de1f9f7339d506/

Thanks, but which commit introduced the issue?

package/snort3/0001-Rename-numa.h-to-numa_snort.h.patch line 6

Quoted 12 lines
package/snort3/0001-Rename-numa.h-to-numa_snort.h.patch new file +6 -0
new file mode 100644
index 0000000000..ca8f7774f1
@@ -0,0 +1,79 @@
+From 3bb2a8fc1244fcbdf24235e541fa2a06a655dcea Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Tue, 8 Sep 2026 21:20:04 +0200
+Subject: [PATCH] Rename numa.h to numa_snort.h
+
+Fixes https://github.com/snort3/snort3/issues/368

This commit message is not really great. Why renaming the header file solves the build issue?

I assume it's because numa.h from snort3 hides the real numa.h from libnuma, but you're not explaining this anywhere.

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH 3/4 package/daq3: bump version to 3.0.27

In reply to Bernd Kuhls

https://github.com/snort3/libdaq/blob/v3.0.27/ChangeLog.md

---
Series passed Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/commits/f4cb6546911bbbad6d372ec48f2ea849497f870d

 package/daq3/daq3.hash | 2 +-
 package/daq3/daq3.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/daq3/daq3.hash +1 -1
index 524c0eb868..a81ae595b4 100644
@@ -1,5 +1,5 @@
 # Locally computed:
-sha256  651e38a2737d179a224bcb01d8a06300667708ee614d19a8b411fdd212cc035d  daq3-3.0.25.tar.gz
+sha256  03fac3da27e3230a7d26262f2480cd65a409cee3596c6758a7f9eacb7f24601c  daq3-3.0.27.tar.gz
 
 # Hash for license files:
 sha256  64601289158eddad72cb4de72652f9e64dc886942c910b38ddee93ba13b0db26  COPYING
package/daq3/daq3.mk +1 -1
index ec3f4ba670..43139ee065 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-DAQ3_VERSION = 3.0.25
+DAQ3_VERSION = 3.0.27
 DAQ3_SITE = $(call github,snort3,libdaq,v$(DAQ3_VERSION))
 DAQ3_LICENSE = GPL-2.0
 DAQ3_LICENSE_FILES = COPYING LICENSE
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

PATCH 4/4 package/snort3: bump version to 3.12.2.0

In reply to Bernd Kuhls

https://github.com/snort3/snort3/blob/3.12.2.0/ChangeLog.md

---
Series passed Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/commits/f4cb6546911bbbad6d372ec48f2ea849497f870d

 package/snort3/snort3.hash | 2 +-
 package/snort3/snort3.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/snort3/snort3.hash +1 -1
index 599818ee24..02ebcf85c9 100644
@@ -1,5 +1,5 @@
 # Locally computed:
-sha256  9465d19b0925088266504e8962e97e55359bafd6a19f66b4169dcd21ef1d8ec5  snort3-3.11.1.0.tar.gz
+sha256  43000d6b0e0307bc1a735874d00deb61e8b6a96d074f8cc9b2fe2cde0058720b  snort3-3.12.2.0.tar.gz
 
 # Hash for license files:
 sha256  3f1cbfb20bb2c608e1a474421880d08b8cba6abb00ab7736d22c481d71656a6d  COPYING
package/snort3/snort3.mk +1 -1
index 273aa56709..a6f296a062 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SNORT3_VERSION = 3.11.1.0
+SNORT3_VERSION = 3.12.2.0
 SNORT3_SITE = $(call github,snort3,snort3,$(SNORT3_VERSION))
 SNORT3_LICENSE = GPL-2.0
 SNORT3_LICENSE_FILES = COPYING LICENSE
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw
In reply to Bernd Kuhls

Hello,

Quoted 5 lines · Bernd Kuhls

Buildroot commit 5e78c6cf3323b4a45f84bcbc504f511dd268e270 bumped the package to version 3.11.1.0 which first included upstream commit
https://github.com/snort3/snort3/commit/a8484408d181aad8e78b0b1e44a5bc05206a44ae

which makes use of '#include <filesystem>' that requires gcc >= 8.

Did you verify that the build actually works with gcc 8.x ?

Indeed https://en.cppreference.com/cpp/filesystem has the note:

"GNU implementation prior to 9.1 requires linking with -lstdc++fs"

which seems odd.

Quoted 7 lines

Fixes build error found by the Gitlab autobuilders with defconfig bootlin-aarch64-glibc-old which occured after removing ' = 0' from src/main/snort.h, line 72, which fixed a previous build error:

output/build/snort3-3.12.2.0/src/flow/dump_flows.cc:26:22:
fatal error: filesystem: No such file or directory #include <filesystem>

I'm sorry but I'm lost here. Which error was "hiding" the other one? Was the "= 0" issue preventing from seeing the <filesystem> issue, or the other way around? Where is the fix for this "= 0" issue?

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot