build_sdk: pin SDK v2.8.6 (recorder API) and stop double-nesting the build dir
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_<arch> 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) <noreply@anthropic.com>
This commit is contained in:
1 parent
0ba428b27c
commit
526d654f68
1 file changed
+11
-5
+11
-5
@@ -26,7 +26,10 @@ repo=$(cd "$here/.." && pwd)
|
|||||||
eval "$("$here/detect_platform.sh")"
|
eval "$("$here/detect_platform.sh")"
|
||||||
|
|
||||||
SDK_REPO="${OB_SDK_REPO:-https://github.com/orbbec/OrbbecSDK_v2.git}"
|
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() {
|
find_build() {
|
||||||
local root="$1" b
|
local root="$1" b
|
||||||
@@ -100,11 +103,14 @@ inject_recorder "$root"
|
|||||||
cmake_k4a=()
|
cmake_k4a=()
|
||||||
[[ -n "${K4A_WRAPPER_DIR:-}" ]] && cmake_k4a=(-DK4A_WRAPPER_DIR="$K4A_WRAPPER_DIR")
|
[[ -n "${K4A_WRAPPER_DIR:-}" ]] && cmake_k4a=(-DK4A_WRAPPER_DIR="$K4A_WRAPPER_DIR")
|
||||||
|
|
||||||
build="$root/build/linux_$(uname -m)"
|
# Build in $root/build and configure from there (cmake ..): the SDK's own
|
||||||
mkdir -p "$build"
|
# linux_config.cmake places its outputs in a build/linux_<arch> 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"
|
cd "$root/build"
|
||||||
cmake ../.. -DCMAKE_BUILD_TYPE=Release -DOB_BUILD_EXAMPLES=ON "${cmake_k4a[@]}" >&2
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DOB_BUILD_EXAMPLES=ON "${cmake_k4a[@]}" >&2
|
||||||
make -j"$(nproc)" >&2
|
make -j"$(nproc)" >&2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user