Failing Custom ROM Build eOS: You are building on a machine with 15.4GB of RAM

So I’m trying to build a custom ROM of eOS for my fairphone 4. When I run

 sudo docker run -v "/srv/e/src:/srv/src" -v "/srv/e/zips:/srv/zips" -v "/srv/e/logs:/srv/logs" -v "/srv/e/ccache:/srv/ccache" -e "BRANCH_NAME=v1.19.1-s" -e "DEVICE_LIST=FP4" -e "REPO=https://gitlab.e.foundation/e/os/releases.git" registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

I get:

>> [Fri Feb 23 19:11:39 UTC 2024] Setting "UNOFFICIAL" as release type
>> [Fri Feb 23 19:11:39 UTC 2024] Adding OTA URL overlay (for custom URL )
>> [Fri Feb 23 19:11:39 UTC 2024] Preparing build environment
>> [Fri Feb 23 19:11:39 UTC 2024] Starting build for FP4, v1.19.1-s branch
>> [Fri Feb 23 19:11:39 UTC 2024] ANDROID_JACK_VM_ARGS=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G
>> [Fri Feb 23 19:11:39 UTC 2024] Switch to Python2
>> [Fri Feb 23 19:13:35 UTC 2024] Failed build for FP4
>> [Fri Feb 23 19:13:35 UTC 2024] Finishing build for FP4
>> [Fri Feb 23 19:13:35 UTC 2024] Cleaning source dir for device FP4
>> [Fri Feb 23 19:13:37 UTC 2024] Switch back to Python3

It temporarly freezes at “Swtich to Python2” and eventually fails the build. This is the log file of the build:

