Bug 230496 - mail/nullmailer: Fails to build with Clang 6.0
Summary: mail/nullmailer: Fails to build with Clang 6.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Tobias Kortkamp
URL:
Keywords: easy, needs-qa
Depends on:
Blocks:
 
Reported: 2018-08-10 08:29 UTC by Tod McQuillin
Modified: 2018-11-08 13:47 UTC (History)
3 users (show)

See Also:
tobik: merge-quarterly+


Attachments
Full build log showing errors (35.50 KB, text/plain)
2018-08-10 08:29 UTC, Tod McQuillin
no flags Details
Patch to allow building with clang 6.0 (277 bytes, patch)
2018-08-10 08:31 UTC, Tod McQuillin
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tod McQuillin 2018-08-10 08:29:47 UTC
Created attachment 196049 [details]
Full build log showing errors

Building with clang 6.0 generates many errors and the build does not succeed.

For example:

inject.cc:216:3: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'unsigned int' in initializer list [-Wc++11-nar
rowing]
  X(Sender,            T,F,F,F,F), // 0
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inject.cc:212:38: note: expanded from macro 'X'
#define X(N,IA,IR,IS,IRS,R) { #N ":",strlen(#N ":"),\
                                     ^~~~~~~~~~~~~~
Comment 1 Tod McQuillin 2018-08-10 08:31:18 UTC
Created attachment 196050 [details]
Patch to allow building with clang 6.0

Adding -std=c++03 to CXXFLAGS allows the build to complete with clang 6.0.

Patch attached.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2018-08-10 10:30:55 UTC
Thank you Todd
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2018-08-10 10:31:19 UTC
Comment on attachment 196050 [details]
Patch to allow building with clang 6.0

Approved by: portmgr (unmaintained port)

Pending QA
Comment 4 Nathan 2018-08-28 01:46:21 UTC
Tested, using USE_CXXSTD=c++03 which ends up being the same as patch, worked on 11.2( which uses clang 6.1(supposedly, I think it's actually showing my host's version, but could not be as 10.4 shows 3.x )
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-11-08 13:46:34 UTC
A commit references this bug:

Author: tobik
Date: Thu Nov  8 13:45:53 UTC 2018
New revision: 484453
URL: https://svnweb.freebsd.org/changeset/ports/484453

Log:
  mail/nullmailer: Unbreak build with Clang 6 (C++14 by default)

  inject.cc:221:3: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'unsigned int' in initializer list [-Wc++11-narrowing]
    X(Errors-To,         T,F,F,F,F), // 5
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p483866_s340093/logs/nullmailer-1.13_3,1.log

  PR:		230496
  Submitted by:	Tod McQuillin <devin@spamcop.net>

Changes:
  head/mail/nullmailer/Makefile
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-11-08 13:47:37 UTC
A commit references this bug:

Author: tobik
Date: Thu Nov  8 13:46:45 UTC 2018
New revision: 484454
URL: https://svnweb.freebsd.org/changeset/ports/484454

Log:
  MFH: r484453

  mail/nullmailer: Unbreak build with Clang 6 (C++14 by default)

  inject.cc:221:3: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'unsigned int' in initializer list [-Wc++11-narrowing]
    X(Errors-To,         T,F,F,F,F), // 5
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p483866_s340093/logs/nullmailer-1.13_3,1.log

  PR:		230496
  Submitted by:	Tod McQuillin <devin@spamcop.net>

  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q4/
  branches/2018Q4/mail/nullmailer/Makefile