Skip to contentSkip to conversation

snort: fix build on sparc v8

PATCH New Fabrice Fontaine 4 participants 8 messages May 10, 2018 – May 15, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 snort: fix build on sparc v8

Add patch to remove -mcpu=v9 before checking sparc architecture

Fixes:
- http://autobuild.buildroot.net/results/59625daa154e3136171dcb89bdc3b8b31dc85021

---
 package/snort/0005-fix-sparc.patch | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/snort/0005-fix-sparc.patch
package/snort/0005-fix-sparc.patch new file +28 -0
new file mode 100644
index 0000000000..14792d2c59
@@ -0,0 +1,28 @@
+When checking if the architecture supports the %time register
+instruction, do not force -mcpu to v9 while doing so. Otherwise it's
+like "let's see if this v9 instruction exists when I force the compiler
+to think I'm using v9", which is non-sensical.
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+
+diff -Naurp ./snort-2.9.11.1-orig/configure.in snort-2.9.11.1/configure.in
+--- ./snort-2.9.11.1-orig/configure.in	2018-05-10 12:20:19.253510678 +0200
++++ snort-2.9.11.1/configure.in	2018-05-10 12:40:18.547584998 +0200
+@@ -942,8 +942,6 @@ fi
+ 
+ # check for sparc %time register
+ if eval "echo $host_cpu|grep -i sparc >/dev/null"; then
+-    OLD_CFLAGS="$CFLAGS"
+-    CFLAGS="$CFLAGS -mcpu=v9 "
+     AC_MSG_CHECKING([for sparc %time register])
+     AC_RUN_IFELSE(
+     [AC_LANG_PROGRAM(
+@@ -957,8 +955,6 @@ if eval "echo $host_cpu|grep -i sparc >/
+     AC_MSG_RESULT($sparcv9)
+     if test "x$sparcv9" = "xyes"; then
+         AC_DEFINE([SPARCV9],[1],[For sparc v9 with %time register])
+-    else
+-        CFLAGS="$OLD_CFLAGS"
+     fi
+ fi
+ 
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 snort: fix build on sparc v8

Fabrice, All,

On 2018-05-10 13:17 +0200, Fabrice Fontaine spake thusly:

Quoted 6 lines

Add patch to remove -mcpu=v9 before checking sparc architecture

Fixes:
- http://autobuild.buildroot.net/results/59625daa154e3136171dcb89bdc3b8b31dc85021

Quoted 11 lines
---
 package/snort/0005-fix-sparc.patch | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/snort/0005-fix-sparc.patch
package/snort/0005-fix-sparc.patch new file +0 -0
new file mode 100644
index 0000000000..14792d2c59

package/snort/0005-fix-sparc.patch line 10

Quoted 10 lines
package/snort/0005-fix-sparc.patch new file +10 -0
@@ -0,0 +1,28 @@
+When checking if the architecture supports the %time register
+instruction, do not force -mcpu to v9 while doing so. Otherwise it's
+like "let's see if this v9 instruction exists when I force the compiler
+to think I'm using v9", which is non-sensical.
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+
+diff -Naurp ./snort-2.9.11.1-orig/configure.in snort-2.9.11.1/configure.in
+--- ./snort-2.9.11.1-orig/configure.in	2018-05-10 12:20:19.253510678 +0200
++++ snort-2.9.11.1/configure.in	2018-05-10 12:40:18.547584998 +0200

I was goign to request a git-formatted patch, but snort-2 is not maintained in the open... Only snort-3 is on github...

Regards,
Yann E. MORIN.

Quoted 25 lines
package/snort/0005-fix-sparc.patch new file +18 -0
+@@ -942,8 +942,6 @@ fi
+ 
+ # check for sparc %time register
+ if eval "echo $host_cpu|grep -i sparc >/dev/null"; then
+-    OLD_CFLAGS="$CFLAGS"
+-    CFLAGS="$CFLAGS -mcpu=v9 "
+     AC_MSG_CHECKING([for sparc %time register])
+     AC_RUN_IFELSE(
+     [AC_LANG_PROGRAM(
+@@ -957,8 +955,6 @@ if eval "echo $host_cpu|grep -i sparc >/
+     AC_MSG_RESULT($sparcv9)
+     if test "x$sparcv9" = "xyes"; then
+         AC_DEFINE([SPARCV9],[1],[For sparc v9 with %time register])
+-    else
+-        CFLAGS="$OLD_CFLAGS"
+     fi
+ fi
+ 
Signature · 6 lines
2.14.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 snort: fix build on sparc v8

In reply to Fabrice Fontaine

Hello,

+Sergio in Cc.

Quoted 10 lines · Fabrice Fontaine

Add patch to remove -mcpu=v9 before checking sparc architecture

Fixes:
- http://autobuild.buildroot.net/results/59625daa154e3136171dcb89bdc3b8b31dc85021

---
 package/snort/0005-fix-sparc.patch | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/snort/0005-fix-sparc.patch

I would have preferred a Git-formatted patch, because the 4 existing patches on the snort package are Git-formatted.

However, I haven't been able to find an upstream Git repository for Snort, so I'm wondering how the existing Git-formatted patches have been generated. Perhaps from a repository created locally using git init+git add ?

Sergio, since you added the snort package, how did you generate the patches ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 snort: fix build on sparc v8

Hello,

Quoted 7 lines

However, I haven't been able to find an upstream Git repository for Snort, so I'm wondering how the existing Git-formatted patches have been generated. Perhaps from a repository created locally using git init+git add ?

Sergio, since you added the snort package, how did you generate the patches ?

Yes, I manually created the git repository to generate the patches. I have also sent the patches upstream and ping one time after a month, but got no responses so far.

Best regards,

Sergio Prado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180514/bf6396de/attachment.html>

#4 lore raw

PATCH 1/1 snort: fix build on sparc v8

Hello,

Quoted 9 lines · Sergio Prado
Quoted 7 lines

However, I haven't been able to find an upstream Git repository for Snort, so I'm wondering how the existing Git-formatted patches have been generated. Perhaps from a repository created locally using git init+git add ?

Sergio, since you added the snort package, how did you generate the patches ?

Yes, I manually created the git repository to generate the patches.

OK, that explains the Git-formatted patches, without any obvious upstream Git repository available online.

Quoted 2 lines

I have also sent the patches upstream and ping one time after a month, but got no responses so far.

OK, too bad. Is snort unmaintained ? Is upstream focused on this snort3 project ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 1/1 snort: fix build on sparc v8

Hello,

Quoted 5 lines
Quoted 2 lines

I have also sent the patches upstream and ping one time after a month, but got no responses so far.

OK, too bad. Is snort unmaintained ? Is upstream focused on this snort3 project ?

As far as I know, it is still maintained. The last release is from 2017-12-06. But I think brand new features are being implemented in 3.X.

I could bump to 3.X, but since there are some compatibility issues between 2.X and 3.X, that would impact 2.X users. We could also have both versions in Buildroot.

What do you think?

Best regards,

Sergio Prado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180515/3a2e86c3/attachment.html>

#6 lore raw

PATCH 1/1 snort: fix build on sparc v8

In reply to Thomas Petazzoni

Dear Thomas,

2018-05-15 14:41 GMT+02:00 Thomas Petazzoni <[email protected]>:

Quoted 9 lines

Hello,

Quoted 5 lines · Sergio Prado
Quoted 5 lines

However, I haven't been able to find an upstream Git repository for Snort, so I'm wondering how the existing Git-formatted patches have been generated. Perhaps from a repository created locally using git init+git add ?

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Sergio, since you added the snort package, how did you generate the patches ?

Yes, I manually created the git repository to generate the patches.

OK, that explains the Git-formatted patches, without any obvious upstream Git repository available online.

So, do you want to reformat my patch? What is the best practice, should we always send git formatted patch even if there is no official Git repository?

Quoted 7 lines
Quoted 3 lines

I have also sent the patches upstream and ping one time after a month, but got no responses so far.

OK, too bad. Is snort unmaintained ? Is upstream focused on this snort3 project ?

Actually snort is most widely used than snort3. snort3 is still in alpha. I have a patch for snort3 package but snort and snort3 don't use the same version of daq library :-/

Quoted 9 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering
https://bootlin.com

Best Regards,

Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180515/267fddff/attachment.html>

#7 lore raw

PATCH 1/1 snort: fix build on sparc v8

Hello,

Quoted 6 lines · Fabrice Fontaine
Quoted 2 lines

OK, that explains the Git-formatted patches, without any obvious upstream Git repository available online.

So, do you want to reformat my patch? What is the best practice, should we always send git formatted patch even if there is no official Git repository?

The only clear policy that I'm trying to enforce is "if the project uses Git as its version control system, then we want Git-formatted patches". If on the other hand the projects is not using Git, then we don't have a clear policy, and so far we have been accepting patches that are not Git-formatted in such a case.

The snort situation caught my eye because your patch was not Git-formatted, but the existing patches were.

Quoted 6 lines
Quoted 3 lines

OK, too bad. Is snort unmaintained ? Is upstream focused on this snort3 project ?

Actually snort is most widely used than snort3. snort3 is still in alpha. I have a patch for snort3 package but snort and snort3 don't use the same version of daq library :-/

We could have a separate snort3 package, and a separate package for the daq library as well. If the daq libraries are API incompatible, it makes sense to have two separate packages for them.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com