FORUMS
Remove All Ads from XDA

[GUIDE] How to build LineageOS 16.0 on Windows 10 (via WSL 1.0)

326 posts
Thanks Meter: 238
 
By Uldiniad, Senior Member on 15th February 2018, 05:54 PM
Post Reply Email Thread
3rd June 2018, 06:44 PM |#141  
Uldiniad's Avatar
OP Senior Member
Thanks Meter: 238
 
Donate to Me
More
Quote:
Originally Posted by eimanrasydan

Hi. I tried your step and something came up when I tried to execute repo init.

and when I continued to the breakfast step, same problem occur. Hope you can help me on this.

you weren't supposed to redo all steps, just the steps after step 8. you can delete everything and start over but it will be overkill.
does your roomservice.xml look like this (not one for one obviously)?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="LineageOS/android_device_samsung_klte" path="device/samsung/klte" remote="github" />
  <project name="LineageOS/android_device_samsung_klte-common" path="device/samsung/klte-common" remote="github" />
  <project name="LineageOS/android_device_samsung_msm8974-common" path="device/samsung/msm8974-common" remote="github" />
  <project name="LineageOS/android_kernel_samsung_msm8974" path="kernel/samsung/msm8974" remote="github" />
  <project name="LineageOS/android_packages_apps_FlipFlap" path="packages/apps/FlipFlap" remote="github" />
  <project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" />
  <project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" />
  <project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" />
  <project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
  <project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" /> 
</manifest>
The Following 2 Users Say Thank You to Uldiniad For This Useful Post: [ View ] Gift Uldiniad Ad-Free
3rd June 2018, 07:15 PM |#142  
Hi newbie here...what would be the probs.?
[email protected]:~/android/lineage$ make bison && make ijar
21:11:12 Waiting up to 10s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:13 Waiting up to 9s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:14 Waiting up to 8s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:15 Waiting up to 7s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:16 Waiting up to 6s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:17 Waiting up to 5s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:18 Waiting up to 4s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:19 Waiting up to 3s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:20 Waiting up to 2s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:21 Waiting up to 1s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:22 Tried to lock /home/lucasguapo23/android/lineage/out/.lock, but timed out polling every 1s until 10s . Make sure no other Soong process is using it

#### failed to build some targets (01:31 (mm:ss)) ####
3rd June 2018, 07:17 PM |#143  
Uldiniad's Avatar
OP Senior Member
Thanks Meter: 238
 
Donate to Me
More
Quote:
Originally Posted by lucasguapo23

[email protected]:~/android/lineage$ make bison && make ijar
21:11:12 Waiting up to 10s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:13 Waiting up to 9s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:14 Waiting up to 8s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:15 Waiting up to 7s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:16 Waiting up to 6s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:17 Waiting up to 5s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:18 Waiting up to 4s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:19 Waiting up to 3s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:20 Waiting up to 2s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:21 Waiting up to 1s to lock /home/lucasguapo23/android/lineage/out/.lock to ensure no other Soong process is running in the same output directory
21:11:22 Tried to lock /home/lucasguapo23/android/lineage/out/.lock, but timed out polling every 1s until 10s . Make sure no other Soong process is using it

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

you were already running make in another process. you can't run two builds at the same time. if there are no other processes using make you can maybe delete the folder /home/lucasguapo23/android/lineage/out/.lock
The Following 3 Users Say Thank You to Uldiniad For This Useful Post: [ View ] Gift Uldiniad Ad-Free
4th June 2018, 01:35 AM |#144  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by Uldiniad

you weren't supposed to redo all steps, just the steps after step 8. you can delete everything and start over but it will be overkill.
does your roomservice.xml look like this (not one for one obvisouly)?

Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="LineageOS/android_device_samsung_klte" path="device/samsung/klte" remote="github" />
  <project name="LineageOS/android_device_samsung_klte-common" path="device/samsung/klte-common" remote="github" />
  <project name="LineageOS/android_device_samsung_msm8974-common" path="device/samsung/msm8974-common" remote="github" />
  <project name="LineageOS/android_kernel_samsung_msm8974" path="kernel/samsung/msm8974" remote="github" />
  <project name="LineageOS/android_packages_apps_FlipFlap" path="packages/apps/FlipFlap" remote="github" />
  <project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" />
  <project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" />
  <project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" />
  <project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
  <project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" /> 
</manifest>

My roomservice.xml look like this:

Quote:

<?xml version="1.0" encoding="UTF-8"?>
<project name="TheMuppets/proprietary_vendor_oppo" path="vendor/oppo" remote="github">
<project name="LineageOS/android_device_oppo_find7" path="device/oppo/find7" remote="github" />
<project name="LineageOS/android_device_oppo_msm8974-common" path="device/oppo/msm8974-common" remote="github" />
<project name="LineageOS/android_kernel_oppo_msm8974" path="kernel/oppo/msm8974" remote="github" />
<project name="LineageOS/android_device_oppo_common" path="device/oppo/common" remote="github" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
</project>

