Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 764056 - media-libs/openal fails to build with gcc-11
Summary: media-libs/openal fails to build with gcc-11
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL: https://github.com/kcat/openal-soft/c...
Whiteboard:
Keywords: PATCH
: 768345 (view as bug list)
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-01-06 09:00 UTC by andy
Modified: 2021-02-05 05:03 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,33.81 KB, text/plain)
2021-01-06 09:00 UTC, andy
Details
replace std::aligned_alloc with ::aligned_alloc (openal-1.21.0-c++.patch,824 bytes, patch)
2021-01-19 16:39 UTC, Helmut Jarausch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description andy 2021-01-06 09:00:37 UTC
Created attachment 681403 [details]
build.log

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);
      |                 ^~~~~~~~~~~~~
      |                 aligned_union


a workaround is to build it with std=gnu++14.conf
Comment 1 Ionen Wolkens gentoo-dev 2021-01-07 17:40:00 UTC
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.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-07 19:33:30 UTC
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.
Comment 3 Helmut Jarausch 2021-01-19 16:37:11 UTC
It happens with gcc-10.2.1, as well
I have attached a patch.
Comment 4 Helmut Jarausch 2021-01-19 16:39:06 UTC
Created attachment 683749 [details, diff]
replace  std::aligned_alloc  with  ::aligned_alloc
Comment 5 Ionen Wolkens gentoo-dev 2021-02-03 02:47:33 UTC
Fixed upstream (tried and builds fine)
Comment 6 Ionen Wolkens gentoo-dev 2021-02-03 02:48:24 UTC
*** Bug 768345 has been marked as a duplicate of this bug. ***
Comment 7 Larry the Git Cow gentoo-dev 2021-02-05 05:03:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3e3ec977fcd5f0af63da5a46658aba98cd34a1a

commit d3e3ec977fcd5f0af63da5a46658aba98cd34a1a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-02-05 05:02:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-02-05 05:02:51 +0000

    media-libs/openal: bump to 1.21.1
    
    Bug: https://bugs.gentoo.org/739252
    Closes: https://bugs.gentoo.org/764056
    Closes: https://bugs.gentoo.org/738240
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/openal/Manifest             |  1 +
 media-libs/openal/openal-1.21.1.ebuild | 80 ++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)