Created attachment 191611 [details] Patch for lib/EWMH.cc to be placed in the files directory --- EWMH.lo --- EWMH.cc:250:7: error: non-constant-expression cannot be narrowed from type 'long' to 'unsigned long' in initializer list [-Wc++11-narrowing] { static_cast<long>(x), static_cast<long>(y) }; ^~~~~~~~~~~~~~~~~~~~ EWMH.cc:250:7: note: insert an explicit cast to silence this issue { static_cast<long>(x), static_cast<long>(y) }; ^~~~~~~~~~~~~~~~~~~~ static_cast<unsigned long>( ) EWMH.cc:250:29: error: non-constant-expression cannot be narrowed from type 'long' to 'unsigned long' in initializer list [-Wc++11-narrowing] { static_cast<long>(x), static_cast<long>(y) }; ^~~~~~~~~~~~~~~~~~~~ EWMH.cc:250:29: note: insert an explicit cast to silence this issue { static_cast<long>(x), static_cast<long>(y) }; ^~~~~~~~~~~~~~~~~~~~ static_cast<unsigned long>( ) 2 errors generated. *** [EWMH.lo] Error code 1 make[3]: stopped in /construction/xports/x11-wm/blackbox/work/blackbox-0.70.1/lib Attached patch silences these error messages.
Created attachment 191612 [details] Patch for Makefile Might as well increase PORTREVISION.
Comment on attachment 191611 [details] Patch for lib/EWMH.cc to be placed in the files directory Thanks, Trond.
Comment on attachment 191612 [details] Patch for Makefile Thanks, Trond.
@Trond What is the uname -a output on the system you have observed this issue on?
(In reply to Kubilay Kocak from comment #4) I don't have access to that particular VM right now, but it's running base/head, I guess it ran r331123-ish at the time.
Unrelated to this patch, found during QA, it appears the TOOLS_ONLY option (enabled) fails to build/install, due to a bug introduced 4 years [1] ago during staging, which removed the MAN1 variable a later INSTALL_MAN macro relied on. Beside reporting it here for future reference, this is also probably the best evidence possible that the TOOLS_ONLY option isn't really valuable on its own, and particularly in contrast to the complexity it adds to the port (magic plist replacements, install_target hacks ":(", among other things). I strongly recommend removing it, but we can do that separately, as I'm trying to make the minimum number of changes possible to fix only this issue, comply with ports/framework guidelines/best-practices, and merge it to the quarterly branch. [1] http://svnweb.freebsd.org/changeset/ports/346174
(In reply to Trond.Endrestol from comment #5) That's fine, after minor investigation, it appears to be "post-Clang 6 import" 12-CURRENT machines. See Also: https://lists.freebsd.org/pipermail/freebsd-ports/2018-August/114039.html
A commit references this bug: Author: koobs Date: Thu Aug 9 06:42:49 UTC 2018 New revision: 476722 URL: https://svnweb.freebsd.org/changeset/ports/476722 Log: x11-wm/blackbox: Fix build with Clang 6, Fix TOOLS_ONLY option Clang 6 (on 12-CURRENT) reports the following error during build: EWMH.cc:250:7: error: non-constant-expression cannot be narrowed from type 'long' to 'unsigned long' in initializer list [-Wc++11-narrowing] { static_cast<long>(x), static_cast<long>(y) }; ^~~~~~~~~~~~~~~~~~~~ There was also a bug introduced 4 years ago which removed the MAN1 variable a later INSTALL_MAN macro relied on [1]. This caused a build/install failure when the TOOLS_ONLY option was enabled. This change fixes those two issues. While I'm here level up port compliance: - Add LICENSE_FILE - Convert to OPTIONS helpers - Regenerate patches [1] http://svnweb.freebsd.org/changeset/ports/346174 [2] https://lists.freebsd.org/pipermail/freebsd-ports/2018-August/114039.html PR: 226708 Submitted by: <Trond Endrestol ximalas info> (Clang 6 fix) Approved by: Andrew J. Caines <A J Caines halplant com> (technically) Approved by: portmgr (implicit, build fixes, framework compliance) Reported by: Erich Dollansky <freebsd ed lists sumeritec com> [2] MFH: 2018Q3 Changes: head/x11-wm/blackbox/Makefile head/x11-wm/blackbox/files/patch-lib_Display.cc head/x11-wm/blackbox/files/patch-lib_EWMH.cc head/x11-wm/blackbox/files/patch-lib_Menu.cc head/x11-wm/blackbox/files/patch-lib_Texture.cc head/x11-wm/blackbox/files/patch-src_Screen.cc head/x11-wm/blackbox/files/patch-src_Slit.cc head/x11-wm/blackbox/files/patch-src_Window.cc head/x11-wm/blackbox/files/patch-src_blackbox.cc head/x11-wm/blackbox/files/patch-src_main.cc head/x11-wm/blackbox/files/patch-util_bsetroot.cc
I can confirm the error on FreeBSD 12: FreeBSD 12.0-CURRENT #5 r337343
A commit references this bug: Author: koobs Date: Tue Aug 21 07:16:16 UTC 2018 New revision: 477707 URL: https://svnweb.freebsd.org/changeset/ports/477707 Log: MFH: r476722 x11-wm/blackbox: Fix build with Clang 6, Fix TOOLS_ONLY option Clang 6 (on 12-CURRENT) reports the following error during build: EWMH.cc:250:7: error: non-constant-expression cannot be narrowed from type 'long' to 'unsigned long' in initializer list [-Wc++11-narrowing] { static_cast<long>(x), static_cast<long>(y) }; ^~~~~~~~~~~~~~~~~~~~ There was also a bug introduced 4 years ago which removed the MAN1 variable a later INSTALL_MAN macro relied on [1]. This caused a build/install failure when the TOOLS_ONLY option was enabled. This change fixes those two issues. While I'm here level up port compliance: - Add LICENSE_FILE - Convert to OPTIONS helpers - Regenerate patches [1] http://svnweb.freebsd.org/changeset/ports/346174 [2] https://lists.freebsd.org/pipermail/freebsd-ports/2018-August/114039.html PR: 226708 Submitted by: <Trond Endrestol ximalas info> (Clang 6 fix) Approved by: Andrew J. Caines <A J Caines halplant com> (technically) Approved by: portmgr (implicit, build fixes, framework compliance) Reported by: Erich Dollansky <freebsd ed lists sumeritec com> [2] Approved by: miwi (ports-secteam) Changes: _U branches/2018Q3/ branches/2018Q3/x11-wm/blackbox/Makefile branches/2018Q3/x11-wm/blackbox/files/patch-lib_Display.cc branches/2018Q3/x11-wm/blackbox/files/patch-lib_EWMH.cc branches/2018Q3/x11-wm/blackbox/files/patch-lib_Menu.cc branches/2018Q3/x11-wm/blackbox/files/patch-lib_Texture.cc branches/2018Q3/x11-wm/blackbox/files/patch-src_Screen.cc branches/2018Q3/x11-wm/blackbox/files/patch-src_Slit.cc branches/2018Q3/x11-wm/blackbox/files/patch-src_Window.cc branches/2018Q3/x11-wm/blackbox/files/patch-src_blackbox.cc branches/2018Q3/x11-wm/blackbox/files/patch-src_main.cc branches/2018Q3/x11-wm/blackbox/files/patch-util_bsetroot.cc
Thank you.