Re: Snort3 fails to build for armv7 hardware
Bill - Google Account via Snort-devel <[email protected]> Tue, 23 Jul 2019 11:44:24 -0400
| Newsgroups | gmane.comp.security.ids.snort.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multipart message in MIME format. --===============1935850577363789463== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01D5414B.FA447240" Content-Language: en-us This is a multipart message in MIME format. ------=_NextPart_000_0001_01D5414B.FA447240 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The supplied patch along with a small change in the port Makefile solved the issue on ARM hardware. Thanks for the quick response. Bill Meeks Vidalia, GA USA From: Bill - Google Account <[email protected]> Sent: Tuesday, July 23, 2019 8:53 AM To: 'Michael Altizer (mialtize)' <[email protected]>; [email protected] Subject: RE: [Snort-devel] Snort3 fails to build for armv7 hardware Thanks Michael. I've forwarded the patch and instructions to the pfSense team for them to try on native ARM hardware. I will let you know if it works. Bill Meeks Vidalia, GA USA From: Michael Altizer (mialtize) <[email protected] <mailto:[email protected]> > Sent: Tuesday, July 23, 2019 12:30 AM To: Bill - Google Account <[email protected] <mailto:[email protected]> >; [email protected] <mailto:[email protected]> Subject: Re: [Snort-devel] Snort3 fails to build for armv7 hardware 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_inspe ctors -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. ------=_NextPart_000_0001_01D5414B.FA447240 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" = xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta = http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 15 = (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri",sans-serif; color:black;} a:link, span.MsoHyperlink {mso-style-priority:99; color:#0563C1; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:#954F72; text-decoration:underline;} p.MsoPlainText, li.MsoPlainText, div.MsoPlainText {mso-style-priority:99; mso-style-link:"Plain Text Char"; margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri",sans-serif; color:black;} p.msonormal0, li.msonormal0, div.msonormal0 {mso-style-name:msonormal; mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; font-size:11.0pt; font-family:"Calibri",sans-serif; color:black;} span.PlainTextChar {mso-style-name:"Plain Text Char"; mso-style-priority:99; mso-style-link:"Plain Text"; font-family:"Calibri",sans-serif;} span.EmailStyle20 {mso-style-type:personal; font-family:"Calibri",sans-serif; color:windowtext;} span.EmailStyle21 {mso-style-type:personal; font-family:"Calibri",sans-serif; color:windowtext;} span.EmailStyle24 {mso-style-type:personal-reply; font-family:"Calibri",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body bgcolor=3Dwhite = lang=3DEN-US link=3D"#0563C1" vlink=3D"#954F72"><div = class=3DWordSection1><p class=3DMsoNormal><span = style=3D'color:windowtext'>The supplied patch along with a small change = in the port Makefile solved the issue on ARM hardware. Thanks for = the quick response.<o:p></o:p></span></p><p class=3DMsoNormal><span = style=3D'color:windowtext'><o:p> </o:p></span></p><div><p = class=3DMsoNormal><b><i><span = style=3D'font-size:12.0pt;color:#1F497D'>Bill = Meeks<o:p></o:p></span></i></b></p><p class=3DMsoNormal><b><i><span = style=3D'font-size:10.0pt;color:#1F497D'>Vidalia, GA = USA</span></i></b><span = style=3D'color:windowtext'><o:p></o:p></span></p></div><p = class=3DMsoNormal><span = style=3D'color:windowtext'><o:p> </o:p></span></p><div><div = style=3D'border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in = 0in 0in'><p class=3DMsoNormal><b><span = style=3D'color:windowtext'>From:</span></b><span = style=3D'color:windowtext'> Bill - Google Account = <[email protected]> <br><b>Sent:</b> Tuesday, July 23, 2019 = 8:53 AM<br><b>To:</b> 'Michael Altizer (mialtize)' = <[email protected]>; = [email protected]<br><b>Subject:</b> RE: [Snort-devel] Snort3 = fails to build for armv7 hardware<o:p></o:p></span></p></div></div><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal><span = style=3D'color:windowtext'>Thanks Michael. I’ve forwarded = the patch and instructions to the pfSense team for them to try on native = ARM hardware. I will let you know if it = works.<o:p></o:p></span></p><p class=3DMsoNormal><span = style=3D'color:windowtext'><o:p> </o:p></span></p><div><p = class=3DMsoNormal><b><i><span = style=3D'font-size:12.0pt;color:#1F497D'>Bill = Meeks<o:p></o:p></span></i></b></p><p class=3DMsoNormal><b><i><span = style=3D'font-size:10.0pt;color:#1F497D'>Vidalia, GA = USA</span></i></b><span = style=3D'color:windowtext'><o:p></o:p></span></p></div><p = class=3DMsoNormal><span = style=3D'color:windowtext'><o:p> </o:p></span></p><div><div = style=3D'border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in = 0in 0in'><p class=3DMsoNormal><b><span = style=3D'color:windowtext'>From:</span></b><span = style=3D'color:windowtext'> Michael Altizer (mialtize) <<a = href=3D"mailto:[email protected]">[email protected]</a>> = <br><b>Sent:</b> Tuesday, July 23, 2019 12:30 AM<br><b>To:</b> Bill - = Google Account <<a = href=3D"mailto:[email protected]">[email protected]</a>>; <a = href=3D"mailto:[email protected]">[email protected]</= a><br><b>Subject:</b> Re: [Snort-devel] Snort3 fails to build for armv7 = hardware<o:p></o:p></span></p></div></div><p = class=3DMsoNormal><o:p> </o:p></p><div><p class=3DMsoNormal>On = 7/22/19 6:17 PM, Bill - Google Account via Snort-devel = wrote:<o:p></o:p></p></div><blockquote = style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><p = class=3DMsoNormal>Hi:<o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p class=3DMsoNormal>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:<o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoPlainText>/nxb-bin/usr/bin/c++ -DHAVE_CONFIG_H = -Dinline=3Dinline -Drestrict=3D__restrict = -I/wrkdirs/usr/ports/security/snort3/work/snort3-3.0.0-255/src/network_in= spectors<o:p></o:p></p><p = class=3DMsoPlainText>-I/wrkdirs/usr/ports/security/snort3/work/snort3-3.0= .0-255/src<o:p></o:p></p><p = class=3DMsoPlainText>-I/usr/local/include/luajit-2.1 = -I.<o:p></o:p></p><p = class=3DMsoPlainText>-I/wrkdirs/usr/ports/security/snort3/work/snort3-3.0= .0-255<o:p></o:p></p><p class=3DMsoPlainText>-I/usr/local/include -O2 = -pipe -DLIBICONV_PLUG -fno-strict-aliasing<o:p></o:p></p><p = class=3DMsoPlainText>-DLIBICONV_PLUG = -fvisibility=3Dhidden -DNDEBUG -O2 = -pipe<o:p></o:p></p><p class=3DMsoPlainText>-DLIBICONV_PLUG = -fno-strict-aliasing -DLIBICONV_PLUG -std=3Dc++11 = -MD<o:p></o:p></p><p class=3DMsoPlainText>-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_clo= ck.cc<o:p></o:p></p><p class=3DMsoPlainText>In file included = from<o:p></o:p></p><p = class=3DMsoPlainText>/wrkdirs/usr/ports/security/snort3/work/snort3-3.0.0= -255/src/time/tsc_clock.cc:24:<o:p></o:p></p><p = class=3DMsoPlainText>/wrkdirs/usr/ports/security/snort3/work/snort3-3.0.0= -255/src/time/tsc_clock.h:55:32:<o:p></o:p></p><p = class=3DMsoPlainText>error: invalid output constraint '=3Da' in = asm<o:p></o:p></p><p = class=3DMsoPlainText> asm = volatile("rdtsc" : "=3Da" (lo), "=3Dd" = (hi));<o:p></o:p></p><p = class=3DMsoPlainText> &nbs= p;  = ; = ^<o:p></o:p></p><p class=3DMsoPlainText>1 error = generated.<o:p></o:p></p><p class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoNormal>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?<o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p = class=3DMsoNormal>Thanks,<o:p></o:p></p><p = class=3DMsoNormal> <o:p></o:p></p><p class=3DMsoNormal><b><i><span = style=3D'font-size:12.0pt;color:#1F497D'>Bill = Meeks</span></i></b><o:p></o:p></p><p class=3DMsoNormal><b><i><span = style=3D'font-size:10.0pt;color:#1F497D'>Vidalia, GA = USA</span></i></b><o:p></o:p></p></blockquote><p><o:p> </o:p></p><p>= Try the attached patch. Make sure you're building without = --enable-tsc-clock.<o:p></o:p></p></div></body></html> ------=_NextPart_000_0001_01D5414B.FA447240-- --===============1935850577363789463== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Snort-devel mailing list [email protected] https://lists.snort.org/mailman/listinfo/snort-devel Please visit http://blog.snort.org for the latest news about Snort! --===============1935850577363789463==--