Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mako (Nexus 4) building errors #2

Closed
brainstorm opened this issue May 13, 2018 · 9 comments
Closed

Mako (Nexus 4) building errors #2

brainstorm opened this issue May 13, 2018 · 9 comments

Comments

@brainstorm
Copy link
Contributor

brainstorm commented May 13, 2018

Great project! I like it much more than the official/manual LineageOS install process:

https://wiki.lineageos.org/devices/mako/build
https://github.com/lineageos-infra/builder_android

I cloned this repo yesterday, setup a device-config/mako.env like so:

$ cat device-config/mako.env
#!/bin/bash

GIT_USER_NAME=brainstorm
GIT_USER_EMAIL=myemail

# Repo and branch
LINEAGEOS_REPO=https://github.com/LineageOS/android.git
LINEAGEOS_BRANCH=lineage-15.1

DEVICE_CODENAME=mako

# add due to Bug with Jack: https://wiki.lineageos.org/devices/klte/build#configure-jack
# adjust if you want to change something
ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"

# link to repo with the proprietary blobs
# https://wiki.lineageos.org/devices/klte/build#extract-proprietary-blobs
PROPRIETARY_BLOBS_REPO=https://github.com/TheMuppets/proprietary_vendor_lge
PROPRIETARY_BLOBS_DIR=$BASE_DIR/vendor/mako

And then ran it like so: docker run --rm --privileged -v "$(pwd)/android":/home/lineageos --env-file device-config/mako.env -ti jfloff/lineageos lineageos init build, all the init part seems fine but unfortunately all the breakfast/lunch/brunch binaries cannot be found during the build phase since there's no envsetup.sh to source/execute?:

(...)
remote: Counting objects: 25831, done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 25831 (delta 29), reused 12 (delta 12), pack-reused 25753
Receiving objects: 100% (25831/25831), 1.54 GiB | 2.63 MiB/s, done.
Resolving deltas: 100% (12534/12534), done.
Checking out files: 100% (7989/7989), done.
[INFO] Downloading extra files
[INFO] Enable caching at '/home/lineageos/cache' with 50G
bash: prebuilts/misc/linux-x86/ccache/ccache: No such file or directory
[INFO] Setup 'build/envsetup.sh'
chmod: cannot access 'build/envsetup.sh': No such file or directory
bash: /home/lineageos/build/envsetup.sh: No such file or directory
bash: breakfast: command not found
[INFO] Export environment setup into '/home/lineageos/.lineageos_dev_init'.
[[ -f /home/lineageos/.lineageos_dev_init ]] && source /home/lineageos/.lineageos_dev_init
[DONE] Init done.
[INFO] Building LineageOS ...
bash: /home/lineageos/build/envsetup.sh: No such file or directory
bash: prebuilts/misc/linux-x86/ccache/ccache: No such file or directory
bash: breakfast: command not found
bash: croot: command not found
bash: brunch: command not found
@jfloff
Copy link
Owner

jfloff commented May 14, 2018

Thank you for your feedback! Let me take a look at this and come back at you.

@brainstorm
Copy link
Contributor Author

brainstorm commented May 14, 2018

Thanks for your reply but please, disregard this issue! ;)

I just re-sync'd via repo sync, the problem was that not everything was properly cloned by repo and therefore the android/ folder was empty (everything still under .repo). Now everything seems to be there and the build seems to be proceeding:

$ ls
Android.bp       bionic           cache            developers       frameworks       libnativehelper  pdk              system           vendor
Makefile         bootable         compatibility    development      hardware         lineage          platform_testing test
android          bootstrap.bash   cts              device           kernel           lineage-sdk      prebuilts        toolchain
art              build            dalvik           external         libcore          packages         sdk              tools

$ du -hs .
 62G	.

So that's a check/feature that could be implemented: if there's nothing there, try to re-sync until repo decides that everything has been cloned/sync'd properly?

I'm convinced that my poor Australian internet connection caused this :/

@brainstorm
Copy link
Contributor Author

More info here about how repo goes from .repo to the above file listing here: https://stackoverflow.com/questions/6149725/how-does-the-android-repo-manifest-repository-work/11870480#11870480

@jfloff
Copy link
Owner

jfloff commented May 14, 2018

Nice find! But does the android folder is always created?

If yes, then I guess we could do a quick check if the android is empty, and while its empty we would keep doing repo sync (https://github.com/jfloff/docker-lineageos/blob/master/lineageos#L120).

What do you think? Feeling like opening a PR? ;)

@brainstorm
Copy link
Contributor Author

brainstorm commented May 15, 2018

I might have a look at it later on, along with some sort of early detection of filesystem case-sentitiveness. I cannot use it as-is locally since my mac came preinstalled with case-insensitive filesystem, gaaah:

$ docker run --rm --privileged -v "$(pwd)/android":/home/lineageos --env-file device-config/mako.env -ti jfloff/lineageos lineageos build
(...)
10:57:56 ************************************************************
10:57:56 You are building on a case-insensitive filesystem.
10:57:56 Please move your source tree to a case-sensitive filesystem.
10:57:56 ************************************************************
10:57:56 Case-insensitive filesystems not supported
#### failed to build some targets (7 seconds) ####

So after hours of downloads and 62GB of disk usage I cannot proceed because further because of that :/ I will just deploy it on a linux box, cloud or elsewhere.

Other than that, I really like your project, much more useful than the [official/upstream manual LineageOS docker builder], IMHO.

@jfloff
Copy link
Owner

jfloff commented May 15, 2018

I feel you ... I just had that on a friend's computer as well! It sucks that the default fs is now case-sensitive.

If you have time, both of those changes would be awesome to add!

@brainstorm
Copy link
Contributor Author

You know what? Not worth it to run on my Mac anyways, with a 40-core spot instance on AWS I get the job done fast and without headaches. Closing yet worth having it here for other people to see the underlying issue :)

@brainstorm
Copy link
Contributor Author

Did I mention it worked like a charm (on AWS) and I love this little container/work you put together? Thanks again! ;)

@jfloff
Copy link
Owner

jfloff commented Jan 4, 2019

Do you feel like opening a PR with that mako device file?

Cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants