-
Notifications
You must be signed in to change notification settings - Fork 10
Fixing errors
Here's a list of errors and their solutions.
Error:
hardware/qcom-caf/sm8150/display/gralloc/gr_buf_mgr.cpp:108:43: error: no member named 'reserved_size' in 'private_handle_t'
108 | uint64_t reserved_region_size = handle->reserved_size;
| ~~~~~~ ^
hardware/qcom-caf/sm8150/display/gralloc/gr_buf_mgr.cpp:127:45: error: no member named 'reserved_size' in 'private_handle_t'
127 | uint64_t reserved_region_size = handle->reserved_size;
| ~~~~~~ ^
hardware/qcom-caf/sm8150/display/gralloc/gr_buf_mgr.cpp:760:41: error: no member named 'reserved_size' in 'private_handle_t'
760 | auto meta_size = getMetaDataSize(hnd->reserved_size);
| ~~~ ^
hardware/qcom-caf/sm8150/display/gralloc/gr_buf_mgr.cpp:802:34: error: no member named 'reserved_size' in 'private_handle_t'
802 | buffer->reserved_size = hnd->reserved_size;
| ~~~ ^
hardware/qcom-caf/sm8150/display/gralloc/gr_buf_mgr.cpp:1092:8: error: no member named 'reserved_size' in 'private_handle_t'
1092 | hnd->reserved_size = static_cast<unsigned int>(descriptor.GetReservedSize());
| ~~~ ^
Solution:
Set TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := true in BoardConfig
Related:
ERROR: files are incompatible: The following instances are in the device manifest but not specified in framework compatibility matrix:
vendor.lineage.health.IChargingControl/default (@2)
vendor.qti.hardware.audiohalext@1.0::IAudioHalExt/default
...
This error means the device manifest declares HAL interfaces that aren't in the framework compatibility matrix.
LineageOS HALs (vendor.lineage.health, vendor.lineage.powershare, vendor.lineage.livedisplay, vendor.lineage.touch):
PRODUCT_PACKAGES += framework_compatibility_matrix.lineage.xmlThe matrix is in hardware/lineage/interfaces/compatibility_matrices/.
Qualcomm HALs (vendor.qti.*):
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xmlDevice-specific HALs:
Add to DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE in BoardConfig.mk, or remove the HAL from your device manifest if it's not actually used.
A commit like this is needed:
- https://git.halogenos.org/halogenOS/android_hardware_qcom-caf_sm8450_audio_primary-hal/-/commit/f8a213122f6251d3f80904e5a5755ff7adcb2d41 or
- https://git.halogenos.org/halogenOS/android_hardware_qcom-caf_sm8450_audio_primary-hal/-/commit/545c4e70c2655979500941950cae6d9af488cdb0
This can happen when you switch device trees without doing a clean build. While the solution varies from device to device and the path is not always the same, usually this can be fixed by deleting the offending symlink, in this case it is out/target/product/guacamole/vendor/odm.
panic: can't extend property "relative_install_path": failed to find property to extend
goroutine 12061 [running]:
github.com/google/blueprint.(*loadHookContext).createModule(0xc032b92b40, 0xc007a92c90, {0xc0174e29a0, 0x1d}, {0xc004e5f480, 0x3d}, {0xc01f2e6330, 0x3, 0xc01f2e6330?})
/run/media/simao/romsrc/XOS-15.2/build/blueprint/module_ctx.go:1381 +0x318
github.com/google/blueprint.(*loadHookContext).CreateModuleInDirectory(0xc032b92b40, 0xc007a92c90, {0xc0174e29a0, 0x1d}, {0xc000244070, 0x32}, {0xc01f2e6330, 0x3, 0x3})
/run/media/simao/romsrc/XOS-15.2/build/blueprint/module_ctx.go:1400 +0x11e
android/soong/android.(*loadHookContext).createModuleInDirectory(0xc007a92c70?, 0x1355482?, {0xc0174e29a0?, 0x15467c8?}, {0xc000244070?, 0x1358abd?}, {0xc01f2e6330?, 0x415a05?, 0x0?})
/run/media/simao/romsrc/XOS-15.2/build/soong/android/hooks.go:108 +0x2e
android/soong/android.createModule({0x1554208, 0xc002376780}, 0x13b90b8, {0x1358abd, 0xf}, {0x2?, {0xc000244070?, 0xc00d05df20?}}, {0xc00d05df20, 0x2, ...})
/run/media/simao/romsrc/XOS-15.2/build/soong/android/hooks.go:159 +0x43b
android/soong/android.(*loadHookContext).CreateModuleInDirectory(0x118f9a0?, 0xc0003e30e0?, {0xc000244070?, 0x0?}, {0xc00d05df20?, 0x0?, 0x0?})
/run/media/simao/romsrc/XOS-15.2/build/soong/android/hooks.go:186 +0x53
android/soong/fsgen.createPrebuiltEtcModulesInDirectory({0x1564f40, 0xc002376780}, {0x134aa30, 0x6}, {0xc000244070, 0x32}, {0xc00024420b, 0x7}, {0xc006183380, 0x4, ...})
/run/media/simao/romsrc/XOS-15.2/build/soong/fsgen/prebuilt_etc_modules_gen.go:359 +0x984
android/soong/fsgen.createPrebuiltEtcModulesForPartition({0x1564f40, 0xc002376780}, {0x134aa30, 0x6}, {0xc000244070, 0x32}, 0xc0182c7bf0)
/run/media/simao/romsrc/XOS-15.2/build/soong/fsgen/prebuilt_etc_modules_gen.go:368 +0x185
android/soong/fsgen.createPrebuiltEtcModules({0x1564f40, 0xc002376780})
/run/media/simao/romsrc/XOS-15.2/build/soong/fsgen/prebuilt_etc_modules_gen.go:382 +0x3a8
android/soong/fsgen.filesystemCreatorFactory.func1({0x1564f40, 0xc002376780})
/run/media/simao/romsrc/XOS-15.2/build/soong/fsgen/filesystem_creator.go:70 +0x2a
android/soong/android.AddLoadHook.func1({0x1561778, 0xc032b92b40})
/run/media/simao/romsrc/XOS-15.2/build/soong/android/hooks.go:58 +0x168
github.com/google/blueprint.runAndRemoveLoadHooks(0xc0003cab48, {0x13316c0, 0xc00001a008}, 0xc0320bbb88, 0xc000d81b78)
/run/media/simao/romsrc/XOS-15.2/build/blueprint/module_ctx.go:1480 +0x2a8
github.com/google/blueprint.(*Context).ParseFileList.func1.1(0xc0320bbb88)
/run/media/simao/romsrc/XOS-15.2/build/blueprint/context.go:1085 +0x55
github.com/google/blueprint.(*Context).ParseFileList.func1(0xc01122ea00)
/run/media/simao/romsrc/XOS-15.2/build/blueprint/context.go:1120 +0x3dd
github.com/google/blueprint.(*Context).WalkBlueprintsFiles.func1.1()
/run/media/simao/romsrc/XOS-15.2/build/blueprint/context.go:1263 +0x29e
created by github.com/google/blueprint.(*Context).WalkBlueprintsFiles.func1 in goroutine 14
/run/media/simao/romsrc/XOS-15.2/build/blueprint/context.go:1242 +0x334
20:59:53 soong bootstrap failed with: exit status 1
Pick at least this commit: https://github.com/LineageOS/android_build_soong/commit/6f53e1445524b3d2b0519fb14e4652416e65eddd and all dependent previous commits.
frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp:176:10: fatal error: 'gralloc_priv.h' file not found
176 | #include "gralloc_priv.h"
| ^~~~~~~~~~~~~~~~
1 error generated.
The file exists at
./external/drm_hwcomposer/tests/test_include/gralloc_priv.h
./hardware/google/gchips/gralloc4/src/gralloc_priv.h
./hardware/libhardware/modules/gralloc/gralloc_priv.h
./hardware/qcom-caf/msm8996/display/gralloc/gralloc_priv.h
./hardware/qcom-caf/msm8998/display/gralloc/gralloc_priv.h
./vendor/qcom/opensource/commonsys-intf/display/gralloc/gralloc_priv.h
but it can't be found. So it probably needs to be put into the include path somehow.
The change was introduced by sf: Fix virtual display related issues. in frameworks/native.
Traditionally, this would be because of a missing change from vendor/lineage about qti display headers. But they recently (as of Q1 2025) migrated to selects: https://github.com/LineageOS/android_vendor_lineage/commit/c3c770de4421d0a879c0343c746dc23a05f9aa4c
You need this to fix it: https://github.com/LineageOS/android_frameworks_native/commit/856133a31a04ba21ae57bedd9ba6420c13b24570
But also this one: https://github.com/LineageOS/android_frameworks_native/commit/ded9030781aa908257491efe8b137291f99feff2
However, that one is not up to date as it does not use the new select stuff yet. So you don't actually need to apply the Android.bp changes, only the .cpp stuff.
In file included from hardware/qcom-caf/sm8350/display/libdebug/debug_handler.cpp:30:
In file included from hardware/qcom-caf/sm8350/display/libdebug/debug_handler.h:33:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/bitset:140:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/string_view:954:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/algorithm:1842:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__algorithm/for_each.h:16:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__ranges/movable_box.h:21:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/optional:1288:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/atomic:590:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__atomic/aliases.h:12:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__atomic/atomic.h:12:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__atomic/atomic_base.h:12:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__atomic/atomic_sync.h:20:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__thread/support.h:112:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__thread/support/pthread.h:18:
In file included from bionic/libc/include/pthread.h:41:
bionic/libc/include/sched.h:99:8: error: redefinition of 'sched_param'
99 | struct sched_param {
| ^
../../romout/xos16_0/soong/.intermediates/product/halogenOS/build/soong/generated_kernel_includes/gen/usr/include/linux/sched/types.h:7:8: note: previous definition is here
7 | struct sched_param {
| ^
1 error generated.
Pick this and rebuild to see what the issue is. You'll need to remove the duplicate from your device tree.
error: external/wpa_supplicant_8/wpa_supplicant/Android.bp:1356:1: "wpa_supplicant_macsec" depends on undefined module "lib_driver_cmd_qcwcn".
Module "wpa_supplicant_macsec" is defined in namespace "." which can read these 18 namespaces: ["." "." "vendor/qcom/opensource/commonsys/display" "hardware/lineage/interfaces/power-libperfmgr" "vendor/qcom/opensource/usb/etc" "vendor/qcom/opensource/dataservices" "hardware/qcom-caf/thermal-legacy-um" "vendor/qcom/opensource/commonsys-intf/display" "hardware/qcom-caf/wlan" "hardware/google/interfaces" "vendor/qcom/opensource/data-ipa-cfg-mgr-legacy-um" "vendor/qcom/opensource/display" "vendor/nothing/Spacewar" "device/nothing/Spacewar" "hardware/qcom-caf/sm8350" "hardware/google/pixel" "hardware/qcom-caf/bootctrl" "hardware/qcom-caf/common/libqti-perfd-client"]
Module "lib_driver_cmd_qcwcn" can be found in these namespaces: ["hardware/qcom-caf/wlan/qcwcn" "hardware/qcom/wlan/legacy" "hardware/qcom/wlan/wcn6740"]
Or did you mean ["lib_driver_cmd_bcmdhd" "zlib_deflate_fuzzer"]?
error: external/wpa_supplicant_8/hostapd/Android.bp:682:1: "hostapd" depends on undefined module "lib_driver_cmd_qcwcn".
Module "hostapd" is defined in namespace "." which can read these 18 namespaces: ["." "." "vendor/qcom/opensource/commonsys/display" "hardware/lineage/interfaces/power-libperfmgr" "vendor/qcom/opensource/usb/etc" "vendor/qcom/opensource/dataservices" "hardware/qcom-caf/thermal-legacy-um" "vendor/qcom/opensource/commonsys-intf/display" "hardware/qcom-caf/wlan" "hardware/google/interfaces" "vendor/qcom/opensource/data-ipa-cfg-mgr-legacy-um" "vendor/qcom/opensource/display" "vendor/nothing/Spacewar" "device/nothing/Spacewar" "hardware/qcom-caf/sm8350" "hardware/google/pixel" "hardware/qcom-caf/bootctrl" "hardware/qcom-caf/common/libqti-perfd-client"]
Module "lib_driver_cmd_qcwcn" can be found in these namespaces: ["hardware/qcom-caf/wlan/qcwcn" "hardware/qcom/wlan/legacy" "hardware/qcom/wlan/wcn6740"]
Or did you mean ["lib_driver_cmd_bcmdhd" "zlib_deflate_fuzzer"]?
error: external/wpa_supplicant_8/wpa_supplicant/Android.bp:1309:1: "wpa_supplicant" depends on undefined module "lib_driver_cmd_qcwcn".
Module "wpa_supplicant" is defined in namespace "." which can read these 18 namespaces: ["." "." "vendor/qcom/opensource/commonsys/display" "hardware/lineage/interfaces/power-libperfmgr" "vendor/qcom/opensource/usb/etc" "vendor/qcom/opensource/dataservices" "hardware/qcom-caf/thermal-legacy-um" "vendor/qcom/opensource/commonsys-intf/display" "hardware/qcom-caf/wlan" "hardware/google/interfaces" "vendor/qcom/opensource/data-ipa-cfg-mgr-legacy-um" "vendor/qcom/opensource/display" "vendor/nothing/Spacewar" "device/nothing/Spacewar" "hardware/qcom-caf/sm8350" "hardware/google/pixel" "hardware/qcom-caf/bootctrl" "hardware/qcom-caf/common/libqti-perfd-client"]
Module "lib_driver_cmd_qcwcn" can be found in these namespaces: ["hardware/qcom-caf/wlan/qcwcn" "hardware/qcom/wlan/legacy" "hardware/qcom/wlan/wcn6740"]
Or did you mean ["lib_driver_cmd_bcmdhd" "zlib_deflate_fuzzer"]?
This is usually a pathmap issue.
Solution for this specific issue: https://github.com/LineageOS/android_hardware_qcom-caf_common/commit/b5edacbb0a9edb23c32b1d55935425afea13bcab
build/make/core/base_rules.mk:320: error: hardware/google/pixel/kernel_headers: MODULE.TARGET.HEADER_LIBRARIES.qti_display_kernel_headers already defined by hardware/qcom-caf/common.
Both hardware/google/pixel/kernel_headers/Android.bp and hardware/qcom-caf/common/Android.bp define qti_display_kernel_headers, causing a conflict.
Solution: Add a soong_namespace to hardware/google/pixel/kernel_headers/Android.bp to isolate those modules. LineageOS has this fix:
panic: unexpected relative path outside directory in removeSrcDirPrefix filepath.Rel(/path/to/source, /path/to/out/target/product/Device)
This fsgen panic occurs when using an out-of-tree $OUT directory (source and output in different paths) and BOARD_PREBUILT_DTBOIMAGE is set at config time to an output path.
Solution: Don't set BOARD_PREBUILT_DTBOIMAGE in BoardConfigKernel.mk (config time). Instead, set it in kernel.mk at task time when DTBO_OUT is properly defined.
In BoardConfigKernel.mk, only set the defaults:
ifeq (true,$(filter true, $(TARGET_NEEDS_DTBOIMAGE) $(BOARD_KERNEL_SEPARATED_DTBO)))
TARGET_KERNEL_DTBO_PREFIX ?=
TARGET_KERNEL_DTBO ?= dtbo.img
endifIn kernel.mk, set the actual path at task time:
BOARD_PREBUILT_DTBOIMAGE := $(DTBO_OUT)/arch/$(KERNEL_ARCH)/boot/$(TARGET_KERNEL_DTBO_PREFIX)$(TARGET_KERNEL_DTBO)hardware/qcom-caf/sm8350/audio/hal/audio_hw.h:79:10: fatal error: 'hardware/audio_amplifier.h' file not found
79 | #include <hardware/audio_amplifier.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
The qcom-caf audio HALs depend on LineageOS's audio amplifier HAL header.
kernel/.../scripts/extract-cert.c:21:10: fatal error: 'openssl/bio.h' file not found
21 | #include <openssl/bio.h>
| ^~~~~~~~~~~~~~~
The kernel build requires OpenSSL headers for extract-cert (triggered by CONFIG_SYSTEM_TRUSTED_KEYRING=y).
Solution: Add prebuilts/kernel-build-tools and prebuilts/tools-lineage to the manifest: