From 526d654f687df462ae19396778fd01bf7a26ad7a Mon Sep 17 00:00:00 2001 From: AngePierre Date: Thu, 10 Sep 2026 17:12:25 +0200 Subject: [PATCH] build_sdk: pin SDK v2.8.6 (recorder API) and stop double-nesting the build dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recorder uses ob::Error::getStatus(), present in v2.8.6 (the Nano) but not v2.4.3 (the version pre-placed on the Orin), so pin the version the recorder is written against. Also configure from $root/build with 'cmake ..' — the SDK's cmake makes its own linux_ output subdir, so creating one first put the libs at build/linux_aarch64/linux_arm64/lib where find_build could not see them. Co-Authored-By: Claude Opus 5 (1M context) --- scripts/build_sdk.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/build_sdk.sh b/scripts/build_sdk.sh index 1fb55e9..d98ecc5 100755 --- a/scripts/build_sdk.sh +++ b/scripts/build_sdk.sh @@ -26,7 +26,10 @@ repo=$(cd "$here/.." && pwd) eval "$("$here/detect_platform.sh")" SDK_REPO="${OB_SDK_REPO:-https://github.com/orbbec/OrbbecSDK_v2.git}" -SDK_REF="${OB_SDK_REF:-main}" +# Pinned to the version the recorder source is written against: v2.4.3 (which came +# pre-placed on the Orin) lacks ob::Error::getStatus() that the recorder uses. A +# caller can override for a platform that needs a different tag. +SDK_REF="${OB_SDK_REF:-v2.8.6}" find_build() { local root="$1" b @@ -100,11 +103,14 @@ inject_recorder "$root" cmake_k4a=() [[ -n "${K4A_WRAPPER_DIR:-}" ]] && cmake_k4a=(-DK4A_WRAPPER_DIR="$K4A_WRAPPER_DIR") -build="$root/build/linux_$(uname -m)" -mkdir -p "$build" +# Build in $root/build and configure from there (cmake ..): the SDK's own +# linux_config.cmake places its outputs in a build/linux_ subdir itself. +# Creating that subdir and configuring from inside it double-nests the outputs +# (build/linux_aarch64/linux_arm64/lib), where find_build cannot see them. +mkdir -p "$root/build" ( - cd "$build" - cmake ../.. -DCMAKE_BUILD_TYPE=Release -DOB_BUILD_EXAMPLES=ON "${cmake_k4a[@]}" >&2 + cd "$root/build" + cmake .. -DCMAKE_BUILD_TYPE=Release -DOB_BUILD_EXAMPLES=ON "${cmake_k4a[@]}" >&2 make -j"$(nproc)" >&2 )