Bug 231265 - security/barnyard2: fails to compile on latest portsnap update with portmaster
Summary: security/barnyard2: fails to compile on latest portsnap update with portmaster
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-09 12:18 UTC by Patrice
Modified: 2019-01-22 15:00 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments
svn-diff-barnyard2 (1.13 KB, patch)
2018-09-24 20:47 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-barnyard2_v2 (1.14 KB, patch)
2018-10-05 22:11 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-barnyard2_v3 (2.17 KB, patch)
2018-10-06 13:10 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-barnyard2_all (15.68 KB, patch)
2018-10-06 13:13 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrice 2018-09-09 12:18:13 UTC
Dear maintainer,

the version 1.13 as shipped on latest portsnap update fails to compile with the following error from portmaster:

# portmaster -gdb security/barnyard2
[..]
cc -DHAVE_CONFIG_H -I. -I../.. -I.. -I ../sfutil   -DSUP_IP6 -I/usr/local/include -I/usr/local/include -DBROCCOLI  -O2 -pipe -fstack-protector -fno-strict-aliasing -m64 -Wall -c -o spo_alert_fwsam.o spo_alert_fwsam.c
spo_alert_fwsam.c:118:13: error: cannot combine with previous 'int' declaration specifier
typedef int SOCKET;
            ^
[..]

The build system is a FreeBSD 11.2-RELEASE.

Best regards,
Comment 1 Nathan 2018-09-09 16:35:57 UTC
(In reply to Patrice from comment #0)
Are you using the default options or did you select more; Using poudriere and default port options I didn't get this.
If you selected more options, which ones were they
Comment 2 Patrice 2018-09-10 06:08:07 UTC
Hello,

thanks for your reply. We played with config options, and found out that it fails with the described error only when activating BRO option. We unticking this one, the port builds successfully.

We are not using poudriere but portmaster to compile ports.

Regards,
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-09-24 20:47:24 UTC
Created attachment 197464 [details]
svn-diff-barnyard2

I am not really sure  if it is right, but try this.
Comment 4 Patrice 2018-10-05 15:04:49 UTC
Comment on attachment 197464 [details]
svn-diff-barnyard2

Hello,

thank you for your try, but it fails to compile because SOCKET is not defined.

Regards,
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-10-05 22:11:16 UTC
Created attachment 197821 [details]
svn-diff-barnyard2_v2

This should work with PORT_PCAP on or off.
Comment 6 Patrice 2018-10-06 07:01:09 UTC
Comment on attachment 197821 [details]
svn-diff-barnyard2_v2

Hello,

the attached patch works when option BRO is activated, but fails when it is turned off.

Regards,
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-10-06 13:10:57 UTC
Created attachment 197830 [details]
svn-diff-barnyard2_v3

Third try.
Comment 8 Walter Schwarzenfeld freebsd_triage 2018-10-06 13:13:44 UTC
Created attachment 197831 [details]
svn-diff-barnyard2_all

Tried to patch out all warnings (some tautological comparisons and other). I am not sure if everythings is right. Please check it.
Comment 9 Patrice 2018-10-06 14:12:14 UTC
Comment on attachment 197831 [details]
svn-diff-barnyard2_all

Compiles without BRO option, fails with it.
Comment 10 Walter Schwarzenfeld freebsd_triage 2018-10-06 17:30:03 UTC
Compiles fine on my system with port or poudriere.
Comment 11 Walter Schwarzenfeld freebsd_triage 2018-10-06 17:30:35 UTC
Please tell me the error message.
Comment 12 Patrice 2018-10-06 17:36:39 UTC
Well, we failed to apply the complete patch on previous try. By testing it again, we confirm it compiles correctly now with or without BRO option.

Thank you for your work,
Comment 13 commit-hook freebsd_committer 2019-01-22 14:58:26 UTC
A commit references this bug:

Author: bofh
Date: Tue Jan 22 14:57:30 UTC 2019
New revision: 490954
URL: https://svnweb.freebsd.org/changeset/ports/490954

Log:
  security/barnyard2: fix compile with ooption BRO

  PR:		231265
  Submitted by:	freebsd@onyphe.io

Changes:
  head/security/barnyard2/Makefile
  head/security/barnyard2/files/patch-decode.c
  head/security/barnyard2/files/patch-map.c
  head/security/barnyard2/files/patch-parser.c
  head/security/barnyard2/files/patch-spo__alert__fwsam.c
  head/security/barnyard2/files/patch-spo__alert__test.c
  head/security/barnyard2/files/patch-spo__alert__unixsock.c
  head/security/barnyard2/files/patch-spo__database.c
  head/security/barnyard2/files/patch-spo__database__cache.c
  head/security/barnyard2/files/patch-spo__syslog__full.c
  head/security/barnyard2/files/patch-spooler.c