Closed
Description
Description
Attempting to build a combined shaderc using sources/third_party/shaderc/Android.mk
fails with the following error:
[arm64-v8a] Combine: libshaderc_combined.a <= libglslang.a libOGLCompiler.a libOSDependent.a libshaderc.a libshaderc_util.a libSPIRV.a libHLSL.a libSPIRV-Tools.a libSPIRV-Tools-opt.a /bin/sh: line 1: [...]/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ar: No such file or directory make: *** [Android.mk:77: [...]/local/arm64-v8a/libshaderc_combined.a] Error 127
Binutils were removed from the NDK in r23 so someone just forgot to update the build script.
Fixing this is a two line change:
--- sources/third_party/shaderc/Android.mk.old 2021-12-18 15:31:11 +0100
+++ sources/third_party/shaderc/Android.mk 2021-12-18 15:31:14 +0100
@@ -52,8 +52,8 @@
$(1)/libshaderc_combined.a: $(addprefix $(1)/, $(ALL_LIBS)) $(1)/combine.ar
@echo "[$(TARGET_ARCH_ABI)] Combine: libshaderc_combined.a <= $(ALL_LIBS)"
- @cd $(1) && $(2)ar -M < combine.ar && cd $(ROOT_SHADERC_PATH)
- @$(2)objcopy --strip-debug $(1)/libshaderc_combined.a
+ @cd $(1) && llvm-ar -M < combine.ar && cd $(ROOT_SHADERC_PATH)
+ @llvm-objcopy --strip-debug $(1)/libshaderc_combined.a
$(NDK_APP_LIBS_OUT)/$(APP_STL)/$(TARGET_ARCH_ABI)/libshaderc.a: \
$(1)/libshaderc_combined.a
Environment Details
- NDK Version: 23.1.7779620
- Build system: ndk-build
- Host OS: Arch Linux x86_64
- ABI: (irrelevant)
- NDK API level: (irrelevant)
- Device API level: (irrelevant)