Build of 1.7S successful on one computer but fails on another (docker)

I can successfully build 1.7S for gts4lv on my laptop (8-core AMD 5700U and Ubuntu 22.04), however when I try to build on my PC (16 core AMD 5950x with Mint Linux 21.1) it fails. Both have 32 GB Ram and over 1 TB of free SSD space
I receive FAILED: out/soong/build.ninja …

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

which device do you build for? - if you post the soong build logs determining the cause sure is possible.

I have no 16 thread machine lying around, but I have a hunch it puts more memory pressure on the system, can be wrong ofc - Trying to Build for dumpling One Plus 5T - #6 by tcecyk (in that thread it turns out though that device partitioning seemed to be the issue though)

gts4lv is Samsung Galaxy Tab S5e LTE. Since I have a dual boot I tried now with Zorin OS 16.2 (also Ubuntu based) and it worked! So I assume the issue is within my Mint Linux

sorry read past the device codname… thanks!

while soong logs can be hard to read for their exact failure, they usually give a proper hint

hard to speculate what made the difference for zorin vs mint

Had the same problem, in the past, with an OpenSuse server.
So, better stick to Ubuntu, as instructed by how-to :wink:

I can build fine on Linux Mint.

We need more details on the error you see. Please can you post it to e.g. pastebin.com?

Uploaded to pastebin :slight_smile:

The second URL is only a part of the log as size was too large

[ 98% 133475/136145] //packages/apps/EmergencyInfo EmergencyGestureAction:EmergencyGestureAction turbine [common]
09:36:03 ninja failed with: signal: killed

I used to see that error regularly, usually at the end of the build when the kernel is being linked. It’s on"out of memory" error, which indicates that the ld process has used up all the available physical memory and swap. I got rid of it by increasing the size of the configured swap. The amount to increase was arrived at by trail and error: looking at System Monitor to see how much was being used, then adding a bit more :slight_smile:

I have ended up with a total of 28GB of swap (on top of the 16GB of physical memory) split between two different disks/partitions. It’s probably more than I need but I ave disk space to spare :slight_smile:

If you are not familiar with increasing swap in Linux (as I wasn’t), this article gave me pretty much all I needed to get it working:
https://www.howtogeek.com/455981/how-to-create-a-swap-file-on-linux/

Details of how I did it on my wiki

I hope that helps

1 Like

Thanks! That was the issue. I had a new SSD, cloned my old one which all went fine.
But did not realized that the swap partition was disabled, and simply activated it again. Though I have 32 GB without swap this was the issue

1 Like

I tried now the traditional build but got following error when I started brunch gts4lv (using v-1.7S branch):

FAILED: ninja: ‘prebuilts/prebuiltapks/AccountManager/app-standard-release-unsigned.apk’, needed by ‘out/target/product/gts4lv/obj/APPS/AccountManager_intermediates/package.apk’, missing and no known rule to make it

I tried also with LineageOS 20 for gts4lv but got diffferent error :slight_smile:
make[1]: Verzeichnis „/mnt/media/e/lineage20/out/target/product/gts4lv/obj/KERNEL_OBJ“ wird verlassen
make: *** [Makefile:152: sub-make] Fehler 2
make: Verzeichnis „/mnt/media/e/lineage20/kernel/samsung/sdm670“ wird verlassen

From the latest weekly update

thanks Pete!
I did as per instructions and now got the same error message as compiling for LineageOS (sorry the error messages are mainly in german):

make[1]: Verzeichnis „/mnt/media/e/eOS/out/target/product/gts4lv/obj/KERNEL_OBJ“ wird verlassen
make: *** [Makefile:152: sub-make] Fehler 2
make: Verzeichnis „/mnt/media/e/eOS/kernel/samsung/sdm670“ wird verlassen
15:48:04 ninja failed with: exit status 1

So that’s a problem with building that specific kernel so I can;t help I’m afraid.

If you’re seeing it when building Lineage, then it’s not specific to /e/. Worth asking in the XDA forum for the LOS ROM for that device. I couldn’t see one for the LTE version, but there’s one for the WiFi version
https://forum.xda-developers.com/t/rom-official-gts4lv-gts4lvwifi-12-lineageos-19.4396111/

Or this Kernel-specific forum

https://forum.xda-developers.com/t/kernel-pie-ten-luiskernel-linux-4-9-215-for-gts4lvwifi-gts4lvlte-devices.3977343/

because soong/make is chaining lots of commands together it might be hard to see which command in a “( cmd1 -arg blah ) && ( cmd2 -arg blub ) && ( cp -R .. )” is specifically failing. You’d need to pastebin the last few hundred lines of a build log for outsiders to see it

I uploaded the error log here:

it’s objecting to the .pem file contents that got generated.

Maybe something with your openssl version. What version of openssl has the environment you’re building in?

openssl version

### Now generating an X.509 key pair to be used for signing modules
[..]
writing new private key to 'certs/signing_key.pem'
### Key pair generated.
  EXTRACT_CERTS   certs/signing_key.pem
At main.c:154:
- SSL error:0480006C:PEM routines::no start line: ../crypto/pem/pem_lib.c:763
extract-cert: certs/signing_key.pem: Success
make[2]: *** [/mnt/media/e/eOS/kernel/samsung/sdm670/certs/Makefile:102: certs/signing_key.x509] Fehler 1
make[1]: *** [/mnt/media/e/eOS/kernel/samsung/sdm670/Makefile:1126: certs] Fehler 2

I’d checked and it seems I have the latest OpenSSL version installed for Ubuntu.
However I did now use my Zorin OS partition on my computer and successfully build the traditional way

and now also on Mint Linux successfully after compiling openSSL from the sources

Next step: unofficial builds with LineageOS / eOS :slight_smile:
Is there a good how-to available - all what I found is pretty outdated and not much guiding…?