[Fri Feb 23 19:11:39 UTC 2024] Starting build for FP4, v1.19.1-s branch
19:11:41 Build sandboxing disabled due to nsjail error.
Trying dependencies-only mode on a non-existing device tree?
19:11:43 Build sandboxing disabled due to nsjail error.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
LINEAGE_VERSION=1.19.1""-s-20240223-UNOFFICIAL-FP4
TARGET_PRODUCT=lineage_FP4
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a76
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a76
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.5.0-18-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SQ3A.220705.004
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/fairphone/FP4 device/fairphone/FP4 hardware/qcom-caf/sm8250 vendor/qcom/opensource/commonsys/display vendor/qcom/opensource/commonsys-intf/display vendor/qcom/opensource/display vendor/qcom/opensource/data-ipa-cfg-mgr vendor/qcom/opensource/dataservices packages/apps/Bluetooth
WITH_SU=false
============================================
19:11:44 **********************************************************
19:11:44 You are building on a machine with 15.4GB of RAM
19:11:44 
19:11:44 The minimum required amount of free memory is around 16GB,
19:11:44 and even with that, some configurations may not work.
19:11:44 
19:11:44 If you run into segfaults or other errors, try reducing your
19:11:44 -j value.
19:11:44 **********************************************************
19:11:44 Build sandboxing disabled due to nsjail error.
e[1mbuild/make/core/soong_config.mk:199: e[35mwarning: e[0me[1mBOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.e[0m
e[1mbuild/make/core/soong_config.mk:200: e[35mwarning: e[0me[1mBOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.e[0m
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
LINEAGE_VERSION=1.19.1""-s-20240223-UNOFFICIAL-FP4
TARGET_PRODUCT=lineage_FP4
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a76
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a76
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.5.0-18-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SQ3A.220705.004
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/fairphone/FP4 device/fairphone/FP4 hardware/qcom-caf/sm8250 vendor/qcom/opensource/commonsys/display vendor/qcom/opensource/commonsys-intf/display vendor/qcom/opensource/display vendor/qcom/opensource/data-ipa-cfg-mgr vendor/qcom/opensource/dataservices packages/apps/Bluetooth
WITH_SU=false
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER"     --top "$TOP"     --out "out/soong"     -n "out"     -d "out/soong/build.ninja.d"     -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
Killed
19:13:35 soong bootstrap failed with: exit status 1
ninja: build stopped: subcommand failed.

#### failed to build some targets (01:52 (mm:ss)) ####

    > [Fri Feb 23 19:13:35 UTC 2024] Failed build for FP4
    > [Fri Feb 23 19:13:35 UTC 2024] Finishing build for FP4
    > [Fri Feb 23 19:13:35 UTC 2024] Cleaning source dir for device FP4


19:13:37 Entire build directory removed.

#### build completed successfully (2 seconds) ####

It seems that the issue has to do with not enough RAM. Is their any solution without having to get more RAM. I currently have sixteen.

I won’t try to answer your real question (other than 16G should be ok in a fairly modern 64bit machine) but I think it worth considering the number of processors in your machine (but you might consider adding 4- 8G swap space, can be done a bit like this for an experiment https://linuxize.com/post/how-to-add-swap-space-on-debian-10/).

Just run the command nproc. The response is your number of processors.

The -j flag is part of repo. The -j flag determines how many jobs will run simultaneously. When building with repo, especially in a new environment with an undeveloped ccache and 16G RAM I would run first with a significant -j flag. The command for nproc=8 might be:

repo sync -j 4 -c --force-sync --no-clone-bundle

In the event of certain problems repo might suggest

repo sync -j 1 -c --fail-fast --no-clone-bundle

In subsequent runs I would go no higher than -j 7

Unfortunately build-community.sh chooses

repo sync -j$(nproc --all) --force-sync --no-clone-bundle

I do not know if it is possible or the syntax to try to pass -j flag as a variable to override this.


You might check out whether you would prefer to use https://gitlab.e.foundation/steadfasterX/android_vendor_e (where the adjustable default is -j (nproc -1) ) … or study this guide https://gitlab.e.foundation/e/documentation/a-generic-guide-on-porting-eos/-/wikis/07:-Building-an-e-ROM-the-Repo-Sync-way.

Edit
Is this a true Ubuntu environment ? I am uncertain of the significance of

Second edit I wonder if you have built a ROM on this machine before. If the aim was to test the machine I would follow these instructions to build standard LineageOS https://wiki.lineageos.org/devices/FP4/build/. A standard Lineage build seems a bit less demanding of resources. (Personally I do not favour Docker for testing as it is so scripted that error messages can be unclear. A Lineage build from these instructions would be more educational.)

Your fail Warning, not a fail, (which I have seen)
Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead
is close to this https://groups.google.com/g/android-building/c/CGZRqcRFtkk/m/dJl-8gu0EwAJ

In my case the error was closer to https://xdaforums.com/t/android12-build-error-libartservice-android-bp-36-1.4238913/, unclear how it actually resolved from old sources, needed to be fixed by patching, but this should not be the case with FP4, I guess.

Update as I had not actually seen the 15.4GB of RAM error verbatim. Even adding 1G Swap should suppress this warning.

A little more research in a current repo sync build environment shows this …

// Build the tree. The 'what' argument can be used to chose which components of
// the build to run.
func Build(ctx Context, config Config, what int) {
	ctx.Verboseln("Starting build with args:", config.Arguments())
	ctx.Verboseln("Environment:", config.Environment().Environ())

	if totalRAM := config.TotalRAM(); totalRAM != 0 {
		ram := float32(totalRAM) / (1024 * 1024 * 1024)
		ctx.Verbosef("Total RAM: %.3vGB", ram)

		if ram <= 16 {
			ctx.Println("************************************************************")
			ctx.Printf("You are building on a machine with %.3vGB of RAM\n", ram)
			ctx.Println("")
			ctx.Println("The minimum required amount of free memory is around 16GB,")
			ctx.Println("and even with that, some configurations may not work.")
			ctx.Println("")
			ctx.Println("If you run into segfaults or other errors, try reducing your")
			ctx.Println("-j value.")
			ctx.Println("************************************************************")
		} else if ram <= float32(config.Parallel()) {
			ctx.Printf("Warning: high -j%d count compared to %.3vGB of RAM", config.Parallel(), ram)
			ctx.Println("If you run into segfaults or other errors, try a lower -j value")

… occurs in /build/soong/ui/build/build.go … but I do not know really how significant the warning is with this small margin of diff.

Beyond my understanding … my search indicates a tentative link also to /external/swiftshader/third_party/llvm-7.0/llvm/, which again might point to the enquiry “Is this a true Ubuntu environment”.

So I noticed on my docker settings the memory was set to 3.8G and swap was 1G. I maxed them out, but still got same log.

The PC was a Windows PC, but I put Ubuntu on it. This is the latest log:


>> [Sat Feb 24 08:48:55 UTC 2024] Starting build for FP4, v1.19.1-s branch
08:49:01 Build sandboxing disabled due to nsjail error.
Trying dependencies-only mode on a non-existing device tree?
08:49:02 Build sandboxing disabled due to nsjail error.

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
LINEAGE_VERSION=1.19.1""-s-20240224-UNOFFICIAL-FP4
TARGET_PRODUCT=lineage_FP4
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a76
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a76
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.5.0-18-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SQ3A.220705.004
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/fairphone/FP4 device/fairphone/FP4 hardware/qcom-caf/sm8250 vendor/qcom/opensource/commonsys/display vendor/qcom/opensource/commonsys-intf/display vendor/qcom/opensource/display vendor/qcom/opensource/data-ipa-cfg-mgr vendor/qcom/opensource/dataservices packages/apps/Bluetooth
WITH_SU=false
============================================
08:49:03 ************************************************************
08:49:03 You are building on a machine with 15.4GB of RAM
08:49:03 
08:49:03 The minimum required amount of free memory is around 16GB,
08:49:03 and even with that, some configurations may not work.
08:49:03 
08:49:03 If you run into segfaults or other errors, try reducing your
08:49:03 -j value.
08:49:03 ************************************************************
08:49:03 Build sandboxing disabled due to nsjail error.
e[1mbuild/make/core/soong_config.mk:199: e[35mwarning: e[0me[1mBOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.e[0m
e[1mbuild/make/core/soong_config.mk:200: e[35mwarning: e[0me[1mBOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.e[0m
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
LINEAGE_VERSION=1.19.1""-s-20240224-UNOFFICIAL-FP4
TARGET_PRODUCT=lineage_FP4
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a76
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a76
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.5.0-18-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SQ3A.220705.004
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/fairphone/FP4 device/fairphone/FP4 hardware/qcom-caf/sm8250 vendor/qcom/opensource/commonsys/display vendor/qcom/opensource/commonsys-intf/display vendor/qcom/opensource/display vendor/qcom/opensource/data-ipa-cfg-mgr vendor/qcom/opensource/dataservices packages/apps/Bluetooth
WITH_SU=false
============================================
[  0% 1/252] compile out/soong/.bootstrap/blueprint-deptools/pkg/github.com/google/blueprint/deptools.a
[  0% 2/252] compile out/soong/.bootstrap/gotestrunner/obj/gotestrunner.a
[  1% 3/252] compile out/soong/.bootstrap/loadplugins/obj/loadplugins.a
[  1% 4/252] compile out/soong/.bootstrap/gotestmain/obj/gotestmain.a
[  1% 5/252] compile out/soong/.bootstrap/soong-cquery/pkg/android/soong/bazel/cquery.a
[  2% 6/252] compile out/soong/.bootstrap/soong-cquery/test/android/soong/bazel/cquery.a
[  2% 7/252] compile out/soong/.bootstrap/blueprint-pathtools/pkg/github.com/google/blueprint/pathtools.a
[  3% 8/252] compile out/soong/.bootstrap/blueprint-parser/pkg/github.com/google/blueprint/parser.a
[  3% 9/252] compile out/soong/.bootstrap/soong-remoteexec/test/android/soong/remoteexec.a
[  3% 10/252] compile out/soong/.bootstrap/soong-remoteexec/pkg/android/soong/remoteexec.a
[  4% 11/252] compile out/soong/.bootstrap/blueprint-parser/test/github.com/google/blueprint/parser.a
[  4% 12/252] link out/soong/.bootstrap/gotestrunner/obj/a.out
[  5% 13/252] compile out/soong/.bootstrap/soong-response/test/android/soong/response.a
[  5% 14/252] compile out/soong/.bootstrap/blueprint-pathtools/test/github.com/google/blueprint/pathtools.a
[  5% 15/252] cp out/soong/.bootstrap/bin/gotestrunner
[  6% 16/252] compile out/soong/.bootstrap/soong-response/pkg/android/soong/response.a
[  6% 17/252] link out/soong/.bootstrap/loadplugins/obj/a.out
[  7% 18/252] cp out/soong/.bootstrap/bin/loadplugins
[  7% 19/252] create out/soong/.bootstrap/soong_build/gen/plugin.go
[  7% 20/252] compile out/soong/.bootstrap/blueprint-proptools/pkg/github.com/google/blueprint/proptools.a
[  8% 21/252] link out/soong/.bootstrap/gotestmain/obj/a.out
[  8% 22/252] cp out/soong/.bootstrap/bin/gotestmain
[  9% 23/252] gotestmain out/soong/.bootstrap/aidl-soong-rules/test/test.go
[  9% 24/252] gotestmain out/soong/.bootstrap/blueprint-bootstrap-bpdoc/test/test.go
[  9% 25/252] gotestmain out/soong/.bootstrap/blueprint/test/test.go
[ 10% 26/252] gotestmain out/soong/.bootstrap/blueprint-parser/test/test.go
[ 10% 27/252] gotestmain out/soong/.bootstrap/blueprint-pathtools/test/test.go
[ 11% 28/252] gotestmain out/soong/.bootstrap/gki-soong-rules/test/test.go
[ 11% 29/252] gotestmain out/soong/.bootstrap/blueprint-proptools/test/test.go
[ 11% 30/252] gotestmain out/soong/.bootstrap/golang-protobuf-proto/test/test.go
[ 12% 31/252] gotestmain out/soong/.bootstrap/soong-android-soongconfig/test/test.go
[ 12% 32/252] compile out/soong/.bootstrap/blueprint-parser/test/test.a
[ 13% 33/252] compile out/soong/.bootstrap/golang-protobuf-proto/pkg/github.com/golang/protobuf/proto.a
[ 13% 34/252] gotestmain out/soong/.bootstrap/soong-apex/test/test.go
[ 13% 35/252] gotestmain out/soong/.bootstrap/soong-bazel/test/test.go
[ 14% 36/252] compile out/soong/.bootstrap/blueprint-pathtools/test/test.a
[ 14% 37/252] gotestmain out/soong/.bootstrap/soong-bp2build/test/test.go
[ 15% 38/252] gotestmain out/soong/.bootstrap/soong-bpf/test/test.go
[ 15% 39/252] gotestmain out/soong/.bootstrap/soong-android/test/test.go
[ 15% 40/252] gotestmain out/soong/.bootstrap/soong-cc/test/test.go
[ 16% 41/252] gotestmain out/soong/.bootstrap/soong-csuite/test/test.go
[ 16% 42/252] gotestmain out/soong/.bootstrap/soong-cquery/test/test.go
[ 17% 43/252] gotestmain out/soong/.bootstrap/soong-cc-config/test/test.go
[ 17% 44/252] compile out/soong/.bootstrap/golang-protobuf-proto/test/github.com/golang/protobuf/proto.a
[ 17% 45/252] gotestmain out/soong/.bootstrap/soong-dexpreopt/test/test.go
[ 18% 46/252] compile out/soong/.bootstrap/sbox_proto/pkg/android/soong/cmd/sbox/sbox_proto.a
[ 18% 47/252] gotestmain out/soong/.bootstrap/soong-filesystem/test/test.go
[ 19% 48/252] compile out/soong/.bootstrap/blueprint-proptools/test/github.com/google/blueprint/proptools.a
[ 19% 49/252] compile out/soong/.bootstrap/soong-cquery/test/test.a
[ 19% 50/252] gotestmain out/soong/.bootstrap/soong-etc/test/test.go
[ 20% 51/252] compile out/soong/.bootstrap/golang-protobuf-proto/test/test.a
[ 20% 52/252] gotestmain out/soong/.bootstrap/soong-genrule/test/test.go
[ 21% 53/252] gotestmain out/soong/.bootstrap/soong-java/test/test.go
[ 21% 54/252] gotestmain out/soong/.bootstrap/soong-kernel/test/test.go
[ 21% 55/252] gotestmain out/soong/.bootstrap/soong-linkerconfig/test/test.go
[ 22% 56/252] compile out/soong/.bootstrap/blueprint-proptools/test/test.a
[ 22% 57/252] gotestmain out/soong/.bootstrap/soong-remoteexec/test/test.go
[ 23% 58/252] gotestmain out/soong/.bootstrap/soong-python/test/test.go
[ 23% 59/252] gotestmain out/soong/.bootstrap/soong-response/test/test.go
[ 23% 60/252] gotestmain out/soong/.bootstrap/soong-rust/test/test.go
[ 24% 61/252] compile out/soong/.bootstrap/soong-remoteexec/test/test.a
[ 24% 62/252] gotestmain out/soong/.bootstrap/soong-sdk/test/test.go
[ 25% 63/252] compile out/soong/.bootstrap/soong-response/test/test.a
[ 25% 64/252] link out/soong/.bootstrap/blueprint-pathtools/test/test
[ 25% 65/252] gotestmain out/soong/.bootstrap/soong-sh/test/test.go
[ 26% 66/252] link out/soong/.bootstrap/blueprint-parser/test/test
[ 26% 67/252] gotestmain out/soong/.bootstrap/soong-shared/test/test.go
[ 26% 68/252] test github.com/google/blueprint/parser
[ 27% 69/252] gotestmain out/soong/.bootstrap/soong-sysprop/test/test.go
[ 27% 70/252] gotestmain out/soong/.bootstrap/soong-xml/test/test.go
[ 28% 71/252] test github.com/google/blueprint/pathtools
[ 28% 72/252] link out/soong/.bootstrap/golang-protobuf-proto/test/test
[ 28% 73/252] link out/soong/.bootstrap/soong-remoteexec/test/test
[ 29% 74/252] link out/soong/.bootstrap/soong-cquery/test/test
[ 29% 75/252] test github.com/golang/protobuf/proto
[ 30% 76/252] test android/soong/remoteexec
[ 30% 77/252] link out/soong/.bootstrap/blueprint-proptools/test/test
[ 30% 78/252] test android/soong/bazel/cquery
[ 31% 79/252] test github.com/google/blueprint/proptools
[ 31% 80/252] compile out/soong/.bootstrap/soong-ui-metrics_proto/pkg/android/soong/ui/metrics/metrics_proto.a
[ 32% 81/252] link out/soong/.bootstrap/soong-response/test/test
[ 32% 82/252] test android/soong/response
[ 32% 83/252] compile out/soong/.bootstrap/blueprint/pkg/github.com/google/blueprint.a
[ 33% 84/252] compile out/soong/.bootstrap/soong/pkg/android/soong.a
[ 33% 85/252] compile out/soong/.bootstrap/blueprint/test/github.com/google/blueprint.a
[ 34% 86/252] compile out/soong/.bootstrap/soong-android-soongconfig/pkg/android/soong/android/soongconfig.a
[ 34% 87/252] compile out/soong/.bootstrap/soong-android-soongconfig/test/android/soong/android/soongconfig.a
[ 34% 88/252] compile out/soong/.bootstrap/blueprint-bootstrap-bpdoc/pkg/github.com/google/blueprint/bootstrap/bpdoc.a
[ 35% 89/252] compile out/soong/.bootstrap/soong-bazel/pkg/android/soong/bazel.a
[ 35% 90/252] compile out/soong/.bootstrap/blueprint/test/test.a
[ 36% 91/252] compile out/soong/.bootstrap/soong-bazel/test/android/soong/bazel.a
[ 36% 92/252] compile out/soong/.bootstrap/blueprint-bootstrap-bpdoc/test/github.com/google/blueprint/bootstrap/bpdoc.a
[ 36% 93/252] compile out/soong/.bootstrap/soong-android-soongconfig/test/test.a
[ 37% 94/252] compile out/soong/.bootstrap/soong-bazel/test/test.a
[ 37% 95/252] compile out/soong/.bootstrap/soong-shared/test/android/soong/shared.a
[ 38% 96/252] compile out/soong/.bootstrap/soong-shared/pkg/android/soong/shared.a
[ 38% 97/252] compile out/soong/.bootstrap/blueprint-bootstrap-bpdoc/test/test.a
[ 38% 98/252] compile out/soong/.bootstrap/soong-shared/test/test.a
[ 39% 99/252] compile out/soong/.bootstrap/blueprint-bootstrap/pkg/github.com/google/blueprint/bootstrap.a
[ 39% 100/252] link out/soong/.bootstrap/soong-bazel/test/test
[ 40% 101/252] test android/soong/bazel
[ 40% 102/252] link out/soong/.bootstrap/soong-android-soongconfig/test/test
[ 40% 103/252] link out/soong/.bootstrap/blueprint/test/test
[ 41% 104/252] test android/soong/android/soongconfig
[ 41% 105/252] link out/soong/.bootstrap/soong-shared/test/test
[ 42% 106/252] link out/soong/.bootstrap/blueprint-bootstrap-bpdoc/test/test
[ 42% 107/252] test android/soong/shared
[ 42% 108/252] test github.com/google/blueprint
[ 43% 109/252] test github.com/google/blueprint/bootstrap/bpdoc
[ 43% 110/252] compile out/soong/.bootstrap/soong-android/pkg/android/soong/android.a
[ 44% 111/252] compile out/soong/.bootstrap/cuttlefish-soong-rules/pkg/android/soong/cuttlefish.a
[ 44% 112/252] compile out/soong/.bootstrap/soong-bloaty/pkg/android/soong/bloaty.a
[ 44% 113/252] compile out/soong/.bootstrap/kernel-config-soong-rules/pkg/android/soong/kernel/configs.a
[ 45% 114/252] compile out/soong/.bootstrap/soong-etc/pkg/android/soong/etc.a
[ 45% 115/252] compile out/soong/.bootstrap/soong-icu/pkg/android/soong/icu.a
[ 46% 116/252] compile out/soong/.bootstrap/soong-etc/test/android/soong/etc.a
[ 46% 117/252] compile out/soong/.bootstrap/soong-cc-config/test/android/soong/cc/config.a
[ 46% 118/252] compile out/soong/.bootstrap/soong-java-config/pkg/android/soong/java/config.a
[ 47% 119/252] compile out/soong/.bootstrap/soong-etc/test/test.a
[ 47% 120/252] compile out/soong/.bootstrap/soong-dexpreopt/pkg/android/soong/dexpreopt.a
[ 48% 121/252] compile out/soong/.bootstrap/soong-dexpreopt/test/android/soong/dexpreopt.a
[ 48% 122/252] compile out/soong/.bootstrap/soong-cc-config/pkg/android/soong/cc/config.a
[ 48% 123/252] compile out/soong/.bootstrap/soong-cc-config/test/test.a
[ 49% 124/252] compile out/soong/.bootstrap/soong-java-config-error_prone/pkg/android/soong/java/config/error_prone.a
[ 49% 125/252] compile out/soong/.bootstrap/soong-lineage-generator/pkg/lineage/soong/generator.a
[ 50% 126/252] compile out/soong/.bootstrap/soong-dexpreopt/test/test.a
[ 50% 127/252] compile out/soong/.bootstrap/soong-genrule/pkg/android/soong/genrule.a
[ 50% 128/252] compile out/soong/.bootstrap/soong-robolectric/pkg/android/soong/robolectric.a
[ 51% 129/252] compile out/soong/.bootstrap/soong-phony/pkg/android/soong/phony.a
[ 51% 130/252] compile out/soong/.bootstrap/soong-genrule/test/android/soong/genrule.a
[ 51% 131/252] compile out/soong/.bootstrap/soong-tradefed/pkg/android/soong/tradefed.a
[ 52% 132/252] compile out/soong/.bootstrap/soong-ca-certificates/pkg/android/soong/system/ca-certificates.a
[ 52% 133/252] compile out/soong/.bootstrap/soong-rust-config/pkg/android/soong/rust/config.a
[ 53% 134/252] compile out/soong/.bootstrap/soong-fs_config/pkg/android/soong/fs_config.a
[ 53% 135/252] compile out/soong/.bootstrap/soong-genrule/test/test.a
[ 53% 136/252] compile out/soong/.bootstrap/soong-libchrome/pkg/android/soong/external/libchrome.a
[ 54% 137/252] compile out/soong/.bootstrap/soong-wayland-protocol-codegen/pkg/android/soong/external/wayland-protocol.a
[ 54% 138/252] compile out/soong/.bootstrap/soong-python/pkg/android/soong/python.a
[ 55% 139/252] compile out/soong/.bootstrap/soong-python/test/android/soong/python.a
[ 55% 140/252] compile out/soong/.bootstrap/soong-android/test/android/soong/android.a
[ 55% 141/252] compile out/soong/.bootstrap/soong-xml/test/android/soong/xml.a
[ 56% 142/252] compile out/soong/.bootstrap/soong-xml/pkg/android/soong/xml.a
[ 56% 143/252] compile out/soong/.bootstrap/soong-python/test/test.a
[ 57% 144/252] link out/soong/.bootstrap/soong-etc/test/test
[ 57% 145/252] compile out/soong/.bootstrap/soong-xml/test/test.a
[ 57% 146/252] compile out/soong/.bootstrap/soong-android/test/test.a
[ 58% 147/252] test android/soong/etc
[ 58% 148/252] compile out/soong/.bootstrap/vintf-compatibility-matrix-soong-rules/pkg/android/soong/vintf-compatibility-matrix.a
[ 59% 149/252] link out/soong/.bootstrap/soong-dexpreopt/test/test
[ 59% 150/252] link out/soong/.bootstrap/soong-cc-config/test/test
[ 59% 151/252] test android/soong/dexpreopt
[ 60% 152/252] test android/soong/cc/config
[ 60% 153/252] link out/soong/.bootstrap/soong-genrule/test/test
[ 61% 154/252] test android/soong/genrule
[ 61% 155/252] link out/soong/.bootstrap/soong-xml/test/test
[ 61% 156/252] link out/soong/.bootstrap/soong-python/test/test
[ 62% 157/252] test android/soong/xml
[ 62% 158/252] test android/soong/python
[ 63% 159/252] link out/soong/.bootstrap/soong-android/test/test
[ 63% 160/252] test android/soong/android
[ 63% 161/252] compile out/soong/.bootstrap/soong-cc/pkg/android/soong/cc.a
[ 64% 162/252] compile out/soong/.bootstrap/soong-display_defaults/pkg/android/soong/hardware/qcom/sm8150/display.a
[ 64% 163/252] compile out/soong/.bootstrap/arm_compute_library_nn_driver/pkg/arm_compute_library_nn_driver.a
[ 65% 164/252] compile out/soong/.bootstrap/soong-display_defaults_sm7250/pkg/android/soong/hardware/qcom/sm7250/display.a
[ 65% 165/252] compile out/soong/.bootstrap/soong-fluoride/pkg/android/soong/fluoride.a
[ 65% 166/252] compile out/soong/.bootstrap/soong-fluoride_qti/pkg/android/soong/fluoride_qti.a
[ 66% 167/252] compile out/soong/.bootstrap/soong-cc/test/android/soong/cc.a
[ 66% 168/252] compile out/soong/.bootstrap/soong-bpf/test/android/soong/bpf.a
[ 67% 169/252] compile out/soong/.bootstrap/soong-clang-prebuilts/pkg/android/soong/prebuilts/clang/host/linux-x86/clangprebuilts.a
[ 67% 170/252] compile out/soong/.bootstrap/soong-bpf/pkg/android/soong/bpf.a
[ 67% 171/252] compile out/soong/.bootstrap/soong-bpf/test/test.a
[ 68% 172/252] compile out/soong/.bootstrap/soong-clang/pkg/android/soong/external/clang.a
[ 68% 173/252] compile out/soong/.bootstrap/soong-cc/test/test.a
[ 69% 174/252] compile out/soong/.bootstrap/soong-kernel/pkg/android/soong/kernel.a
[ 69% 175/252] compile out/soong/.bootstrap/soong-kernel/test/android/soong/kernel.a
[ 69% 176/252] compile out/soong/.bootstrap/soong-kernel/test/test.a
[ 70% 177/252] compile out/soong/.bootstrap/soong-linkerconfig/test/android/soong/linkerconfig.a
[ 70% 178/252] compile out/soong/.bootstrap/soong-llvm/pkg/android/soong/external/llvm.a
[ 71% 179/252] compile out/soong/.bootstrap/soong-linkerconfig/pkg/android/soong/linkerconfig.a
[ 71% 180/252] compile out/soong/.bootstrap/soong-linkerconfig/test/test.a
[ 71% 181/252] compile out/soong/.bootstrap/soong-sh/test/android/soong/sh.a
[ 72% 182/252] compile out/soong/.bootstrap/soong-filesystem/test/android/soong/filesystem.a
[ 72% 183/252] compile out/soong/.bootstrap/soong-filesystem/pkg/android/soong/filesystem.a
[ 73% 184/252] compile out/soong/.bootstrap/soong-filesystem/test/test.a
[ 73% 185/252] compile out/soong/.bootstrap/soong-sh/test/test.a
[ 73% 186/252] compile out/soong/.bootstrap/soong-rust/test/android/soong/rust.a
[ 74% 187/252] compile out/soong/.bootstrap/soong-rust/test/test.a
[ 74% 188/252] link out/soong/.bootstrap/soong-kernel/test/test
[ 75% 189/252] compile out/soong/.bootstrap/soong-rust/pkg/android/soong/rust.a
[ 75% 190/252] link out/soong/.bootstrap/soong-bpf/test/test
[ 75% 191/252] link out/soong/.bootstrap/soong-cc/test/test
[ 76% 192/252] test android/soong/kernel
[ 76% 193/252] compile out/soong/.bootstrap/soong-sh/pkg/android/soong/sh.a
[ 76% 194/252] link out/soong/.bootstrap/soong-linkerconfig/test/test
[ 77% 195/252] test android/soong/bpf
[ 77% 196/252] test android/soong/linkerconfig
[ 78% 197/252] link out/soong/.bootstrap/soong-filesystem/test/test
[ 78% 198/252] compile out/soong/.bootstrap/soong-bp2build/pkg/android/soong/bp2build.a
[ 78% 199/252] link out/soong/.bootstrap/soong-sh/test/test
[ 79% 200/252] test android/soong/sh
[ 79% 201/252] compile out/soong/.bootstrap/soong-bp2build/test/android/soong/bp2build.a
[ 80% 202/252] compile out/soong/.bootstrap/soong-bp2build/test/test.a
[ 80% 203/252] test android/soong/filesystem
[ 80% 204/252] link out/soong/.bootstrap/soong-rust/test/test
[ 81% 205/252] compile out/soong/.bootstrap/soong-java/pkg/android/soong/java.a
[ 81% 206/252] link out/soong/.bootstrap/soong-bp2build/test/test
[ 82% 207/252] compile out/soong/.bootstrap/soong-suite-harness/pkg/android/soong/tradefed/suite_harness.a
[ 82% 208/252] compile out/soong/.bootstrap/soong-csuite/test/android/soong/csuite.a
[ 82% 209/252] compile out/soong/.bootstrap/soong-csuite/pkg/android/soong/csuite.a
[ 83% 210/252] compile out/soong/.bootstrap/soong-csuite/test/test.a
[ 83% 211/252] compile out/soong/.bootstrap/soong-sysprop/pkg/android/soong/sysprop.a
[ 84% 212/252] test android/soong/bp2build
[ 84% 213/252] compile out/soong/.bootstrap/hidl-soong-rules/pkg/android/soong/hidl.a
[ 84% 214/252] compile out/soong/.bootstrap/soong-sysprop/test/android/soong/sysprop.a
[ 85% 215/252] compile out/soong/.bootstrap/xsdc-soong-rules/pkg/android/soong/xsdc.a
[ 85% 216/252] compile out/soong/.bootstrap/soong-sysprop/test/test.a
[ 86% 217/252] compile out/soong/.bootstrap/soong-java/test/android/soong/java.a
[ 86% 218/252] compile out/soong/.bootstrap/soong-selinux/pkg/android/soong/selinux.a
[ 86% 219/252] compile out/soong/.bootstrap/soong-java/test/test.a
[ 87% 220/252] compile out/soong/.bootstrap/soong-apex/pkg/android/soong/apex.a
[ 87% 221/252] compile out/soong/.bootstrap/gki-soong-rules/pkg/android/soong/gki.a
[ 88% 222/252] compile out/soong/.bootstrap/gki-soong-rules/test/android/soong/gki.a
[ 88% 223/252] compile out/soong/.bootstrap/gki-soong-rules/test/test.a
[ 88% 224/252] compile out/soong/.bootstrap/soong-apex/test/android/soong/apex.a
[ 89% 225/252] compile out/soong/.bootstrap/soong-art/pkg/android/soong/art.a
[ 89% 226/252] link out/soong/.bootstrap/soong-csuite/test/test
[ 90% 227/252] compile out/soong/.bootstrap/soong-apex/test/test.a
[ 90% 228/252] test android/soong/csuite
[ 90% 229/252] compile out/soong/.bootstrap/aidl-soong-rules/pkg/android/soong/aidl.a
[ 91% 230/252] compile out/soong/.bootstrap/aidl-soong-rules/test/android/soong/aidl.a
[ 91% 231/252] link out/soong/.bootstrap/soong-sysprop/test/test
[ 92% 232/252] compile out/soong/.bootstrap/aidl-soong-rules/test/test.a
[ 92% 233/252] compile out/soong/.bootstrap/soong-sdk/pkg/android/soong/sdk.a
[ 92% 234/252] compile out/soong/.bootstrap/soong-sdk/test/android/soong/sdk.a
[ 93% 235/252] link out/soong/.bootstrap/soong-java/test/test
[ 93% 236/252] compile out/soong/.bootstrap/soong-sdk/test/test.a
[ 94% 237/252] compile out/soong/.bootstrap/soong_build/obj/soong_build.a
[ 94% 238/252] link out/soong/.bootstrap/gki-soong-rules/test/test
[ 94% 239/252] link out/soong/.bootstrap/soong-apex/test/test
[ 95% 240/252] test android/soong/gki
[ 95% 241/252] link out/soong/.bootstrap/aidl-soong-rules/test/test
[ 96% 242/252] test android/soong/sysprop
[ 96% 243/252] link out/soong/.bootstrap/soong-sdk/test/test
[ 96% 244/252] link out/soong/.bootstrap/soong_build/obj/a.out
[ 97% 245/252] cp out/soong/.bootstrap/bin/soong_build
[ 97% 246/252] test android/soong/aidl
[ 98% 247/252] test android/soong/rust
[ 98% 248/252] test android/soong/java
[ 98% 249/252] test android/soong/cc
[ 99% 250/252] test android/soong/sdk
[ 99% 251/252] test android/soong/apex
[100% 252/252] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER"     --top "$TOP"     --out "out/soong"     -n "out"     -d "out/soong/build.ninja.d"     -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
Killed
08:52:51 soong bootstrap failed with: exit status 1
ninja: build stopped: subcommand failed.

#### failed to build some targets (03:48 (mm:ss)) ####

>> [Sat Feb 24 08:52:51 UTC 2024] Failed build for FP4
>> [Sat Feb 24 08:52:51 UTC 2024] Finishing build for FP4
>> [Sat Feb 24 08:52:51 UTC 2024] Cleaning source dir for device FP4
08:52:53 Entire build directory removed.

#### build completed successfully (2 seconds) ####

Second edit

I think looking more carefully, @maximebellis, your virtual disk limit is set way too low – even the max 467G is borderline. Please can you try again on max.

Can I double check, via Dual boot or VM ?

Edit
Interesting from your image, looks like your machine has nproc=8, but docker seems to allow you to set a limit of say 4 (or even 1 later, as this would further help eliminate some segfault). This would seem worth a test, worth also comparing / noting “build time” with last 03:48 (mm:ss) On reflection this is probably not a way of manipulating the -j flag.

1 Like

So I tried to completly restart. Removed the folder and create the directories again. Also maxed out everything in docker. When I first type repo sync, it adds the device files for the FP4 in the device folder. But when I than run

sudo docker run -v "/srv/e/src:/srv/src" -v "/srv/e/zips:/srv/zips" -v "/srv/e/logs:/srv/logs" -v "/srv/e/ccache:/srv/ccache" -e "BRANCH_NAME=v1.19.1-s" -e "DEVICE_LIST=FP4" -e "REPO=https://gitlab.e.foundation/e/os/releases.git" registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

I get the following log:

>> [Sat Feb 24 12:18:46 UTC 2024] Starting build for FP4, v1.19.1-s branch
12:18:52 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
e[1mbuild/make/core/product_config.mk:160: e[31merror: e[0me[1mCan not locate config makefile for product "lineage_FP4".e[0m
12:18:52 dumpvars failed with: exit status 1
  File "/usr/local/bin/repo", line 51
    def print(self, *args, **kwargs):
            ^
SyntaxError: invalid syntax
Device FP4 not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Found repository: android_device_fairphone_FP4
Default revision: lineage-19.1
Checking branch info
Checking if device/fairphone/FP4 is fetched from android_device_fairphone_FP4
Adding dependency: LineageOS/android_device_fairphone_FP4 -> device/fairphone/FP4
Using default branch for android_device_fairphone_FP4
Syncing repository to retrieve project.
Repository synced!
Looking for dependencies in device/fairphone/FP4
device/fairphone/FP4 has no additional dependencies.
Done
12:18:54 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
e[1mbuild/make/core/product_config.mk:160: e[31merror: e[0me[1mCan not locate config makefile for product "lineage_FP4".e[0m
12:18:54 dumpvars failed with: exit status 1
12:18:55 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
e[1mbuild/make/core/product_config.mk:160: e[31merror: e[0me[1mCan not locate config makefile for product "lineage_FP4".e[0m
12:18:55 dumpvars failed with: exit status 1

** Don't have a product spec for: 'lineage_FP4'
** Do you have the right repo manifest?

No such item in brunch menu. Try 'breakfast'
>> [Sat Feb 24 12:18:55 UTC 2024] Failed build for FP4
>> [Sat Feb 24 12:18:55 UTC 2024] Finishing build for FP4
>> [Sat Feb 24 12:18:55 UTC 2024] Cleaning source dir for device FP4
12:18:56 Entire build directory removed.

#### build completed successfully (1 seconds) ####

And I look at the device folder and the folder for fairphone is removed.

I’m not sure what you mean by that?

This is not the “book method” – if you had a clean environment then repo init was not run before repo sync — repo sync will not know what to do – may make it more difficult to see if / where docker fails and to interpret logs! :slight_smile:

I imagine you never saw the message “repo sync has finished successfully.

At this stage I keep notes of disk space used. The above full job might have added 120G used space.

Now to docker …

Repository synced!
Looking for dependencies in device/fairphone/FP4
device/fairphone/FP4 has no additional dependencies.
Done

The above looks good … but … extracting “e[31m” type bits which are warnings in colour we see …

build/make/core/product_config.mk:160: error: Can not locate config makefile for product "lineage_FP4"
12:18:55 dumpvars failed with: exit status 1

Looks like https://forum.fairphone.com/t/fp4-and-unofficial-lineageos/77347/433 – docker has got confused … perhaps check out the other comments adjacent there.

OK, so this is about Is this a pure Ubuntu environment and why am I seeing reference to Windows ?

Three ways to take a retail laptop sold with Windows

  • Remove Windows entirely with the Ubuntu install – ideal.
  • Partition the hard drive, add a bootloader like Grub, and allow yourself to choose to boot either Windows or Ubuntu. – Dual boot, Ok
  • Using Windows install some sort of Virtual machine which offers to run Ubuntu as it were inside Windows. – VM = Virtual machine.

Windows is entirly removed. SO it should just be a Linux machine.

I have been looking into:

Don't have a product spec for: 'lineage_FP4'

But I’m still stuck at this error. The FP4 is not in the device folder. I just ran:

sudo docker run -v "/srv/e/src:/srv/src" -v "/srv/e/zips:/srv/zips" -v "/srv/e/logs:/srv/logs" -v "/srv/e/ccache:/srv/ccache" -e "BRANCH_NAME=v1.19.1-s" -e "DEVICE_LIST=FP4" -e "REPO=https://gitlab.e.foundation/e/os/releases.git" registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

I think that we do not know if this is happening because your environment has not yet downloaded all the required sources.

Can you tell whether your environment has acquired 120GiB - 240 GiB of data?

Is this file being created?

`<build environment>/.repo/local_manifests/roomservice.xml`

How is the machine partitioned ?

Default docker wants to work in the root partition, so for instance this machine would need a non default folder structure – no useful space on / .

$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0   514M  0 part /boot/efi
├─sda2   8:2    0  13.9G  0 part /
└─sda3   8:4    0 857.5G  0 part /home

I use 32Gb of RAM + swap to build S for the Fairphone 3, i think it is not possibl with less RAM.

Being aware of State of Community Docker: Working? and https://gitlab.e.foundation/e/backlog/-/issues/7688 I ran a variant of your docker FP4 v1.19.1-s branch on my 32G RAM + swap machine overnight.

I do not normally use docker so I would be prepared to believe that I made some docker errors, but I seem to reproduce most of the issues you report.

/srv/logs/repo-20240228.log ends repo sync has finished successfully.

At first sight using ncdu the environment looks well populated.

/src/S
130.8 GiB [##########] /.repo
49.2 GiB [### ] /vendor
45.9 GiB [### ] /prebuilts
9.9 GiB [ ] /external
2.3 GiB [ ] /packages
2.0 GiB [ ] /cts
1.8 GiB [ ] /frameworks
959.1 MiB [ ] /kernel
804.3 MiB [ ] /tools
792.2 MiB [ ] /system
468.7 MiB [ ] /test
443.8 MiB [ ] /hardware
369.2 MiB [ ] /device
221.2 MiB [ ] /developers
177.4 MiB [ ] /platform_testing
176.8 MiB [ ] /lineage
162.1 MiB [ ] /development
104.1 MiB [ ] /toolchain
93.9 MiB [ ] /art
90.8 MiB [ ] /libcore
64.0 MiB [ ] /bionic
Total disk usage: 246.7 GiB Apparent size: 241.3 GiB Items: 2832351

But the FP4 log reads

>> [Wed Feb 28 08:45:07 UTC 2024] Starting build for FP4, v1.19.1-s branch
08:45:14 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
e[1mbuild/make/core/product_config.mk:160: e[31merror: e[0me[1mCan not locate config makefile for product "lineage_FP4".e[0m
08:45:14 dumpvars failed with: exit status 1
  File "/usr/local/bin/repo", line 51
    def print(self, *args, **kwargs):
            ^
SyntaxError: invalid syntax
Device FP4 not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Found repository: android_device_fairphone_FP4
Default revision: lineage-19.1
Checking branch info
Checking if device/fairphone/FP4 is fetched from android_device_fairphone_FP4
Adding dependency: LineageOS/android_device_fairphone_FP4 -> device/fairphone/FP4
Using default branch for android_device_fairphone_FP4
Syncing repository to retrieve project.
Repository synced!
Looking for dependencies in device/fairphone/FP4
device/fairphone/FP4 has no additional dependencies.
Done
08:45:15 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
e[1mbuild/make/core/product_config.mk:160: e[31merror: e[0me[1mCan not locate config makefile for product "lineage_FP4".e[0m
08:45:15 dumpvars failed with: exit status 1
08:45:16 Build sandboxing disabled due to nsjail error.
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
e[1mbuild/make/core/product_config.mk:160: e[31merror: e[0me[1mCan not locate config makefile for product "lineage_FP4".e[0m
08:45:16 dumpvars failed with: exit status 1

** Don't have a product spec for: 'lineage_FP4'
** Do you have the right repo manifest?

No such item in brunch menu. Try 'breakfast'
>> [Wed Feb 28 08:45:16 UTC 2024] Failed build for FP4
>> [Wed Feb 28 08:45:16 UTC 2024] Finishing build for FP4
>> [Wed Feb 28 08:45:16 UTC 2024] Cleaning source dir for device FP4
08:45:17 Entire build directory removed.

#### build completed successfully (1 seconds) ####

The following local_manifests files exist:
/src/S/.repo/local_manifests/proprietary_gitlab.xml, /src/S/.repo/local_manifests/proprietary.xml and /src/S/.repo/local_manifests/roomservice.xml which reads:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="LineageOS/android_device_fairphone_FP4" path="device/fairphone/FP4" remote="github" />
</manifest>

Edit

The one line roomservice.xml is unexpected. At least a part of the problem here is that docker has failed to pull in a kernel line in .repo/local_manifests/roomservice.xml

I think such line would look like

  <project path="kernel/fairphone/sm7225" remote="github" name="LineageOS/android_kernel_fairphone_sm7225" />

I will update if this seems a fix.

You mean this line?

<project name="LineageOS/android_device_fairphone_FP4" path="device/fairphone>

Why is it unexpected?

What is fairphone sm722?

Please can you tell me what you see.

Because with the roomservice.xml in my report we would be trying to build a ROM without a kernel !

It refers to the kernel which I think we need. https://github.com/LineageOS/android_kernel_fairphone_sm7225

Thus it is a fit with

** Don't have a product spec for: 'lineage_FP4'
** Do you have the right repo manifest?

… No we don’t!

I have a build in progress will update if it works.

i see this

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="LineageOS/android_device_fairphone_FP4" path="device/fairphone/FP4" remote="github" />
</manifest>

My build failed at 99% when I changed out of docker to old fashioned repo sync method.

However. maybe you can get docker to work by creating an improved .repo/local_manifests/FP4.xml.

Thanks, so in that is a match with mine. Please also verify to yourself that in /path/to/src/S/.repo/local_manifests you find

proprietary_gitlab.xml
proprietary.xml
roomservice.xml

The method should then be as follows.

cd /path/to/src/S/.repo/local_manifests/
sudo rm roomservice.xml

Then

mkdir /srv/local_manifests/`

and within that folder add a file named FP4.xml

which should read

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="LineageOS/android_device_fairphone_FP4" path="device/fairphone/FP4" remote="github" />
  <project path="kernel/fairphone/sm7225" remote="github" name="LineageOS/android_kernel_fairphone_sm7225" />
</manifest>

Then please add to your docker command an element in this format

-v "/srv/local_manifests:/srv/local_manifests" \

It might be worthwhile to add privileged to your docker run

sudo docker run --privileged

by allowing docker to use the host file system, issues with

Build sandboxing disabled due to nsjail error.

during build disappeared for me.


sudo docker run --rm --privileged

The --rm is just for cleaning up, will not hurt and just removes the container you just spun up.


[quote="maximebellis, post:4, topic:55806"] HOST_CROSS_OS=windows [/quote]

This must be backed into the docker image, I see this, too


[quote="maximebellis, post:6, topic:55806"] ``` :18:52 dumpvars failed with: exit status 1 File "/usr/local/bin/repo", line 51 def print(self, *args, **kwargs): ^ SyntaxError: invalid syntax ``` [/quote] I was getting the above errors starting build with the late Oktober/November version of the /e docker image.

Tried fixing a ton of things and I even reformatted the ssd and installed new.


[quote="maximebellis, post:4, topic:55806"] `08:49:03 You are building on a machine with 15.4GB of RAM` [/quote]

16Gb RAM and just a single 500Gb SSD; minimal Ubuntu 22.04 Server and Docker from snaps

Did work for me on my first ever build:


I might spin up my workstation on the weekend and run your device in docker just see.

Did that work for you? Cause I’m still getting same error

I run the command now privileged:

sudo docker run --rm --privileged -v "/srv/e/src:/srv/src" -v "/srv/e/zips:/srv/zips" -v "/srv/e/logs:/srv/logs" -v "/srv/e/ccache:/srv/ccache" -e "BRANCH_NAME=v1.19.1-s" -e "DEVICE_LIST=FP4" -e "REPO=https://gitlab.e.foundation/e/os/releases.git" registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

My build log now looks like this;

>> [Thu Feb 29 12:25:57 UTC 2024] Starting build for FP4, v1.19.1-s branch
[W][2024-02-29T12:26:02+0000][27603] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files
[W][2024-02-29T12:26:02+0000][27603] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
e[1mbuild/make/core/product_config.mk:160: e[31merror: e[0me[1mCan not locate config makefile for product "lineage_FP4".e[0m
12:26:02 dumpvars failed with: exit status 1
  File "/usr/local/bin/repo", line 51
    def print(self, *args, **kwargs):
            ^
SyntaxError: invalid syntax
Device FP4 not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Found repository: android_device_fairphone_FP4
Default revision: lineage-19.1
Checking branch info
Checking if device/fairphone/FP4 is fetched from android_device_fairphone_FP4
Adding dependency: LineageOS/android_device_fairphone_FP4 -> device/fairphone/FP4
Using default branch for android_device_fairphone_FP4
Syncing repository to retrieve project.
Repository synced!
Looking for dependencies in device/fairphone/FP4
device/fairphone/FP4 has no additional dependencies.
Done
[W][2024-02-29T12:26:04+0000][27673] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files
[W][2024-02-29T12:26:04+0000][27673] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
e[1mbuild/make/core/product_config.mk:160: e[31merror: e[0me[1mCan not locate config makefile for product "lineage_FP4".e[0m
12:26:04 dumpvars failed with: exit status 1
[W][2024-02-29T12:26:05+0000][27742] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files
[W][2024-02-29T12:26:05+0000][27742] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
e[1mbuild/make/core/product_config.mk:160: e[31merror: e[0me[1mCan not locate config makefile for product "lineage_FP4".e[0m
12:26:05 dumpvars failed with: exit status 1

** Don't have a product spec for: 'lineage_FP4'
** Do you have the right repo manifest?

No such item in brunch menu. Try 'breakfast'
>> [Thu Feb 29 12:26:05 UTC 2024] Failed build for FP4
>> [Thu Feb 29 12:26:05 UTC 2024] Finishing build for FP4
>> [Thu Feb 29 12:26:05 UTC 2024] Cleaning source dir for device FP4
12:26:06 Entire build directory removed.

#### build completed successfully (1 seconds) ####

… ish in that the build went to 99%. But not tested in docker.

First thing to check – has docker put your FP4.xml into /.repo/local_manifests ?

… and / or has a wrong roomservice.xml been readded ?

Edit

Ah ! I think this is the problem … I do not see

-v "/srv/local_manifests:/srv/local_manifests"

in your new docker command.


Side issue -- fix as above first

I also noticed that while I wrote

You may need to adjust your paths to match your environment. Elsewhere you used a structure /srv/e/src – it may be that you should be careful to keep paths consistent, though I don’t expect this to be a problem

Great! :smile: If you were to do so perhaps you could checkout this detail within a docker environment (as, having abandoned docker, I cannot be sure what was present in my docker test).

We have both seen a single line roomservice.xml which reads

  <project name="LineageOS/android_device_fairphone_FP4" path="device/fairphone/FP4" remote="github" />

No kernel is indicated – got to be a fail.

The log shows:

Looking for dependencies in device/fairphone/FP4
device/fairphone/FP4 has no additional dependencies.
Done

Odd because in /device/fairphone/FP4/lineage.dependencies I see

  {
    "repository": "android_kernel_fairphone_FP4",
    "target_path": "kernel/fairphone/FP4"
  }

Of course the script does helpfully pass on

No such item in brunch menu. Try 'breakfast'

But the script seems to have no ability to run breakfast.

In my case by converting to “plain repo sync method” breakfast is more or less required in establishing the build environment.

Secondly,

There is an /e/OS variant FP4.xml published https://gitlab.e.foundation/e/os/local_manifests/-/blob/v1-s/FP4.xml?ref_type=heads.

However using it (with repo sync) I am currently failing at the “writing build rules …” stage with

FAILED: 
build/make/core/Makefile:61: error: overriding commands for target `out/target/product/FP4/vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service',
previously defined at build/make/core/base_rules.mk:525
11:38:23 ckati failed with: exit status 1

Seems the error was also encountered here Building with Docker image for FP4 fails

I’ve done one more complete formatting of my SSD and started from scratch, with ~15h of repo download – but I can’t build anything anymore, neither any of my previous Samsung, nor Fairphone. So, sorry I can’t be of any help.

Will probably abandon the /e Docker, as it is lacking some basic information, like release notes, updated documentation, updated howto…