Bug 241804 - www/squid: fix build on GCC architectures
Summary: www/squid: fix build on GCC architectures
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Piotr Kubaj
Depends on:
Reported: 2019-11-08 15:57 UTC by Piotr Kubaj
Modified: 2019-11-13 14:31 UTC (History)
2 users (show)

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

patch (1.59 KB, patch)
2019-11-08 15:57 UTC, Piotr Kubaj
timp87: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2019-11-08 15:57:22 UTC
Created attachment 208976 [details]

Add --disable-strict-error-checking to CONFIGURE_ARGS for everyone. It adds -Werror, which is against ports tree policy and causes:
Icmp6.cc: In member function 'virtual void Icmp6::SendEcho(Ip::Address&, int, const char*, int)':
Icmp6.cc:165:72: error: converting a packed 'icmp6_hdr' pointer (alignment 1) to a 'short unsigned int' pointer (alignment 2) may result in an unaligned pointer value [-Werror=address-of-packed-member]
  165 |     icmp->icmp6_cksum = CheckSum((unsigned short *) icmp, icmp6_pktsize);
      |                                                                        ^
In file included from Icmp6.h:20,
                 from Icmp6.cc:18:
/usr/include/netinet/icmp6.h:72:8: note: defined here
   72 | struct icmp6_hdr {
      |        ^~~~~~~~~
At global scope:
cc1plus: error: unrecognized command line option '-Wno-deprecated-register' [-Werror]
cc1plus: all warnings being treated as errors

Additionally, add GSSAPI_NONE to default options when built with GCC. The reason is that it only builds with https://reviews.freebsd.org/D20289 applied and this patch is uncommitted because Mk/Uses/gssapi.mk fails to review it.
Comment 1 timp87 2019-11-12 14:38:43 UTC
Let me test it.
I'll get back soon.
Comment 2 timp87 2019-11-12 14:48:38 UTC
Please, note this
> CFLAGS+=	-Wno-error=deprecated-declarations
was added several weeks ago to fix build with libc++ 9
Comment 3 Piotr Kubaj freebsd_committer 2019-11-12 14:59:57 UTC
(In reply to timp87 from comment #2)
--disable-strict-error-checking will remove -Werror altogether, so there shouldn't be -Werror-related errors anymore.