Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Possibly bug] Failed to compile on GCC 8.3.0 #987

Closed
runlevel5 opened this issue Apr 8, 2024 · 5 comments
Closed

[Possibly bug] Failed to compile on GCC 8.3.0 #987

runlevel5 opened this issue Apr 8, 2024 · 5 comments

Comments

@runlevel5
Copy link
Contributor

runlevel5 commented Apr 8, 2024

OS: Debian 8.3.0
GCC: gcc (Debian 8.3.0-6) 8.3.0
OpenAL source code: master branch at commit 9ecf3d0

Compile option:

set(LIBTYPE STATIC)
option(FORCE_STATIC_VCRT "" ON)
option(ALSOFT_UTILS "" OFF)
option(ALSOFT_EXAMPLES "" OFF)
option(ALSOFT_UPDATE_BUILD_VERSION "" OFF)
option(ALSOFT_INSTALL "" OFF)
option(ALSOFT_INSTALL_CONFIG "" OFF)
option(ALSOFT_INSTALL_HRTF_DATA "" OFF)
option(ALSOFT_INSTALL_AMBDEC_PRESETS "" OFF)
option(ALSOFT_INSTALL_EXAMPLES "" OFF)
option(ALSOFT_INSTALL_UTILS "" OFF)

I ran into following errors:

[ 42%] Building C object extern/curl/lib/CMakeFiles/libcurl_static.dir/request.c.o

In file included from /__w/Q2RTX/Q2RTX/extern/openal-soft/common/ringbuffer.h:12,
                 from /__w/Q2RTX/Q2RTX/extern/openal-soft/common/ringbuffer.cpp:23:
/__w/Q2RTX/Q2RTX/extern/openal-soft/common/flexarray.h: In instantiation of 'struct al::FlexArrayStorage<std::byte, 16, true>':
/__w/Q2RTX/Q2RTX/extern/openal-soft/common/flexarray.h:78:51:   required from 'struct al::FlexArray<std::byte, 16>'
/__w/Q2RTX/Q2RTX/extern/openal-soft/common/ringbuffer.h:36:34:   required from here
/__w/Q2RTX/Q2RTX/extern/openal-soft/common/flexarray.h:20:59: error: requested alignment is not an integer constant
 struct alignas(std::max(alignment, alignof(al::span<T>))) FlexArrayStorage : al::span<T> {
                                                           ^~~~~~~~~~~~~~~~
[ 42%] Building C object extern/curl/lib/CMakeFiles/libcurl_static.dir/rtsp.c.o
[ 42%] Building C object extern/curl/lib/CMakeFiles/libcurl_static.dir/select.c.o
cc1plus: warning: unrecognized command line option '-Wno-interference-size'
cc1plus: warning: unrecognized command line option '-Wno-c++20-attribute-extensions'
make[2]: *** [extern/openal-soft/CMakeFiles/OpenAL.dir/build.make:178: extern/openal-soft/CMakeFiles/OpenAL.dir/common/ringbuffer.cpp.o] Error 1
@runlevel5 runlevel5 changed the title [Possibly bug] Failed to compile on Ubuntu 22.04 [Possibly bug] Failed to compile on GCC 8.3.0 Apr 8, 2024
@runlevel5
Copy link
Contributor Author

I reckon it might be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94929

@runlevel5
Copy link
Contributor Author

As you might have known, there are many games ported to the SteamOS which currently uses GCC 8.3.0 for its v2 runtime pack. Therefore IMHO it would be great if openal-soft could be backward-compatible with GCC 8. I am more than happy to contribute workaround patches.

@kcat
Copy link
Owner

kcat commented Apr 8, 2024

That bug report suggests it was fixed in GCC 8. I guess SteamOS can't update to a fixed version of 8?

Though if the issue is with using std::max in alignas specifically, it shouldn't be too much of a problem to work around. If other fixes are needed, I'd be fine with accepting them as long as they're not too invasive.

@runlevel5
Copy link
Contributor Author

That bug report suggests it was fixed in GCC 8. I guess SteamOS can't update to a fixed version of 8?

The SteamOS v2 SDK uses Debian Jessie of which GCC is still on 8.3.0. I don't think I could convince Debian to bump GCC on that old version.

Though if the issue is with using std::max in alignas specifically, it shouldn't be too much of a problem to work around. If other fixes are needed, I'd be fine with accepting them as long as they're not too invasive.

I will make a new Pull Request

@runlevel5
Copy link
Contributor Author

On second thought I think devs should move to the SteamOS RT v3 instead, I am not a big fan of introducing extra codes to handle edge cases of legacy compilers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants