Dependencies between Android.mk and Android.bp modules

8,989 views
Skip to first unread message

krzysztof....@volvocars.com

unread,
Oct 30, 2017, 10:57:04 AM10/30/17
to Android Building
Hello,

We are trying to create modules using BP that have dependencies to other modules defined in Android.mk.

It seems that bp cannot link to the library (error: ..../Android.bp:4:1: "binaryinbp" depends on undefined module "libinmake"

Is this expected behavior or some mistake on our side?

Reproduction:

Android.bp
-------------------------------------
cc_library_shared {
    name: "libinbp",
}

cc_binary {
    name: "binaryinbp",
    srcs: ["main.cpp"],
    shared_libs: [
        "libinbp",
        "libinmake"       // This is not possible, building gives error: binaryinbp" depends on undefined module "libinmake"
    ]
}



Android.mk
-------------------------------------
include $(CLEAR_VARS)
LOCAL_MODULE := libinmake
include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_SRC_FILES := main.cpp
LOCAL_MODULE := binaryinmake
LOCAL_SHARED_LIBRARIES := \
    libinmake \
    libinbp
include $(BUILD_EXECUTABLE)

Best regards,
Krzysztof Wesolowski

Colin Cross

unread,
Oct 30, 2017, 11:45:25 AM10/30/17
to android-...@googlegroups.com
This is expected, Soong requires knowledge of all of its modules dependencies.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-building+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wesolowski, Krzysztof

unread,
Oct 31, 2017, 10:08:30 AM10/31/17
to android-...@googlegroups.com
Is there any nice way of dealing with dependencies out of our control? To expose them to soon in some way without touching other repositories?

Best Regards,

Krzysztof Wesolowski (Chris)
Sent from mobile




To post to this group, send email to android-...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.

Colin Cross

unread,
Oct 31, 2017, 1:29:38 PM10/31/17
to android-...@googlegroups.com
Nope, your dependencies will need to be converted first.

On Mon, Oct 30, 2017 at 9:01 AM, Wesolowski, Krzysztof <krzysztof....@volvocars.com> wrote:
Is there any nice way of dealing with dependencies out of our control? To expose them to soon in some way without touching other repositories?

Best Regards,

Krzysztof Wesolowski (Chris)
Sent from mobile

On Mon, Oct 30, 2017 at 4:45 PM +0100, "Colin Cross" <ccr...@android.com> wrote:

This is expected, Soong requires knowledge of all of its modules dependencies.

Rajavenu Kyatham

unread,
Feb 20, 2018, 2:37:37 PM2/20/18
to Android Building
@Krzysztof Wesolowski how you solved this dependency? have you converted the android.mk to android.bp? OR any other way without converting to android.bp?   
I have same dependency, please let me know.

Thanks,
Rajavenu.


On Tuesday, October 31, 2017 at 10:59:38 PM UTC+5:30, Colin Cross wrote:
Nope, your dependencies will need to be converted first.
On Mon, Oct 30, 2017 at 9:01 AM, Wesolowski, Krzysztof <krzysztof....@volvocars.com> wrote:
Is there any nice way of dealing with dependencies out of our control? To expose them to soon in some way without touching other repositories?

Best Regards,

Krzysztof Wesolowski (Chris)
Sent from mobile

On Mon, Oct 30, 2017 at 4:45 PM +0100, "Colin Cross" <ccr...@android.com> wrote:

This is expected, Soong requires knowledge of all of its modules dependencies.
To post to this group, send email to android...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.

Wesolowski, Krzysztof

unread,
Feb 22, 2018, 11:42:48 AM2/22/18
to android-...@googlegroups.com
Not found other solution, so converting was primary solution.

I had idea to make BP library based on hard-coded include paths and then link everything together via Mk file, but never got to try.

BR, K.

Get Outlook for Android


From: android-...@googlegroups.com <android-...@googlegroups.com> on behalf of Rajavenu Kyatham <rajave...@gmail.com>
Sent: Tuesday, February 20, 2018 3:16:04 PM
To: Android Building
Subject: Re: [android-building] Dependencies between Android.mk and Android.bp modules
 
Reply all
Reply to author
Forward
0 new messages