Looking for some BUILDERS to teach / guide me

Trying to avoid “The minimum required amount of free memory is around 16GB”
a Docker build is running since 03h (UTC) including a special setting inspired by smu44 shared command : with 7G at the end.

-e "ANDROID_JACK_VM_ARGS=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx7G" \

.

my “/system + /home” volume is full off by multiple repo sync without cleaning,
i will reorganise my computer by adding a dedicated 500 Gb hard drive for workspace (this will also optimize disk access time)
i was planning to setup a 16Gb swap partition along the /system one, but your suggestion about 16Gb USB2 stick is amazing…
i cannot buy (25€) 2x8Gb RAM PC3 10600U (1333Mhz) or 12800U (compatible) for the moment, i don’t know if 2x16Gb exist for those generation.

Edit : i have ordered 2x8Gb (maximum admissible by my p6 motherboard) will see next week…

Have you already set up say 16GB swap ?

If you have a spare 16 GB USB stick (which might go end-of-life with this experiment !) you might set another 16 GB swap there.

Are you watching htop to see memory use ? Memory use starts to spike at 97%.

in htop, i can see that free memory is about 7-15 %
CPU is about 85-95 %
actually /swap (created after the system setup) is not used

Edit : system have colapsed because the single /system volume (500Gb) was full
have modified the configuration right now.

1 Like

ok now trying using the repo way with :

  • 16Gb of RAM the maximum for my p6 motherboard i5 4x3.3Ghz,
    (i also have a Mac Pro bought espcecially to build /e/ that can have more memory, but its CPU tray is HS)

  • a dedicated 500Gb HD mounted to /home/user/lineage

first attempt : build LOS for gts4lv

hi, my first error is comming soon :

following LOS config instructions

git lfs install

give me

Error: Failed to call git rev-parse --git-dir: exit status 128 
Git LFS initialized.

and

repo init -u https://github.com/LineageOS/android.git -b lineage-18.1 --git-lfs

give

Usage: repo init -u url [options]

repo: error: no such option: --git-lfs

Edit :

this morning, when booting, the system found package updates and now git lfs install and repo init -u https://github.com/LineageOS/android.git -b lineage-18.1 --git-lfs works

next steps now… repo sync
done in 26m21.477s
repo sync has finished successfully.

final step : brunch gts4lv is running… … … …

Ouch !

 brunch gts4lv
Looking for dependencies in device/samsung/gts4lv
Looking for dependencies in device/samsung/gts4lv-common
Looking for dependencies in device/samsung/qcom-common
Looking for dependencies in hardware/samsung
hardware/samsung has no additional dependencies.
Looking for dependencies in kernel/samsung/sdm670
kernel/samsung/sdm670 has no additional dependencies.

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
LINEAGE_VERSION=18.1-20230910-UNOFFICIAL-gts4lv
TARGET_PRODUCT=lineage_gts4lv
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-83-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=RQ3A.211001.001
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/samsung/gts4lv vendor/samsung/gts4lv-common device/samsung/gts4lv-common hardware/qcom-caf/sdm845 vendor/qcom/opensource/commonsys-intf/display vendor/qcom/opensource/data-ipa-cfg-mgr vendor/qcom/opensource/dataservices packages/apps/Bluetooth
============================================
14:22:45 ************************************************************
14:22:45 You are building on a machine with 15.6GB of RAM
14:22:45 
14:22:45 The minimum required amount of free memory is around 16GB,
14:22:45 and even with that, some configurations may not work.
14:22:45 
14:22:45 If you run into segfaults or other errors, try reducing your
14:22:45 -j value.
14:22:45 ************************************************************
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
LINEAGE_VERSION=18.1-20230910-UNOFFICIAL-gts4lv
TARGET_PRODUCT=lineage_gts4lv
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-83-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=RQ3A.211001.001
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/samsung/gts4lv vendor/samsung/gts4lv-common devi
ce/samsung/gts4lv-common hardware/qcom-caf/sdm845 vendor/qcom/opensource/commons
ys-intf/display vendor/qcom/opensource/data-ipa-cfg-mgr vendor/qcom/opensource/d
ataservices packages/apps/Bluetooth
============================================
[100% 444/444] writing build rules ...
build/make/core/Makefile:49: warning: overriding commands for target `out/target
/product/gts4lv/vendor/lib64/librilutils.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `ou
t/target/product/gts4lv/vendor/lib64/librilutils.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target
/product/gts4lv/vendor/etc/init/android.hardware.gatekeeper@1.0-service.rc'
build/make/core/base_rules.mk:528: warning: ignoring old commands for target `ou
t/target/product/gts4lv/vendor/etc/init/android.hardware.gatekeeper@1.0-service.
rc'
build/make/core/Makefile:49: warning: overriding commands for target `out/target
/product/gts4lv/vendor/lib/camera.device@1.0-impl.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `ou
t/target/product/gts4lv/vendor/lib/camera.device@1.0-impl.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target
/product/gts4lv/vendor/lib/camera.device@3.2-impl.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `ou
t/target/product/gts4lv/vendor/lib/camera.device@3.2-impl.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target
/product/gts4lv/vendor/lib/camera.device@3.3-impl.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `ou
t/target/product/gts4lv/vendor/lib/camera.device@3.3-impl.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target
/product/gts4lv/vendor/lib/camera.device@3.4-impl.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `ou
t/target/product/gts4lv/vendor/lib/camera.device@3.4-impl.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target
/product/gts4lv/vendor/lib/libsensorndkbridge.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `ou
t/target/product/gts4lv/vendor/lib/libsensorndkbridge.so'
build/make/core/Makefile:49: warning: overriding commands for target `out/target
/product/gts4lv/vendor/lib64/libsensorndkbridge.so'
build/make/core/base_rules.mk:513: warning: ignoring old commands for target `ou
t/target/product/gts4lv/vendor/lib64/libsensorndkbridge.so'
[  1% 1893/114592] build out/target/common/obj/all-event-log-tags.txt
frameworks/base/services/core/java/com/android/server/wm/EventLogTags.logtags:39
: warning: tag "wm_on_paused_called" (30021) duplicated in frameworks/base/core/
java/android/app/EventLogTags.logtags:9
frameworks/base/services/core/java/com/android/server/wm/EventLogTags.logtags:41
: warning: tag "wm_on_resume_called" (30022) duplicated in frameworks/base/core/
java/android/app/EventLogTags.logtags:11
frameworks/base/services/core/java/com/android/server/wm/EventLogTags.logtags:50
: warning: tag "wm_stop_activity" (30048) duplicated in frameworks/base/core/jav
a/android/app/EventLogTags.logtags:14
frameworks/base/services/core/java/com/android/server/wm/EventLogTags.logtags:56
: warning: tag "wm_add_to_stopping" (30066) duplicated in frameworks/base/core/j
ava/android/app/EventLogTags.logtags:35
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeropt
ions/EventLogTags.logtags:6: warning: tag "lock_screen_type" (90200) duplicated 
in packages/apps/Settings/src/com/android/settings/EventLogTags.logtags:6
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeropt
ions/EventLogTags.logtags:9: warning: tag "exp_det_device_admin_activated_by_use
r" (90201) duplicated in packages/apps/Settings/src/com/android/settings/EventLo
gTags.logtags:9
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeropt
ions/EventLogTags.logtags:12: warning: tag "exp_det_device_admin_declined_by_use
r" (90202) duplicated in packages/apps/Settings/src/com/android/settings/EventLo
gTags.logtags:12
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeropt
ions/EventLogTags.logtags:15: warning: tag "exp_det_device_admin_uninstalled_by_
user" (90203) duplicated in packages/apps/Settings/src/com/android/settings/Even
tLogTags.logtags:15
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeropt
ions/EventLogTags.logtags:18: warning: tag "settings_latency" (90204) duplicated
 in packages/apps/Settings/src/com/android/settings/EventLogTags.logtags:18
vendor/qcom/opensource/commonsys/system/bt/EventLogTags.logtags:36: warning: tag
 "bt_hci_timeout" (1010000) duplicated in system/bt/EventLogTags.logtags:36
vendor/qcom/opensource/commonsys/system/bt/EventLogTags.logtags:37: warning: tag
 "bt_config_source" (1010001) duplicated in system/bt/EventLogTags.logtags:37
vendor/qcom/opensource/commonsys/system/bt/EventLogTags.logtags:38: warning: tag
 "bt_hci_unknown_type" (1010002) duplicated in system/bt/EventLogTags.logtags:38
[  1% 2228/114592] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_cl.c
FAILED: out/target/product/gts4lv/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermed
iates/rs_cl.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bi
n/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS
_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript64-linux
-android -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframewo
rks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -DARCH_ARM64_HAVE_NEON -x renderscript
 frameworks/rs/driver/runtime/rs_cl.c -o out/target/product/gts4lv/obj/RENDERSCR
IPT_BITCODE/libclcore.bc_intermediates/rs_cl.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading
 shared libraries: libncurses.so.5: cannot open shared object file: No such file
 or directory
[  1% 2229/114592] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_element.c
FAILED: out/target/product/gts4lv/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermed
iates/rs_element.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bi
n/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS
_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript64-linux
-android -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframewo
rks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -DARCH_ARM64_HAVE_NEON -x renderscript
 frameworks/rs/driver/runtime/rs_element.c -o out/target/product/gts4lv/obj/REND
ERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_element.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading
 shared libraries: libncurses.so.5: cannot open shared object file: No such file
 or directory
[  1% 2230/114592] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_allocatio
FAILED: out/target/product/gts4lv/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermed
iates/rs_allocation.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bi
n/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS
_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript64-linux
-android -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframewo
rks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -DARCH_ARM64_HAVE_NEON -x renderscript
 frameworks/rs/driver/runtime/rs_allocation.c -o out/target/product/gts4lv/obj/R
ENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_allocation.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading
 shared libraries: libncurses.so.5: cannot open shared object file: No such file
 or directory
[  1% 2231/114592] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_core.c
FAILED: out/target/product/gts4lv/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermed
iates/rs_core.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bi
n/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS
_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript64-linux
-android -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframewo
rks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -DARCH_ARM64_HAVE_NEON -x renderscript
 frameworks/rs/driver/runtime/rs_core.c -o out/target/product/gts4lv/obj/RENDERS
CRIPT_BITCODE/libclcore.bc_intermediates/rs_core.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading
 shared libraries: libncurses.so.5: cannot open shared object file: No such file
 or directory
[  1% 2232/114592] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_f16_math.
FAILED: out/target/product/gts4lv/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermed
iates/rs_f16_math.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bi
n/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS
_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript64-linux
-android -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframewo
rks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -DARCH_ARM64_HAVE_NEON -x renderscript
 frameworks/rs/driver/runtime/rs_f16_math.c -o out/target/product/gts4lv/obj/REN
DERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_f16_math.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading
 shared libraries: libncurses.so.5: cannot open shared object file: No such file
 or directory
14:29:21 ninja failed with: exit status 1

#### failed to build some targets (06:36 (mm:ss)) ####

i will retry after running something like

export ANDROID_JACK_VM_ARGS=“-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx15G”

give : identifiant non valable

export "ANDROID_JACK_VM_ARGS=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx15G”

stay in suspend…

can you try the following:

for 32-bit binaries : sudo apt-get install libncurses5:i386

for 64-bit binaries : sudo apt-get install libncurses5

OK, so now you switched to non-Docker building method :wink:
Please read here about requirements: https://gitlab.e.foundation/e/documentation/a-generic-guide-on-porting-eos/-/wikis/05:-Setting-up-the-Build-Environment.

yes, waiting for hours to finally get an error is insupportable.
and i want to share builds to the community for unsupported devices as ronald actually does and itsclarence or harvey186 before him

Hardware recommendations

  • 64 bit environment
  • minimum of 250 GB of free hard disk space
  • 16 GB RAM / swap space
  • Ubuntu OS - is the recommended OS for builds.

All the same, builds should work on most Linux or Mac distributions as long as these conditions are met.

Additional requirements

  • Uninterrupted power supply
  • Fast internet connectivity and unlimited download options ( if possible )

i have

I think you need to read though the “pre-start” bits here https://wiki.lineageos.org/devices/gts4lv/build.

Did you include the apt install list already ?

bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick
lib32ncurses5-dev lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev
libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync
schedtool squashfs-tools xsltproc
zip zlib1g-dev
1 Like

yes

just not sure about exctracting blobs as presentation is not clearly segmented in steps

i will redo from the begining
can i just delete the /home/antec/android/lineage/device/samsung folder ?

ok, i just did, and then…

ensure you install all required package for building as @aibd stated

that’s ok with that step

The really important thing is to do it in the right order.

No need to delete anything at the moment.

When you get to the stage of source build/envsetup.sh I like to look at the output. In fact I save it to help identify missing pieces … so `source build/envsetup.sh > envsetup_01.txt.

