| 29 May 2024 |
atemu12 | Envsetup loads a bunch of bash functions | 17:44:39 |
atemu12 | The line you linked is probably such a function | 17:45:10 |
atemu12 | So it can indeed load env vars | 17:45:29 |
erahhal | Thanks. | 18:23:02 |
erahhal | My current strategy is to see what's different from this repo which successfully builds 21. | 18:23:27 |
atemu12 | That sounds like a good plan | 18:32:40 |
| @swendel:curious.bio joined the room. | 22:28:30 |
| 3 Jun 2024 |
eyJhb | Atemu: https://github.com/nix-community/robotnix/pull/227 any chance this can get merged? :D | 08:13:47 |
atemu12 | I'll have to take a look | 13:50:54 |
erahhal | i've still been trying to get 21 to build in my free time. Realized that there were some issues with the update script that didn't fully populate device-dirs.json and vendor-dirs.json, specifically get_store_path in robotnix_common.py was returning the path with None/ appended to it. I addressed that, and it seems that the json files are fully populated. I did have to comment out adding a dependency to the vendor file (vendor/google/gs-common) as no repo seems to exist. Not sure where to find that repo. I tried building and now get a nix failure rather than an android build failure:
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'cheetah-factory-2024060308.zip'
whose name attribute is located at /nix/store/d0dl9ch4hhxkqikc1dw3868j95gsbb0h-source/pkgs/stdenv/generic/make-derivation.nix:205:7
… while evaluating attribute 'buildCommand' of derivation 'cheetah-factory-2024060308.zip'
at /nix/store/d0dl9ch4hhxkqikc1dw3868j95gsbb0h-source/pkgs/build-support/trivial-builders.nix:74:14:
73| name = lib.strings.sanitizeDerivationName name;
74| inherit buildCommand;
| ^
75| passAsFile = [ "buildCommand" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute '"vendor/google/gs-common"' missing
at /nix/store/d0dl9ch4hhxkqikc1dw3868j95gsbb0h-source/lib/attrsets.nix:107:50:
106| */
107| getAttrs = names: attrs: genAttrs names (name: attrs.${name});
| ^
108|
| 17:56:59 |
atemu12 | The easy way is to blacklist the device which pulls in the vendor dir | 17:59:47 |
atemu12 | As for the stack trace, you truncated away the actual error | 18:00:12 |
erahhal | Ah yes, sorry:
error: attribute '"vendor/google/gs-common"' missing
at /nix/store/d0dl9ch4hhxkqikc1dw3868j95gsbb0h-source/lib/attrsets.nix:107:50:
106| */
107| getAttrs = names: attrs: genAttrs names (name: attrs.${name});
| ^
108|
| 18:09:57 |
erahhal | Where is that blacklist? | 18:10:13 |
erahhal | * Where is the blacklist | 18:10:27 |
erahhal | This does also seem to be broken for android 13 on master, but it fails with gs101 instead of gs-common when building for cheetah | 18:19:02 |
erahhal | If I remove the gs-common dependencies, 14 also fails on gs101. | 18:19:28 |
erahhal | I guess those are dependencies for the tensor chip? | 18:20:09 |
erahhal | Are they not necessary? I will try commenting those out as well | 18:20:24 |
erahhal | To get past the errors, had to remove gs101, gs201, pantah, and pantah-kernel as well... | 18:23:01 |
erahhal | No idea if those are necessary. I did patch the update script to pull from googlesource.com to get them to even be added. Perhaps they should just be blacklisted. Will try | 18:23:36 |
erahhal | Ok, it actually built around 300 source files! Then it failed with this:
note: keeping build directory '/tmp/nix-build-robotnix-lineage_cheetah-2024060317.drv-0'
error: builder for '/nix/store/ysklg1pa18cqjnlhf21i7qfrcmi6i8af-robotnix-lineage_cheetah-2024060317.drv' failed with exit code 1;
last 10 log lines:
> FAILED:
> build/make/core/Makefile:5280: warning: Neither INSTALLED_KERNEL_TARGET nor INSTALLED_BOOTIMAGE_TARGET is defined when PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS is true. Information about the updated kernel cannot be built into OTA update package. You can fix this by: (1) setting TARGET_NO_KERNEL to false and installing the built kernel to out/target/product/generic/kernel, so that kernel information will be extracted from the built kernel; or (2) Add a prebuilt boot image and specify it in BOARD_PREBUILT_BOOTIMAGE; or (3) extracting kernel configuration and defining BOARD_KERNEL_CONFIG_FILE and BOARD_KERNEL_VERSION manually; or (4) unsetting PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS manually.
> build/make/core/tasks/dex_preopt_check.mk:13: warning: Missing compilation artifacts. Dexpreopting is not working for some system server jars. See https://cs.android.com/android/platform/superproject/+/master:build/make/core/tasks/README.dex_preopt_check.md
> Offending entries:
> system/framework/oat/arm/org.lineageos.platform.odex
> system/framework/oat/arm/org.lineageos.platform.vdex
> In file included from build/make/core/main.mk:1494:
> In file included from build/make/core/Makefile:7695:
> build/make/core/tasks/dex_preopt_check.mk:13: error: Build failed.
> 18:46:51 ckati failed with: exit status 1
For full logs, run 'nix log /nix/store/ysklg1pa18cqjnlhf21i7qfrcmi6i8af-robotnix-lineage_cheetah-2024060317.drv'.
error: 1 dependencies of derivation '/nix/store/bkhnbik6832pi7nbdzn6k1jn1h5q76ib-cheetah-factory-2024060317.zip.drv' failed to build
| 18:47:38 |
erahhal | Seems related to the excluded kernel libs above? | 18:47:56 |
atemu12 | erahhal: Does the kernel source for your device exist in source.dirs? | 20:49:00 |
erahhal | I guess this is where I admit I should know more about using a nix development environment. How do I see where the sources are pulled down? I've been testing this by creating a flake that pulls in my robotnix branch as an input then calls robotnixSystem | 20:52:15 |
erahhal | It seems that it's putting sources into the nix store during build time, but otherwise I don't know | 20:52:39 |
atemu12 | It's actually constructing an android source tree in the build env | 20:53:05 |
atemu12 | You can check the source.dirs attribute for the paths that will be linked and their sources | 20:53:24 |
erahhal | Right, how do I do that though 😅 | 20:55:08 |
erahhal | This is sort of a complicated project to be diving into as someone not very experienced with Nix build environment heh. But I guess I'm the type to learn by jumping into the deep end of the pool | 20:56:02 |