MISSING_LIBS_EXTRACTOR: fixed

This commit is contained in:
XargonWan 2024-12-10 10:52:21 +09:00
parent 06034ee7fc
commit 0851624a8b
2 changed files with 4 additions and 4 deletions

View file

@ -2,13 +2,13 @@
# Search for missing libraries # Search for missing libraries
missing_libs=$(flatpak run --command=sh net.retrodeck.retrodeck -c \ missing_libs=$(flatpak run --command=sh net.retrodeck.retrodeck -c \
"find \${FLATPAK_DEST}/bin -type f -exec ldd {} + 2>/dev/null | grep 'not found' | awk '{print \$1}' | sort | uniq") "find /app/bin -type f -exec ldd {} + 2>/dev/null | grep 'not found' | awk '{print \$2}' | tr -d ':' | xargs -n 1 basename | sort | uniq | tr '\n' ' '")
# If there is any missing library it will be printed and the step will fail # If there is any missing library, it will be printed, and the step will fail
if [ -n "$missing_libs" ]; then if [ -n "$missing_libs" ]; then
echo "The following libraries are missing:" echo "The following libraries are missing:"
echo "$missing_libs" echo "$missing_libs"
exit 1 exit 1
else else
echo "TEST OK: No missing libraries are found" echo "TEST OK: No missing libraries are found"
fi fi

View file

@ -682,7 +682,7 @@ modules:
build-commands: build-commands:
- | - |
# Search for missing libraries in our libtmp folder # Search for missing libraries in our libtmp folder
missing_libs=$(find "${FLATPAK_DEST}/bin" -type f -exec ldd {} + 2>/dev/null | grep "not found" | awk '{print $1}' | sort | uniq) missing_libs=$("find /app/bin -type f -exec ldd {} + 2>/dev/null | grep 'not found' | awk '{print \$2}' | tr -d ':' | xargs -n 1 basename | sort | uniq | tr '\n' ' '")
# Manually specified libraries that are not automatically detected # Manually specified libraries that are not automatically detected
manually_imported="libpostproc.so.56 libswscale.so.6 libshaderc_shared.so.1 libbz2.so.1.0 libaio.so.1 ld-linux.so.2 libvpx.so.9 libzmusic.so.1 libicuuc.so.73 libLLVM.so.18.1" manually_imported="libpostproc.so.56 libswscale.so.6 libshaderc_shared.so.1 libbz2.so.1.0 libaio.so.1 ld-linux.so.2 libvpx.so.9 libzmusic.so.1 libicuuc.so.73 libLLVM.so.18.1"