Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 May 2023 12:21:10 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 271486] audio/espeak-ng: fix build with clang 16
Message-ID:  <bug-271486-7788@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 271486
           Summary: audio/espeak-ng: 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: se@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(se@FreeBSD.org)
          Assignee: se@FreeBSD.org

Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because audio/espeak-ng's Makefile does not explicitly set its C++
standard, this leads to an error:

  src/speechPlayer/src/speechWaveGenerator.cpp:197:56: error: reference to
'sample' is ambiguous
          unsigned int generate(const unsigned int sampleCount, sample*
sampleBuf) {
                                                                ^
  src/speechPlayer/src/sample.h:23:3: note: candidate found by name lookup =
is
'sample'
  } sample;
    ^
  /usr/include/c++/v1/__algorithm/sample.h:95:17: note: candidate found by =
name
lookup is 'std::sample'
  _SampleIterator sample(_PopulationIterator __first,
                  ^

This is because speechWaveGenerator.cpp has "using namespace std;" at
the top, so "sample" can match both "std::sample" (from <algorithm>) and
"struct sample" (from sample.h). Qualify "sample" as "::sample" to work
around the problem.

--=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-271486-7788>