Skip to content

Commit 5875bf6

Browse files
committed
Fix opencv check to 4.11, use onnxruntime 1.17.3 for trixie
1 parent 1cd87af commit 5875bf6

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

packaging/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ check_artifacts() {
5858

5959
if [[ "$use_debs" == "true" ]]; then
6060
# Check for DEB packages first
61-
if [ ! -f "$ARTIFACT_DIR/libopencv4.12_4.12.0-1_arm64.deb" ] && [ ! -f "$ARTIFACT_DIR/libopencv-dev_4.12.0-1_arm64.deb" ]; then
62-
if [ ! -f "$ARTIFACT_DIR/opencv-4.12.0-arm64.tar.gz" ]; then
61+
if [ ! -f "$ARTIFACT_DIR/libopencv4.11_4.11.0-1_arm64.deb" ] && [ ! -f "$ARTIFACT_DIR/libopencv-dev_4.11.0-1_arm64.deb" ]; then
62+
if [ ! -f "$ARTIFACT_DIR/opencv-4.11.0-arm64.tar.gz" ]; then
6363
missing+=("opencv")
6464
fi
6565
fi
@@ -83,7 +83,7 @@ check_artifacts() {
8383
fi
8484
else
8585
# Check for tar.gz packages
86-
if [ ! -f "$ARTIFACT_DIR/opencv-4.12.0-arm64.tar.gz" ]; then
86+
if [ ! -f "$ARTIFACT_DIR/opencv-4.11.0-arm64.tar.gz" ]; then
8787
missing+=("opencv")
8888
fi
8989
if [ ! -f "$ARTIFACT_DIR/activemq-cpp-3.9.5-arm64.tar.gz" ]; then
@@ -101,7 +101,7 @@ check_artifacts() {
101101
log_warn "Missing artifacts: ${missing[*]}"
102102
return 1
103103
else
104-
if [[ "$use_debs" == "true" ]] && [ -f "$ARTIFACT_DIR/libopencv4.12_4.12.0-1_arm64.deb" ]; then
104+
if [[ "$use_debs" == "true" ]] && [ -f "$ARTIFACT_DIR/libopencv4.11_4.11.0-1_arm64.deb" ]; then
105105
log_success "All DEB packages present"
106106
else
107107
log_success "All artifacts present"
@@ -498,7 +498,7 @@ build_dev() {
498498
if [[ -f "build/build.ninja" ]]; then
499499
if grep -q "/opt/opencv\|/opt/activemq" build/build.ninja 2>/dev/null; then
500500
# Check if DEB packages are installed (they use /usr/, not /opt/)
501-
if dpkg -l 2>/dev/null | grep -qE "^ii\s+(libopencv4\.12|libactivemq-cpp)\s"; then
501+
if dpkg -l 2>/dev/null | grep -qE "^ii\s+(libopencv4\.11|libactivemq-cpp)\s"; then
502502
log_warn "Detected build directory with /opt/ paths but DEB packages use /usr/"
503503
log_warn "This causes linker failures - cached paths are stale"
504504
log_info "Automatically cleaning build directory for compatibility..."

packaging/src/lib/pitrac-common-functions.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ extract_all_dependencies() {
534534

535535
# Check if packages were already installed from APT repository
536536
local has_apt_packages=false
537-
if dpkg -l | grep -qE "^ii\s+(libopencv4\.12|libactivemq-cpp)\s"; then
537+
if dpkg -l | grep -qE "^ii\s+(libopencv4\.11|libactivemq-cpp)\s"; then
538538
# Check if they came from our APT repo (not from local debs)
539539
if grep -q "pitrac" /etc/apt/sources.list.d/pitrac.list 2>/dev/null; then
540540
has_apt_packages=true
@@ -546,7 +546,7 @@ extract_all_dependencies() {
546546

547547
if [[ "$use_debs" == "true" ]]; then
548548
# Check if deb packages exist
549-
if [[ -f "$artifacts_dir/libopencv4.12_4.12.0-1_arm64.deb" ]]; then
549+
if [[ -f "$artifacts_dir/libopencv4.11_4.11.0-1_arm64.deb" ]]; then
550550
log_info "Using DEB packages for dependency installation..."
551551

552552
# Check if system lgpio is already installed
@@ -558,12 +558,12 @@ extract_all_dependencies() {
558558
# Skip lgpio if system version is installed
559559
install_deb_dependency "$artifacts_dir/liblgpio1_0.2.2-1_arm64.deb" "liblgpio1" "true"
560560
install_deb_dependency "$artifacts_dir/libactivemq-cpp_3.9.5-1_arm64.deb" "libactivemq-cpp"
561-
install_deb_dependency "$artifacts_dir/libopencv4.12_4.12.0-1_arm64.deb" "libopencv4.12"
561+
install_deb_dependency "$artifacts_dir/libopencv4.11_4.11.0-1_arm64.deb" "libopencv4.11"
562562
install_deb_dependency "$artifacts_dir/libonnxruntime1.17.3_1.17.3-xnnpack3_arm64.deb" "libonnxruntime1.17.3"
563563

564564
# Install development packages (these depend on runtime packages)
565565
install_deb_dependency "$artifacts_dir/libactivemq-cpp-dev_3.9.5-1_arm64.deb" "libactivemq-cpp-dev"
566-
install_deb_dependency "$artifacts_dir/libopencv-dev_4.12.0-1_arm64.deb" "libopencv-dev"
566+
install_deb_dependency "$artifacts_dir/libopencv-dev_4.11.0-1_arm64.deb" "libopencv-dev"
567567

568568
# msgpack is header-only, check if not already installed
569569
if ! dpkg -l | grep -qE "^ii\s+libmsgpack-cxx-dev"; then
@@ -573,7 +573,7 @@ extract_all_dependencies() {
573573
fi
574574

575575
log_success "All DEB packages installed"
576-
elif [[ -f "$artifacts_dir/opencv-4.12.0-arm64.tar.gz" ]]; then
576+
elif [[ -f "$artifacts_dir/opencv-4.11.0-arm64.tar.gz" ]]; then
577577
log_info "DEB packages not found, falling back to tar.gz extraction..."
578578
use_debs="false"
579579
else
@@ -585,7 +585,7 @@ extract_all_dependencies() {
585585
# Fallback to tar.gz extraction if DEBs not available or disabled
586586
if [[ "$use_debs" == "false" ]]; then
587587
log_info "Using tar.gz archives for dependency installation..."
588-
extract_dependency "$artifacts_dir/opencv-4.12.0-arm64.tar.gz" "opencv" "$dest_dir"
588+
extract_dependency "$artifacts_dir/opencv-4.11.0-arm64.tar.gz" "opencv" "$dest_dir"
589589
extract_dependency "$artifacts_dir/activemq-cpp-3.9.5-arm64.tar.gz" "activemq-cpp" "$dest_dir"
590590
extract_dependency "$artifacts_dir/lgpio-0.2.2-arm64.tar.gz" "lgpio" "$dest_dir"
591591
extract_dependency "$artifacts_dir/msgpack-cxx-6.1.1-arm64.tar.gz" "msgpack" "$dest_dir"
@@ -861,7 +861,7 @@ install_dependencies_from_apt() {
861861
"libmsgpack-cxx-dev"
862862
"libactivemq-cpp"
863863
"libactivemq-cpp-dev"
864-
"libopencv4.12"
864+
"libopencv4.11"
865865
"libopencv-dev"
866866
)
867867

0 commit comments

Comments
 (0)