yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] TheIronMaiden:
ninja: no work to do.

ninja: no work to do.

06:14:12 *******************************************************

06:14:12 You are attempting to build with an unsupported JDK.

06:14:12

06:14:12 Only an OpenJDK based JDK is supported.

06:14:12

06:14:12 Please follow the machine setup instructions at:

06:14:12 https://source.android.com/source/initializing.html

06:14:12 *******************************************************

06:14:12 stop

#### failed to build some targets ####

I do have, jdk installed im a bit confused

Sent from mTalk
[Android Software/Hacking General [Developers Only]] Uldiniad:
how did you setup your environment? I've never had complaints about jdk when people here followed my guide to the letter. what is outputted when you run java -version?
[Android Software/Hacking General [Developers Only]] TheIronMaiden:
I fixed it, it had the wrong path apparently, now i forgot to clone a git for the v20, so when i get home ill have to clone it and restart the build

Edit::::::

ating...

[134/1111] including ./device/lge/msm8996-common/Android.mk ...

build/core/base_rules.mk:238: error: device/lge/msm8996-common/gps/android: MODULE.TARGET.SHARED_LIBRARIES.android.hardware.gnss@1.0-impl-qti already defined by android_device_lge_msm8996-common/gps/android.

02:24:42 ckati failed with: exit status 1

ating...

[134/1111] including ./device/lge/msm8996-common/Android.mk ...

build/core/base_rules.mk:238: error: device/lge/msm8996-common/gps/android: MODULE.TARGET.SHARED_LIBRARIES.android.hardware.gnss@1.0-impl-qti already defined by android_device_lge_msm8996-common/gps/android.

02:24:42 ckati failed with: exit status 1

This is really pissing me off, it's like i have a few conflicting directories and I don't know how to fix it

Sent from mTalk
[Android Software/Hacking General [Developers Only]] Uldiniad:
I'm sorry that you're having trouble making builds but it does not look like this is wsl's fault though but the tree that needs help. you can check gerrit to see if there are any fixes incoming or check with the maintainer of the device
[Android Software/Hacking General [Developers Only]] TheIronMaiden:
There was a duplication error, found it.

Got another error, and can't find a fix for it

ninja: error: 'device/lge/msm8996-common/rootdir/etc/fstab.full', needed by '/home/hawkeye29/android/lineage/out/target/product/h910/ramdisk-recovery.cpio', missing and no known rule to make it

02:46:32 ninja failed with: exit status 1

The file is there too, don't get it
[Android Software/Hacking General [Developers Only]] Uldiniad:
is this happening on the official unmodified 15.1 tree for the device starting from scratch (make clobber)?
[Android Software/Hacking General [Developers Only]] TheIronMaiden:
Yes it is
[Android Software/Hacking General [Developers Only]] Uldiniad:
do you know if it builds on native with the tree as it is atm? have you seen if there are any patches up on gerrit related to the issue you're having? any forums talking about it? have you contacted the maintainer?

seems more likely to be a device tree issue than wsl here. I cannot help much with device-specific issues
[Android Software/Hacking General [Developers Only]] Skrifoxx:
error.GitError: manifests var:

*** Please tell me who you are.

Run

git config --global user.email "you@example.com"

git config --global user.name "Your Name"

to set your account's default identity.

Omit --global to set the identity only in this repository.

fatal: empty ident name (for <charlito234@DESKTOP-8B18I5H.localdomain>) not allowed what can i do for this issue ¿¿¿_-
[Android Software/Hacking General [Developers Only]] Uldiniad:
run the commands it is telling you to:

git config --global user.email "john.wick@gmail.com"

and then

git config --global user.name "John Wick"
[Android Software/Hacking General [Developers Only]] Tetradog:
For Alcatel 8050d how can do It?
[Android Software/Hacking General [Developers Only]] Uldiniad:
is it officially supported?
[Android Software/Hacking General [Developers Only]] Skrifoxx:
For Samsung series A .. Is it supported?
[Android Software/Hacking General [Developers Only]] olavsu1:
Hi,

I a'm trying to compile that. but I get error

device/lge/d855/recovery/recovery_updater.cpp:29:10: fatal error: 'updater/install.h' file not found
#include "updater/install.h"

repo is broken?

Android.mk file in problem folder says: LOCAL_C_INCLUDES := bootable/recovery

then needed header file must be foundable in

bootable/recovery/uptater

there are no neded file in this folder.

but there are bootable/recovery/uptater/include/uptater

which contains needed files. I copy them to bootable/recovery/uptater

Now I get that result:

device/lge/d855/recovery/recovery_updater.cpp:168:27: error: no matching function for call to 'Evaluate'
baseband_string = Evaluate(state, argv[i]);
^~~~~~~~
bootable/recovery/edify/expr.h:93:6: note: candidate function not viable: requires 3 arguments, but 2 were provided
bool Evaluate(State* state, const std::unique_ptr<Expr>& expr, std::string* result);
^
device/lge/d855/recovery/recovery_updater.cpp:169:29: error: ordered comparison between pointer and zero ('char *' and 'int')
if (baseband_string < 0) {
~~~~~~~~~~~~~~~ ^ ~
device/lge/d855/recovery/recovery_updater.cpp:170:20: warning: 'ErrorAbort' is deprecated [-Wdeprecated-declarations]
return ErrorAbort(state, "%s() error parsing arguments: %d",
^
bootable/recovery/edify/expr.h:145:42: note: 'ErrorAbort' has been explicitly marked deprecated here
__attribute__((format(printf, 2, 3), deprecated));
^
device/lge/d855/recovery/recovery_updater.cpp:171:23: warning: format specifies type 'int' but the argument has type 'char *' [-Wformat]
name, baseband_string);
^~~~~~~~~~~~~~~
device/lge/d855/recovery/recovery_updater.cpp:188:5: error: no matching function for call to 'RegisterFunction'
RegisterFunction("g3.verify_baseband", VerifyBasebandFn);
^~~~~~~~~~~~~~~~
bootable/recovery/edify/expr.h:117:6: note: candidate function not viable: no known conversion from 'Value *(const char *, State *, int, Expr **)' to 'Function' (aka 'Value *(*)(const char *, State *, const std::vector<std::unique_ptr<Expr> > &)') for 2nd argument
void RegisterFunction(const std::string& name, Function fn);
^
3 warnings and 3 errors generated.
[ 0% 137/64791] Building Kernel Config
make: Entering directory '/home/olavsu1/android/lineage/kernel/lge/g3'
GEN /home/olavsu1/android/lineage/out/target/product/d855/obj/KERNEL_OBJ/Makefile
#
# configuration written to .config
#
make: Leaving directory '/home/olavsu1/android/lineage/kernel/lge/g3'
make: Entering directory '/home/olavsu1/android/lineage/kernel/lge/g3'
GEN /home/olavsu1/android/lineage/out/target/product/d855/obj/KERNEL_OBJ/Makefile
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
make: Leaving directory '/home/olavsu1/android/lineage/kernel/lge/g3'
[ 0% 138/64791] //external/googletest...gtest clang++ src/gtest-all.cc [linux]
ninja: build stopped: subcommand failed.
12:44:21 ninja failed with: exit status 1

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

Must be here another version install.h file?
[Android Software/Hacking General [Developers Only]] albertoduqe:
Thanks for this guide!

Running a Carbon rom build right now (after some previous failed attempts no doubt) and so far 10% and all seems to be running fine :)
[Android Software/Hacking General [Developers Only]] Uldiniad:
The build environment works, that means it will support anything that is supported in native. The question is: is your device officially supported by LineageOS (by this I mean, do you see a lineage-15.1 branch on the lineageOS GitHub repos for your device) and does it build correctly under native? If the answer is no then you can follow this and other guides to do whatever you're looking to do but don't complain about errors here when they happen. If the answer is yes, then if you get errors, they might be due to wsl in which case I am interested because it most likely means there is stuff to be fixed on my side.
[Android Software/Hacking General [Developers Only]] Uldiniad:
did this error happen when building from a clean tree? no modifications? I haven't seen an error like this before. can you try running repo forall -vc "git reset --hard" on /android/lineage (note that if you have not submitted commits, they will disappear. use this if you don't have anything you care about and want to reset your tree back to source) and then repo sync again. also do you know if it builds currently under native?
[Android Software/Hacking General [Developers Only]] olavsu1:
The one thing what I doing . I was copy the LG proprietary binary files to vendor.

because some of them isn't in repo.
[Android Software/Hacking General [Developers Only]] Uldiniad:
ok. that sounds to me like the device tree needs bringup before it will be buildable then :/
[Android Software/Hacking General [Developers Only]] olavsu1:
i clean the source, now

make bison && make ijar ends with error:

[1064/1064] including ./vendor/qcom/opensource/rcs-service/Android.mk ...
device/lge/g3-common/gps/libloc_api_50001/Android.mk: error: gps.msm8974 (SHARED_LIBRARIES android-arm) missing libmdmdetect (SHARED_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
device/lge/g3-common/gps/libloc_api_50001/Android.mk: error: gps.msm8974 (SHARED_LIBRARIES android-arm) missing libperipheral_client (SHARED_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
build/core/main.mk:732: error: exiting from previous errors.
18:14:12 ckati failed with: exit status 1

#### failed to build some targets (02:42 (mm:ss)) ####
[Android Software/Hacking General [Developers Only]] Uldiniad:
once again I don't understand what is going on. I can build it without issues. seems like it still is related to your device tree though somehow since I see it fails in the android.mk in lge/g3-common
[Android Software/Hacking General [Developers Only]] olavsu1:
Uldiniad, you are doing breakfast with samsung codename.

but i have LG D3 International (d855). I do breakfast d855
[Android Software/Hacking General [Developers Only]] Uldiniad:
I get that. And I'm saying that your device's official tree seems to be broken (unless you are telling me that it works in its current state in native). Because many other officially supported devices here are building fine.
[Android Software/Hacking General [Developers Only]] olavsu1:
bacause I'm estonian, then i have these lines in my .bashrc

export USE_CCACHE=1
ccache -M 60G
export CCACHE_COMPRESS=1
export LANG=C
[Android Software/Hacking General [Developers Only]] Uldiniad:
those lines look ok. they should not have anything to do with the issue you're running into
[Android Software/Hacking General [Developers Only]] albertoduqe:
OK so a little bit after my message build stopped :)

The error is with bison:

FAILED: /home/albertoduqe/carbono/out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_kryo_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.cpp /home/albertoduqe/carbono/out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_kryo_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.h
BISON_PKGDATADIR=external/bison/data prebuilts/misc/linux-x86/bison/bison -d --defines=/home/albertoduqe/carbono/out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_kryo_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.h -o /home/albertoduqe/carbono/out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm64_armv8-a_kryo_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.cpp frameworks/compile/mclinker/lib/Script/ScriptParser.yy
/bin/sh: 1: prebuilts/misc/linux-x86/bison/bison: Exec format error

I first tried removing the export bison and export ijar lines from .bashrc, install bison with apt-get, make clobber and build again. It of course failed. I hadn't at the time read about the 32/64 bit problems.

I then went back to the OP and followed steps again. Problem is I am trying to build Carbon and it doesn't have a breakfast command in its build menu. I have no idea to what extent this can affect the whole thing. Only alternative that came to mind was to lunch for my device (lithium) and then run the make bison && make ijar. Those go thorugh successfully. But then when I make carbon the error is there again.

Any ideas of what am I doing wrong here?

Maybe with another rom source that includes breakfast it would work?

I would really like to work with WSL instead of setting up a VM again...

Thanks!

---------- Post added at 08:14 AM ---------- Previous post was at 07:35 AM ----------

OK I reply myself :) because I searched a bit and found some tricks could be pulled and now it seems to be progressing... I share it because if it really works it's a workaround to non-working 32 bit packages that doesn't need the export bison and ijar and that allows you to use the standard bison package for compiling.

I know nothing about the technicalities but I just followed this:

https://github.com/microsoft/wsl/issues/2468#issuecomment-374904520

As some other guys there,

apt install gcc:i386

gave me some dependecies problems and didn't install properly. I tried the first proposed solution and didn't work and finally went for this one:

sudo apt install -y libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386 zlib1g-dev:i386

Before the building itself I run both

sudo service binfmt-support start

and

sudo dpkg --add-architecture i386

Now the build is going on... It might break down later from some other stuff but the bison/32 bit issue seems overcome :)
[Android Software/Hacking General [Developers Only]] olavsu1:
Uldiniad,

your point 8 in first post is buggy.

<project name="TheMuppets/proprietary_vendor_your device brand" path="vendor/your device brand" remote="github" />

I get no manifest error.

it mus be

