Bug 236206 - devel/rapidjson: fails to build with clang 8
Summary: devel/rapidjson: fails to build with clang 8
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: Tobias Kortkamp
URL:
Keywords: needs-patch
Depends on:
Blocks: 236062
  Show dependency treegraph
 
Reported: 2019-03-04 12:43 UTC by Jan Beich
Modified: 2019-03-09 11:29 UTC (History)
1 user (show)

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


Attachments
rapidjson.diff (1.30 KB, patch)
2019-03-05 09:18 UTC, Tobias Kortkamp
tobik: maintainer-approval? (yuri)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2019-03-04 12:43:45 UTC
$ poudriere jail -cj clang8 -v projects/clang800-import -m svn+https
$ poudriere testport -j clang8 devel/rapidjson
[...]
In file included from example/schemavalidator/schemavalidator.cpp:7:
include/rapidjson/schema.h:1701:72: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
        RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartObject, (CurrentContext()));
                                                                       ^
include/rapidjson/schema.h:1702:59: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartObject, ());
                                                          ^
include/rapidjson/schema.h:1710:65: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(Key, (str, len, copy));
                                                                ^
include/rapidjson/schema.h:1716:68: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndObject, (memberCount));
                                                                   ^
include/rapidjson/schema.h:1722:71: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
        RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartArray, (CurrentContext()));
                                                                      ^
include/rapidjson/schema.h:1723:58: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartArray, ());
                                                         ^
include/rapidjson/schema.h:1729:68: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
        RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndArray, (elementCount));
                                                                   ^
7 errors generated.

http://package18.nyi.freebsd.org/data/headamd64PR236062-default/2019-03-01_06h42m53s/logs/errors/rapidjson-1.1.0_5.log
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-03-04 23:31:08 UTC
Reminder: Clang 8 was merged to 13.0-CURRENT in base r344779. Maintainers, expect pkg-fallout@ mail soon.
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2019-03-05 09:18:18 UTC
Created attachment 202572 [details]
rapidjson.diff

This directly affects my ccls and kodi-devel ports.  This has
happened before in the past.  The port already patches -Werror out
for the examples and tests and disables it on tier 2 archs as well.
Let's finally do the same for the rest of the build.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-03-06 09:17:33 UTC
A commit references this bug:

Author: tobik
Date: Wed Mar  6 09:17:12 UTC 2019
New revision: 494785
URL: https://svnweb.freebsd.org/changeset/ports/494785

Log:
  devel/rapidjson: Fix build with Clang 8

  include/rapidjson/schema.h:1729:68: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
          RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndArray, (elementCount));
                                                                     ^

  New warnings in Clang => new errors in devel/rapidjson due to the
  build having -Werror with -Wall and -Wextra.  This has also happened
  during previous Clang version bumps.  Instead of collecting new
  -Wno-* every time, disable use of -Werror entirely similar to what
  the port already does on tier 2 archs.

  PR:		236206
  Reported by:	jbeich
  Approved by:	portmgr blanket

Changes:
  head/devel/rapidjson/Makefile