Cesium Prerequisites

Hello,
I’m trying to build a unity project with cesium for unity 1.2.0.
If i build it in my unity editor i have no problem.
But if i build it with this docker image: unityci/editor:2021.3.25f1-windows-mono-1.1 i
have the following error.

I believe there is any dependency issue in the editor docker image, which doesn’t allow tu build
the project with cesium.

Any hint on any particular prerequisites of cesium in an ubuntu bases docker image ?

2023-05-22 17:07:56 /additionalfile:“Library/Bee/artifacts/500b0aE.dag/CesiumRuntime.AdditionalFile.txt”
2023-05-22 17:07:56 ##### Custom Environment Variables
2023-05-22 17:07:56 DOTNET_MULTILEVEL_LOOKUP=0
2023-05-22 17:07:56 ##### ExitCode
2023-05-22 17:07:56 1
2023-05-22 17:07:56 ##### Output
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTile.cs(2,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumBingMapsRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumCreditSystem.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumFeature.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumGeoreference.cs(3,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumGlobeAnchor.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumIonRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumMetadata.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumTileExcluder.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumTileMapServiceRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumWebMapServiceRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumWgs84Ellipsoid.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/NativeDownloadHandler.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTile.cs(13,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTile.cs(13,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTile.cs(34,39): error CS8795: Partial method ‘Cesium3DTile.getBounds(IntPtr, double4x4)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(41,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(41,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(635,30): error CS8795: Partial method ‘Cesium3DTileset.SetShowCreditsOnScreen(bool)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(637,30): error CS8795: Partial method ‘Cesium3DTileset.Start()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(638,30): error CS8795: Partial method ‘Cesium3DTileset.Update()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(639,30): error CS8795: Partial method ‘Cesium3DTileset.OnValidate()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(641,30): error CS8795: Partial method ‘Cesium3DTileset.OnEnable()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(642,30): error CS8795: Partial method ‘Cesium3DTileset.OnDisable()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(648,29): error CS8795: Partial method ‘Cesium3DTileset.RecreateTileset()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(653,29): error CS8795: Partial method ‘Cesium3DTileset.FocusTileset()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumBingMapsRasterOverlay.cs(27,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumBingMapsRasterOverlay.cs(27,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumBingMapsRasterOverlay.cs(65,41): error CS8795: Partial method ‘CesiumBingMapsRasterOverlay.AddToTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumBingMapsRasterOverlay.cs(68,41): error CS8795: Partial method ‘CesiumBingMapsRasterOverlay.RemoveFromTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumCreditSystem.cs(93,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumCreditSystem.cs(93,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumCreditSystem.cs(176,30): error CS8795: Partial method ‘CesiumCreditSystem.UpdateCredits(bool)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs(15,41): error CS8795: Partial method ‘CesiumDebugColorizeTilesRasterOverlay.AddToTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs(17,41): error CS8795: Partial method ‘CesiumDebugColorizeTilesRasterOverlay.RemoveFromTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.



2023-05-22 17:07:56 AssetDatabase: script compilation time: 49.569640s
2023-05-22 17:07:56 Scripts have compiler errors.
2023-05-22 17:07:56
2023-05-22 17:07:56 Aborting batchmode due to failure:
2023-05-22 17:07:56 Scripts have compiler errors.
2023-05-22 17:07:56
2023-05-22 17:07:56 + case $? in
2023-05-22 17:07:56 + echo ‘An error occurred . Exit’
2023-05-22 17:07:56 + exit 1
2023-05-22 17:07:56 /home/bokken/build/output/unity/unity/External/baselib/builds/Include/C/Internal/Baselib_Semaphore_FutexBased.inl.h(151): Assertion failed (count >= 0) - Destruction is not allowed when there are still threads waiting on the semaphore.
2023-05-22 17:07:56 Caught fatal signal - signo:5 code:128 errno:0 addr:(nil)
2023-05-22 17:07:56 Obtained 12 stack frames.
2023-05-22 17:07:56 #0 0x0055838f3fb35c in RegisterRuntimeInitializeAndCleanup::ExecuteCleanup()
2023-05-22 17:07:56 #1 0x0055838f2588e0 in RuntimeCleanup()
2023-05-22 17:07:56 #2 0x005583907f5d3f in DoQuitEditorWithExitCode(int, bool)
2023-05-22 17:07:56 #3 0x0055838f3f2bc2 in CheckBatchModeErrorString(core::basic_string<char, core::StringStorageDefault > const&)
2023-05-22 17:07:56 #4 0x00558390bc0500 in RefreshInternalV2(AssetDatabase::UpdateAssetOptions, ScanFilter const&, InternalRefreshFlagsV2)
2023-05-22 17:07:56 #5 0x00558390b9a76b in StopAssetImportingV2Internal(AssetDatabase::UpdateAssetOptions, InternalRefreshFlagsV2, ScanFilter const*, char const*)
2023-05-22 17:07:56 #6 0x00558390b9cea9 in InitialRefreshV2(bool)
2023-05-22 17:07:56 #7 0x0055839074d6a7 in Application::InitializeProject()
2023-05-22 17:07:56 #8 0x005583907f74da in InitializeUnity(void*)
2023-05-22 17:07:56 #9 0x005583907f6b69 in main
2023-05-22 17:07:56 #10 0x007f88bd835c87 in __libc_start_main
2023-05-22 17:07:56 #11 0x0055838e9a3029 in _start
2023-05-22 17:07:56 Trace/breakpoint trap
2023-05-22 17:07:56 An error occurred . Exit

Cesium for Unity only includes binaries for Windows (Intel), macOS (both Intel and Apple), Android (Intel and ARM), and iOS. Only 64-bit platforms are supported, there is no support for any 32-bit platform.

If your Docker image isn’t one of the supported platforms, then that is the problem.

If you’re trying to build Cesium for Unity yourself from source rather than using the version that includes pre-built native code, you’ll need to follow the Developer Setup instructions.

I @Kevin_Ring, thank you for your reply.
I’m using Unity Package Manager to download Cesium for Unity.
I have the manifest.json with the following entry:

“com.cesium.unity”: “1.2.0”,

The docker image i’m using is unityci/editor:2021.3.25f1-windows-mono-1.1 which is based on Ubuntu, and the supported architecture is linux/amd64. So i think it should work, right ?

No, Linux is not a supported platform.

We’ve successfully compiled and run it on Linux, so it’s definitely possible. But we don’t include the necessary binaries out of the box yet. If you need to run on Linux, you currently need to compile the native code yourself by following the developer setup instructions, adapting them for Linux along the way:

Ok, i undestrand.
I’m trying to build from source.
If i have a build script which runs on a pipeline, once i have cesium binary, where i have to put inside my unity project?

Thank you in advance for your support.

I’m getting this error, when building Cesium for Unity on an ubuntu based docker image:

cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo
...
...
cmake --build build -j14 --target install --config RelWithDebInfo

/com.cesium.unity/native~/extern/cesium-native/CesiumGltf/src/FeatureTexturePropertyView.cpp:72:11: error: conversion to ‘std::__cxx11::basic_string::size_type {aka long unsigned int}’ from ‘const int32_t {aka const int}’ may change the sign of the result

What compiler are you using? Looking at line 72, that error doesn’t make much sense. And I just confirmed I can compile it successfully under Ubuntu on WSL2 with GCC 9.4.0.

Hi Keving,
i’ve retrying it with a “clean” environment.

This is my Dockerfile:

FROM ubuntu:18.04 AS cesium-builder

RUN apt-get update && apt-get install build-essential libssl-dev wget -y

RUN wget https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3.tar.gz

RUN tar -zxvf cmake-3.17.3.tar.gz

RUN cd cmake-3.17.3 && ./bootstrap && make && make install

RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh

RUN chmod +x ./dotnet-install.sh && ./dotnet-install.sh --version 7.0.302

RUN export PATH=$PATH:/root/.dotnet

RUN apt-get update && apt-get install git -y

RUN git clone --recurse-submodules https://github.com/CesiumGS/cesium-unity.git com.cesium.unity

RUN whoami

RUN ls -la /root/.dotnet

RUN export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 && cd com.cesium.unity && /root/.dotnet/dotnet publish Reinterop~ -o .
RUN cd com.cesium.unity/native~ && cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build -j14 --target install --config RelWithDebInfo

An this is the build output:

#0 117.6 [ 71%] Building CXX object extern/cesium-native/CesiumGltf/CMakeFiles/CesiumGltf.dir/src/Ktx2TranscodeTargets.cpp.o
#0 118.0 [ 71%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/OctreeAvailability.cpp.o
#0 118.2 [ 71%] Building CXX object extern/cesium-native/CesiumGltf/CMakeFiles/CesiumGltf.dir/src/MetadataFeatureTableView.cpp.o
#0 118.2 [ 72%] Building CXX object extern/cesium-native/CesiumGltf/CMakeFiles/CesiumGltf.dir/src/Model.cpp.o
#0 118.2 [ 72%] Building CXX object extern/cesium-native/CesiumGltf/CMakeFiles/CesiumGltf.dir/src/PropertyType.cpp.o
#0 118.7 [ 72%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/OctreeTilingScheme.cpp.o
#0 120.0 /com.cesium.unity/native~/extern/cesium-native/CesiumGltf/src/FeatureTexturePropertyView.cpp: In constructor ‘CesiumGltf::FeatureTexturePropertyView::FeatureTexturePropertyView(const CesiumGltf::Model&, const CesiumGltf::ClassProperty&, const CesiumGltf::TextureAccessor&)’:
#0 120.0 /com.cesium.unity/native~/extern/cesium-native/CesiumGltf/src/FeatureTexturePropertyView.cpp:72:11: error: conversion to ‘std::__cxx11::basic_string::size_type {aka long unsigned int}’ from ‘const int32_t {aka const int}’ may change the sign of the result [-Werror=sign-conversion]
#0 120.0 static_cast<size_t>(this->_pImage->channels) ||
#0 120.0 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 120.6 [ 72%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/OrientedBoundingBox.cpp.o
#0 120.7 [ 72%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/Plane.cpp.o
#0 121.4 [ 74%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/QuadtreeAvailability.cpp.o
#0 122.2 [ 74%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/QuadtreeRectangleAvailability.cpp.o
#0 122.3 cc1plus: all warnings being treated as errors
#0 122.3 extern/cesium-native/CesiumGltf/CMakeFiles/CesiumGltf.dir/build.make:108: recipe for target ‘extern/cesium-native/CesiumGltf/CMakeFiles/CesiumGltf.dir/src/FeatureTexturePropertyView.cpp.o’ failed
#0 122.3 make[2]: *** [extern/cesium-native/CesiumGltf/CMakeFiles/CesiumGltf.dir/src/FeatureTexturePropertyView.cpp.o] Error 1
#0 122.3 make[2]: *** Waiting for unfinished jobs…
#0 122.3 [ 74%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/QuadtreeTileID.cpp.o
#0 122.4 [ 74%] Linking CXX static library libCesiumJsonReader.a
#0 122.8 [ 74%] Built target CesiumJsonReader
#0 122.8 [ 74%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/QuadtreeTilingScheme.cpp.o
#0 122.8 [ 74%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/Ray.cpp.o
#0 122.8 [ 74%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/Rectangle.cpp.o
#0 122.9 [ 74%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/Transforms.cpp.o
#0 123.7 [ 74%] Building CXX object extern/cesium-native/CesiumGeometry/CMakeFiles/CesiumGeometry.dir/src/clipTriangleAtAxisAlignedThreshold.cpp.o
#0 125.4 [ 74%] Linking CXX static library libspdlog.a
#0 125.7 [ 74%] Built target spdlog
#0 127.8 [ 75%] Linking CXX static library libCesiumGeometry.a
#0 127.9 [ 75%] Built target CesiumGeometry
#0 128.0 Scanning dependencies of target CesiumGeospatial
#0 128.1 [ 75%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/BoundingRegionWithLooseFittingHeights.cpp.o
#0 128.1 [ 75%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/BoundingRegion.cpp.o
#0 128.1 [ 75%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/Ellipsoid.cpp.o
#0 128.1 [ 75%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/EllipsoidTangentPlane.cpp.o
#0 128.1 [ 75%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/GeographicProjection.cpp.o
#0 128.1 [ 75%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/GlobeRectangle.cpp.o
#0 128.1 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/GlobeAnchor.cpp.o
#0 128.1 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/CartographicPolygon.cpp.o
#0 128.1 [ 75%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/BoundingRegionBuilder.cpp.o
#0 129.2 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/GlobeTransforms.cpp.o
#0 130.1 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/HilbertOrder.cpp.o
#0 130.2 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/LocalHorizontalCoordinateSystem.cpp.o
#0 130.2 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/Projection.cpp.o
#0 130.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/S2CellBoundingVolume.cpp.o
#0 130.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/S2CellID.cpp.o
#0 131.1 [ 78%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/WebMercatorProjection.cpp.o
#0 133.3 [ 78%] Linking CXX static library libCesiumGeospatial.a
#0 133.4 [ 78%] Built target CesiumGeospatial
#0 135.6 [ 78%] Linking C static library libsqlite3.a
#0 135.8 CMakeFiles/Makefile2:4069: recipe for target ‘extern/cesium-native/CesiumGltf/CMakeFiles/CesiumGltf.dir/all’ failed
#0 135.8 make[1]: *** [extern/cesium-native/CesiumGltf/CMakeFiles/CesiumGltf.dir/all] Error 2
#0 135.8 make[1]: *** Waiting for unfinished jobs…
#0 135.8 [ 78%] Built target sqlite3
#0 137.3 [ 78%] Linking CXX static library libktx_read.a
#0 137.4 [ 78%] Built target ktx_read
#0 137.5 make: *** [all] Error 2
#0 137.5 Makefile:171: recipe for target ‘all’ failed

failed to solve: process “/bin/sh -c cd com.cesium.unity/native~ && cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build -j14
–target install --config RelWithDebInfo” did not complete successfully: exit code: 2

This is my gcc version:

#15 [virtualentity 12/15] RUN gcc --version
#15 0.286 gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

I have update gcc to 9.x version with:

RUN apt-get install software-properties-common -y

RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y

RUN apt-get update -y && apt-get install gcc-9 g+±9 -y && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g+±9

without success. I have this error while comipiling cesium:

#19 100.1 [ 75%] Linking CXX static library libCesiumGeometry.a
#19 100.2 [ 75%] Built target CesiumGeometry
#19 100.3 Scanning dependencies of target CesiumGeospatial
#19 100.4 [ 75%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/GeographicProjection.cpp.o
#19 100.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/GlobeAnchor.cpp.o
#19 100.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/BoundingRegionWithLooseFittingHeights.cpp.o
#19 100.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/BoundingRegion.cpp.o
#19 100.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/BoundingRegionBuilder.cpp.o
#19 100.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/EllipsoidTangentPlane.cpp.o
#19 100.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/CartographicPolygon.cpp.o
#19 100.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/Ellipsoid.cpp.o
#19 102.2 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/GlobeRectangle.cpp.o
#19 102.5 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/GlobeTransforms.cpp.o
#19 102.6 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/HilbertOrder.cpp.o
#19 102.7 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/Projection.cpp.o
#19 102.7 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/LocalHorizontalCoordinateSystem.cpp.o
#19 102.7 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/S2CellBoundingVolume.cpp.o
#19 103.4 [ 77%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/S2CellID.cpp.o
#19 103.4 [ 78%] Building CXX object extern/cesium-native/CesiumGeospatial/CMakeFiles/CesiumGeospatial.dir/src/WebMercatorProjection.cpp.o
#19 105.9 [ 78%] Built target draco_compression_mesh_dec
#19 106.0 Scanning dependencies of target draco_static
#19 106.0 [ 78%] Linking CXX static library libdraco.a
#19 106.6 [ 78%] Built target draco_static
#19 106.7 [ 78%] Linking CXX static library libCesiumGeospatial.a
#19 106.8 [ 78%] Built target CesiumGeospatial
#19 108.0 [ 78%] Linking C static library libsqlite3.a
#19 108.0 [ 78%] Built target sqlite3
#19 108.1 Scanning dependencies of target CesiumAsync
#19 108.1 [ 78%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/ResponseCacheControl.cpp.o
#19 108.1 [ 78%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/AsyncSystem.cpp.o
#19 108.1 [ 78%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/CachingAssetAccessor.cpp.o
#19 108.1 [ 78%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/GunzipAssetAccessor.cpp.o
#19 108.1 [ 78%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/TaskScheduler.cpp.o
#19 108.1 [ 78%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/ThreadPool.cpp.o
#19 108.1 [ 78%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/SqliteCache.cpp.o
#19 108.1 [ 80%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/QueuedScheduler.cpp.o
#19 108.1 [ 80%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/HttpHeaders.cpp.o
#19 108.1 [ 80%] Building CXX object extern/cesium-native/CesiumAsync/CMakeFiles/CesiumAsync.dir/src/InternalTimegm.cpp.o
#19 112.5 [ 80%] Linking CXX static library libCesiumGltf.a
#19 112.7 [ 80%] Built target CesiumGltf
#19 114.5 [ 80%] Linking CXX static library libCesiumAsync.a
#19 114.6 [ 80%] Built target CesiumAsync
#19 114.6 Scanning dependencies of target CesiumIonClient
#19 114.6 [ 80%] Building CXX object extern/cesium-native/CesiumIonClient/CMakeFiles/CesiumIonClient.dir/src/Connection.cpp.o
#19 114.6 [ 81%] Building CXX object extern/cesium-native/CesiumIonClient/CMakeFiles/CesiumIonClient.dir/src/Response.cpp.o
#19 114.6 [ 81%] Building CXX object extern/cesium-native/CesiumIonClient/CMakeFiles/CesiumIonClient.dir/src/parseLinkHeader.cpp.o
#19 121.0 [ 81%] Linking CXX static library libktx_read.a
#19 121.1 [ 81%] Built target ktx_read
#19 121.2 Scanning dependencies of target CesiumGltfReader
#19 121.2 [ 81%] Building CXX object extern/cesium-native/CesiumGltfReader/CMakeFiles/CesiumGltfReader.dir/generated/src/registerExtensions.cpp.o
#19 121.2 [ 81%] Building CXX object extern/cesium-native/CesiumGltfReader/CMakeFiles/CesiumGltfReader.dir/generated/src/GeneratedJsonHandlers.cpp.o
#19 121.2 [ 83%] Building CXX object extern/cesium-native/CesiumGltfReader/CMakeFiles/CesiumGltfReader.dir/src/decodeDataUrls.cpp.o
#19 121.2 [ 83%] Building CXX object extern/cesium-native/CesiumGltfReader/CMakeFiles/CesiumGltfReader.dir/src/decodeDraco.cpp.o
#19 121.2 [ 83%] Building CXX object extern/cesium-native/CesiumGltfReader/CMakeFiles/CesiumGltfReader.dir/src/ImageManipulation.cpp.o
#19 121.2 [ 83%] Building CXX object extern/cesium-native/CesiumGltfReader/CMakeFiles/CesiumGltfReader.dir/src/NamedObjectJsonHandler.cpp.o
#19 121.2 [ 83%] Building CXX object extern/cesium-native/CesiumGltfReader/CMakeFiles/CesiumGltfReader.dir/src/GltfReader.cpp.o
#19 138.2 [ 83%] Linking CXX static library libCesiumIonClient.a
#19 138.4 [ 83%] Built target CesiumIonClient
#19 138.4 Scanning dependencies of target CesiumForUnityNative-Editor
#19 138.4 [ 83%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/PluginMain.cpp.o
#19 138.4 [ 83%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir//Shared/src/UnityLoggerSink.cpp.o
#19 138.4 [ 83%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/IonTokenTroubleshootingWindowImpl.cpp.o
#19 138.4 [ 83%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/
/Shared/src/UnityTaskProcessor.cpp.o
#19 138.4 [ 83%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir//Shared/src/Cesium.cpp.o
#19 138.4 [ 83%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/CesiumEditorWindowImpl.cpp.o
#19 138.4 [ 83%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/IonAssetsTreeViewImpl.cpp.o
#19 138.4 [ 83%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/CesiumIonSessionImpl.cpp.o
#19 138.4 [ 84%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/SelectIonTokenWindowImpl.cpp.o
#19 138.4 [ 86%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/
/Shared/src/UnityAssetAccessor.cpp.o
#19 138.4 [ 86%] Building CXX object Editor/CMakeFiles/CesiumForUnityNative-Editor.dir//Shared/src/NativeDownloadHandlerImpl.cpp.o
#19 138.5 In file included from /com.cesium.unity/native~/Editor/src/IonTokenTroubleshootingWindowImpl.cpp:1:
#19 138.5 /com.cesium.unity/native~/Editor/src/IonTokenTroubleshootingWindowImpl.h:3:10: fatal error: DotNet/System/String.h: No such file or directory
#19 138.5 3 | #include <DotNet/System/String.h>
#19 138.5 | ^~~~~~~~~~~~~~~~~~~~~~~~
#19 138.5 compilation terminated.
#19 138.5 make[2]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/IonTokenTroubleshootingWindowImpl.cpp.o] Error 1
#19 138.5 make[2]: *** Waiting for unfinished jobs…
#19 138.5 Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/build.make:186: recipe for target ‘Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/IonTokenTroubleshootingWindowImpl.cpp.o’ failed
#19 138.5 In file included from /com.cesium.unity/native~/Editor/src/CesiumEditorWindowImpl.cpp:1:
#19 138.5 /com.cesium.unity/native~/Editor/src/CesiumEditorWindowImpl.h:3:10: fatal error: DotNet/CesiumForUnity/Cesium3DTileset.h: No such file or directory
#19 138.5 3 | #include <DotNet/CesiumForUnity/Cesium3DTileset.h>
#19 138.5 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#19 138.5 compilation terminated.
#19 138.5 Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/build.make:147: recipe for target ‘Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/CesiumEditorWindowImpl.cpp.o’ failed
#19 138.5 make[2]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/CesiumEditorWindowImpl.cpp.o] Error 1
#19 138.6 In file included from /com.cesium.unity/native~/Editor/src/IonAssetsTreeViewImpl.cpp:1:
#19 138.6 /com.cesium.unity/native~/Editor/src/IonAssetsTreeViewImpl.h:5:10: fatal error: DotNet/CesiumForUnity/IonAssetsColumn.h: No such file or directory
#19 138.6 5 | #include <DotNet/CesiumForUnity/IonAssetsColumn.h>
#19 138.6 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#19 138.6 /com.cesium.unity/native~/Shared/src/UnityTaskProcessor.cpp:3:10: fatal error: DotNet/System/Action.h: No such file or directory
#19 138.6 3 | #include <DotNet/System/Action.h>
#19 138.6 | ^~~~~~~~~~~~~~~~~~~~~~~~
#19 138.6 compilation terminated.
#19 138.6 compilation terminated.
#19 138.6 make[2]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/IonAssetsTreeViewImpl.cpp.o] Error 1
#19 138.6 Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/build.make:173: recipe for target ‘Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/IonAssetsTreeViewImpl.cpp.o’ failed
#19 138.6 Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/build.make:134: recipe for target 'Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/
/Shared/src/UnityTaskProcessor.cpp.o’ failed
#19 138.6 make[2]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir//Shared/src/UnityTaskProcessor.cpp.o] Error 1
#19 138.7 /com.cesium.unity/native~/Shared/src/UnityLoggerSink.cpp:3:10: fatal error: DotNet/System/Object.h: No such file or directory
#19 138.7 3 | #include <DotNet/System/Object.h>
#19 138.7 | ^~~~~~~~~~~~~~~~~~~~~~~~
#19 138.7 compilation terminated.
#19 138.7 make[2]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/
/Shared/src/UnityLoggerSink.cpp.o] Error 1
#19 138.7 Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/build.make:121: recipe for target 'Editor/CMakeFiles/CesiumForUnityNative-Editor.dir//Shared/src/UnityLoggerSink.cpp.o’ failed
#19 138.8 In file included from /com.cesium.unity/native~/Editor/src/SelectIonTokenWindowImpl.cpp:1:
#19 138.8 /com.cesium.unity/native~/Editor/src/SelectIonTokenWindowImpl.h:6:10: fatal error: DotNet/CesiumForUnity/IonTokenSource.h: No such file or directory
#19 138.8 6 | #include <DotNet/CesiumForUnity/IonTokenSource.h>
#19 138.8 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#19 138.8 compilation terminated.
#19 138.8 In file included from /com.cesium.unity/native~/Editor/src/CesiumIonSessionImpl.cpp:1:
#19 138.8 /com.cesium.unity/native~/Editor/src/CesiumIonSessionImpl.h:11:10: fatal error: DotNet/System/String.h: No such file or directory
#19 138.8 11 | #include <DotNet/System/String.h>
#19 138.8 | ^~~~~~~~~~~~~~~~~~~~~~~~
#19 138.8 compilation terminated.
#19 138.8 make[2]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/CesiumIonSessionImpl.cpp.o] Error 1
#19 138.8 Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/build.make:160: recipe for target ‘Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/CesiumIonSessionImpl.cpp.o’ failed
#19 138.8 make[2]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/SelectIonTokenWindowImpl.cpp.o] Error 1
#19 138.8 Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/build.make:212: recipe for target ‘Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/src/SelectIonTokenWindowImpl.cpp.o’ failed
#19 138.8 /com.cesium.unity/native~/Shared/src/UnityAssetAccessor.cpp:8:10: fatal error: DotNet/CesiumForUnity/Helpers.h: No such file or directory
#19 138.8 8 | #include <DotNet/CesiumForUnity/Helpers.h>
#19 138.8 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#19 138.8 compilation terminated.
#19 138.8 make[2]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/
/Shared/src/UnityAssetAccessor.cpp.o] Error 1
#19 138.8 Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/build.make:108: recipe for target ‘Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/__/Shared/src/UnityAssetAccessor.cpp.o’ failed
#19 139.6 CMakeFiles/Makefile2:4602: recipe for target ‘Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/all’ failed
#19 139.6 make[1]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/all] Error 2
#19 139.6 make[1]: *** Waiting for unfinished jobs…
#19 153.6 [ 86%] Linking CXX static library libCesiumGltfReader.a
#19 153.7 [ 86%] Built target CesiumGltfReader
#19 153.7 Makefile:171: recipe for target ‘all’ failed
#19 153.7 make: *** [all] Error 2
#19 ERROR: process “/bin/sh -c cd com.cesium.unity/native~ && cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build -j14 --target install --config RelWithDebInfo” did not complete successfully: exit code: 2

[virtualentity 16/16] RUN cd com.cesium.unity/native~ && cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build build -j14 --target install --config RelWithDebInfo:
#19 138.8 compilation terminated.
#19 138.8 make[2]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir//Shared/src/UnityAssetAccessor.cpp.o] Error 1
#19 138.8 Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/build.make:108: recipe for target 'Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/
/Shared/src/UnityAssetAccessor.cpp.o’ failed
#19 139.6 CMakeFiles/Makefile2:4602: recipe for target ‘Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/all’ failed
#19 139.6 make[1]: *** [Editor/CMakeFiles/CesiumForUnityNative-Editor.dir/all] Error 2
#19 139.6 make[1]: *** Waiting for unfinished jobs…
#19 153.6 [ 86%] Linking CXX static library libCesiumGltfReader.a
#19 153.7 [ 86%] Built target CesiumGltfReader
#19 153.7 Makefile:171: recipe for target ‘all’ failed
#19 153.7 make: *** [all] Error 2

@alessandro_mancini In the latest log you posted, it looks like it didn’t recognize any of the Reinterop headers. This leads me to think that the Reinterop files didn’t get generated.

Can you make sure that in the com.cesium.unity folder, you’ve generated Reinterop like so?

dotnet publish Reinterop~ -o .

Then, make sure that in native~/Runtime you see a generated-Editor folder. If this is missing, you need to manually prompt Unity to generate them. Make a trivial change in a script, e.g. just add a space or linebreak, to make Unity recompile all scripts. This should make the generated files appear.

Let us know if that doesn’t work.

Hi @janine thank you for your support.

I’ve tried to follow your advice.

RUN ls -la com.cesium.unity/native~/Runtime

RUN export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 && PATH=$PATH:/root/.dotnet && cd com.cesium.unity && dotnet publish Reinterop~ -o .

RUN ls -la com.cesium.unity/native~/Runtime

#18 [virtualentity 15/17] RUN ls -la com.cesium.unity/native~/Runtime
#18 0.206 total 32
#18 0.206 drwxr-xr-x 3 root root 4096 Jun 1 09:38 .
#18 0.206 drwxr-xr-x 7 root root 4096 Jun 1 09:38 …
#18 0.206 -rw-r–r-- 1 root root 1961 Jun 1 09:38 .clang-format
#18 0.206 -rw-r–r-- 1 root root 140 Jun 1 09:38 .editorconfig
#18 0.206 -rw-r–r-- 1 root root 47 Jun 1 09:38 .gitignore
#18 0.206 -rw-r–r-- 1 root root 1758 Jun 1 09:38 CMakeLists.txt
#18 0.206 -rw-r–r-- 1 root root 724 Jun 1 09:38 package.json
#18 0.206 drwxr-xr-x 2 root root 4096 Jun 1 09:38 src
#18 DONE 0.2s

#19 [virtualentity 16/17] RUN export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 && PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.dotnet && cd com.cesium.unity && dotnet publish Reinterop~ -o .
#19 0.519
#19 0.521 Welcome to .NET 7.0!
#19 0.521 ---------------------
#19 0.521 SDK Version: 7.0.302
#19 0.521
#19 0.521 Telemetry
#19 0.521 ---------
#19 0.521 The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to ‘1’ or ‘true’ using your favorite shell.
#19 0.521
#19 0.521 Read more about .NET CLI Tools telemetry: .NET SDK and .NET CLI telemetry - .NET CLI | Microsoft Learn
#19 0.521
#19 0.521 ----------------
#19 0.521 Installed an ASP.NET Core HTTPS development certificate.
#19 0.521 To trust the certificate run ‘dotnet dev-certs https --trust’ (Windows and macOS only).
#19 0.521 Learn about HTTPS: Enforce HTTPS in ASP.NET Core | Microsoft Learn
#19 0.521 ----------------
#19 0.521 Write your first app: .NET Tutorial | Hello World in 5 minutes
#19 0.522 Find out what’s new: What's new in .NET 6 | Microsoft Learn
#19 0.522 Explore documentation: .NET documentation | Microsoft Learn
#19 0.522 Report issues and find source on GitHub: GitHub - dotnet/core: Home repository for .NET Core
#19 0.522 Use ‘dotnet --help’ to see available commands or visit: .NET CLI | Microsoft Learn
#19 0.522 --------------------------------------------------------------------------------------
#19 0.843 MSBuild version 17.6.1+8ffc3fe3d for .NET
#19 1.029 Determining projects to restore…
#19 5.519 Restored /com.cesium.unity/Reinterop~/Reinterop.csproj (in 4.33 sec).
#19 6.709 Reinterop → /com.cesium.unity/Reinterop~/bin/Debug/netstandard2.0/Reinterop.dll
#19 6.728 Reinterop → /com.cesium.unity/
#19 DONE 6.8s

#20 [virtualentity 17/17] RUN ls -la com.cesium.unity/native~/Runtime
#20 0.355 total 32
#20 0.355 drwxr-xr-x 3 root root 4096 Jun 1 09:38 .
#20 0.355 drwxr-xr-x 7 root root 4096 Jun 1 09:38 …
#20 0.355 -rw-r–r-- 1 root root 1961 Jun 1 09:38 .clang-format
#20 0.355 -rw-r–r-- 1 root root 140 Jun 1 09:38 .editorconfig
#20 0.355 -rw-r–r-- 1 root root 47 Jun 1 09:38 .gitignore
#20 0.355 -rw-r–r-- 1 root root 1758 Jun 1 09:38 CMakeLists.txt
#20 0.355 -rw-r–r-- 1 root root 724 Jun 1 09:38 package.json
#20 0.355 drwxr-xr-x 2 root root 4096 Jun 1 09:38 src
#20 DONE 0.4s

I’m in trouble, because i have to compile Cesium in Linux, because we would like to run a unity build in bamboo pipeline with a Docker agent.
If i run the unity build it failed because cesium (from the unity package manager) does not support Linux.
So, what i have to do ?
Run, dotnet publish Reinterop~ -o ., run unity build, catch the failed, compile cesium from suorce and then again run unity build ?
I’m sorry for the silly questions, but i’m a newbie in the unity environment.

Thank you in advance,
Alessandro.

Yeah to echo what Janine said, your GCC9 build looks ok other than the generated code is missing.

To automate a build, you need to build reinterop, launch Unity and let it compile, and then build the native code. It may be helpful to look at the scripts our CI system uses to do this on other platforms:

Thank you Kevin, for your support.
I understand, what you mean.
But i’m in trouble, beacuase if i run

dotnet run --project Build~

i receive:

/root/.dotnet/dotnet run --project Build~

Unhandled exception. System.Exception: Could not find Unity!
at Build.Package.Run() in /com.cesium.unity/Build~/Package.cs:line 16
at Build.Program.Main(String args) in /com.cesium.unity/Build~/Program.cs:line 10

Indeed, in cesium-unity/Unity.cs at main · CesiumGS/cesium-unity · GitHub there is no the entry for a Linux based platform.
I could fork the project, and build my own release, but i don’t know if there is any other simple option to do it.

Thank you for your support.
Alessandro.

Right, Linux is not a supported platform. I linked the CI build script to demonstrate what needs to happen, but it doesn’t work on Linux yet. It’s probably not hard to fix, but you’ll definitely have to fix it. Or do the same steps a different way (by executing the steps Build~ executes, but not using it directly, for example).

Yep, i understand.
I’m running unity-editor -quit -batchmode -nographics -projectPath /test -executeMethod CesiumForUnity.BuildCesiumForUnity.CompileForEditorAndExit which is the command launched from Packages.cs
Now i have native~/Runtime/generated-Editor folder.
Now i’m rying to build from source… :crossed_fingers:

@Kevin_Ring it works!!
Now, if i would like to take the binary (i think it should be libCesiumForUnityNative-Editor.so and libCesiumForUnityNative-Runtime.so) and reused it with another project, where i could put these files in my Unity project ?

P.S. i think i will publish a Dockerfile to help anyone with my own issue.

I have another question.
If i have a developer which works with Windows or Mac, and has cesium for unity as a dependency in the manifest.json, and also i have a pipeline which run a Unity build from cli, on a Docker container linux based, how could i use cesium for unity works for the both the environments ?

Thank you in advance.
Alessandro Mancini.

Glad to hear you got it working!

You can take a look at our CI “Combine” scripts to see how we combine the builds for multiple platforms together into a single package.