phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.4k stars 660 forks source link

Pie builds fail for LineageOS 16.0 and Pixel Experience 9.0 #303

Closed milankragujevic closed 5 years ago

milankragujevic commented 5 years ago

Piyel Experience fails because the pixel90 target refers to https://github.com/PixelExperience-P/manifest which was deleted.

LineageOS fails with cryptic errors that are fault of the treble repo. Last LineageOS error I got:

error: vendor/lineage/build/soong/Android.bp:31:8: module "generated_kernel_includes": cmd: unknown variable '$(KERNEL_MAKE_FLAGS)'

aslafy-z commented 5 years ago

Here's a patch for Lineage: https://github.com/aslafy-z/android_vendor_lineage/commit/0e890665886445d9947e16efe204cd596603205f We don't want to build kernel as we do a GSI. Comes from here: https://github.com/RevOS-Treble/treble/blob/linux/build.sh#L74

milankragujevic commented 5 years ago

fixed with @aslafy-z's patch.

tmvkrpxl0 commented 5 years ago

I have same problem but rom is aex, and i already did remove some lines to make Android.bp similar with your fix, but it causes another error. So i need to find another way to fix. Can someone help me to fix?

aslafy-z commented 5 years ago

@tmvkrpxl0 If you've got another error than the one OP raised, please open an issue related to this error!

Zaheer-P commented 5 years ago

i did the patch now i get this error: external/tinycompress/Android.bp:1:1: "libtinycompress" depends on undefined module "generated_kernel_headers"

tmvkrpxl0 commented 5 years ago

i did the patch now i get this error: external/tinycompress/Android.bp:1:1: "libtinycompress" depends on undefined module "generated_kernel_headers"

i'll tell you what i did to fix this error this might be cause error after you build, i recommend you to not do this i just put // in line 31, 34, 37, 38

//cmd: "make $(KERNEL_MAKE_FLAGS) -C $(TARGET_KERNEL_SOURCE) O=$(genDir) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) headers_install",

    // Directories that can be imported by a cc_* module generated_headers property
    //export_include_dirs: ["usr/include", "usr/techpack/audio/include"],

    // Sources for dependency tracking
    //dep_root: "$(TARGET_KERNEL_SOURCE)",
    //dep_files: [ "Makefile", "include/**/*", "arch/$(KERNEL_ARCH)/include/**/*", "techpack/audio/include/**/*"],

just like that

1-Family commented 3 years ago

If anyone else encounters this - What solved the problem for me, is not only running source build/envsetup.sh but also 'breakfast DEVICE' with some device, for the necessary files to be imported, before issuing the make idegen command

ghost commented 3 years ago

If anyone else encounters this - What solved the problem for me, is not only running source build/envsetup.sh but also 'breakfast DEVICE' with some device, for the necessary files to be imported, before issuing the make idegen command

Yes. This is the solution. No need to mess with generated kernel includes...
This is a device tree adaptation problem. You just need to do a "breakfast codename", and the error that it throws will automatically tell you what filename that your aosp_device.mk should have... In my case, I had the same problem, when I'm trying with xpe_sunny.mk, but the actual string I should have was xperience_sunny.mk After adapting Android.mk, common lunch choices, rom.dependencies, etc, then PRODUCT_SOONG_NAMESPACES successfully took all the directories that it needed.