Bug 216031

Summary: net-im/folks: fails to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: freebsd-gnome (Nobody) <gnome>
Status: Closed FIXED    
Severity: Affects Only Me CC: dim, sunpoet
Priority: --- Keywords: needs-patch
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 216008    

Description Jan Beich freebsd_committer freebsd_triage 2017-01-13 14:00:00 UTC
/usr/local/include/readline/rltypedefs.h:35:22: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef int Function () __attribute__ ((deprecated));
                     ^
                      void
/usr/local/include/readline/rltypedefs.h:36:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef void VFunction () __attribute__ ((deprecated));
                       ^
                        void
/usr/local/include/readline/rltypedefs.h:37:26: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char *CPFunction () __attribute__ ((deprecated));
                         ^
                          void
/usr/local/include/readline/rltypedefs.h:38:28: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char **CPPFunction () __attribute__ ((deprecated));
                           ^
                            void
/usr/local/include/readline/readline.h:385:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
extern int rl_message ();
                      ^
                       void

build log: http://sprunge.us/IECJ
regressed by: https://github.com/llvm-mirror/clang/commit/162749f9c543
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2017-01-13 14:27:55 UTC
So actually this is something the readline port, since the complaints are about its headers.  Either we can disable -Wstrict-prototypes for this port to work around it, or we can fix the prototypes in the readline port.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-01-21 04:40:52 UTC
A commit references this bug:

Author: jbeich
Date: Sat Jan 21 04:39:52 UTC 2017
New revision: 432012
URL: https://svnweb.freebsd.org/changeset/ports/432012

Log:
  net-im/folks: ignore warnings in system headers

  Pass -isystem to avoid adding -Wno-foo each time Clang bumps into an
  issue with a header from another port.

  PR:		216031

Changes:
  head/net-im/folks/Makefile
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-01-21 04:46:30 UTC
https://wiki.freebsd.org/WarnerLosh/UsrLocal where -I/usr/local/include vs. -isystem/usr/local/include is the legacy for crippling the compiler.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-01-21 04:52:06 UTC
A commit references this bug:

Author: jbeich
Date: Sat Jan 21 04:51:17 UTC 2017
New revision: 432014
URL: https://svnweb.freebsd.org/changeset/ports/432014

Log:
  MFH: r432012

  net-im/folks: ignore warnings in system headers

  Pass -isystem to avoid adding -Wno-foo each time Clang bumps into an
  issue with a header from another port.

  PR:		216031
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2017Q1/
  branches/2017Q1/net-im/folks/Makefile