Snort mailing list archives

Re: Snort3 fails to build for armv7 hardware


From: "Michael Altizer \(mialtize\) via Snort-devel" <snort-devel () lists snort org>
Date: Tue, 23 Jul 2019 04:30:12 +0000

On 7/22/19 6:17 PM, Bill - Google Account via Snort-devel wrote:
Hi:

I maintain the Snort package for the pfSense firewall distribution.  I am currently working on a Snort3 package for 
pfSense.  To that end the pfSense developers have recently enabled the build of the Snort3 binary on their image 
builders.  pfSense is based on FreeBSD and is available for both AMD64 and ARMv7 architectures.  Snort3-3.0.0-255 is 
currently failing to build for ARMv7 images on FreeBSD 12.  The relevant parts of the build failure log are as follows:


/nxb-bin/usr/bin/c++  -DHAVE_CONFIG_H -Dinline=inline -Drestrict=__restrict 
-I/wrkdirs/usr/ports/security/snort3/work/snort3-3.0.0-255/src/network_inspectors

-I/wrkdirs/usr/ports/security/snort3/work/snort3-3.0.0-255/src

-I/usr/local/include/luajit-2.1 -I.

-I/wrkdirs/usr/ports/security/snort3/work/snort3-3.0.0-255

-I/usr/local/include -O2 -pipe -DLIBICONV_PLUG -fno-strict-aliasing

-DLIBICONV_PLUG  -fvisibility=hidden   -DNDEBUG    -O2 -pipe

-DLIBICONV_PLUG -fno-strict-aliasing  -DLIBICONV_PLUG   -std=c++11 -MD

-MT src/time/CMakeFiles/time.dir/tsc_clock.cc.o -MF src/time/CMakeFiles/time.dir/tsc_clock.cc.o.d -o 
src/time/CMakeFiles/time.dir/tsc_clock.cc.o -c 
/wrkdirs/usr/ports/security/snort3/work/snort3-3.0.0-255/src/time/tsc_clock.cc

In file included from

/wrkdirs/usr/ports/security/snort3/work/snort3-3.0.0-255/src/time/tsc_clock.cc:24:

/wrkdirs/usr/ports/security/snort3/work/snort3-3.0.0-255/src/time/tsc_clock.h:55:32:

error: invalid output constraint '=a' in asm

        asm volatile("rdtsc" : "=a" (lo), "=d" (hi));

                               ^

1 error generated.

This error occurs on a stock FreeBSD 12.0 installation and is not specific to pfSense.  Could someone from the Snort3 
team please take a look?

Thanks,

Bill Meeks
Vidalia, GA USA


Try the attached patch.  Make sure you're building without --enable-tsc-clock.

Attachment: tscclock.diff
Description: tscclock.diff

_______________________________________________
Snort-devel mailing list
Snort-devel () lists snort org
https://lists.snort.org/mailman/listinfo/snort-devel

Please visit http://blog.snort.org for the latest news about Snort!

Current thread: