[HTC 10 ROMs, Kernels, Recoveries, & Other Developm] andybones:
I still can't get a ROM compile. Cleaned everything up, and Lineage14, Lineage 16 build, just getting stuck at this point in both Lineage17 and crDroidAndriodQ

So after I get hit with this:

[ 66% 66344/99083] target C: audio.primary.msm8996 <= hardware/qcom-caf/msm8996
FAILED: out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o
/bin/bash -c "PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang	-I external/tinyalsa/include -I external/tinycompress/include -I system/media/audio_utils/include -I external/expat/lib -I system/media/audio_route/include -I system/media/audio_effects/include -I hardware/qcom-caf/msm8996/audio/hal/msm8974 -I hardware/qcom-caf/msm8996/audio/hal/audio_extn -I hardware/qcom-caf/msm8996/audio/hal/voice_extn -I hardware/qcom-caf/msm8996/audio/hal -I out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates -I out/target/product/pme/gen/SHARED_LIBRARIES/audio.primary.msm8996_intermediates -I libnativehelper/include_jni \$(cat out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem out/target/product/pme/obj/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -faddrsig -Wimplicit-fallthrough -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-zero-as-null-pointer-constant -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -march=armv8-a -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -std=gnu99 -DPLATFORM_MSM8996 -Wno-macro-redefined -DUSE_VENDOR_EXTN -DUSE_LL_AS_PRIMARY_OUTPUT -DPCM_OFFLOAD_ENABLED -DANC_HEADSET_ENABLED -DFLUENCE_ENABLED -DAFE_PROXY_ENABLED -DHFP_ENABLED -DMULTI_VOICE_SESSION_ENABLED -DCOMPRESS_VOIP_ENABLED -DAUDIO_EXTN_FORMATS_ENABLED -DHW_VARIANTS_ENABLED -DALAC_OFFLOAD_ENABLED -DCOMPRESS_METADATA_NEEDED -DPCM_OFFLOAD_ENABLED_24 -DDEV_ARBI_ENABLED -DDOLBY_ACDB_LICENSE -D_GNU_SOURCE -Wall -Werror -DSND_MONITOR_ENABLED -DANDROID_PLATFORM_SDK_VERSION=29 -fPIC -D_USING_LIBCXX -DANDROID_STRICT -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-tautological-unsigned-enum-zero-compare -Wno-tautological-unsigned-zero-compare -Wno-c++98-compat-extra-semi -Wno-return-std-move-in-c++11 -MD -MF out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.d -o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o hardware/qcom-caf/msm8996/audio/hal/audio_hw.c"
hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:4747:17: error: implicit declaration of function 'compress_set_next_track_param' is invalid in C99 [-Werror,-Wimplicit-function-declaration]compress_set_next_track_param(out->compr, &(out->compr_config.codec->options)); ^1 error generated.

I go and edit the hardware/

qcom-caf

/msm8996/audio/hal/audio_hw.c

and edit this code:

if (is_offload_usecase(out->usecase)) {
ALOGVV("copl(%p): writing buffer (%zu bytes) to compress device", out, bytes);
if (out->send_new_metadata) {
ALOGD("copl(%p):send new gapless metadata", out);
compress_set_gapless_metadata(out->compr, &out->gapless_mdata);
out->send_new_metadata = 0;
if (out->send_next_track_params && out->is_compr_metadata_avail) {
ALOGD("copl(%p):send next track params in gapless", out);
compress_set_next_track_param(out->compr, &(out->compr_config.codec->options));
out->send_next_track_params = false;
out->is_compr_metadata_avail = false;
}
}

to

if (is_offload_usecase(out->usecase)) {
ALOGVV("copl(%p): writing buffer (%zu bytes) to compress device", out, bytes);
if (out->send_new_metadata) {
ALOGD("copl(%p):send new gapless metadata", out);
compress_set_gapless_metadata(out->compr, &out->gapless_mdata);
out->send_new_metadata = 0;
#if defined(SNDRV_COMPRESS_SET_NEXT_TRACK_PARAM)
if (out->send_next_track_params && out->is_compr_metadata_avail) {
ALOGD("copl(%p):send next track params in gapless", out);
compress_set_next_track_param(out->compr, &(out->compr_config.codec->options));
out->send_next_track_params = false;
out->is_compr_metadata_avail = false;
}
#endif
}

-- which I'm not sure is the correct edit or not, but after this I get hit with this and then I'm stuck:

[ 73% 24492/33280] target SharedLib: audio.primary.msm8996 (out/target/product/p
FAILED: out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/LINKED/audio.primary.msm8996.so
/bin/bash -c "/usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang++ -nostdlib -Wl,-soname,audio.primary.msm8996.so
-Wl,--gc-sections -shared out/soong/.intermediates/bionic/libc/crtbegin_so/android_arm64_armv8-a_core/crtbegin_so.o
out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o out/target/product/pme/obj/SHARED_LIBRARIES
/audio.primary.msm8996_intermediates/voice.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates
/platform_info.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/msm8974/platform.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/acdb.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_extn/audio_extn.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_extn/utils.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_extn/hfp.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/voice_extn/voice_extn.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/voice_extn/compress_voip.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/msm8974/hw_info.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_extn/dev_arbi.o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_extn/sndmonitor.o -Wl,--whole-archive -Wl,--no-whole-archive out/target/product/pme/obj/STATIC_LIBRARIES/libclang_rt.ubsan_minimal-aarch64-android_intermediates/libclang_rt.ubsan_minimal-aarch64-android.a prebuilts/clang/host/linux-x86/clang-r353983c/lib64/clang/9.0.3/lib/linux//libclang_rt.builtins-aarch64-android.a out/target/product/pme/obj/STATIC_LIBRARIES/libatomic_intermediates/libatomic.a out/target/product/pme/obj/STATIC_LIBRARIES/libgcc_intermediates/libgcc.a -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined-version -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_stripped.a -fuse-ld=lld -Wl,--hash-style=gnu -Wl,--icf=safe -Wl,-z,max-page-size=4096 -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,-execute-only -Wl,--exclude-libs,libclang_rt.ubsan_minimal-aarch64-android.a -Wl,--no-undefined out/target/product/pme/obj/SHARED_LIBRARIES/liblog_intermediates/liblog.so out/target/product/pme/obj/SHARED_LIBRARIES/libcutils_intermediates/libcutils.so out/target/product/pme/obj/SHARED_LIBRARIES/libtinyalsa_intermediates/libtinyalsa.so out/target/product/pme/obj/SHARED_LIBRARIES/libaudioroute_intermediates/libaudioroute.so out/target/product/pme/obj/SHARED_LIBRARIES/libaudioutils_intermediates/libaudioutils.so out/target/product/pme/obj/SHARED_LIBRARIES/libexpat_intermediates/libexpat.so out/target/product/pme/obj/SHARED_LIBRARIES/libc++_intermediates/libc++.so out/target/product/pme/obj/SHARED_LIBRARIES/libc_intermediates/libc.so out/target/product/pme/obj/SHARED_LIBRARIES/libm_intermediates/libm.so out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.so -o out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/LINKED/audio.primary.msm8996.so out/soong/.intermediates/bionic/libc/crtend_so/android_arm64_armv8-a_core/obj/bionic/libc/arch-common/bionic/crtend_so.o"
ld.lld: error: undefined symbol: compress_stop
>>> referenced by audio_hw.c:2694 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:2694)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_standby_l)

ld.lld: error: undefined symbol: compress_close
>>> referenced by audio_hw.c:3778 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:3778)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_standby_l)

ld.lld: error: undefined symbol: compress_open
>>> referenced by audio_hw.c:3271 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:3271)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(start_output_stream)

ld.lld: error: undefined symbol: is_compress_ready
>>> referenced by audio_hw.c:3275 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:3275)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(start_output_stream)

ld.lld: error: undefined symbol: is_compress_ready
>>> referenced by audio_hw.c:3283 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:3283)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(start_output_stream)

ld.lld: error: undefined symbol: compress_nonblock
>>> referenced by audio_hw.c:3294 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:3294)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(start_output_stream)

ld.lld: error: undefined symbol: compress_set_max_poll_wait
>>> referenced by audio_hw.c:3301 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:3301)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(start_output_stream)

ld.lld: error: undefined symbol: compress_get_error
>>> referenced by audio_hw.c:3284 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:3284)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(start_output_stream)

ld.lld: error: undefined symbol: compress_close
>>> referenced by audio_hw.c:3285 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:3285)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(start_output_stream)

ld.lld: error: undefined symbol: compress_pause
>>> referenced by audio_hw.c:7833 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:7833)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(check_a2dp_restore_l)

ld.lld: error: undefined symbol: compress_resume
>>> referenced by audio_hw.c:7838 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:7838)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(check_a2dp_restore_l)

ld.lld: error: undefined symbol: compress_pause
>>> referenced by audio_hw.c:5141 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:5141)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_pause)

ld.lld: error: undefined symbol: compress_resume
>>> referenced by audio_hw.c:5171 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:5171)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_resume)

ld.lld: error: undefined symbol: compress_stop
>>> referenced by audio_hw.c:2694 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:2694)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_flush)

ld.lld: error: undefined symbol: compress_stop
>>> referenced by audio_hw.c:2694 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:2694)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_standby)

ld.lld: error: undefined symbol: compress_close
>>> referenced by audio_hw.c:3694 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:3694)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_standby)

ld.lld: error: undefined symbol: compress_set_gapless_metadata
>>> referenced by audio_hw.c:4743 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:4743)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_write)

ld.lld: error: undefined symbol: compress_write
>>> referenced by audio_hw.c:4785 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:4785)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_write)

ld.lld: error: undefined symbol: compress_write
>>> referenced by audio_hw.c:4776 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:4776)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_write)

ld.lld: error: undefined symbol: compress_start
>>> referenced by audio_hw.c:4808 (hardware/qcom-caf/msm8996/audio/hal/audio_hw.c:4808)
>>> out/target/product/pme/obj/SHARED_LIBRARIES/audio.primary.msm8996_intermediates/audio_hw.o:(out_write)

ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
22:10:21 ninja failed with: exit status 1

Thanks man, I know you've got your hands full, really wanna get a darn compile! :)