Patched ros-gz-vendors mismatched versions (jazzy)
I've only tested this on jazzy, but it might (and probably does) affect other versions.
Some of the gazebo vendors that are patched using patchAmentVendor throw this error when trying to build:
```
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: -j12 SHELL=/nix/store/q7sqwn7i6w2b67adw0bmix29pxg85x3w-bash-5.3p3/bin/bash
[ 12%] Creating directories for 'gz_common_vendor'
[ 25%] Performing download step for 'gz_common_vendor'
/nix/store/avpdmq8vygamkqvd7rrk7l016bk6s101-vcstool-0.3.0/lib/python3.13/site-packages/vcstool/commands/help.py:4: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for rem>
from pkg_resources import load_entry_point
=== ./gz_common_vendor (tar) ===
Downloaded tarball from 'file:///nix/store/irpi2cwj6yw6576kq8cplrg2z62bxchg-gz-common5_5.7.1.tar' and unpacked it
[ 37%] No update_disconnected step for 'gz_common_vendor'
[ 50%] No patch_disconnected step for 'gz_common_vendor'
[ 62%] Performing configure step for 'gz_common_vendor'
loading initial cache file /build/gz_common_vendor-release-release-jazzy-gz_common_vendor-0.0.9-1/build/gz_common_vendor-config.cmake
CMake Error: The source directory "/build/gz_common_vendor-release-release-jazzy-gz_common_vendor-0.0.9-1/build/gz_common_vendor-prefix/src/gz_common_vendor" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make[2]: *** [CMakeFiles/gz_common_vendor.dir/build.make:93: gz_common_vendor-prefix/src/gz_common_vendor-stamp/gz_common_vendor-configure] Error 1
```
After a bit of experimenting, I found that the vendor package was not searching for the patched package, but instead the original version. This only happens when the version attribute in `vendored-source.json` is changed from the version that the vendor package searches for. For example, the recent update changed the version of gz-common-vendor from 0.0.8 to 0.0.9. 0.0.8 searches for gz-common version 5.7.1, which is supplied in the `vendored-source.json`, but 0.0.9 searches for gz-common version 5.8.0, and is unable to find it, throwing the above error. So far, I've only found this issue in these (jazzy) packages:
- gz-physics-vendor (7.5.0 instead of 7.6.0)
- gz-rendering-vendor (8.2.2 instead of 8.2.3)
- gz-sim-vendor (8.9.0 instead of 8.10.0)
- gz-transport-vendor (13.4.1 instead of 13.5.0)
- gz-common-vendor (5.7.1 instead of 5.8.0)
Currently, my workaround is to patch the vendor package to change the version it searches for (as shown below), but there is probably a better way - maybe updating the `vendored-source.json` or setting the version to relaxed (I tried to do the latter, but I might have been doing it wrong as it didn't seem to work).
common-version.patch
```
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce2545f..2cca41f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,8 +4,8 @@ project(gz_common_vendor)
# Project-specific settings
set(LIB_VER_MAJOR 5)
-set(LIB_VER_MINOR 8)
-set(LIB_VER_PATCH 0)
+set(LIB_VER_MINOR 7)
+set(LIB_VER_PATCH 1)
set(LIB_VER_SUFFIX "")
# Derived variables
```
and in an overlay:
```
gz-common-vendor = rosPrev.gz-common-vendor.overrideAttrs (
{
patches ? [ ],
...
}:
{
patches = patches ++ [ ./patches/gz-vendors/common-version.patch ];
}
);
```
2 条评论