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

Compile failure with latest cesium-native on Unreal/Android due to <numbers> #1587

Open
kring opened this issue Jan 17, 2025 · 1 comment · Fixed by CesiumGS/cesium-native#1069
Labels
bug Something isn't working urgent For high priority issues and bugs

Comments

@kring
Copy link
Member

kring commented Jan 17, 2025

In file included from D:/a/cesium-unreal/cesium-unreal/extern/cesium-native/CesiumGeometry/src/IntersectionTests.cpp:7:
D:/a/cesium-unreal/cesium-unreal/extern/cesium-native/CesiumUtility/include/CesiumUtility/Math.h:7:10: fatal error: 'numbers' file not found

#include <numbers>

         ^~~~~~~~~

1 error generated.

This header file was introduced to libc++ with Clang 11. See P0631R8 on this page:
https://libcxx.llvm.org/Status/Cxx20.html

With Unreal 5.3-5.5, we build with NDK r25b, which should be LLVM 14 or so. Yet it's missing the <numbers> header for mysterious reasons. I wasn't able to find much information about this. The closest I could find is this:
termux/termux-packages#13247

In any case, we need to either revert our use of <numbers> in cesium-native, or find some workaround for Unreal/Android builds.

@kring kring added bug Something isn't working urgent For high priority issues and bugs labels Jan 17, 2025
@kring
Copy link
Member Author

kring commented Jan 17, 2025

Even after the fix above, it still doesn't compile on Android due to the use of std::ranges in BatchTableToGltfStructuralMetadata.cpp. The NDK issue describing this problem is here:
android/ndk#1530

The good news is it has been largely addressed in NDK r26, but the bad news is even UE 5.5 is still on r25b, so it'll be ages before we're free of this problem.

@kring kring reopened this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent For high priority issues and bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant