Re: Snort3 fails to build for armv7 hardware
"Michael Altizer \(mialtize\) via Snort-devel" <[email protected]> Wed, 24 Jul 2019 01:25:29 +0000
| Newsgroups | gmane.comp.security.ids.snort.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============5884629849924674380== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_229ce17b10e358193a25a940743e5cceciscocom_" --_000_229ce17b10e358193a25a940743e5cceciscocom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Cool. That should make its way into a GitHub push in the near future. On 7/23/19 11:44 AM, Bill - Google Account wrote: The supplied patch along with a small change in the port Makefile solved th= e issue on ARM hardware. Thanks for the quick response. Bill Meeks Vidalia, GA USA From: Bill - Google Account <[email protected]><mailto:billmeeks8@gmail.= com> Sent: Tuesday, July 23, 2019 8:53 AM To: 'Michael Altizer (mialtize)' <[email protected]><mailto:mialtize@cisco= .com>; [email protected]<mailto:[email protected]> Subject: RE: [Snort-devel] Snort3 fails to build for armv7 hardware Thanks Michael. I=92ve forwarded the patch and instructions to the pfSense= team for them to try on native ARM hardware. I will let you know if it wo= rks. Bill Meeks Vidalia, GA USA From: Michael Altizer (mialtize) <[email protected]<mailto:mialtize@cisco.= com>> 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 c= urrently working on a Snort3 package for pfSense. To that end the pfSense = developers have recently enabled the build of the Snort3 binary on their im= age 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 fo= r 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=3Dinline -Drestrict=3D__rest= rict -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=3Dhidden -DNDEBUG -O2 -pipe -DLIBICONV_PLUG -fno-strict-aliasing -DLIBICONV_PLUG -std=3Dc++11 -MD -MT src/time/CMakeFiles/time.dir/tsc_clock.cc.o -MF src/time/CMakeFiles/tim= e.dir/tsc_clock.cc.o.d -o src/time/CMakeFiles/time.dir/tsc_clock.cc.o -c /w= rkdirs/usr/ports/security/snort3/work/snort3-3.0.0-255/src/time/tsc_clock.c= c 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 '=3Da' in asm asm volatile("rdtsc" : "=3Da" (lo), "=3Dd" (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-clo= ck. --_000_229ce17b10e358193a25a940743e5cceciscocom_ Content-Type: text/html; charset="Windows-1252" Content-ID: <[email protected]> Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1= 252"> </head> <body text=3D"#000000" bgcolor=3D"#FFFFFF"> <div class=3D"moz-cite-prefix">Cool. That should make its way into a = GitHub push in the near future.<br> </div> <div class=3D"moz-cite-prefix"><br> </div> <div class=3D"moz-cite-prefix">On 7/23/19 11:44 AM, Bill - Google Account w= rote:<br> </div> <blockquote type=3D"cite" cite=3D"mid:000001d5416d$81554ef0$83ffecd0$@gmail= .com"> <meta name=3D"Generator" 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]--> <div class=3D"WordSection1"> <p class=3D"MsoNormal"><span style=3D"color:windowtext">The supplied patch = along with a small change in the port Makefile solved the issue on ARM hard= ware. Thanks for the quick response.<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"color:windowtext"><o:p> </o:p></= span></p> <div> <p class=3D"MsoNormal"><b><i><span style=3D"font-size:12.0pt;color:#1F497D"= >Bill Meeks<o:p></o:p></span></i></b></p> <p class=3D"MsoNormal"><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=3D"MsoNormal"><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=3D"MsoNormal"><b><span style=3D"color:windowtext">From:</span></b>= <span style=3D"color:windowtext"> Bill - Google Account <a class=3D"moz-txt-link-rfc2396E" href=3D"mailto:[email protected]"><= ;[email protected]></a> <br> <b>Sent:</b> Tuesday, July 23, 2019 8:53 AM<br> <b>To:</b> 'Michael Altizer (mialtize)' <a class=3D"moz-txt-link-rfc2396E" = href=3D"mailto:[email protected]"> <[email protected]></a>; <a class=3D"moz-txt-link-abbreviated" 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=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal"><span style=3D"color:windowtext">Thanks Michael.&nbs= p; I=92ve 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=3D"MsoNormal"><span style=3D"color:windowtext"><o:p> </o:p></= span></p> <div> <p class=3D"MsoNormal"><b><i><span style=3D"font-size:12.0pt;color:#1F497D"= >Bill Meeks<o:p></o:p></span></i></b></p> <p class=3D"MsoNormal"><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=3D"MsoNormal"><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=3D"MsoNormal"><b><span style=3D"color:windowtext">From:</span></b>= <span style=3D"color:windowtext"> Michael Altizer (mialtize) <<a href=3D= "mailto:[email protected]" moz-do-not-send=3D"true">[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]= " moz-do-not-send=3D"true">[email protected]</a>>; <a href=3D"mailto:[email protected]" moz-do-not-send=3D"true">Sno= [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=3D"MsoNormal"><o:p> </o:p></p> <div> <p class=3D"MsoNormal">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=3D"MsoNormal">Hi:<o:p></o:p></p> <p class=3D"MsoNormal"> <o:p></o:p></p> <p class=3D"MsoNormal">I maintain the Snort package for the pfSense firewal= l distribution. I am currently working on a Snort3 package for pfSens= e. 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 arch= itectures. Snort3-3.0.0-255 is currently failing to build for ARMv7 i= mages on FreeBSD 12. The relevant parts of the build failure log are = as follows:<o:p></o:p></p> <p class=3D"MsoNormal"> <o:p></o:p></p> <p class=3D"MsoPlainText">/nxb-bin/usr/bin/c++ -DHAVE_CONFIG_= H -Dinline=3Dinline -Drestrict=3D__restrict -I/wrkdirs/usr/ports/security/s= nort3/work/snort3-3.0.0-255/src/network_inspectors<o:p></o:p></p> <p class=3D"MsoPlainText">-I/wrkdirs/usr/ports/security/snort3/work/snort3-= 3.0.0-255/src<o:p></o:p></p> <p class=3D"MsoPlainText">-I/usr/local/include/luajit-2.1 -I.<o:p></o:p></p= > <p class=3D"MsoPlainText">-I/wrkdirs/usr/ports/security/snort3/work/snort3-= 3.0.0-255<o:p></o:p></p> <p class=3D"MsoPlainText">-I/usr/local/include -O2 -pipe -DLIBICONV_PLUG -f= no-strict-aliasing<o:p></o:p></p> <p class=3D"MsoPlainText">-DLIBICONV_PLUG -fvisibility=3Dhidden = -DNDEBUG -O2 -pipe<o:p></o:p></p> <p class=3D"MsoPlainText">-DLIBICONV_PLUG -fno-strict-aliasing -DLIBI= CONV_PLUG -std=3Dc++11 -MD<o:p></o:p></p> <p class=3D"MsoPlainText">-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/tim= e.dir/tsc_clock.cc.o -c /wrkdirs/usr/ports/security/snort3/work/snort3-3.0.= 0-255/src/time/tsc_clock.cc<o:p></o:p></p> <p class=3D"MsoPlainText">In file included from<o:p></o:p></p> <p class=3D"MsoPlainText">/wrkdirs/usr/ports/security/snort3/work/snort3-3.= 0.0-255/src/time/tsc_clock.cc:24:<o:p></o:p></p> <p class=3D"MsoPlainText">/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=3D"MsoPlainText">error: invalid output constraint '=3Da' in asm<o:= p></o:p></p> <p class=3D"MsoPlainText"> asm vo= latile("rdtsc" : "=3Da" (lo), "=3Dd" (hi));<o= :p></o:p></p> <p class=3D"MsoPlainText"> &= nbsp; &nbs= p; ^<o:p></o:p></p> <p class=3D"MsoPlainText">1 error generated.<o:p></o:p></p> <p class=3D"MsoNormal"> <o:p></o:p></p> <p class=3D"MsoNormal">This error occurs on a stock FreeBSD 12.0 installati= on and is not specific to pfSense. Could someone from the Snort3 team= please take a look?<o:p></o:p></p> <p class=3D"MsoNormal"> <o:p></o:p></p> <p class=3D"MsoNormal">Thanks,<o:p></o:p></p> <p class=3D"MsoNormal"> <o:p></o:p></p> <p class=3D"MsoNormal"><b><i><span style=3D"font-size:12.0pt;color:#1F497D"= >Bill Meeks</span></i></b><o:p></o:p></p> <p class=3D"MsoNormal"><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> </blockquote> <p><br> </p> </body> </html> --_000_229ce17b10e358193a25a940743e5cceciscocom_-- --===============5884629849924674380== 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! --===============5884629849924674380==--