Created attachment 681403 [details]
media-libs/openal fails to build with gcc-11 with :
../openal-soft-1.21.0/common/almalloc.cpp:23:17: error: ‘aligned_alloc’ is not a member of ‘std’; did you mean ‘aligned_union’?
23 | return std::aligned_alloc(alignment, size);
a workaround is to build it with std=gnu++14.conf
Again, even if it (obviously) had no impact, please use normal *FLAGS when reporting these. Can reproduce with gcc-11.0.9999-d54be5a and still happens with openal-1.21.0.
gcc added std::aligned_alloc only for -std=gnu++17. gcc-11 defaults to that standard and feature detection succeeds. Then cmake uses -std=gnu++14 and fails. I'd say it's a bug in the upstream package.
It happens with gcc-10.2.1, as well
I have attached a patch.
Created attachment 683749 [details, diff]
replace std::aligned_alloc with ::aligned_alloc
Fixed upstream (tried and builds fine)
*** Bug 768345 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s):
Author: Sam James <email@example.com>
AuthorDate: 2021-02-05 05:02:51 +0000
Commit: Sam James <firstname.lastname@example.org>
CommitDate: 2021-02-05 05:02:51 +0000
media-libs/openal: bump to 1.21.1
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sam James <email@example.com>
media-libs/openal/Manifest | 1 +
media-libs/openal/openal-1.21.1.ebuild | 80 ++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+)