<manifest>
<project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" />
</manifest>
[Android Software/Hacking General [Developers Only]] Uldiniad:
I don't recommend using that workaround since it is quite a bit more complicated than mine (it might have cause very subtle errors to use this 32-bit executable workaround, which I won't help with because you're building for a rom I don't support). Also, it is not officially supported by wsl and it is completely unnecessary. Your rom clearly hasn't ported my changes since bison_exec is not doing anything. You can port the changes yourself. There is enough documentation on the internet, so I'll let you figure out how to port patches if that's what you decide to do.
[Android Software/Hacking General [Developers Only]] Uldiniad:
It is not buggy. roomservice.xml is generally generated by breakfast iirc. So something went wrong on your side somewhere. If for some reason you had to create it, because I expect people to know a minimum about manifests, I expect people to know how to make an empty manifest file and add line 8 to it. Also, if you searched the thread, you'd have found that i already answered questions like yours about roomservice
[Android Software/Hacking General [Developers Only]] albertoduqe:
Alright, I'll take your word for it.

Thanks for the reply.
[Android Software/Hacking General [Developers Only]] Skrifoxx:
yes it is also i found on GitHub the kernel base and .mk and others …. sorry for my nooby but i'm new doing this ….. i would like try do my own project for my old device cause i know there's people who have this device yet :)

if i have questions i whish u answer my ones
[Android Software/Hacking General [Developers Only]] olavsu1:
compile success, not 15.1 but 14.1 it woks same unstable like official.... I was going jira now.

unoffiicial 15.1 builds for d855 looks better but have same problems..
[Android Software/Hacking General [Developers Only]] Uldiniad:
Then you should be able to go ahead and follow the guide replacing the brand, codename and so forth for your device as specified and it should work
[Android Software/Hacking General [Developers Only]] olavsu1:
And 15.1 compiles too.

there was a workaround

no compile errors after applying that patch :)
[Android Software/Hacking General [Developers Only]] Uldiniad:
Told you the device tree was broken
[Android Software/Hacking General [Developers Only]] olavsu1:
but it not bootup. only lg picture appear.. need it a different loader?

the target folder contains a boot.img must flash it too?
[Android Software/Hacking General [Developers Only]] Uldiniad:
No. You only need to flash the unofficial zip that is made. If it doesn't bootup it could be for a number of reasons (device's GitHub tree not completely in shape probably). What I can say is it is most likely not related to wsl. I am not a device maintainer and I do not know how to resolve your issue. Anything concerning your device should be brought to your device maintainer
[Android Software/Hacking General [Developers Only]] olavsu1:
I don't compile in WSL, i use ubuntu host. previously i use ubuntu guest in virtualbox (win7)

are there a command similar "make clean"?
[Android Software/Hacking General [Developers Only]] Uldiniad:
Please note the crucial keyword in the title of the article: How to build LineageOS 15.1 on Windows 10 (specifically, via WSL)

If you are not using the exact thing that this article is all about, what are you doing here (aside from wasting everyone's time including yours)?

WSL build environment failures are my problem. If you run into any of those come back and report. Else no.

There are enough resources on how to build lineageOS on native and forums for your device. Go post there.

Thanks
[Android Software/Hacking General [Developers Only]] olavsu1:
ehh, it's not importat what others are using, wsl or native linux. the compile protcess is 100% same.

I was using Your guide started at point 5 and it works.

take it easy.
[Android Software/Hacking General [Developers Only]] Uldiniad:
It is not the exact same process. Why would i make a guide if it was? Have you checked wsl-compile on Gerrit? That should show you the differences from compiling on native.

Also there's a lineageOS wiki page for building your device on native Debian based Linux
[Android Software/Hacking General [Developers Only]] olavsu1:
what are differenses? I don't see any differense. all things after point 5 works.

it's not needed my case.

all problems what I see gome out from source, not from partly following your guide.

case closed

thanks for Your guide.
[Android Software/Hacking General [Developers Only]] ProttoyX:
Nice guide! Can I build using core i5-7200u with 8GB RAM?
[Android Software/Hacking General [Developers Only]] Uldiniad:
The only thing that makes a difference in this case concerning the CPU is speed. The slower the CPU the more hair you pull, the faster, the happier.

RAM though is a bigger deal. Google recommends 16GB on native but on WSL it is all the more important because we already have Windows and the programs you run in the background taking a chunk of that, then WSL and the programs you run on it. Jack already tends to OOM on less than 16GB on native. So if you want to try it, be my guest. But if you run into memory issues, you'll have been warned.
[Android Software/Hacking General [Developers Only]] ProttoyX:
Thank you for your nice explanation!

One more thing! How can I edit or modify files on WSL? With nano/vim only? Or there's other way?
[Android Software/Hacking General [Developers Only]] RaEsAcademy:
You can find the WSL ubuntu root in C:\Users|\[Your username]\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_***\LocalState\rootfs

By this way you can edit the file in Windows if you like.
[Android Software/Hacking General [Developers Only]] ProttoyX:
Thanks! But I've heard that permission conflicts occurs and some file is case sensitive on Linux, but couldn't be saved with the same name in Windows! Doesn't that mean we can't modify all files on Windows!
[Android Software/Hacking General [Developers Only]] Uldiniad:
You are correct. You can ignore the other reply. There is a reason I say in the warnings section of the guide to only modify the files in WSL from within. Nano and Vim work fine but if you want to be more efficient you might want to look into setting up a desktop environment (the post right under OP has resources for that) and getting stuff like Atom or Sublime.
[Android Software/Hacking General [Developers Only]] ProttoyX:
You mean we can setup a desktop/GUI environment on WSL?

And Atom or Sublime for what? Windows or WSL?

If it's for Windows, won't it give the same problem?

I tried compiling a kernel on WSL and some files couldn't be changed and gets broken if I access them from Windows!

And some files has name like SOMENAME.SOMEEXTENSION and somename.someextension on Linux but Windows normally gets confused even I found that case sensitive files also supported on Windows!

And for some reason, I wasn't able install gcc today! apt says hash mismatch! Tried different apt sources with no luck! Don't know what's the reason!
[Android Software/Hacking General [Developers Only]] Uldiniad:
Yes, you can set up a desktop environment for wsl. Check the post below op as I said. You can install sublime on wsl after that.

And don't edit files in wsl from Windows as the warning says.
[Android Software/Hacking General [Developers Only]] ProttoyX:
Thanks! I am gonna give a try!

I normally use dualboot but the main problem is space! I got a bare 120GB SSD for system!

And my 1TB HDD is slow as hell!

---------- Post added at 11:15 PM ---------- Previous post was at 11:12 PM ----------

One more thing, can I do all of this with Docker?

Will it affect performance?
[Android Software/Hacking General [Developers Only]] Uldiniad:
You can try docker. But others that used VMs here have had issues because of them. And performance will most definitely take a hit.

Also 120GB will probably not be enough. Source code after a full build takes a lot of space. I'm 30 GB away from filling my 256 GB SSD
[Android Software/Hacking General [Developers Only]] madper:
Just tried this guide, at first it failed when compiling webrtc, but after re-sync the repo, apply the wsl-compile patch again then try another build everything works perfectly fine.

Huge thanks for this guide, now no need to spin a new linux vm just for building a rom :good:
[Android Software/Hacking General [Developers Only]] decentguy49:
Hi,

while compiling ROM i am getting following error -

I think I am missing something
[Android Software/Hacking General [Developers Only]] Uldiniad:
you're running 32-bit bison. 32-bit binaries are not supported in wsl. that's why it says exec format error. You need to make bison after repopicking my patches and set BISON_EXEC to point to it. if you put bison_exec in bashrc you won't need to set it every time. and you will need to repopick every time you repo sync. anyways, no new information here. re-read the OP and redo the steps that concern bison.
[Android Software/Hacking General [Developers Only]] decentguy49:
Hey, now getting a new error -
[Android Software/Hacking General [Developers Only]] Uldiniad:
Looks to me like you're using a version of Java that is not supported by the aosp build system. You need to use the version I put in the packages to be installed. I think it's openjdk8
[Android Software/Hacking General [Developers Only]] decentguy49:
Followed OP but still I am getting same error, any help?
[Android Software/Hacking General [Developers Only]] Uldiniad:
if you're getting the same exact error it means that wsl you probably still have openjdk 11 installed and that the build environment is using that instead of openjdk 8. you must find a way for the build environment to use openjdk 8 instead.
[Android Software/Hacking General [Developers Only]] decentguy49:
No no, i am getting this error -