Another nice clue is when you find your first .repo/local_manifests/roomservice.xml.

Here is a 7 day only paste of my a3xelte.xml with a 1 line edit of a roomservice.xml

the file was created, but it is empty

I can’t fully explain that, but … you are not ready for source build/envsetup.sh until after repo sync completed successfully, with the full set of tools.

Unknown to me … maybe envsetup.sh can run with Exit code 0 no reported error ?

just one thought, a repo sync under 30min is really fast. If you have a real fast internet connection it might be possible. However I have a cable 1000 mbit/s connection and repo sync does need much more over an hour…

1 Like

how can find to do that ?

Edit : i just found a generated roomservice.xml

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project path="device/samsung/gts4lv" remote="github" name="LineageOS/android_device_samsung_gts4lv" />
  <project path="device/samsung/gts4lv-common" remote="github" name="LineageOS/android_device_samsung_gts4lv-common" />
  <project path="device/samsung/qcom-common" remote="github" name="LineageOS/android_device_samsung_qcom-common" />
  <project path="kernel/samsung/sdm670" remote="github" name="LineageOS/android_kernel_samsung_sdm670" />
  <project path="hardware/samsung" remote="github" name="LineageOS/android_hardware_samsung" />
</manifest>

so i have added the last line from your exemple, and saved it as gts4lv.xml roomservice_xml

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project path="device/samsung/gts4lv" remote="github" name="LineageOS/android_device_samsung_gts4lv" />
  <project path="device/samsung/gts4lv-common" remote="github" name="LineageOS/android_device_samsung_gts4lv-common" />
  <project path="device/samsung/qcom-common" remote="github" name="LineageOS/android_device_samsung_qcom-common" />
  <project path="kernel/samsung/sdm670" remote="github" name="LineageOS/android_kernel_samsung_sdm670" />
  <project path="hardware/samsung" remote="github" name="LineageOS/android_hardware_samsung" />
  <project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" depth="1" />
