Header file not found while using Soong build Android.bp

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Header file not found while using Soong build Android.bp

Hưng Vũ
Hi everyone!
I am trying to build a new HAL implementation and service with Soong build. Even though the build process is successful while using Android.mk makefile, After converting this Android.mk file into Android.bp, the build process is failed with the error described as header file not found:
```
hardware/interfaces/hvuleds/2.0/default/Hvuleds.h:24:10: fatal error: 'linux/msm_mdp.h' file not found
#include <linux/msm_mdp.h>
```
This is content of my Android.mk file with success and performing in device well:
```
#===============================================
# Makefile for compliling service binary
#===============================================
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true

LOCAL_MODULE := android.hardware.hvuleds@2.0-service
LOCAL_INIT_RC := android.hardware.hvuleds@2.0-service.rc
LOCAL_SRC_FILES := \
    service.cpp \

LOCAL_SHARED_LIBRARIES := \
    libcutils \
    libdl \
    libbase \
    libutils \
    libhardware \
    libhidlbase \
    libhidltransport \
    android.hardware.hvuleds@2.0 \
    android.hardware.hvuleds@2.0-impl \

include $(BUILD_EXECUTABLE)



#=================================================
# Makefile for compiling implementation shared library
#=================================================
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.hvuleds@2.0-impl
LOCAL_SRC_FILES := Hvuleds.cpp

LOCAL_SHARED_LIBRARIES := \
    libbase \
    liblog \
    libhidlbase \
    libhidltransport \
    libhardware \
    libutils \
    android.hardware.hvuleds@2.0 \

LOCAL_MODULE_TAGS := optional

include $(BUILD_SHARED_LIBRARY)
```
And this is content of Android.bp file with fail. This file is converted automatically form Android.mk with ```androidmk``` tool:
```
//===============================================
// Makefile for compliling service binary
//===============================================

cc_binary {
    relative_install_path: "hw",
    proprietary: true,

    name: "android.hardware.hvuleds@2.0-service",
    init_rc: ["android.hardware.hvuleds@2.0-service.rc"],
    srcs: ["service.cpp"],

    shared_libs: [
        "libcutils",
        "libdl",
        "libbase",
        "libutils",
        "libhardware",
        "libhidlbase",
        "libhidltransport",
        "android.hardware.hvuleds@2.0",
        "android.hardware.hvuleds@2.0-impl",
    ],

}

//=================================================
// Makefile for compiling implementation shared library
//=================================================

cc_library_shared {
    name: "android.hardware.hvuleds@2.0-impl",
    srcs: ["Hvuleds.cpp"],

    shared_libs: [
        "libbase",
        "liblog",
        "libhidlbase",
        "libhidltransport",
        "libhardware",
        "libutils",
        "android.hardware.hvuleds@2.0",
    ],

}
```
Can anyone help and explain to me !
Thank all !
Best regards !

--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-porting/4ae5370d-cb1a-4089-8cfc-810863c2a54e%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Header file not found while using Soong build Android.bp

Trần Kha
Hi Hưng,

Your header file include an existing header msm_mdp.h which is a kernel header of qcom device (https://android.googlesource.com/platform/hardware/qcom/msm8960/+/refs/heads/android10-dev/kernel-headers/linux/msm_mdp.h). I guess you are trying to create your HAL based on qcom's HAL. If you don't use msm_mdp.h, please comment it out. If you are using it, please add it to your current kernel-headers folder.

Regards,
Kha Tran

Vào 08:59:24 UTC+7 Thứ Tư, ngày 15 tháng 4 năm 2020, Hưng Vũ đã viết:
Hi everyone!
I am trying to build a new HAL implementation and service with Soong build. Even though the build process is successful while using Android.mk makefile, After converting this Android.mk file into Android.bp, the build process is failed with the error described as header file not found:
```
hardware/interfaces/hvuleds/2.0/default/Hvuleds.h:24:10: fatal error: 'linux/msm_mdp.h' file not found
#include <linux/msm_mdp.h>
```
This is content of my Android.mk file with success and performing in device well:
```
#===============================================
# Makefile for compliling service binary
#===============================================
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true

LOCAL_MODULE := android.hardware.hvuleds@2.0-service
LOCAL_INIT_RC := android.hardware.hvuleds@2.0-service.rc
LOCAL_SRC_FILES := \
    service.cpp \

LOCAL_SHARED_LIBRARIES := \
    libcutils \
    libdl \
    libbase \
    libutils \
    libhardware \
    libhidlbase \
    libhidltransport \
    android.hardware.hvuleds@2.0 \
    android.hardware.hvuleds@2.0-impl \

include $(BUILD_EXECUTABLE)



#=================================================
# Makefile for compiling implementation shared library
#=================================================
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.hvuleds@2.0-impl
LOCAL_SRC_FILES := Hvuleds.cpp

LOCAL_SHARED_LIBRARIES := \
    libbase \
    liblog \
    libhidlbase \
    libhidltransport \
    libhardware \
    libutils \
    android.hardware.hvuleds@2.0 \

LOCAL_MODULE_TAGS := optional

include $(BUILD_SHARED_LIBRARY)
```
And this is content of Android.bp file with fail. This file is converted automatically form Android.mk with ```androidmk``` tool:
```
//===============================================
// Makefile for compliling service binary
//===============================================

cc_binary {
    relative_install_path: "hw",
    proprietary: true,

    name: "android.hardware.hvuleds@2.0-service",
    init_rc: ["android.hardware.hvuleds@2.0-service.rc"],
    srcs: ["service.cpp"],

    shared_libs: [
        "libcutils",
        "libdl",
        "libbase",
        "libutils",
        "libhardware",
        "libhidlbase",
        "libhidltransport",
        "android.hardware.hvuleds@2.0",
        "android.hardware.hvuleds@2.0-impl",
    ],

}

//=================================================
// Makefile for compiling implementation shared library
//=================================================

cc_library_shared {
    name: "android.hardware.hvuleds@2.0-impl",
    srcs: ["Hvuleds.cpp"],

    shared_libs: [
        "libbase",
        "liblog",
        "libhidlbase",
        "libhidltransport",
        "libhardware",
        "libutils",
        "android.hardware.hvuleds@2.0",
    ],

}
```
Can anyone help and explain to me !
Thank all !
Best regards !

--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-porting/93f72cfd-02c9-43df-b484-12c6a204ab87o%40googlegroups.com.