[Android Q&A, Help & Troubleshooting] Rycon33:
I proceed with building Mahdi rom for my Xperia SP

But after dew minutes of building, I encountered the error about RIL:

make: *** [/home/ry/mahdi/out/target/product/huashan/obj/SHARED_LIBRARIES/libril_intermediates/ril.o] Error 1

make: *** Waiting for unfinished jobs....

the complete error is below:

device/sony/qcom-common/libril/ril.cpp:149:11: error: 'MAX_SOCKET_NAME_LENGTH' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:257:34: error: 'RIL_SsServiceType' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:257:61: error: 'RIL_SsRequestType' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:257:86: error: expression list treated as compound expression in initializer [-fpermissive]

In file included from device/sony/qcom-common/libril/ril.cpp:274:0:

device/sony/qcom-common/libril/ril_commands.h:27:6: error: 'RIL_REQUEST_ENTER_DEPERSONALIZATION_CODE' was not declared in this scope

device/sony/qcom-common/libril/ril_commands.h:135:6: error: 'RIL_REQUEST_GET_DATA_CALL_PROFILE' was not declared in this scope

device/sony/qcom-common/libril/ril_commands.h:136:6: error: 'RIL_REQUEST_SET_UICC_SUBSCRIPTION' was not declared in this scope

device/sony/qcom-common/libril/ril_commands.h:137:6: error: 'RIL_REQUEST_SET_DATA_SUBSCRIPTION' was not declared in this scope

In file included from device/sony/qcom-common/libril/ril.cpp:278:0:

device/sony/qcom-common/libril/ril_unsol_commands.h:59:6: error: 'RIL_UNSOL_ON_SS' was not declared in this scope

device/sony/qcom-common/libril/ril_unsol_commands.h:60:6: error: 'RIL_UNSOL_STK_CC_ALPHA_NOTIFY' was not declared in this scope

device/sony/qcom-common/libril/ril_unsol_commands.h:61:6: error: 'RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp: In function 'char* android::RIL_getRilSocketName()':

device/sony/qcom-common/libril/ril.cpp:302:12: error: 'rild' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp: In function 'void android::RIL_setRilSocketName(char*)':

device/sony/qcom-common/libril/ril.cpp:307:13: error: 'rild' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:307:22: error: 'MAX_SOCKET_NAME_LENGTH' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp: In function 'void android::dispatchUiccSubscripton(android::Parcel&, android::RequestInfo*)':

device/sony/qcom-common/libril/ril.cpp:1576:5: error: 'RIL_SelectUiccSub' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:1576:23: error: expected ';' before 'uicc_sub'

device/sony/qcom-common/libril/ril.cpp:1579:13: error: 'uicc_sub' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:1597:26: error: 'RIL_SubscriptionType' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:1597:48: error: expected ';' before 't'

device/sony/qcom-common/libril/ril.cpp:1603:28: error: 'RIL_UiccSubActStatus' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:1603:50: error: expected ';' before 't'

device/sony/qcom-common/libril/ril.cpp: In function 'int android::responseSSData(android::Parcel&, void*, size_t)':

device/sony/qcom-common/libril/ril.cpp:2730:31: error: 'RIL_StkCcUnsolSsResponse' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:2737:5: error: 'RIL_StkCcUnsolSsResponse' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:2737:31: error: 'p_cur' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:2737:66: error: expected primary-expression before ')' token

device/sony/qcom-common/libril/ril.cpp:2737:68: error: expected ';' before 'response'

device/sony/qcom-common/libril/ril.cpp:2744:68: error: 'android::isServiceTypeCfQuery' cannot be used as a function

device/sony/qcom-common/libril/ril.cpp:2746:45: error: 'NUM_SERVICE_CLASSES' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:2770:23: error: 'SS_INFO_MAX' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp: At global scope:

device/sony/qcom-common/libril/ril.cpp:2785:34: error: redefinition of 'bool android::isServiceTypeCfQuery'

device/sony/qcom-common/libril/ril.cpp:257:13: error: 'bool android::isServiceTypeCfQuery' previously defined here

device/sony/qcom-common/libril/ril.cpp:2785:34: error: 'RIL_SsServiceType' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:2785:61: error: 'RIL_SsRequestType' was not declared in this scope

device/sony/qcom-common/libril/ril.cpp:4181:1: error: expected '}' at end of input