V1-r Build error: Ninja: Multiple rules generate


i tried to build v1-r for the lineage supported hotdog device with and without docker. I know, that R is not officially supported by now and there are fixes ongoing, but im interested in this stuff and maybe one of you already had this issue or is willing to help.

So the build is failing with the same error for the docker build, the good old way and the steadfasterX way to build:

FAILED: ninja: out/soong/build.ninja:4921911: multiple rules generate out/soong/.intermediates/frameworks/base/core/res/framework-res/android_common/aapt2/vendor/lineage/overlay/microg/frameworks/base/core/res/res/values_config.arsc.flat [-w dupbuild=err]

Anybody can help where i can try to start debugging?

My suggestion is, that this has to do with the overlay/microg things. And from the error message i get, that there seem to be multiple ways to generate this file.

Thanks for any recommendations.

In the mentioned build.ninja file i found the following passage twice:

out/soong/.intermediates/frameworks/base/core/res/framework-res/android_common/aapt2/vendor/lineage/overlay/microg/frameworks/base/core/res/res/values_config.arsc.flat $
    : g.java.aapt2Compile $
    vendor/lineage/overlay/microg/frameworks/base/core/res/res/values/config.xml $
    | ${g.android.soong.java.config.Aapt2Cmd}

description = ${m.framework-res_android_common.moduleDesc}aapt2 compile vendor/lineage/overlay/microg/frameworks/base/core/res/res${m.framework-res_android_common.moduleDescSuffix}
cFlags = --pseudo-localize
outDir = out/soong/.intermediates/frameworks/base/core/res/framework-res/android_common/aapt2/vendor/lineage/overlay/microg/frameworks/base/core/res/res

The problem is, that i have no clue how to find where this builds come from. Is there a possibility to check from which sources the rules come from?

Hi! Two months after your try I am getting the same exact error. Have you managed to resolve it?

No, unfortunately not :confused:

I managed to successfully build my v1-r, but unfortunately phone won’t boot. Anyway, what I have done is replaced occurrences of “-w dupbuild=err” to “-w dupbuild=warn” in files soong.go and ninja.go. Probably only one of them would do, but i didn’t want to test so I replaced both and after that it worked.
Files are located in: …/src/R/build/soong/ui/build/.
Hope this helps.

This is failing for me building z3 and z3c using traditional build tools (breakfast, lunch, mka bacon)

I have added a comment in the issue that was raised, but is now closed

that has been fixed likely by: build-community: Stop setting up microg overlays (!32) · Merge requests · e / os / docker-lineage-cicd · GitLab

First time building R for a3xelte
using BRANCH_NAME=“v1.0-beta-r”
Seen “available” Tags · e / os / releases · GitLab
Using method steadfasterX / android vendor e · GitLab

I was expecting user error but this thread came top of my search for the error ! Is there any reason this might have returned?

wildcard(out/target/product/a3xelte/clean_steps.mk) was changed, regenerating...
FAILED: ninja: out/soong/build.ninja:3340517: multiple rules generate out/soong/.intermediates/frameworks/base/core/res/framework-res/android_common/aapt2/vendor/lineage/overlay/microg/frameworks/base/core/res/res/values_config.arsc.flat [-w dupbuild=err]
09:20:57 ninja failed with: exit status 1

are you for sure using the “v1-r” branch of my vendor_e ?
could you also pls share your vendor/lineage/config/common.mk ?


ok, found the reason: vendor: Override device-specific settings for the location providers (d85b7d1f) · Commits · e / os / android_vendor_lineage · GitLab

this re-adds the microg overlay (for sure not correct)!

when you remove the microg line this error should be gone

(I have commented on the origin issue so this get fixed upstream)


Thanks @steadfasterX for the fast response. I had v1-r in vendor_e, but there was still unexplained mention of v1-q when running envsetup.sh. This must be user error in my upgrade process. I am now starting from new sources.

ok if you encounter any issues paste the full build log to a paste service then. good luck :slight_smile:

1 Like