I think it got everything except for some lines.
4th June 2018, 01:37 AM |#145  
Uldiniad's Avatar
OP Senior Member
Thanks Meter: 238
 
Donate to Me
More
Quote:
Originally Posted by eimanrasydan

My roomservice.xml look like this:



I think it got everything except for the last line.

the last line is the one you gotta manually insert (as seen in step 8 which I had accidentally removed previously). do you still have issues after inserting it and following the rest of the steps?
The Following User Says Thank You to Uldiniad For This Useful Post: [ View ] Gift Uldiniad Ad-Free
4th June 2018, 05:39 AM |#146  
Junior Member
Thanks Meter: 0
 
More
hello OP, newbie here.

Thanks for provide me a detailed step to get lineageos. It's my first time to sync repo using github
My device is Samsung GT-N5100, what should my roomservice.xml looks like?
Could you please give me advice?
Thanks in advance.

edited.
I put the following lines in roomservice.xml
Quote:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
<project name="LineageOS/android_device_samsung_n5100" path="device/samsung/n5100" remote="github" />
<project name="LineageOS/android_device_samsung_smdk4412-common" path="device/samsung/smdk4412-common" remote="github" />
<project name="LineageOS/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" />
<project name="LineageOS/android_device_samsung_common" path="device/samsung/common" remote="github" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
</manifest>

but it ended with the following error
Quote:

LineageOS/android_external_chromium-webview
* [new branch] lineage-15.1 -> github/lineage-15.1

error: Exited sync due to fetch errors

any suggestion?
4th June 2018, 10:38 AM |#147  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by Uldiniad

the last line is the one you gotta manually insert (as seen in step 8 which I had accidentally removed previously). do you still have issues after inserting it and following the rest of the steps?

With a bit of googling, I manage to solve the problem and proceed until the last step. However the build was failed due to an error occur at the end as follow:

Quote:

[ 8% 6311/75863] //external/libpng:libpng clang pngset.c [linux]
FAILED: /home/eimanrasydan/android/lineage/out/soong/.intermediates/external/libpng/libpng/linux_x86_64_static/obj/external/libpng/pngset.o
PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-4053586/bin/clang -c -Iexternal/libpng -Iexternal/libpng -fno-exceptions -Wno-multichar -Wa,--noexecstack -fPIC -no-canonical-prefixes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -O2 -g -fno-strict-aliasing --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -fstack-protector-strong -m64 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=$PWD/= -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Iexternal/zlib -Isystem/core/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Ilibnativehelper/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include -Ilibnativehelper/include_deprecated -std=gnu89 -Wno-unused-parameter -target x86_64-linux-gnu -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -fPIC -D_USING_LIBCXX -std=gnu99 -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF /home/eimanrasydan/android/lineage/out/soong/.intermediates/external/libpng/libpng/linux_x86_64_static/obj/external/libpng/pngset.o.d -o /home/eimanrasydan/android/lineage/out/soong/.intermediates/external/libpng/libpng/linux_x86_64_static/obj/external/libpng/pngset.o external/libpng/pngset.c
prebuilts/clang/host/linux-x86/clang-4053586/bin/clang.real: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory
clang.real: error: unable to execute command: No such file or directory
clang.real: error: clang frontend command failed due to signal (use -v to see invocation)
Android clang version 5.0.300080 (based on LLVM 5.0.300080)
Target: x86_64--linux-gnu
Thread model: posix
InstalledDir: prebuilts/clang/host/linux-x86/clang-4053586/bin
clang.real: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang.real: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang.real: note: diagnostic msg: /tmp/pngset-047c24.c
clang.real: note: diagnostic msg: /tmp/pngset-047c24.sh
clang.real: note: diagnostic msg:

********************
[ 8% 6320/75863] //external/libpng:libpng clang pngrtran.c [linux]
ninja: build stopped: subcommand failed.
13:22:11 ninja failed with: exit status 1

What do you suggest?
4th June 2018, 03:09 PM |#148  
Uldiniad's Avatar
OP Senior Member
Thanks Meter: 238
 
Donate to Me
More
Quote:
Originally Posted by eimanrasydan

With a bit of googling, I manage to solve the problem and proceed until the last step. However the build was failed due to an error occur at the end as follow:



What do you suggest?

try again with clean out directory. repeat only the steps that are mentioned at the bottom of the guide. to clean the out directory do
Code:
make clobber
libc++.so issues were usually related to bison. make sure that it is made and that your BISON_EXEC flag is set to point to it (and add to bashrc so that you don't have to keep setting the flag every time you reopen command line). if you still see libc++.so issues after, try running the build again sometimes that solved it.
4th June 2018, 03:11 PM |#149  
Uldiniad's Avatar
OP Senior Member
Thanks Meter: 238
 
Donate to Me
More
Quote:
Originally Posted by tumirin

hello OP, newbie here.

Thanks for provide me a detailed step to get lineageos. It's my first time to sync repo using github
My device is Samsung GT-N5100, what should my roomservice.xml looks like?
Could you please give me advice?
Thanks in advance.

edited.
I put the following lines in roomservice.xml


but it ended with the following error


any suggestion?

your roomservice is usually built by breakfast. you should not have to make it yourself. the only addition is TheMuppets. and that section of the error doesn't tell me the reason why it failed to sync.

edit: please check that your device actually has lineage-15.1 before complaining about errors. https://github.com/LineageOS/android..._samsung_n5100 it has no lineage-15.1 branch
4th June 2018, 05:10 PM |#150  
Kapil Tapsi's Avatar
Senior Member
Flag New Delhi
Thanks Meter: 1,504
 
Donate to Me
More
hey @Uldiniad thanks for the awesome guide. I am trying to compile for mido for test. i have doubt..Can I use this guide for nougat? Is it even possible for nougat somehow? I know nougat is obsolete but some devices supports nougat only. Please ping me some information. FYI I want to make dotos build for nougat,,
4th June 2018, 05:47 PM |#151  
Mafworld's Avatar
Senior Member
Flag La Ceiba
Thanks Meter: 46
 
Donate to Me
More
Quote:
Originally Posted by Uldiniad

Requirements

  • Windows 10 (64-bit) installed on a drive (256GB or bigger) (SSD recommended)
    (Skip Ahead Insider Preview builds recommended)
  • 16GB RAM or more
Warnings
  • Do NOT add/edit your Linux files from Windows. The files will most likely be broken in bash.
    Instead, add/edit the files from within the Linux subsystem
  • Using mnt to download the source code to other drives and then attempting to follow this guide will probably result in failures. Download the source to folders only within the subsystem
Setting up a Windows Subsystem for Linux (WSL) build environment
  1. Open Microsoft Store
  2. Search for the Ubuntu 18.04 app
  3. Install the app
  4. Open the app and follow the first-time setup steps
  5. Install the following packages:
    Code:
    sudo apt install android-sdk-platform-tools bc build-essential ccache curl g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop m4 openjdk-8-jdk pngcrush repo rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
  6. Make a directory for the source code (and go to it):
    Code:
    mkdir -p ~/android/lineage && cd android/lineage
  7. Initialize the LineageOS source repository:
    Code:
    repo init -u https://github.com/LineageOS/android.git -b lineage-15.1
  8. Add the following to .repo/local_manifests/roomservice.xml (you can create the file if it doesn't exist):
    Code:
    <project name="TheMuppets/proprietary_vendor_your device brand" path="vendor/your device brand" remote="github" />
  9. Download the source code:
    Code:
    repo sync
  10. (Optional; Recommended) https://wiki.lineageos.org/devices/k...speed-up-build
  11. Cherrypick the following commit:
    Code:
    source build/envsetup.sh && repopick -t wsl-compile
    (https://review.lineageos.org/q/wsl-compile)
  12. Prepare the device-specific code:
    Code:
    breakfast your device codename
  13. Make 64-bit bison and ijar:
    Code:
    make bison && make ijar
  14. Set BISON_EXEC to run the 64-bit bison and IJAR_EXEC to run the adapted ijar:
    Code:
    export BISON_EXEC=~/android/lineage/out/host/linux-x86/bin/bison
    export IJAR_EXEC=~/android/lineage/out/host/linux-x86/bin/ijar
    (add the commands to ~/.bashrc if you don't want to have to execute it every time you reopen a command line)
  15. Start the build:
    Code:
    brunch your device codename

For future builds, you need to repeat steps 9, 11, and 15 in the source code folder
Repeat step 13 every time you clean the out directory

ok, thanks a lot for the guide, of course i just tried the first command and was expecting all go in a good way, sorry for my bad english in case everything I say doesn't make any sense but, somehow my WSL is not getting all the required repo's, I've installed ubuntu 18.04 app and enabled WSL feature on control panel, executed the first command but eventually I got a repo's error

Code:
[email protected]:/home# sudo apt install android-sdk-platform-tools bc build-essential ccache curl g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop m4 openjdk-8-jdk pngcrush repo rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package lzop is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package android-sdk-platform-tools
E: Unable to locate package gperf
E: Unable to locate package liblz4-tool
E: Unable to locate package libwxgtk3.0-dev
E: Couldn't find any package by glob 'libwxgtk3.0-dev'
E: Couldn't find any package by regex 'libwxgtk3.0-dev'
E: Package 'lzop' has no installation candidate
E: Unable to locate package openjdk-8-jdk
E: Unable to locate package pngcrush
E: Unable to locate package repo
E: Unable to locate package schedtool
in case I don't have the repo's then where can I find them and add them ? thanks for support and your guide!
Post Reply Subscribe to Thread

Tags
bashonwindows, lineageos, windows, wsl

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes