Bug 271055 - graphics/libGLU: fix build with clang 16
Summary: graphics/libGLU: fix build with clang 16
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-04-24 20:34 UTC by Dimitry Andric
Modified: 2023-04-25 16:55 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments
graphics/libGLU: fix build with clang 16 (2.04 KB, patch)
2023-04-24 20:35 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-04-24 20:34:46 UTC
Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because graphics/libGLU's Makefile does not explicitly set its C++ standard,
this leads to several errors:

  ../src/libnurbs/internals/varray.cc:76:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      register long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]);
      ^~~~~~~~~
  ../src/libnurbs/internals/varray.cc:77:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      register long dt = sgn(arc->tail()[1] - arc->prev->tail()[1]);
      ^~~~~~~~~

Upstream already noticed this, and committed
https://gitlab.freedesktop.org/mesa/glu/-/commit/b6c308172993 as a fix,
so add this as an additional patch, until the next version is released.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-04-24 20:35:04 UTC
Created attachment 241714 [details]
graphics/libGLU: fix build with clang 16
Comment 2 Emmanuel Vadot freebsd_committer freebsd_triage 2023-04-25 06:24:46 UTC
You need to bump PORTREVISION too, otherwise lgtm.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-04-25 16:38:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=88f549c0d62c1a897a69aeebbb15d8ec91c9dc20

commit 88f549c0d62c1a897a69aeebbb15d8ec91c9dc20
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-04-24 20:31:37 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-04-25 16:27:56 +0000

    graphics/libGLU: fix build with clang 16

    Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
    Because graphics/libGLU's Makefile does not explicitly set its C++ standard,
    this leads to several errors:

      ../src/libnurbs/internals/varray.cc:76:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
          register long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]);
          ^~~~~~~~~
      ../src/libnurbs/internals/varray.cc:77:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
          register long dt = sgn(arc->tail()[1] - arc->prev->tail()[1]);
          ^~~~~~~~~

    Upstream already noticed this, and committed
    https://gitlab.freedesktop.org/mesa/glu/-/commit/b6c308172993 as a fix,
    so add this as an additional patch, until the next version is released.

    PR:             271055
    Approved by:    manu (maintainer)
    MFH:            2023Q2

 graphics/libGLU/Makefile | 5 ++++-
 graphics/libGLU/distinfo | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)