On recent CURRENT (FreeBSD 12.0-CURRENT #14 r328101: Wed Jan 17 23:57:27 CET 2018 amd64, WITH_LLD_IS_LD=YES), updating port editors/pdfedit fails with the error: [...] c++ -c -O2 -pipe -fstack-protector -fno-strict-aliasing -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -fexceptions -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -fexceptions -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -fexceptions -I. -I/usr/ports/editors/pdfedit/work/pdfedit-0.4.5/src -I/usr/ports/editors/pdfedit/work/pdfedit-0.4.5/src/xpdf/ -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/include -o streamwriter.o streamwriter.cc In file included from cxref.cc:28: /usr/ports/editors/pdfedit/work/pdfedit-0.4.5/src/kernel/cxref.h:422:18: error: non-constant-expression cannot be narrowed from type 'pdfobjects::IndiRef::ObjNum' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] ::Ref xpdfRef={ref.num, ref.gen}; ^~~~~~~ /usr/ports/editors/pdfedit/work/pdfedit-0.4.5/src/kernel/cxref.h:422:18: note: insert an explicit cast to silence this issue ::Ref xpdfRef={ref.num, ref.gen}; ^~~~~~~ static_cast<int>( ) /usr/ports/editors/pdfedit/work/pdfedit-0.4.5/src/kernel/cxref.h:422:27: error: non-constant-expression cannot be narrowed from type 'pdfobjects::IndiRef::GenNum' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] ::Ref xpdfRef={ref.num, ref.gen};
Created attachment 192936 [details] Two patch files included for editors/pdfedit (application/x-tar)
Comment on attachment 192936 [details] Two patch files included for editors/pdfedit (application/x-tar) Hi, I have experienced the same trouble. Versions of Ports and FreeBSD are as follows: # $FreeBSD: head/editors/pdfedit/Makefile 467711 2018-04-18 13:57:42Z jbeich $ FreeBSD 11.2-PRERELEASE FreeBSD 11.2-PRERELEASE #1 r333087: amd64 Now, I attach two patch files as workaround. This patch makes compilation successful, anyway. Cheers
Comment on attachment 192936 [details] Two patch files included for editors/pdfedit (application/x-tar) I changed mime type, application/x-tar
A commit references this bug: Author: tobik Date: Sat Aug 25 05:00:37 UTC 2018 New revision: 478001 URL: https://svnweb.freebsd.org/changeset/ports/478001 Log: editors/pdfedit: Fix build with Clang 6 /wrkdirs/usr/ports/editors/pdfedit/work/pdfedit-0.4.5/src/kernel/cxref.h:422:18: error: non-constant-expression cannot be narrowed from type 'pdfobjects::IndiRef::ObjNum' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] ::Ref xpdfRef={ref.num, ref.gen}; ^~~~~~~ /wrkdirs/usr/ports/editors/pdfedit/work/pdfedit-0.4.5/src/kernel/cxref.h:422:18: note: insert an explicit cast to silence this issue ::Ref xpdfRef={ref.num, ref.gen}; ^~~~~~~ static_cast<int>( ) http://beefy11.nyi.freebsd.org/data/head-i386-default/p477696_s338122/logs/errors/pdfedit-0.4.5_11.log PR: 225295 Reported by: O. Hartmann <ohartmann@walstatt.org> Changes: head/editors/pdfedit/Makefile
(In reply to 1wkmmr from comment #2) I am sorry I did not have time to do a thorough code review to find out if the patches are good and have applied a blanket fix (USE_CXXSTD=c++98) instead. It should build fine now.