$ poudriere jail -cj clang7 -a amd64 -v projects/clang700-import -m svn+https $ poudriere testport -j clang7 devel/libzim [...] c++ -Isrc/src@@zim@sha -Isrc -I../src -Iinclude -I../include -Istatic -I/usr/local/include -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Werror -std=c++11 -O3 -O2 -fstack-protector -fno-strict-aliasing -fPIC -pthread -MD -MQ 'src/src@@zim@sha/fileimpl.cpp.o' -MF 'src/src@@zim@sha/fileimpl.cpp.o.d' -o 'src/src@@zim@sha/fileimpl.cpp.o' -c ../src/fileimpl.cpp ../src/fileimpl.cpp:75:13: error: local variable 'e' will be copied despite being thrown by name [-Werror,-Wreturn-std-move] throw e; ^ ../src/fileimpl.cpp:75:13: note: call 'std::move' explicitly to avoid copying throw e; ^ std::move(e) http://package18.nyi.freebsd.org/data/headamd64PR230355-default/2018-08-11_19h01m06s/logs/errors/libzim-4.0.0_1.log
-Werror shouldn't be enabled outside of maintainer mode for unimportant warnings (e.g., -Wall) as it tends to break build on each compiler upgrade/change/etc. If you really care about every warning report upstream after confirming it affects development version.
-Wall + -Werror also breaks platforms stuck on GCC (powerpc*, mips*, sparc64). ../src/fileimpl.cpp: In constructor 'zim::FileImpl::FileImpl(const string&)': ../src/fileimpl.cpp:74:33: error: catching polymorphic type 'class zim::ZimFileFormatError' by value [-Werror=catch-value=] } catch (ZimFileFormatError e) { ^ ../src/fileimpl.cpp: In member function 'std::shared_ptr<const zim::Dirent> zim::FileImpl::getDirent(zim::article_index_t)': ../src/fileimpl.cpp:301:18: error: catching polymorphic type 'class zim::InvalidSize' by value [-Werror=catch-value=] } catch (InvalidSize) { ^~~~~~~~~~~ ../src/fileimpl.cpp: In member function 'std::__cxx11::string zim::FileImpl::getChecksum()': ../src/fileimpl.cpp:496:14: error: catching polymorphic type 'class zim::BufferError' by value [-Werror=catch-value=] } catch (BufferError) ^~~~~~~~~~~ cc1plus: all warnings being treated as errors
A commit references this bug: Author: swills Date: Wed Aug 15 17:02:12 UTC 2018 New revision: 477240 URL: https://svnweb.freebsd.org/changeset/ports/477240 Log: devel/libzim: Remove -Werror from the build flags Fixes build with Clang 7 PR: 230626 Changes: head/devel/libzim/files/patch-meson.build