Skip to content

Add support for Linux (on 64-bit Intel/AMD)#677

Open
kring wants to merge 24 commits into
mainfrom
linux
Open

Add support for Linux (on 64-bit Intel/AMD)#677
kring wants to merge 24 commits into
mainfrom
linux

Conversation

@kring

@kring kring commented Apr 7, 2026

Copy link
Copy Markdown
Member

Copilot did the work but I checked it and it looks right to me. The CI build succeeds, but the tests fail (very quickly!) for unknown reasons. The next step is probably to try it on an actual Linux system and see what's going on.

@kring

kring commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

Oh I almost forgot about one other thing that needs to happen before this is merged. For maximum compatibility across Linux distributions, we should use a lowest common denominator build environment like Alma Linux 8 to produce our build. I think this may be as simple as adding container to the build.yml, but I haven't tried it:

    runs-on: ubuntu-latest
    container:
      image: almalinux:8

@j9liu j9liu linked an issue Apr 7, 2026 that may be closed by this pull request
@kring kring marked this pull request as ready for review April 27, 2026 22:20
@kring

kring commented Apr 27, 2026

Copy link
Copy Markdown
Member Author

This should be ready to merge now. The package builds, the tests run and pass, and the native code build happens in an Alma Linux 8 container for wide compatibility across Linux distributions.

@Canright-Jared-BoozAllen

Copy link
Copy Markdown

What are the odds this might make it into the June release of Cesium for Unity? It would solve a lot of CI/CD pipeline woes for us.

@j9liu j9liu requested a review from timoore May 19, 2026 15:20
@j9liu j9liu added this to the June 2026 Release milestone May 19, 2026
@j9liu j9liu removed this from the June 2026 Release milestone May 28, 2026
@j9liu

j9liu commented May 29, 2026

Copy link
Copy Markdown
Contributor

Sorry @Canright-Jared-BoozAllen, we wanted to get this into the upcoming release but couldn't find the bandwidth. We'll definitely target next month, though!

@j9liu j9liu added this to the July 2026 Release milestone May 29, 2026
@Canright-Jared-BoozAllen

Copy link
Copy Markdown

Sorry @Canright-Jared-BoozAllen, we wanted to get this into the upcoming release but couldn't find the bandwidth. We'll definitely target next month, though!

No worries; thank you for the update!

@j9liu j9liu removed this from the July 2026 Release milestone Jun 17, 2026
@Canright-Jared-BoozAllen

Copy link
Copy Markdown

Hello! Just wanted to re-up that Linux support would solve a major pain point for us. We don't have access to anything other than Ubuntu CI/CD runners, so the Cesium for Unity dependency in our project prevents automated builds and tests. Bringing this pull request into a Cesium for Unity release would be cause for our team to dance joyfully through the streets.

@j9liu j9liu added this to the August 2025 Release milestone Jul 1, 2026
@laurenfrederick

Copy link
Copy Markdown
Contributor

@Canright-Jared-BoozAllen Sorry for the delay. We are actively working on this for the August 1 release. Still hoping this incites joyful dancing.

@timoore

timoore commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Oh I almost forgot about one other thing that needs to happen before this is merged. For maximum compatibility across Linux distributions, we should use a lowest common denominator build environment like Alma Linux 8 to produce our build. I think this may be as simple as adding container to the build.yml, but I haven't tried it:

    runs-on: ubuntu-latest
    container:
      image: almalinux:8

Should we be doing this in Cesium for Unreal and Cesium Native too?

@@ -0,0 +1,7 @@
include("${CMAKE_CURRENT_LIST_DIR}/shared/common.cmake")

set(VCPKG_TARGET_ARCHITECTURE x64)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the defaults for Linux in vcpkg, so I'm assuming the reason for having a triplet is just to pass through CESIUM_VCPKG_RELEASE_ONLY? That might merit a comment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing that through will save CI time, yes. But I think overall the idea is that we have triplets for all of our target platforms, allowing us to precisely control how the shared library is built. The fact that we happen to match the x64-linux defaults is coincidence. I'm actually slightly surprised VCPKG_LIBRARY_LINKAGE=static by default on Linux; it's dynamic on Windows, where dynamic linking is usually more problematic.

@timoore timoore mentioned this pull request Jul 2, 2026
@kring

kring commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Should we be doing this in Cesium for Unreal and Cesium Native too?

Unreal supplies its own Alma 8 "cross-compiling" toolchain (even though it's Linux-to-Linux), which we use. So no benefit there. (or it's already effectively done, is another way of looking at it)

In Native, we never ship the built binaries, so no need there, either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Linux

5 participants