cesium-native
cesium-native copied to clipboard
Cannot download 3rdParty from vcpkg
When I was building cesium-native of the latest release, It always failed in one of those third-party dependencies. Last time it was draco and now it is ktx. It stops me from compiling cesium-native. When I used the old version, which download dependencies libs by git submodule, this didn't happen. I sincerely hope you to return the tradition way of adding third-party dependencies back to give us a choice, rather than only provide one way from ezvcpkg to download them!
@zhcnyuyang Would you be able to share a log of the compilation failure so we can help?
It's probably https://github.com/microsoft/vcpkg/issues/44695 - currently also fighting that
This issue can be fixed by https://github.com/microsoft/vcpkg/pull/44764 which hasn't been merged yet.
As a temporary workaround, you can manually apply the patch from the pull request. Just copy the modified port files from the PR's directory ports/ktx/* to cesium-native/extern/vcpkg/ports/ktx/.
By the way, you can set -DCMAKE_TOOLCHAIN_FILE=<path to your vcpkg.cmake> or -DCESIUM_USE_EZVCPKG=OFF to disable ezvcpkg.
This issue can be fixed by microsoft/vcpkg#44764 which hasn't been merged yet.
As a temporary workaround, you can manually apply the patch from the pull request. Just copy the modified port files from the PR's directory
ports/ktx/*tocesium-native/extern/vcpkg/ports/ktx/.By the way, you can set
-DCMAKE_TOOLCHAIN_FILE=<path to your vcpkg.cmake>or-DCESIUM_USE_EZVCPKG=OFFto disable ezvcpkg. 您好,我也是大陆的。老乡一场,幸会,幸会。 我是吉林的,现居北京,你是哪里人?
You can work around the smudge error by setting the GIT_LFS_SKIP_SMUDGE environment variable to 1. Why is this needed? I don't know.
@azrogers https://github.com/CesiumGS/cesium-native/pull/1089#issuecomment-2898133015
Cesium-Native depends on microsoft vcpkg to be working. However the existing [email protected] which microsoft's vcpkg uses is preventing cesium-native to compile.
We need Microsoft vcpkg to upgrade [email protected] to [email protected]
https://github.com/microsoft/vcpkg/blob/c622fe071c548755588e027251cde792c2d4471c/versions/baseline.json#L4219-L4222
The list of recommendations here are fragmented, different users struggle without a clear idea what could be a temporary fix while waiting for Microsoft vcpkg, which cesium native reference, to upgrade from non compiling due to [email protected] to [email protected]
[email protected] is already released. https://github.com/KhronosGroup/KTX-Software/releases/tag/v4.4.0
A temporary fix could be https://github.com/CesiumGS/cesium-native/pull/1089#issuecomment-2898133015 => but reference [email protected] to by pass dependency for Microsoft vcpkg to return to working condition
@GeorgeS2019 It looks like there's an open PR for KTX 4.4.0: https://github.com/microsoft/vcpkg/pull/44764
What issues are you encountering building with ktx on Windows? Most of the team here use Windows to develop Cesium Native and we aren't having issues with KTX. Is this just something you encounter when trying to work with 3D Tiles for Godot?
@azrogers
What do you think the problem here, it calls [email protected] because Cesium-Native links the official Microsoft vcpkg and I assume the cesium team here has switched to a branch of Microsoft vcpkg with [email protected] ?
That switch needs custom setup not officially available in the offcial cesium-native repos?
cc @Kyn21kx
https://github.com/Battle-Road-Labs/3D-Tiles-For-Godot/actions/runs/15151624335/job/42598670172#step:6:123
@GeorgeS2019 It looks like there's an open PR for KTX 4.4.0: microsoft/vcpkg#44764
What issues are you encountering building with ktx on Windows? Most of the team here use Windows to develop Cesium Native and we aren't having issues with KTX. Is this just something you encounter when trying to work with 3D Tiles for Godot?
I found that these compilation errors are actually caused by CMake 4.0. Some vcpkg ports relying on legacy policies may encounter failures when executing its cmake scripts. This can be workaround by downgrading cmake to 3.29 while waiting for vcpkg's official unified upgrade.
Btw both the KTX 4.4.0 (overlayed port) and 4.3.2 (official port) versions can be installed successfully after downgrading cmake.
@DCTewi
Are you saying that there is no need to upgrade to
[1] [email protected] and [2] https://github.com/CesiumGS/cesium-native/issues/1142#issuecomment-2852886863
All one needs to do is simply changing to cmake 3.29?
===> The instruction was clear. Avoid cmake 4.0
Prerequisites
- C++ 20
- CMake 3.1+ and less than 4.0 due to compatibility issues
- Python 3.8+ (with pip)
- SCons (
pip install scons) - Visual Studio 2022 with C++ desktop development workload (If you plan on contributing or developing)
- Git
- Godot 4.1+ (with GDExtension support)
- Windows 10/11 (64-bit)
What do you think the problem here, it calls [email protected] because Cesium-Native links the official Microsoft vcpkg and I assume the cesium team here has switched to a branch of Microsoft vcpkg with [email protected] ?
We have not. We are using the master branch of https://github.com/microsoft/vcpkg.git.
It seems to me like you are using an out of date clone of vcpkg. The URL in the current portfile in the master branch (which is KTX v4.3.2) is https://repo.msys2.org/msys/x86_64/util-linux-2.40.2-2-x86_64.pkg.tar.zst. It looks like whatever version of the portfile you have is trying to grab util-linux-2.35.2-2-x86_64.pkg.tar.zst instead. I would recommend grabbing the latest version of vcpkg and trying again.
I found that these compilation errors are actually caused by CMake 4.0. Some vcpkg ports relying on legacy policies may encounter failures when executing its cmake scripts. This can be workaround by downgrading cmake to 3.29 while waiting for vcpkg's official unified upgrade.
Btw both the KTX 4.4.0 (overlayed port) and 4.3.2 (official port) versions can be installed successfully after downgrading cmake.
This is something we have run into. Downgrading to CMake 3.31.7 is advised at the moment, though you might be able to get away with -DCMAKE_POLICY_VERSION_MINIMUM="3.5" on CMake 4. But I believe the error above is due to an outdated portfile and not a CMake compatibility issue.
The ktx issue for Godot windows build is resolved. The Godot Cesium github action is running fine now https://github.com/Battle-Road-Labs/3D-Tiles-For-Godot
This issue is fairly general in nature, so I can't definitively say it's resolved @GeorgeS2019. But as far as I am aware there is nothing that should prevent folks from building the latest version of cesium-native. It may be necessary on some systems to set the GIT_LFS_SKIP_SMUDGE environment variable.
It may also still be helpful to stick to the latest CMake 3.x version and avoid CMake 4.x.