maintainer-feedback requested: [Bug 271422] graphics/libcdr01: fix build with clang 16
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 271422] graphics/libcdr01: fix build with clang 16"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 May 2023 18:11:39 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked FreeBSD Office Team <office@FreeBSD.org> for maintainer-feedback: Bug 271422: graphics/libcdr01: fix build with clang 16 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271422 --- Description --- Since clang 16 (and gcc 11) the default C++ standard is now gnu++17. Because graphics/libcdr01's configure scripts and Makefiles do not explicitly set the C++ standard, this leads to several errors: In file included from CDRDocument.cpp:15: In file included from ./CDRContentCollector.h:26: In file included from ./CDRCollector.h:20: /usr/local/include/lcms2.h:1291:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] typedef cmsInt32Number (* cmsSAMPLER16) (CMSREGISTER const cmsUInt16Number In[], ^~~~~~~~~~~~ /usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER' # define CMSREGISTER register ^ /usr/local/include/lcms2.h:1292:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] CMSREGISTER cmsUInt16Number Out[], ^~~~~~~~~~~~ /usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER' # define CMSREGISTER register ^ /usr/local/include/lcms2.h:1293:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] CMSREGISTER void * Cargo); ^~~~~~~~~~~~ /usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER' # define CMSREGISTER register ^ /usr/local/include/lcms2.h:1295:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] typedef cmsInt32Number (* cmsSAMPLERFLOAT)(CMSREGISTER const cmsFloat32Number In[], ^~~~~~~~~~~~ /usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER' # define CMSREGISTER register ^ /usr/local/include/lcms2.h:1296:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] CMSREGISTER cmsFloat32Number Out[], ^~~~~~~~~~~~ /usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER' # define CMSREGISTER register ^ /usr/local/include/lcms2.h:1297:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] CMSREGISTER void * Cargo); ^~~~~~~~~~~~ /usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER' # define CMSREGISTER register ^ Add -DCMS_NO_REGISTER_KEYWORD to CPPFLAGS, to avoid lcms2.h using register keywords in its declarations.