Search code examples
android-kernellineageos

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


I realize I need to define QCOM has the vendor somewhere, but which file / where is this typically declared?

I am getting the following exception while building the ROM for a lineageos project and need some help diagnosing and resolving the issue:

    -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)
                                               ^

Device tree:= https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/tree/lineage-15.1

Vendor tree:= https://github.com/darran-kelinske-fivestars/android_vendor_lenovo_tb8504f/tree/lineage-15.1

Kernel source:= https://github.com/dazza5000/android_kernel_lenovo_msm8937/tree/tb8504f

ROM Source:= https://github.com/LineageOS/android

Command:

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

Full log:

https://del.dog/ujizecehug


Solution

  • I don't know the long term fix for this issue, but my quick and dirty fix was to define the variable in both of the files that depend on it.

    I went into the file hw_info_drm.cpp and added the following at the top:

    #define QCOM 1