Created attachment 183947 [details] Fix and suppress clang 5.0.0 warnings in devel/rapidjson During an exp-run for the projects/clang500-import branch (bug 219139), it turned out that devel/rapidjson does not build with clang and libc++ 5.0.0 [1]: In file included from /wrkdirs/usr/ports/devel/rapidjson/work/rapidjson-1.1.0/example/tutorial/tutorial.cpp:4: In file included from /wrkdirs/usr/ports/devel/rapidjson/work/rapidjson-1.1.0/include/rapidjson/document.h:20: In file included from /wrkdirs/usr/ports/devel/rapidjson/work/rapidjson-1.1.0/include/rapidjson/reader.h:20: /wrkdirs/usr/ports/devel/rapidjson/work/rapidjson-1.1.0/include/rapidjson/allocators.h:111:64: error: zero as null pointer constant [-Werror,-Wzero-as-null-pointer-constant] chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(0), baseAllocator_(baseAllocator), ownBaseAllocator_(0) ^ nullptr and many more of these. The port is built with -Werror and a lot of extra warnings enabled, and clang 5.0.0 now has a new warning about using zero as a null pointer constant (I think it is enabled when you use -std=c++11 or higher). It is probably easiest to suppress this warning, since fixing all the instances is quite intrusive. Here is a patch to do just that, and one additional fix for another -Werror warning: In file included from example/schemavalidator/schemavalidator.cpp:7: include/rapidjson/schema.h:382:56: error: declaration shadows a typedef in 'Schema<SchemaDocumentType>' [-Werror,-Wshadow] typedef typename SchemaDocumentType::ValueType ValueType; ^ include/rapidjson/schema.h:340:52: note: previous declaration is here typedef typename SchemaDocumentType::ValueType ValueType; ^ [1] http://package18.nyi.freebsd.org/data/headamd64PR219139-default/2017-05-22_13h01m42s/logs/errors/rapidjson-1.1.0_1.log
The upstream bug report: https://github.com/miloyip/rapidjson/issues/1003
If they they patch the upstream in a day or two, I will just move the revision of the port.
(In reply to Yuri Victorovich from comment #2) Any news on this -- this leads to build errors for me now. mfg Tobias
I asked the upstream maintainer in the upstream bug report.
Upstream maintainer asked for a PR.
Ping. Can we do something about this please? Maybe apply Dimitry's patch or disable the use of -Werror entirely? This blocks having a 12.0-CURRENT package for kodi-devel on pkg.FreeBSD.org. Thank you.
Committed, thanks!
A commit references this bug: Author: yuri Date: Sun Dec 31 17:14:15 UTC 2017 New revision: 457707 URL: https://svnweb.freebsd.org/changeset/ports/457707 Log: devel/rapidjson: Fix clang warnings on 12 PR: 220388 Submitted by: dim Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D13599 Changes: head/devel/rapidjson/Makefile head/devel/rapidjson/distinfo head/devel/rapidjson/files/ head/devel/rapidjson/files/patch-include_rapidjson_schema.h