[Bug 271486] audio/espeak-ng: fix build with clang 16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 18 May 2023 12:21:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271486 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. -- You are receiving this mail because: You are the assignee for the bug.