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

minetest 5.8.0 src/client/sound/sound_data.cpp missing #include <algorithm> #14738

Closed
olivia-may opened this issue Jun 8, 2024 · 3 comments
Closed
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors Possible close Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible

Comments

@olivia-may
Copy link

olivia-may commented Jun 8, 2024

Minetest version

Minetest version 5.8.0 (Linux)
Tag 5.8.0
(Minetest won't compile)

Irrlicht device

X11

Operating system and version

Artix (Most recent version / Rolling release)
gcc (GCC) 14.1.1 20240522

CPU model

No response

GPU model

No response

Active renderer

No response

Summary

The file src/client/sound/sound_data.cpp uses C++ std library functions std::lower_bound and std::upper_bound, but because <algorithm> is not included, the compiler throws errors saying these functions are not defined. I noticed, in 5.9.0-dev, this is fixed. Can this be fixed in 5.8.0? I was able to fix this and run minetest as usual after adding #include <algorithm> to the file. Minetest 5.8.0 otherwise will not compile on my system.
Here is the git diff:

diff --git a/src/client/sound/sound_data.cpp b/src/client/sound/sound_data.cpp
index f0cbc6dbf..d2d626e2c 100644
--- a/src/client/sound/sound_data.cpp
+++ b/src/client/sound/sound_data.cpp
@@ -25,6 +25,7 @@ with this program; ifnot, write to the Free Software Foundation, Inc.,
 #include "sound_data.h"
 
 #include "sound_constants.h"
+#include <algorithm>
 
 namespace sound {

Steps to reproduce

Compile minetest 5.8.0 and wait for it to get to src/client/sound/sound_data.cpp.

@olivia-may olivia-may added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Jun 8, 2024
@olivia-may
Copy link
Author

I found the commit that fixes this
c9ab61a
Maybe a new tag could be made? 5.8.2? This commit was created on the same month as 5.8.0's release, so I don't think it would be that hard.

@olivia-may
Copy link
Author

I checked, minetest 5.8.1-android also has this bug.

@wsor4035 wsor4035 added @ Build CMake, build scripts, official builds, compiler and linker errors Possible close labels Jun 8, 2024
@appgurueu
Copy link
Contributor

Closing this since the 5.9.0 feature freeze has begun: This will be fixed in the 5.9.0 release. There is little point in a 5.8.2 when 5.9.0 is around the corner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Build CMake, build scripts, official builds, compiler and linker errors Possible close Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible
Projects
None yet
Development

No branches or pull requests

3 participants