Build the service in a container, and fix what the target compiler found

The openlgtv NDK is a Linux toolchain with no macOS or Windows build, so
tools/build.sh could not produce a binary anywhere else. docker-build.sh
bakes the SDK into an image and compiles there; packaging and deploy stay
on the host, where the TV is reachable. The SDK ships aarch64 as well as
x86_64, so the image picks the one matching the daemon and Apple Silicon
builds natively rather than under emulation.

Cross-compiling for real turned up three things the host compiler did
not:

  sink_hyperhdr_viz.c  read p->width and p->height to format the error
                       message after free(p)
  sink_hyperhdr.c      an SDP connection line of 128 bytes cannot hold
                       "IN IP4 " plus a 127-byte host plus "/255", so a
                       long hostname would silently lose its TTL suffix
  common/log.c         the log body was sized to the whole ring line,
                       leaving nothing for the prefix; budget for it so
                       the bound is provable rather than left to
                       snprintf

A clean cross-compile is now warning-free, and readelf confirms the
design rule holds: luna-service2, glib, PmLogLib and libc, with no
libpulse or libasound.

Also: @webosose/ares-cli was pinned to ^3.0.0, which does not exist
(latest is 2.4.0), so npm install failed outright. build.sh now puts
node_modules/.bin on PATH so a local install is enough.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Rene Kievits
2026-08-26 10:29:09 +02:00
co-authored by Claude Opus 5
parent 7529a60650
commit 3e4d0e17bc
11 changed files with 5692 additions and 14 deletions
+11 -3
View File
@@ -2,12 +2,20 @@
"name": "lgtv-audio-cap",
"version": "1.0.0",
"private": true,
"description": "Captures audio on an LG webOS 5/6 TV and streams it out — HyperHDR first, plus raw UDP, TCP and HTTP.",
"keywords": ["webos", "lgtv", "hyperhdr", "hyperion", "audio", "webosbrew"],
"description": "Captures audio on an LG webOS 5/6 TV and streams it out \u2014 HyperHDR first, plus raw UDP, TCP and HTTP.",
"keywords": [
"webos",
"lgtv",
"hyperhdr",
"hyperion",
"audio",
"webosbrew"
],
"license": "MIT",
"scripts": {
"build": "tools/build.sh",
"native": "tools/build.sh native",
"docker": "tools/docker-build.sh",
"stage": "tools/build.sh stage",
"package": "tools/build.sh package",
"deploy": "tools/build.sh install && tools/build.sh launch",
@@ -21,7 +29,7 @@
"serve": "python3 -m http.server 8000 --directory frontend"
},
"devDependencies": {
"@webosose/ares-cli": "^3.0.0",
"@webosose/ares-cli": "^2.4.0",
"jsdom": "^24.0.0"
}
}