Closed j9liu closed 4 months ago
To diagnose this, we need to see the log file mentioned in the error message.
Yep. I asked the user for more information before opening the issue. (Just wanted to do so before I forgot.)
They posted the full log here. It looks like this is the offending error:
make[2]: *** No rule to make target ‘extern/cesium-native/extern/draco/CMakeFiles/draco_compression_attributes_pred_schemes_enc.dir/4903a2f1d67bacb7cbad22462a10a95f/prediction_scheme_encoder_factory.cc.o’, needed by ‘extern/cesium-native/extern/draco/libdracod.a’. Stop.
I remember that mid-March, we updated the Draco library in https://github.com/CesiumGS/cesium-native/pull/829. This was probably incorporated into the April Cesium for Unity release.
Notice that same file is mentioned earlier in the log:
CMake Warning in extern/cesium-native/extern/draco/CMakeLists.txt:
The object file directory
E:/UnityProject/cesium-unity-samples-1.9.0/Packages/com.cesium.unity/native~/build-Android-arm64/extern/cesium-native/extern/draco/CMakeFiles/draco_compression_attributes_pred_schemes_enc.dir/
has 192 characters. The maximum full path to an object file is 250
characters (see CMAKE_OBJECT_PATH_MAX). Object file
4903a2f1d67bacb7cbad22462a10a95f/prediction_scheme_encoder_factory.cc.o
cannot be safely placed under this directory. The build may not work
correctly.
It's possible this user doesn't have long paths enabled. This is mentioned as a requirement in the prerequisites section of the developer setup instructions: https://github.com/CesiumGS/cesium-unity/blob/main/Documentation~/developer-setup.md
It's also possible that long paths are enabled, but the path is too long anyway (even when Windows has no path limit, some tools do). Moving the project to E:\a
or similar is a good way to exclude that possibility.
Turned out it was the long paths issue, thanks @kring !
Reported on the forum here.
User experiencing problems building for Android with the following circumstances:
Reportedly, this doesn't happen with v1.8.0. They've shared this callstack with us: