Missing intermediates for external project in P-preview AOSP tree

2,542 views
Skip to first unread message

Peter T. A. Galek

unread,
Jun 26, 2018, 10:12:52 AM6/26/18
to Android Building
I'd like help please to configure which intermediates are generated when using 'mmm' in the P-preview AOSP tree.

I am building for the Pixel (Sailfish) and I have successfully rebuilt the kernel and then all .img files. Now I am trying to add extra projects in "external" folder.

I am creating the following in the out/ intermediates folder:

aidl  classes               classes-full-debug.jar  java-source-list      link_type
anno  classes-combined.jar  classes.jar             java-source-list.tmp

However my parent project is reporting it needs the classes-header.jar file, which is not created.

My steps are:
      mmm external/dependentproject

success.

   mmm external/myproject

failure.

Output is:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=aosp_sailfish
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=kryo
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-041500-generic-x86_64-Ubuntu-16.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PPR1.180610.003
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
No need to regenerate ninja file
ninja: error: 'out/target/common/obj/JAVA_LIBRARIES/dependentproject_intermediates/classes-header.jar', needed by 'out/target/common/obj/JAVA_LIBRARIES/myproject_intermediates/classes-full-debug.jar', missing and no known rule to make it
14:16:30 ninja failed with: exit status 1



The dependent project has the following Android.mk.

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := dependentproject

LOCAL_SRC_FILES += \
      $(call all-java-files-under,src) \
      $(call all-Iaidl-files-under,src)

include $(BUILD_STATIC_JAVA_LIBRARY)



The myproject has the following Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := myproject

LOCAL_SRC_FILES += \
      $(call all-java-files-under,java)

LOCAL_JAVA_LIBRARIES := \
      services.core

LOCAL_STATIC_JAVA_LIBRARIES := \
      dependentproject \
      dependentprojectb

include $(BUILD_JAVA_LIBRARY)



Peter T. A. Galek

unread,
Jun 27, 2018, 6:54:54 PM6/27/18
to Android Building
As I understand it, making these projects invokes soong which translates the .mk files into blueprint .bp files, which ninja then can compile.


The make is successful using the Oreo AOSP tree, but now fails with the P-preview tree as described. Can I configure the dependentproject to prepare different intermediates such as classes-headers.jar as called for by the parent project myproject?

Colin Cross

unread,
Jun 28, 2018, 2:08:01 PM6/28/18
to android-...@googlegroups.com
I'd suggest using mmma for at least the first build of external/myproject, which will build all necessary dependencies.

--
--
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
android-buildi...@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-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter T. A. Galek

unread,
Jun 29, 2018, 2:28:48 PM6/29/18
to Android Building
Thanks for the tip - this works. 

In case this helps others avoid the trap, I found out if I cd into the project folder and run mmm it succeeds. But that had produced no intermediates and the project hadn't been integrated into the full system image after running make snod. 
Reply all
Reply to author
Forward
0 new messages