-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
collision with new glibc identifier #5203
Comments
Having the same issue while building filament on Manjaro with |
One workaround is to rename the constant (used only in one file) to something else, like index 98073c489..d8bc32f82 100644
--- a/libs/image/src/ImageSampler.cpp
+++ b/libs/image/src/ImageSampler.cpp
@@ -38,7 +38,7 @@ struct FilterFunction {
bool rejectExternalSamples = true;
};
-constexpr float M_PIf = float(filament::math::F_PI);
+constexpr float M_PI_f = float(filament::math::F_PI);
const FilterFunction Box {
.fn = [](float t) { return t <= 0.5f ? 1.0f : 0.0f; },
@@ -50,7 +50,7 @@ const FilterFunction Nearest { Box.fn, 0.0f };
const FilterFunction Gaussian {
.fn = [](float t) {
if (t >= 2.0) return 0.0f;
- const float scale = 1.0f / std::sqrt(0.5f * M_PIf);
+ const float scale = 1.0f / std::sqrt(0.5f * M_PI_f);
return std::exp(-2.0f * t * t) * scale;
},
.boundingRadius = 2
@@ -86,7 +86,7 @@ const FilterFunction Mitchell {
// Not bothering with a fast approximation since we cache results for each row.
float sinc(float t) {
if (t <= 0.00001f) return 1.0f;
- return std::sin(M_PIf * t) / (M_PIf * t);
+ return std::sin(M_PI_f * t) / (M_PI_f * t);
} |
Okay, that works for the immediate need. Thanks. |
This was referenced Dec 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To reproduce, compile with glibc 2.35+.
References
https://sourceware.org/pipermail/libc-alpha/2022-February/136040.html
Desktop
Linux
*edit: Closing as these should be caught by CI
The text was updated successfully, but these errors were encountered: