Bug 241804 - www/squid: fix build on GCC architectures
Summary: www/squid: fix build on GCC architectures
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: Piotr Kubaj
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-08 15:57 UTC by Piotr Kubaj
Modified: 2019-12-05 18:28 UTC (History)
2 users (show)

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


Attachments
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 freebsd_triage 2019-11-08 15:57:22 UTC
Created attachment 208976 [details]
patch

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 Pavel Timofeev 2019-11-12 14:38:43 UTC
Let me test it.
I'll get back soon.
Comment 2 Pavel Timofeev 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
https://svnweb.freebsd.org/ports?view=revision&revision=514623
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 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.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-12-05 18:28:46 UTC
A commit references this bug:

Author: pkubaj
Date: Thu Dec  5 18:27:46 UTC 2019
New revision: 519101
URL: https://svnweb.freebsd.org/changeset/ports/519101

Log:
  www/squid: fix build on GCC architectures

  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

  PR:		241804
  Approved by:	timp87@gmail.com (maintainer), mentors (implicit approval)

Changes:
  head/www/squid/Makefile