</manifest>
1 Like

A duplicate won’t be tolerated, so maybe rename roomservice.xml to roomservice_xml

so that, late edit, the “old” roomservice_xml goes “unreadable”
and the “new” <device>.xml is acted upon.

Worth an explanation … is a good plan when building an unsupported device – you will have wanted to do good preparation.

A Lineage supported device provides roomservice.xml, but that will require the addition of extracting blobs or an additional project that is the vendor source from perhaps Gitlab or Github, as you just did in the post above.

repo sync is running…

Fetching: 100% (866/866), done in 5m56.652s
Checking out: 100% (866/866), done in 1m47.808s
repo sync has finished successfully.

source build/envsetup.sh > envsetup_01.txt still empty

brunch gts4lv is running…

failed :

clang-11: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
  HOSTCC  scripts/sign-file
  HOSTLD  scripts/dtc/dtc
/home/antec/android/lineage/kernel/samsung/sdm670/scripts/sign-file.c:25:10: fatal error: 'openssl/opensslv.h' file not
 found
#include <openssl/opensslv.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [scripts/Makefile.host:101 : scripts/sign-file] Erreur 1
make[2]: *** Attente des tâches non terminées....
make[1]: *** [/home/antec/android/lineage/kernel/samsung/sdm670/Makefile:611 : scripts] Erreur 2
make[1]: *** Attente des tâches non terminées....
  UPD     include/config/kernel.release
make[1] : on quitte le répertoire « /home/antec/android/lineage/out/target/product/gts4lv/obj/KERNEL_OBJ »
make: *** [Makefile:152 : sub-make] Erreur 2
make : on quitte le répertoire « /home/antec/android/lineage/kernel/samsung/sdm670 »
19:28:51 ninja failed with: exit status 1

#### failed to build some targets (01:47:20 (hh:mm:ss)) ####

you need to search for opensslv.h header file. Possibly its not in the directory
where it should be as per sign-file.c
If you find it, copy it in the correct folder or change folder in sign-file.c

/home/antec/android/lineage/kernel/samsung/sdm670/scripts/sign-file.c:25:10: fatal error: ‘openssl/opensslv.h’ file not
found
#include <openssl/opensslv.h>

1 Like