Bug 255370 - security/suricata 6.0.2 fails to build due to -Werror (-Werror to be removed)
Summary: security/suricata 6.0.2 fails to build due to -Werror (-Werror to be removed)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Kevin Bowling
URL:
Keywords: easy, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2021-04-24 18:50 UTC by Ryan Lawrence
Modified: 2021-06-15 18:09 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (franco)
kbowling: merge-quarterly+


Attachments
Make error output (6.47 KB, text/plain)
2021-04-24 18:50 UTC, Ryan Lawrence
no flags Details
annotate PRELUDE as BROKEN (467 bytes, patch)
2021-05-23 18:51 UTC, Franco Fichtner
franco: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Lawrence 2021-04-24 18:50:45 UTC
Created attachment 224402 [details]
Make error output

Trying to build the new Suricata 6.0.2 on 13.0-RELEASE fails:

1. cd /usr/ports/security/suricata
2. make
3. error attached error.txt
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-04-25 00:38:28 UTC
^Triage: 

-Werror needs to be removed, or overridden. Additionally, these warnings should be reported upstream, and upstream requested to not include -Werror in the distributed/default build
Comment 2 Franco Fichtner 2021-04-25 17:44:01 UTC
Do you have the PRELUDE option turned on manually?

> alert-prelude.c:680:10: error: implicit declaration of function 'JsonHttpAddMetadata' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    js = JsonHttpAddMetadata(p->flow, pa->tx_id);

And

https://redmine.openinfosecfoundation.org/issues/4065


Cheers,
Franco
Comment 3 Ryan Lawrence 2021-04-25 21:53:21 UTC
(In reply to Franco Fichtner from comment #2)
I see.. yes this is a full configuration build with LUA. Disabling prelude does resolve this issue and builds just fine. Perhaps we should update the Makefile and set Prelude as BROKEN?
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2021-04-26 00:59:36 UTC
(In reply to Ryan Lawrence from comment #3)

-Werror is not appropriate for ports/package builds, and should be disabled/overridden
Comment 5 Franco Fichtner 2021-05-23 18:51:04 UTC
Created attachment 225203 [details]
annotate PRELUDE as BROKEN

Hi,

here is the patch as discussed.

The issue importance is likely too high.


Cheers,
Franco
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-06-15 15:05:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2d4de39c06e6d77981f1b40b38282fa66c6ff51d

commit 2d4de39c06e6d77981f1b40b38282fa66c6ff51d
Author:     Franco Fichtner <franco@opnsense.org>
AuthorDate: 2021-06-15 15:01:39 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-06-15 15:01:39 +0000

    security/suricata: Mark option PRELUDE as broken

    https://redmine.openinfosecfoundation.org/issues/4065

    PR:             255370
    Reported by:    Ryan Lawrence <bug@ryan-l.com>
    Approved by:    maintainer timeout
    MFH:            2021Q2

 security/suricata/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-06-15 15:05:18 UTC
A commit in branch 2021Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c9d8d57514cef9eab27e4a618dbdd9c1f47e45fc

commit c9d8d57514cef9eab27e4a618dbdd9c1f47e45fc
Author:     Franco Fichtner <franco@opnsense.org>
AuthorDate: 2021-06-15 15:01:39 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-06-15 15:05:00 +0000

    security/suricata: Mark option PRELUDE as broken

    https://redmine.openinfosecfoundation.org/issues/4065

    PR:             255370
    Reported by:    Ryan Lawrence <bug@ryan-l.com>
    Approved by:    maintainer timeout
    MFH:            2021Q2

    (cherry picked from commit 2d4de39c06e6d77981f1b40b38282fa66c6ff51d)

 security/suricata/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 8 Kevin Bowling freebsd_committer freebsd_triage 2021-06-15 15:06:28 UTC
This was not a blanked -Werror issue, this was a legitimate compilation issue.

Thanks for the fix Franco!
Comment 9 Kevin Bowling freebsd_committer freebsd_triage 2021-06-15 15:08:32 UTC
Sorry for marking this maintainer timeout, I saw it as ? in the bug flags and didn't recheck the attachment area.
Comment 10 Franco Fichtner 2021-06-15 18:09:50 UTC
Nah, no problem. Thanks for the commit, Kevin :)