hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:559:35: error: use of undeclared identifier 'QCOM'

hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:559:35: error: use of undeclared identifier 'QCOM'

我知道我需要定义 QCOM 在某处有供应商,但是通常声明哪个文件/在哪里?

我在为 lineageos 项目构建 ROM 时遇到以下异常,需要一些帮助来诊断和解决问题:

    -MD -MF /home/lineageos/out/target/product/tb8504f/obj_arm/SHARED_LIBRARIES/libsdmcore_intermediates/drm/hw_info_drm.d -o /home/lineageos/out/target/product/tb8504f/obj_arm/SHARED_LIBRARIES/libsdmcore_intermediates/drm/hw_info_drm.o hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp"
hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:559:35: error: use of undeclared identifier 'QCOM'
      if (drm_format_modifier == (DRM_FORMAT_MOD_QCOM_COMPRESSED |
                                  ^
hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:58:56: note: expanded from macro 'DRM_FORMAT_MOD_QCOM_COMPRESSED'
#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1)
                                                       ^
hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:560:11: error: use of undeclared identifier 'QCOM'
          DRM_FORMAT_MOD_QCOM_DX | DRM_FORMAT_MOD_QCOM_TIGHT)) {
          ^
hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:61:48: note: expanded from macro 'DRM_FORMAT_MOD_QCOM_DX'
#define DRM_FORMAT_MOD_QCOM_DX fourcc_mod_code(QCOM, 0x2)
                                               ^

设备树:= https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/tree/lineage-15.1

供应商树:= https://github.com/darran-kelinske-fivestars/android_vendor_lenovo_tb8504f/tree/lineage-15.1

内核源码:= https://github.com/dazza5000/android_kernel_lenovo_msm8937/tree/tb8504f

ROM 来源:= https://github.com/LineageOS/android

命令:

repo sync -j20 && source build/envsetup.sh && breakfast tb8504f && make -j20 | tee rom.log

完整日志:

https://del.dog/ujizecehug

我不知道这个问题的长期修复方法,但我的快速修复方法是在依赖它的两个文件中定义该变量。

我进入文件 hw_info_drm.cpp 并在顶部添加了以下内容:

#define QCOM 1