Skip to content

Commit 1ce02dd

Browse files
committed
ci: create stub libimage_transcoder_shared.so for restool
The OpenHarmony SDK doesn't include libimage_transcoder_shared.so which is normally distributed as part of DevEco Studio. restool (resource compiler) tries to load it for CompileResource. Create a minimal stub .so and add ldd debug to understand restool dependencies.
1 parent baa0db3 commit 1ce02dd

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,31 @@ jobs:
570570
#endif
571571
AUBIO_CONFIG
572572
573+
# restool (resource compiler) expects libimage_transcoder_shared.so which is
574+
# part of DevEco Studio but not the public OpenHarmony SDK download.
575+
# Create a minimal stub .so so that restool can load it.
576+
- name: Create missing SDK shared libraries
577+
run: |
578+
SDK_HOME=~/ohos-sdk
579+
580+
echo "=== restool dependencies ==="
581+
ldd "$SDK_HOME/toolchains/restool" 2>&1 || true
582+
583+
echo "=== Testing restool directly ==="
584+
"$SDK_HOME/toolchains/restool" --version 2>&1 || true
585+
586+
# Build stub for any missing .so that restool needs
587+
for so_name in libimage_transcoder_shared.so; do
588+
if ! find "$SDK_HOME" -name "$so_name" -print -quit | grep -q .; then
589+
echo "Creating stub $so_name"
590+
echo 'void __stub_placeholder(void) {}' | gcc -shared -x c - -o "$SDK_HOME/toolchains/lib/$so_name"
591+
echo " Created at $SDK_HOME/toolchains/lib/$so_name"
592+
fi
593+
done
594+
595+
echo "=== toolchains/lib after stubs ==="
596+
ls -la "$SDK_HOME/toolchains/lib/"
597+
573598
- name: Build HAP
574599
run: |
575600
set -o pipefail

0 commit comments

Comments
 (0)