Skip to content

Conversation

@BKPepe
Copy link
Member

@BKPepe BKPepe commented Oct 8, 2025

Maintainer: @graysky2

  1. Enabled hyperscan/vectorscan together with adding dependency only for x86_64 and aarch64.
  2. Disabled tmalloc (from gperftools package) for powerpc and mips.

By doing this refactor, snort3 is going to be available for more OpenWrt devices (as it was in the past) as currently it was compiled only for x86_x64 and aarch64 by mistake.

Fixes: 257e2fc ("snort3: fix logic in gpertools-runtime depends")

(cherry picked from commit 126364e)
[For OpenWrt 24.10: There is hyperscan instead of vectorscan]
Backport of #27037

@BKPepe BKPepe added the OpenWrt 24.10 Issue/PR on branch 24.10 label Oct 8, 2025
1. Enabled hyperscan/vectorscan together with adding dependency only for x86_64 and aarch64.
2. Disabled tmalloc (from gperftools package) for powerpc and mips.

By doing this refactor, snort3 is going to be available for more OpenWrt devices
(as it was in the past) as currently it was compiled only for x86_x64 and aarch64 by mistake.

Fixes: 257e2fc ("snort3: fix logic in gpertools-runtime depends")

Signed-off-by: Josef Schlehofer <[email protected]>
(cherry picked from commit 126364e)
[For OpenWrt 24.10: There is hyperscan instead of vectorscan]
@BKPepe BKPepe force-pushed the backport-snort-2410 branch from ed1e7e0 to 071fa03 Compare October 8, 2025 14:11
@BKPepe
Copy link
Member Author

BKPepe commented Oct 8, 2025

Okay, all the CI/CD failures are related to testing inside the Docker container, it looks like:

Signature check passed.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10-SNAPSHOT/targets/x86/64/kmods/6.6.93-1-1745ebad77278f5cdc8330d17a3f43d6/Packages.gz, wget returned 8.
Error: Process completed with exit code 1.

Not related, so this can be merged.

@graysky2
Copy link
Contributor

graysky2 commented Oct 8, 2025

I have not tested with this branch but I have observed on main that the build system expects gperftools-runtime to be selected and fails when it is not. Is that the intended behavior considering how the build bots work and presumably have it already build as a module?

Example:

% cat << EOF > .config
CONFIG_TARGET_bcm27xx=y
CONFIG_TARGET_bcm27xx_bcm2712=y
CONFIG_TARGET_bcm27xx_bcm2712_DEVICE_rpi-5=y
CONFIG_DEVEL=y
CONFIG_TOOLCHAINOPTS=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BIND_ENABLE_DOH=y
# CONFIG_BINUTILS_USE_VERSION_2_44 is not set
CONFIG_BINUTILS_USE_VERSION_2_45=y
CONFIG_BINUTILS_VERSION="2.45"
CONFIG_BINUTILS_VERSION_2_45=y
# CONFIG_GCC_USE_VERSION_14 is not set
CONFIG_GCC_USE_VERSION_15=y
CONFIG_GCC_VERSION="15.2.0"
CONFIG_GCC_VERSION_15=y
CONFIG_PACKAGE_snort3=y
EOF

% make defconfig ; make clean ; make
...
Feature options:
    DAQ Modules:    Dynamic
    libatomic:      User-specified
    Hyperscan:      OFF
    ICONV:          ON
    Libunwind:      OFF
    LZMA:           ON
    RPC DB:         TIRPC
    SafeC:          OFF
    TCMalloc:       ON
    JEMalloc:       OFF
    UUID:           ON
    NUMA:           OFF
    LibML:          OFF
-------------------------------------------------------

-- Configuring done (0.8s)
-- Generating done (0.1s)
-- Build files have been written to: /scratch/union/build_dir/target-aarch64_cortex-a76_musl/snort3-3.9.5.0
touch /scratch/union/build_dir/target-aarch64_cortex-a76_musl/snort3-3.9.5.0/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /scratch/union/build_dir/target-aarch64_cortex-a76_musl/snort3-3.9.5.0/.built
touch /scratch/union/build_dir/target-aarch64_cortex-a76_musl/snort3-3.9.5.0/.built_check
MAKEFLAGS="" /scratch/union/staging_dir/host/bin/ninja  -j1 -C /scratch/union/build_dir/target-aarch64_cortex-a76_musl/snort3-3.9.5.0 
ninja: Entering directory `/scratch/union/build_dir/target-aarch64_cortex-a76_musl/snort3-3.9.5.0'
ninja: error: '/scratch/union/staging_dir/target-aarch64_cortex-a76_musl/usr/lib/libtcmalloc.so', needed by 'src/snort', missing and no known rule to make it
make[2]: *** [Makefile:120: /scratch/union/build_dir/target-aarch64_cortex-a76_musl/snort3-3.9.5.0/.built] Error 1
make[2]: Leaving directory '/scratch/union/feeds/packages/net/snort3'
time: package/feeds/packages/snort3/compile#0.82#0.30#1.08
    ERROR: package/feeds/packages/snort3 failed to build.
make[1]: *** [package/Makefile:184: package/feeds/packages/snort3/compile] Error 1
make[1]: Leaving directory '/scratch/union'
make: *** [/scratch/union/include/toplevel.mk:233: package/snort3/compile] Error 2

@BKPepe
Copy link
Member Author

BKPepe commented Oct 8, 2025

Okay, I think I know what is going on. Please create issue and I will address it for the master branch. I will merge this as it is, because it is cherry-pick.

@BKPepe BKPepe merged commit 7a30a57 into openwrt:openwrt-24.10 Oct 8, 2025
7 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OpenWrt 24.10 Issue/PR on branch 24.10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants