Closed CesiumBen closed 3 years ago
@CesiumBen Can you try using the install
branch of cesium-unreal. Be sure to update submodules recursively using git submodule update --init --recursive
.
@CesiumBen maybe add C++17 in the project too. @kring mentions it here https://github.com/CesiumGS/cesium-unreal-demo/pull/13#discussion_r586032007. I haven't tried it though
Have tried a few things with no success. Attempting builds in between each change with no difference.
My hunch is it could be the NDK as well. going to keep digging
I cloned the latest version of cesium-unreal-demo
this morning, and we're now able to get past the build and deploy steps now, all the way to "Launch Complete" (with new problems at that point). Thanks, everyone.
I'm seeing some new errors now, screenshotted below. Does anyone have a guess as to what might be going on here?
It's strange that it's referencing a D:/
drive when my PC doesn't have one, but I figure that's probably the Quest.
EDIT: This might've actually been a step backward (e.g., it couldn't build the plugin, so it just bypassed it). I'll keep looking.
@shehzan10 pointed out that the problem is that cesium-native is built for Windows instead of Android. I'm working on trying to build it for Android.
I'm feeling my way in the dark with this. Thought I'd post my progress in case anyone can spot what I'm doing wrong.
Relevant docs:
Build was failing with this message:
...\cesium-native\cesium-native\CesiumGltf\src\Model.cpp:191:108: error: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'std::__ndk1::__wrap_iter<int *>::difference_type' (aka 'int') [-Werror,-Wshorten-64-to-32]
This is the line:
std::copy(pRhsDefaultScene->nodes.begin(), pRhsDefaultScene->nodes.end(), newScene.nodes.begin() + int64_t(originalNodeCount));
There are a number of similar errors with casting, and I don't fully understand them. For example, in QuantizedMeshContent.cpp
, there are four lines like this one:
std::partial_sort_copy(westEdgeIndices.begin(),
westEdgeIndices.end(),
sortEdgeIndices.begin(),
sortEdgeIndices.begin() + westVertexCount,
[&uvsAndHeights](auto lhs, auto rhs) { return uvsAndHeights[lhs].y < uvsAndHeights[rhs].y; });
westVertexCount
is a uint32_t
. When it's used in the operation above, it's implicitly being cast to an int
, and the compiler complains that the conversion changes its signedness.
If all I care about is getting this to compile, I can make those implicit casts explicit. Here are the spots where I did that:
Model.cpp
[191] std::copy(pRhsDefaultScene->nodes.begin(), pRhsDefaultScene->nodes.end(), newScene.nodes.begin() + (int)int64_t(originalNodeCount));
SqliteCache.cpp
[215] std::time_t expiryTime = (std::time_t)sqlite3_column_int64(this->_getEntryStmtWrapper.get(), 1);
decodeDraco.cpp
[51] gsl::span<const std::byte> data(buffer.cesium.data.data() + bufferView.byteOffset, (unsigned int)static_cast<uint64_t>(bufferView.byteLength));
Reader.cpp
[270] buffer.cesium.data = std::vector<std::byte>(binaryChunk.begin(), binaryChunk.begin() + (int)buffer.byteLength);
QuantizedMeshContent.cpp
[437-441] std::partial_sort_copy(westEdgeIndices.begin(),
westEdgeIndices.end(),
sortEdgeIndices.begin(),
sortEdgeIndices.begin() + (int)westVertexCount,
[&uvsAndHeights](auto lhs, auto rhs) { return uvsAndHeights[lhs].y < uvsAndHeights[rhs].y; });
[462-466] std::partial_sort_copy(southEdgeIndices.begin(),
southEdgeIndices.end(),
sortEdgeIndices.begin(),
sortEdgeIndices.begin() + (int)southVertexCount,
[&uvsAndHeights](auto lhs, auto rhs) { return uvsAndHeights[lhs].x > uvsAndHeights[rhs].x; });
[487-491] std::partial_sort_copy(eastEdgeIndices.begin(),
eastEdgeIndices.end(),
sortEdgeIndices.begin(),
sortEdgeIndices.begin() + (int)eastVertexCount,
[&uvsAndHeights](auto lhs, auto rhs) { return uvsAndHeights[lhs].y > uvsAndHeights[rhs].y; });
[512-516] std::partial_sort_copy(northEdgeIndices.begin(),
northEdgeIndices.end(),
sortEdgeIndices.begin(),
sortEdgeIndices.begin() + (int)northVertexCount,
[&uvsAndHeights](auto lhs, auto rhs) { return uvsAndHeights[lhs].x < uvsAndHeights[rhs].x; });
TestTilesetSelectionAlgorithm.cpp
[26] std::streamsize size = (int)file.tellg();
After that, I hit this problem:
C:/Users/mboydsurka/AppData/Local/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/filesystem:1084: error: undefined reference to 'std::__ndk1::__fs::filesystem::path::__root_directory() const'
That line 1084 is the return statement in this:
_LIBCPP_INLINE_VISIBILITY bool has_root_directory() const {
return !__root_directory().empty();
}
Some problem with the toolchain.
I think the "right" way of fixing the first warning would be
std::copy(pRhsDefaultScene->nodes.begin(), pRhsDefaultScene->nodes.end(), newScene.nodes.begin() + std::vector<int32_t>::difference_type(originalNodeCount));
but some C++ expert should confirm that.
Thank you, @javagl! That works and makes more sense.
Reference: Slide 44 onwards in https://www.slideshare.net/GerkeMaxPreussner/plugins-thirdparty-sdks-in-ue4
I am able to build the Cesium for Unreal Samples project for the Oculus Quest 2. I can build a .apk, or I can use Launch. Both compile without any errors, but it just shows up black for me inside the Quest. I thought maybe there was a lighting issue or a problem with the Cesium Sun/Sky, but I deleted the sky and put in directional lights, and then I put a glowing material on the earth's surface, and everything was still showing up black. I've only tried on the Quest 2, since that's my desired target.
@getinthedamnbox I was able to get around the error you posted above. By default Unreal doesn't actually package everything in your project as you might expect.
There are two things I would try to fix this:
Click the little down arrow next to the Launch button and check "Enable cooking on the fly". This will try to package all of the references into one package when you hit launch.
You can manually add folders for it to add to the build. First go to the content browser and click view options on the bottom right, and check Show Engine Content and Show Plugin Content. Then in your project settings, search for "additional" and there's an option called Additional Asset Directories to Cook. Click the plus sign twice, and add your CesiumSamples folder (under Content) and add the CesiumForUnreal folder.
Hopefully one or both of these works for you.
Another thing I would mention is that by default when Unreal builds an .apk, it tries to keep the file size down, and it accomplishes this by creating a separate .obb file that contains other data. You can package the .obb information into the .apk (if that's what you want to do) by searching for "package game" in your project settings and checking package game data inside .apk.
Link to the Cesium community forum post that brought me here
Hi @n-baja,
Thank you for the detailed documentation on packaging the APK for Android. This is very helpful for us.
I assume that you were able to compile cesium-native
with Android NDK then? Did you run into any issues compiling that? Any insights would help, thanks again.
Unfortunately this is outside my wheelhouse. It's possible that someone else on my team will be able to try this next month, assuming this hasn't been pushed further along by others by then.
I did some initial testing with Android support over the weekend - https://github.com/CesiumGS/cesium-unreal/tree/android-platform.
Here are my notes:
-TargetPlatform=Win64+Android -Platform=Win64
. However, this is not perfect - it works on my local computer, but as you can see in this travis log, it only tries to build Windows and not Android. I'm not sure if this is a result of the "portable" Unreal Engine we have running on Travis.
Building 6 actions with 32 processes...
[1/6] PCH.CesiumRuntime.h [armv7]
[2/6] PCH.CesiumRuntime.h [arm64]
[3/6] Module.CesiumRuntime.gen.cpp [armv7]
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h:5:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/ViewState.h:3:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/BoundingVolume.h:6:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumGeospatial/BoundingRegion.h:5:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumGeospatial/Ellipsoid.h(102,3): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
std::optional<Cartographic>
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h:5:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/ViewState.h:3:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/BoundingVolume.h:6:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumGeospatial/BoundingRegion.h:5:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumGeospatial/Ellipsoid.h(116,3): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
std::optional<glm::dvec3>
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h:5:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/ViewState.h:3:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/BoundingVolume.h:6:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumGeospatial/BoundingRegion.h:6:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumGeospatial/GlobeRectangle.h:3:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumGeometry/Rectangle.h(182,3): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
std::optional<Rectangle> intersect(const Rectangle& other) const noexcept;
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h:5:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/ViewState.h:3:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/BoundingVolume.h:6:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumGeospatial/BoundingRegion.h:6:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumGeospatial/GlobeRectangle.h(176,3): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
std::optional<GlobeRectangle>
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h:5:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/ViewState.h:3:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/BoundingVolume.h(22,14): error: no template named 'variant' in namespace 'std'
typedef std::variant<
~~~~~^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h:5:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/ViewState.h(76,9): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
const std::optional<CesiumGeospatial::Cartographic>&
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h:5:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/ViewState.h(164,13): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
const std::optional<CesiumGeospatial::Cartographic>&
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h:5:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/ViewState.h(175,9): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
const std::optional<CesiumGeospatial::Cartographic> _positionCartographic;
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h:9:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/CesiumRuntime/Public/CesiumGeoreferenceable.h(36,11): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
virtual std::optional<Cesium3DTiles::BoundingVolume>
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h(293,11): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
virtual std::optional<Cesium3DTiles::BoundingVolume>
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h(342,3): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
std::optional<UnrealCameraParameters> GetCamera() const;
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:2:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/Cesium3DTileset.gen.cpp:8:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/Cesium3DTileset.h(343,3): error: no template named 'optional' in namespace 'std'; did you mean 'TOptional'?
std::optional<UnrealCameraParameters> GetPlayerCamera() const;
^~~~~~~~~~~~~
TOptional
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Misc/Optional.h(16,8): note: 'TOptional' declared here
struct TOptional
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:4:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/CesiumBingMapsRasterOverlay.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/CesiumBingMapsRasterOverlay.h:5:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/CesiumRuntime/Public/CesiumRasterOverlay.h:5:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/RasterOverlay.h:4:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumAsync/IAssetAccessor.h:3:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumAsync/AsyncSystem.h(66,20): error: no template named 'invoke_result' in namespace 'std'; did you mean 'TInvokeResult'?
typename std::invoke_result<Func, T>::type,
^~~~~~~~~~~~~~~~~~
TInvokeResult
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Templates/Invoke.h(139,8): note: 'TInvokeResult' declared here
struct TInvokeResult : UE4Invoke_Private::TInvokeResult_Impl<void, FuncType, ArgTypes...>
^
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Development/CesiumRuntime/Module.CesiumRuntime.gen.cpp:4:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Intermediate/Build/Android/UE4/Inc/CesiumRuntime/CesiumBingMapsRasterOverlay.gen.cpp:8:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source\CesiumRuntime/Public/CesiumBingMapsRasterOverlay.h:5:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/CesiumRuntime/Public/CesiumRasterOverlay.h:5:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\Cesium3DTiles/RasterOverlay.h:4:
In file included from C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumAsync/IAssetAccessor.h:3:
C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/ThirdParty/include\CesiumAsync/AsyncSystem.h(68,24): error: no template named 'invoke_result' in namespace 'std'; did you mean 'TInvokeResult'?
typename std::invoke_result<Func, T>::type>::type>::value,
^~~~~~~~~~~~~~~~~~
TInvokeResult
C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Core/Public\Templates/Invoke.h(139,8): note: 'TInvokeResult' declared here
struct TInvokeResult : UE4Invoke_Private::TInvokeResult_Impl<void, FuncType, ArgTypes...>
I don't think I'll be able to test this more for a while. But if there are any volunteers who want to look into this, go ahead.
Branch: https://github.com/CesiumGS/cesium-unreal/tree/android-platform
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ld.lld: error: undefined symbol: genTangSpaceDefault
...
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ld.lld: error: undefined symbol: stderr
...
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ld.lld: error: undefined symbol: stdout
...
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ld.lld: error: undefined symbol: __gnu_strerror_r
Full log:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Running: C:\Program Files\Epic Games\UE_4.26\Engine\Binaries\DotNET\UnrealBuildTool.exe CesiumForUnrealSamples Android Shipping -Project=C:\Users\smohammed\workspace\cesium-unreal-samples\CesiumForUnrealSamples.uproject C:\Users\smohammed\workspace\cesium-unreal-samples\CesiumForUnrealSamples.uproject -N
oUBTMakefiles -remoteini="C:\Users\smohammed\workspace\cesium-unreal-samples" -skipdeploy -Manifest=C:\Users\smohammed\workspace\cesium-unreal-samples\Intermediate\Build\Manifest.xml -NoHotReload -log="C:\Users\smohammed\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UBT-CesiumForUnrealSamples-Android-Shipping.txt"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Using 'git status' to determine working set for adaptive non-unity build (C:\Users\smohammed\workspace\cesium-unreal-samples).
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): PLATFORM_ANDROID_NDK_VERSION = 210500
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): NDK toolchain: r21e, NDK version: 21, GccVersion: 4.9, ClangVersion: 9.0.9
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Parsing headers for CesiumForUnrealSamples
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Running UnrealHeaderTool "C:\Users\smohammed\workspace\cesium-unreal-samples\CesiumForUnrealSamples.uproject" "C:\Users\smohammed\workspace\cesium-unreal-samples\Intermediate\Build\Android\CesiumForUnrealSamples\Shipping\CesiumForUnrealSamples.uhtmanifest" -LogCmds="loginit warning, logexit warning, l
ogdatabase error" -Unattended -WarningsAsErrors -abslog="C:\Users\smohammed\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UHT-CesiumForUnrealSamples-Android-Shipping.txt" -installed
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Reflection code generated for CesiumForUnrealSamples in 3.055182 seconds
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Compiling Native 64-bit code with NDK API 'android-21'
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Writing manifest to C:\Users\smohammed\workspace\cesium-unreal-samples\Intermediate\Build\Manifest.xml
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Building CesiumForUnrealSamples...
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [Upgrade]
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [Upgrade] bLegacyPublicIncludePaths = false => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [Upgrade] ShadowVariableWarningLevel = WarningLevel.Error => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [Upgrade] PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs => Set in build.cs files to enables IWYU-style PCH model. See https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/IWYU/index.html. (Previously: PCHUsageMode.UseSharedPCHs).
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [Upgrade] Suppress this message by setting 'DefaultBuildSettings = BuildSettingsVersion.V2;' in CesiumForUnrealSamples.Target.cs, and explicitly overriding settings that differ from the new defaults.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [Upgrade]
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Building 4 actions with 32 processes...
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [1/4] SharedPCH.Core.h [arm64]
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [2/4] CesiumForUnrealSamples.cpp [arm64]
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): [3/4] CesiumForUnrealSamples-Android-Shipping-arm64.so
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ld.lld: error: undefined symbol: genTangSpaceDefault
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by CesiumGltfComponent.cpp:237 (C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/CesiumRuntime/Private\CesiumGltfComponent.cpp:237)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Android/UE4/Shipping/CesiumRuntime/Module.CesiumRuntime.cppa8.o:(void loadPrimitive<std::__ndk1::vector<unsigned int, std::__ndk1::allocator<unsigned int> > >(std::__ndk1::vector<LoadMod
elResult, std::__ndk1::allocator<LoadModelResult> >&, CesiumGltf::Model const&, CesiumGltf::Mesh const&, CesiumGltf::MeshPrimitive const&, glm::mat<4, 4, double, (glm::qualifier)0> const&, IPhysXCooking*, CesiumGltf::Accessor const&, CesiumGltf::AccessorView<FVector> const&, std::__ndk1::vector<unsigned int, std::__ndk1::allocator<unsigned int> > const&))
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by CesiumGltfComponent.cpp:237 (C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/CesiumRuntime/Private\CesiumGltfComponent.cpp:237)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Android/UE4/Shipping/CesiumRuntime/Module.CesiumRuntime.cppa8.o:(void loadPrimitive<std::__ndk1::vector<unsigned int, std::__ndk1::allocator<unsigned int> > >(std::__ndk1::vector<LoadMod
elResult, std::__ndk1::allocator<LoadModelResult> >&, CesiumGltf::Model const&, CesiumGltf::Mesh const&, CesiumGltf::MeshPrimitive const&, glm::mat<4, 4, double, (glm::qualifier)0> const&, IPhysXCooking*, CesiumGltf::Accessor const&, CesiumGltf::AccessorView<FVector> const&, std::__ndk1::vector<unsigned int, std::__ndk1::allocator<unsigned int> > const&))
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by CesiumGltfComponent.cpp:237 (C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/CesiumRuntime/Private\CesiumGltfComponent.cpp:237)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Android/UE4/Shipping/CesiumRuntime/Module.CesiumRuntime.cppa8.o:(void loadPrimitive<CesiumGltf::AccessorView<unsigned short> >(std::__ndk1::vector<LoadModelResult, std::__ndk1::allocator
<LoadModelResult> >&, CesiumGltf::Model const&, CesiumGltf::Mesh const&, CesiumGltf::MeshPrimitive const&, glm::mat<4, 4, double, (glm::qualifier)0> const&, IPhysXCooking*, CesiumGltf::Accessor const&, CesiumGltf::AccessorView<FVector> const&, CesiumGltf::AccessorView<unsigned short> const&))
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by CesiumGltfComponent.cpp:237 (C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/CesiumRuntime/Private\CesiumGltfComponent.cpp:237)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Android/UE4/Shipping/CesiumRuntime/Module.CesiumRuntime.cppa8.o:(void loadPrimitive<CesiumGltf::AccessorView<unsigned short> >(std::__ndk1::vector<LoadModelResult, std::__ndk1::allocator
<LoadModelResult> >&, CesiumGltf::Model const&, CesiumGltf::Mesh const&, CesiumGltf::MeshPrimitive const&, glm::mat<4, 4, double, (glm::qualifier)0> const&, IPhysXCooking*, CesiumGltf::Accessor const&, CesiumGltf::AccessorView<FVector> const&, CesiumGltf::AccessorView<unsigned short> const&))
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by CesiumGltfComponent.cpp:237 (C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/CesiumRuntime/Private\CesiumGltfComponent.cpp:237)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Android/UE4/Shipping/CesiumRuntime/Module.CesiumRuntime.cppa8.o:(void loadPrimitive<CesiumGltf::AccessorView<unsigned int> >(std::__ndk1::vector<LoadModelResult, std::__ndk1::allocator<L
oadModelResult> >&, CesiumGltf::Model const&, CesiumGltf::Mesh const&, CesiumGltf::MeshPrimitive const&, glm::mat<4, 4, double, (glm::qualifier)0> const&, IPhysXCooking*, CesiumGltf::Accessor const&, CesiumGltf::AccessorView<FVector> const&, CesiumGltf::AccessorView<unsigned int> const&))
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by CesiumGltfComponent.cpp:237 (C:/Users/smohammed/workspace/PackagesAndroid/CesiumForUnreal/HostProject/Plugins/CesiumForUnreal/Source/CesiumRuntime/Private\CesiumGltfComponent.cpp:237)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Android/UE4/Shipping/CesiumRuntime/Module.CesiumRuntime.cppa8.o:(void loadPrimitive<CesiumGltf::AccessorView<unsigned int> >(std::__ndk1::vector<LoadModelResult, std::__ndk1::allocator<L
oadModelResult> >&, CesiumGltf::Model const&, CesiumGltf::Mesh const&, CesiumGltf::MeshPrimitive const&, glm::mat<4, 4, double, (glm::qualifier)0> const&, IPhysXCooking*, CesiumGltf::Accessor const&, CesiumGltf::AccessorView<FVector> const&, CesiumGltf::AccessorView<unsigned int> const&))
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)):
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ld.lld: error: undefined symbol: stderr
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by kd_tree_attributes_decoder.cc
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> kd_tree_attributes_decoder.cc.o:(bool draco::FloatPointsTreeDecoder::DecodePointCloud<draco::PointAttributeVectorOutputIterator<float> >(draco::DecoderBuffer*, draco::PointAttributeVectorOutputIterator<float>&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplac
e/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libdraco.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by kd_tree_attributes_decoder.cc
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> kd_tree_attributes_decoder.cc.o:(bool draco::FloatPointsTreeDecoder::DecodePointCloud<draco::PointAttributeVectorOutputIterator<float> >(draco::DecoderBuffer*, draco::PointAttributeVectorOutputIterator<float>&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplac
e/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libdraco.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by kd_tree_attributes_decoder.cc
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> kd_tree_attributes_decoder.cc.o:(bool draco::FloatPointsTreeDecoder::DecodePointCloud<draco::PointAttributeVectorOutputIterator<float> >(draco::DecoderBuffer*, draco::PointAttributeVectorOutputIterator<float>&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplac
e/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libdraco.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by kd_tree_attributes_decoder.cc
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> kd_tree_attributes_decoder.cc.o:(bool draco::FloatPointsTreeDecoder::DecodePointCloud<draco::PointAttributeVectorOutputIterator<float> >(draco::DecoderBuffer*, draco::PointAttributeVectorOutputIterator<float>&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplac
e/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libdraco.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by spdlog.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> spdlog.cpp.o:(spdlog::logger::err_handler_(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlo
g.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by spdlog.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> spdlog.cpp.o:(spdlog::logger::err_handler_(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlo
g.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_mutex>::ansicolor_stderr_sink(spdlog::color_mode)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_mutex>::ansicolor_stderr_sink(spdlog::color_mode)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>::ansicolor_stderr_sink(spdlog::color_mode)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>::ansicolor_stderr_sink(spdlog::color_mode)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced 14 more times
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)):
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ld.lld: error: undefined symbol: stdout
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>::ansicolor_stdout_sink(spdlog::color_mode)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>::ansicolor_stdout_sink(spdlog::color_mode)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_nullmutex>::ansicolor_stdout_sink(spdlog::color_mode)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_nullmutex>::ansicolor_stdout_sink(spdlog::color_mode)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(std::__ndk1::shared_ptr<spdlog::logger> spdlog::synchronous_factory::create<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>, spdlog::color_mode&>(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, sp
dlog::color_mode&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(std::__ndk1::shared_ptr<spdlog::logger> spdlog::synchronous_factory::create<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>, spdlog::color_mode&>(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, sp
dlog::color_mode&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(std::__ndk1::shared_ptr<spdlog::logger> spdlog::synchronous_factory::create<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_nullmutex>, spdlog::color_mode&>(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >
, spdlog::color_mode&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(std::__ndk1::shared_ptr<spdlog::logger> spdlog::synchronous_factory::create<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_nullmutex>, spdlog::color_mode&>(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >
, spdlog::color_mode&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(std::__ndk1::shared_ptr<spdlog::async_logger> spdlog::async_factory_impl<(spdlog::async_overflow_policy)0>::create<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>, spdlog::color_mode&>(std::__ndk1::basic_string<char, std::__ndk1::char_traits<ch
ar>, std::__ndk1::allocator<char> >, spdlog::color_mode&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by color_sinks.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> color_sinks.cpp.o:(std::__ndk1::shared_ptr<spdlog::async_logger> spdlog::async_factory_impl<(spdlog::async_overflow_policy)0>::create<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>, spdlog::color_mode&>(std::__ndk1::basic_string<char, std::__ndk1::char_traits<ch
ar>, std::__ndk1::allocator<char> >, spdlog::color_mode&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced 6 more times
PackagingResults: Error: undefined symbol: genTangSpaceDefault
PackagingResults: Error: undefined symbol: stderr
PackagingResults: Error: undefined symbol: stdout
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)):
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ld.lld: error: undefined symbol: __gnu_strerror_r
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by fmt.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> fmt.cpp.o:(fmt::v7::detail::safe_strerror(int, char*&, unsigned long)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by fmt.cpp
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> fmt.cpp.o:(fmt::v7::format_system_error(fmt::v7::detail::buffer<char>&, int, fmt::v7::basic_string_view<char>)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplace/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64\libspdlog.a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): clang++: error: linker command failed with exit code 1 (use -v to see invocation)
PackagingResults: Error: undefined symbol: __gnu_strerror_r
PackagingResults: Error: linker command failed with exit code 1 (use -v to see invocation)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Took 14.1143846s to run UnrealBuildTool.exe, ExitCode=6
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): UnrealBuildTool failed. See log for more details. (C:\Users\smohammed\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UBT-CesiumForUnrealSamples-Android-Shipping.txt)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): BUILD FAILED
PackagingResults: Error: Unknown Error
Here is the packaged version of the plugin for Android and Win64. To get around GitHub issues 10mb size limit, I had to break the zip file into 10M chunks. You can use 7zip to extract them. Don't forget to remove the .txt
extension after downloading.
CesiumForUnreal-Win64-Android.zip.001.txt CesiumForUnreal-Win64-Android.zip.002.txt CesiumForUnreal-Win64-Android.zip.003.txt CesiumForUnreal-Win64-Android.zip.004.txt CesiumForUnreal-Win64-Android.zip.005.txt CesiumForUnreal-Win64-Android.zip.006.txt
I also tried adding ADD_DEFINITIONS(-D__ANDROID__)
in the android toolchain file as well as PublicDefinitions.AddRange
in the Build.cs files, so that it would explicitly set the Android flags in spdlog (https://github.com/gabime/spdlog/search?q=android), but that still runs into the same issue. Not sure if I missed any spots. Did not push this update to GitHub. Diff below.
diff --git a/CesiumForUnreal.uplugin b/CesiumForUnreal.uplugin
index d394b7b..0fa6176 100644
--- a/CesiumForUnreal.uplugin
+++ b/CesiumForUnreal.uplugin
@@ -15,6 +15,7 @@
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
+ "SupportedTargetPlatforms": [ "Win64", "Mac", "Linux", "Android" ],
"Modules": [
{
"Name": "CesiumRuntime",
diff --git a/Source/CesiumEditor/CesiumEditor.Build.cs b/Source/CesiumEditor/CesiumEditor.Build.cs
index 905e47c..45d1da1 100644
--- a/Source/CesiumEditor/CesiumEditor.Build.cs
+++ b/Source/CesiumEditor/CesiumEditor.Build.cs
@@ -42,6 +42,12 @@ public class CesiumEditor : ModuleRules
platform = "Android-xaarch64";
libPostfix = ".a";
libPrefix = "lib";
+ PublicDefinitions.AddRange(
+ new string[]
+ {
+ "__ANDROID__"
+ }
+ );
}
else if(Target.Platform == UnrealTargetPlatform.Linux) {
platform = "Linux-x64";
diff --git a/Source/CesiumRuntime/CesiumRuntime.Build.cs b/Source/CesiumRuntime/CesiumRuntime.Build.cs
index 1e680a7..f333b54 100644
--- a/Source/CesiumRuntime/CesiumRuntime.Build.cs
+++ b/Source/CesiumRuntime/CesiumRuntime.Build.cs
@@ -1,4 +1,5 @@
// Copyright 2020-2021 CesiumGS, Inc. and Contributors
+// Copyright 2020-2021 CesiumGS, Inc. and Contributors
using UnrealBuildTool;
using System;
@@ -42,6 +43,12 @@ public class CesiumRuntime : ModuleRules
platform = "Android-xaarch64";
libPostfix = ".a";
libPrefix = "lib";
+ PublicDefinitions.AddRange(
+ new string[]
+ {
+ "__ANDROID__"
+ }
+ );
}
else if(Target.Platform == UnrealTargetPlatform.Linux) {
platform = "Linux-x64";
diff --git a/extern/unreal-android-toolchain.cmake b/extern/unreal-android-toolchain.cmake
index f50918e..c1263df 100644
--- a/extern/unreal-android-toolchain.cmake
+++ b/extern/unreal-android-toolchain.cmake
@@ -13,3 +13,4 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
SET(HTTPLIB_USE_OPENSSL_IF_AVAILABLE OFF)
+ADD_DEFINITIONS(-D__ANDROID__)
@shehzan10 for spdlog, can you try to replace this line with something like
pLogger->sinks() = { std::make_shared<spd::sinks::android_sink_mt>() };
That will replace our unreal sink with spdlog's android sink
I think it should not be necessary to replace the SpdlogUnrealLoggerSink
: This is an implementation of the spdlog sink
that forwards the log messages to UE_LOG
(wherever this ends up on Android - it's a hyper-complex macro, but will be available on Android in one form or the other). I.e. the purpose of this sink is exactly to not forward to stdout
or stderr
.
A wild guess would be that spdlog
tries to create its default sink under the hood, when the "default logger" is initialized, and this sink (i.e. one of the color_sinks
) assumes stdout
/stderr
. But... I'd (naively) assume that it should not do this when __ANDROID__
is defined....
(In the worst case, we might not use the spdlog::default_logger()
and have to replace it with spdlog::android_logger_mt(...)
, but that's hard to imagine...)
Some of the messages seem to stem from draco, though:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ld.lld: error: undefined symbol: stderr
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> referenced by kd_tree_attributes_decoder.cc
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): >>> kd_tree_attributes_decoder.cc.o:(bool draco::FloatPointsTreeDecoder::DecodePointCloud<draco::PointAttributeVectorOutputIterator<float> >(draco::DecoderBuffer*, draco::PointAttributeVectorOutputIterator<float>&)) in archive C:/Program Files/Epic Games/UE_4.26/Engine/Plugins/Marketplac
From a quick glance at this file, draco uses an own log macro that forwards to printf
by default, but seems to forward to Android when #ifdef ANDROID_LOGGING
.
Big 👍 to everything Marco said.
Opened #443 as a draft PR for anyone else to try it out.
Looks like MikkTSpace is not available for Android. According to our UDN thread for compiling on android: (don't forget to click "Show more answers")
It isn't used for mobile and therefore wasn't built for Android. You cannot use the Linux arm libraries on Android.
Since this is CMake-based it wouldn't be hard to compile libraries for Android and add a target check for Android to the Build.cs to set the proper lib path. Android toolchain expects you to list all the architecture directories and it will filter out the ones not needed for each architecture target.
else if (Target.Platform = UnrealTargetPlatform.Android) { PublicAdditionalLibraries.Add(Path.Combine(MikkTSpacePath, "lib/Android/armeabi-v7a/libMikkTSpace.a")); PublicAdditionalLibraries.Add(Path.Combine(MikkTSpacePath, "lib/Android/arm64/libMikkTSpace.a")); PublicAdditionalLibraries.Add(Path.Combine(MikkTSpacePath, "lib/Android/x86/libMikkTSpace.a")); PublicAdditionalLibraries.Add(Path.Combine(MikkTSpacePath, "lib/Android/x86_64/libMikkTSpace.a")); }
I don't think we want to use custom builds. AFAICT UE only ships MikkTSpace header and not the C/C++ file, so we can't compile using their either. So our possible options are:
CC @kring
Use MikkTSpace as a dependency that we compile ourselves - possibly in Cesium Native.
I think this one is sensible. Right now Cesium for Unreal generates normals and tangents for glTFs that don't have them already. But I think it would make a lot of sense for cesium-native to do that instead. There should be flags in TilesetContentOptions
requesting normals and tangents, because not all rendering engines will need them.
@kring Agree with that. I think we should make that change separate from this PR, and merge that into this.
Use MikkTSpace as a dependency that we compile ourselves
I wonder whether this might lead to similar trouble as the current "duplicate sqlite" libraries...? (Maybe it's possible to more strictly separate the toolchains for Android<->NonAndroid cases, or this is a C++ library that can be wrapped into another namespace or so... but I'm wondering...)
It very well might, Marco. Especially since UE seems to have customized their version slightly again (ugh). I'm nearly at the moment where I can find out for sure, though.
I just wanted to mention this, in case no one has run into this yet. In Unreal, you can change the render settings to emulate your Android settings.
When I do this, it crashes for me and gives me this error:
Aside from potential problems getting this ont to the Marketplace (#472) and the fact that the UE SunSky doesn't work on Android and we potentially need a replacement (#495), this is complete. Closing.
@kring This is marked as done, however I cannot get it to compile. Does this meaning of done, mean the Android version works? I have tried the version in the comments posted as text links and the Branch, and neither will successfully package for Android. Am I misunderstanding something? Thanks!
@Aeromix builds from main should work (including package) on Android. But you must use UE 4.26.2, earlier releases won't be able to package. And that's why the release of Cesium for Unreal on the Epic Marketplace doesn't support Android yet. We're working on that.
@kring Ahhh, perfect! I am using 4.26.1, time to upgrade! Thank you!
@kring Okay, so I downloaded and compiled a fresh 4.26.2 and dropped in the "android-ndk-21b" branch into EngineDir/Plugins/Marketplace. and I recieve these errors on building:
Am I missing a step?
@Aeromix the contents of the git repo are not ready to be installed into the Engine/Plugins/Marketplace directory. The plugin needs to be built and packaged first to be installed as an engine plugin. Our CI system does that automatically. Click the green tick at the top of any branch, then download the "plugin-package-combined":
I recommend you use the main
branch, not android-ndk-21b
. So the download link as of this writing is:
https://builds-cesium-unreal.s3.amazonaws.com/CesiumForUnreal-v1.4.0-21-g8f33758.zip?AWSAccessKeyId=AKIARTC57YNRHBJ2GKGG&Signature=Y4mDSCjd%2FF6A2IpKEfQg%2F4P4s4I%3D&Expires=1941077784
I'd also recommend using Epic's official 4.26.2 build rather than compiling your own, if possible. At least until you confirm that works, because I don't know what additional problems a custom build might cause.
@kring, this worked perfectly, thank you so much! :)
I have been trying to use this plugin for oculus quest, but facing some issues with that. I have been able to test this on a mobile phone, If i enable vulkan it just crashes when the application starts, but if i use it with open gl , then it does not crash, but everything is black? any one has tried to do it for VR.
I have been trying to use this plugin for oculus quest, but facing some issues with that. I have been able to test this on a mobile phone, If i enable vulkan it just crashes when the application starts, but if i use it with open gl , then it does not crash, but everything is black? any one has tried to do it for VR.
I used Vulkan. Try Vulkan only, disable ES3.1, make sure HDR is off, Instanced Stereo and Multi-View/Mobile Multi-View is on. It works on Vulkan, can confirm
okay thanks. I am using source engine though, I hope that does not make any difference. and did you do it for VR ?
okay thanks. I am using source engine though, I hope that does not make any difference.
Same: 4.26.2 off GitHub, from 2 days ago
okay thanks. I am using source engine though, I hope that does not make any difference.
Same: 4.26.2 off GitHub, from 2 days ago
and for VR ?
okay thanks. I am using source engine though, I hope that does not make any difference.
Same: 4.26.2 off GitHub, from 2 days ago
and for VR ?
Yes, Quest 2, and tbh be prepared, the performance is not the best, it's alriiiiiiight, but it def wouldn't pass for Oculus release guidelines
okay thanks. I am using source engine though, I hope that does not make any difference.
Same: 4.26.2 off GitHub, from 2 days ago
and for VR ?
Yes, Quest 2, and tbh be prepared, the performance is not the best, it's alriiiiiiight, but it def wouldn't pass for Oculus release guidelines
yeah... well i am not surprised though. Thanks for the help
We’re having a build issue with cesium for unreal. The build fails with these issues:
Each issue mentioned that is not found (and could we potentially mean TOptional). I think that this might be a c++ version error when exporting to a separate platform than windows, (we’re exporting for Android ASTC). We read that before c++ 17 was experimental so you would reference it as <experimental/optional>, so high chances that the issue might be the version of C++ we’re targeting. We’re having a hard time finding any solutions but might be a no-brainer.
If anyone could shed some light on this that would be awesome. @kring @baothientran @nithinp7 @dzungpng @getinthedamnbox