Bug 293185 - print/lilypond: fix build with clang 21
Summary: print/lilypond: fix build with clang 21
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-14 23:09 UTC by Dimitry Andric
Modified: 2026-02-16 20:10 UTC (History)
1 user (show)

See Also:
m.ne: maintainer-feedback+


Attachments
print/lilypond: fix build with clang 21 (2.87 KB, patch)
2026-02-14 23:10 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 2026-02-14 23:09:38 UTC
With clang 21 print/lilypond fails to build, with errors similar to:

    In file included from line-interface.cc:25:
    In file included from /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/lazy-skyline-pair.hh:24:
    /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/transform.hh:32:3: error: 'smob_trampoline' is a private member of 'Smob_base<Transform>'
       32 |   LY_DECLARE_SMOB_PROC (&Transform::call, 1, 0, 0);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:245:32: note: expanded from macro 'LY_DECLARE_SMOB_PROC'
      245 |   LY_DECLARE_STATIC_SMOB_PROC (smob_trampoline<PMF>, REQ, OPT, VAR)
          |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:240:65: note: expanded from macro 'LY_DECLARE_STATIC_SMOB_PROC'
      240 |     scm_set_smob_apply (smob_tag, reinterpret_cast<scm_t_subr> (FUN), REQ,     \
          |                                                                 ^~~
    /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:260:14: note: declared private here
      260 |   static SCM smob_trampoline (SCM self, SCM arg1)
          |              ^

Upstream fixed this as a side effect of
https://gitweb.git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=f2192eb294e
by making the smob_trampoline methods protected, but it also includes
other changes. Apply a minimalist version, which only makes the needed
methods protected.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-14 23:10:29 UTC
Created attachment 268060 [details]
print/lilypond: fix build with clang 21
Comment 2 Martin Neubauer 2026-02-16 14:55:30 UTC
Looks reasonable. Thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-02-16 20:03:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=58bab68c706086774b17dcacc61c8fd37ecc8a15

commit 58bab68c706086774b17dcacc61c8fd37ecc8a15
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-14 23:09:53 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-16 20:00:44 +0000

    print/lilypond: fix build with clang 21

    With clang 21 print/lilypond fails to build, with errors similar to:

        In file included from line-interface.cc:25:
        In file included from /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/lazy-skyline-pair.hh:24:
        /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/transform.hh:32:3: error: 'smob_trampoline' is a private member of 'Smob_base<Transform>'
           32 |   LY_DECLARE_SMOB_PROC (&Transform::call, 1, 0, 0);
              |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:245:32: note: expanded from macro 'LY_DECLARE_SMOB_PROC'
          245 |   LY_DECLARE_STATIC_SMOB_PROC (smob_trampoline<PMF>, REQ, OPT, VAR)
              |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:240:65: note: expanded from macro 'LY_DECLARE_STATIC_SMOB_PROC'
          240 |     scm_set_smob_apply (smob_tag, reinterpret_cast<scm_t_subr> (FUN), REQ,     \
              |                                                                 ^~~
        /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:260:14: note: declared private here
          260 |   static SCM smob_trampoline (SCM self, SCM arg1)
              |              ^

    Upstream fixed this as a side effect of
    https://gitweb.git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=f2192eb294e
    by making the smob_trampoline methods protected, but it also includes
    other changes. Apply a minimalist version, which only makes the needed
    methods protected.

    PR:             293185
    Approved by:    m.ne@gmx.net (maintainer)
    MFH:            2026Q1

 print/lilypond/files/patch-lily_include_smobs.hh (new) | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-02-16 20:05:36 UTC
A commit in branch 2026Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=319de1201ea6ea21fe0991619451cf78ed0444e6

commit 319de1201ea6ea21fe0991619451cf78ed0444e6
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-14 23:09:53 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-16 20:04:21 +0000

    print/lilypond: fix build with clang 21

    With clang 21 print/lilypond fails to build, with errors similar to:

        In file included from line-interface.cc:25:
        In file included from /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/lazy-skyline-pair.hh:24:
        /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/transform.hh:32:3: error: 'smob_trampoline' is a private member of 'Smob_base<Transform>'
           32 |   LY_DECLARE_SMOB_PROC (&Transform::call, 1, 0, 0);
              |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:245:32: note: expanded from macro 'LY_DECLARE_SMOB_PROC'
          245 |   LY_DECLARE_STATIC_SMOB_PROC (smob_trampoline<PMF>, REQ, OPT, VAR)
              |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:240:65: note: expanded from macro 'LY_DECLARE_STATIC_SMOB_PROC'
          240 |     scm_set_smob_apply (smob_tag, reinterpret_cast<scm_t_subr> (FUN), REQ,     \
              |                                                                 ^~~
        /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:260:14: note: declared private here
          260 |   static SCM smob_trampoline (SCM self, SCM arg1)
              |              ^

    Upstream fixed this as a side effect of
    https://gitweb.git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=f2192eb294e
    by making the smob_trampoline methods protected, but it also includes
    other changes. Apply a minimalist version, which only makes the needed
    methods protected.

    PR:             293185
    Approved by:    m.ne@gmx.net (maintainer)
    MFH:            2026Q1

    (cherry picked from commit 58bab68c706086774b17dcacc61c8fd37ecc8a15)

 print/lilypond/files/patch-lily_include_smobs.hh (new) | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)