Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 May 2023 18:00:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        office@FreeBSD.org
Subject:   [Bug 271421] graphics/libfreehand: fix build with clang 16
Message-ID:  <bug-271421-25061@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271421

            Bug ID: 271421
           Summary: graphics/libfreehand: fix build with clang 16
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: office@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: office@FreeBSD.org
             Flags: maintainer-feedback?(office@FreeBSD.org)

Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because multimedia/smpeg's configure scripts and Makefiles do not
explicitly set the C++ standard, this leads to several errors:

  In file included from FreeHandDocument.cpp:14:
  In file included from ./FHParser.h:15:
  /usr/local/include/lcms2.h:1291:44: error: ISO C++17 does not allow
'register' storage class specifier [-Wregister]
  typedef cmsInt32Number (* cmsSAMPLER16)   (CMSREGISTER const cmsUInt16Num=
ber
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 Ou=
t[],
                                             ^~~~~~~~~~~~
  /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 cmsFloat32Nu=
mber
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 -D CMS_NO_REGISTER_KEYWORD to CPPFLAGS, to avoid lcms2.h using
register keywords in its declarations.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271421-25061>