[GUIDE] How to build Android on Windows

Search This thread

Uldiniad

Senior Member
Mar 17, 2016
346
269
so for now i become this error

[ 0% 908/98513] APK certs list: /home/mcenzie/android/lin...rts_intermediates/lineage_oneplus3-apkcerts-9f6a5688b3.txt
FAILED: /home/mcenzie/android/lineage/out/target/product/oneplus3/obj/PACKAGING/apkcerts_intermediates/lineage_oneplus3-apkcerts-9f6a5688b3.txt
/bin/bash /home/mcenzie/android/lineage/out/target/product/oneplus3/obj/PACKAGING/apkcerts_intermediates/lineage_oneplus3-apkcerts-9f6a5688b3.txt.rsp
/home/mcenzie/android/lineage/out/target/product/oneplus3/obj/PACKAGING/apkcerts_intermediates/lineage_oneplus3-apkcerts-9f6a5688b3.txt.rsp: fork: Invalid argument
[ 0% 917/98513] Export includes file: -- /home/mcenzie/a...IBRARIES/libGLESv1_CM.ndk.15_intermediates/export_includes
ninja: build stopped: subcommand failed.
13:25:07 ninja failed with: exit status 1

#### failed to build some targets (07:02 (mm:ss)) ####

That error is specific to your device, I can't help much with that.
I'd recommend you start with this:
Code:
make clobber
Code:
breakfast oneplus3 && make bacon WITH_DEXPREOPT=false
If it doesn't help. you'd have to search on google about the error and check on forums of people making unofficial builds for oneplus3 on lineage-15.1 branch and possibly post there. Alternatively, you can go on LineageOS chat room on IRC https://webchat.freenode.net/?channels=lineageos-dev and ask about the error there.
 
  • Like
Reactions: Mcenzie

Mcenzie

Senior Member
Apr 7, 2012
73
16
That error is specific to your device, I can't help much with that.
I'd recommend you start with this:
Code:
make clobber
Code:
breakfast oneplus3 && make bacon WITH_DEXPREOPT=false
If it doesn't help. you'd have to search on google about the error and check on forums of people making unofficial builds for oneplus3 on lineage-15.1 branch and possibly post there. Alternatively, you can go on LineageOS chat room on IRC https://webchat.freenode.net/?channels=lineageos-dev and ask about the error there.

Okay thank you. I give it up.
In my normaly ubuntu building works and thats ok.

maby that can help you:

[ 4% 4210/98372] //external/webp/src:libwebp-encode clang enc/picture_csp_enc.c
FAILED: /home/mcenzie/android/lineage/out/soong/.intermediates/external/webp/src/libwebp-encode/android_arm64_armv8-a_kryo_static_core/obj/external/webp/src/enc/picture_csp_enc.o
PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4053586/bin/clang -c -Iexternal/webp/src/enc -Iexternal/webp/src -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DNDEBUG -O2 -g -Wstrict-aliasing=2 -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/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -mcpu=kryo -Iexternal/webp/include -Iexternal/libcxx/include -Iexternal/libcxxabi/include -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 -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_deprecated -O2 -DANDROID -DWEBP_SWAP_16BIT_CSP -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/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/mcenzie/android/lineage/out/soong/.intermediates/external/webp/src/libwebp-encode/android_arm64_armv8-a_kryo_static_core/obj/external/webp/src/enc/picture_csp_enc.o.d -o /home/mcenzie/android/lineage/out/soong/.intermediates/external/webp/src/libwebp-encode/android_arm64_armv8-a_kryo_static_core/obj/external/webp/src/enc/picture_csp_enc.o external/webp/src/enc/picture_csp_enc.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: aarch64--linux-android
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/picture_csp_enc-058f5f.c
clang.real: note: diagnostic msg: /tmp/picture_csp_enc-058f5f.sh
clang.real: note: diagnostic msg:

********************
[ 4% 4218/98372] //external/libxml2:libxml2 clang parser.c [arm]
 

Uldiniad

Senior Member
Mar 17, 2016
346
269
Okay thank you. I give it up.
In my normaly ubuntu building works and thats ok.

maby that can help you:

[ 4% 4210/98372] //external/webp/src:libwebp-encode clang enc/picture_csp_enc.c
FAILED: /home/mcenzie/android/lineage/out/soong/.intermediates/external/webp/src/libwebp-encode/android_arm64_armv8-a_kryo_static_core/obj/external/webp/src/enc/picture_csp_enc.o
PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4053586/bin/clang -c -Iexternal/webp/src/enc -Iexternal/webp/src -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DNDEBUG -O2 -g -Wstrict-aliasing=2 -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/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -mcpu=kryo -Iexternal/webp/include -Iexternal/libcxx/include -Iexternal/libcxxabi/include -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 -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_deprecated -O2 -DANDROID -DWEBP_SWAP_16BIT_CSP -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/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/mcenzie/android/lineage/out/soong/.intermediates/external/webp/src/libwebp-encode/android_arm64_armv8-a_kryo_static_core/obj/external/webp/src/enc/picture_csp_enc.o.d -o /home/mcenzie/android/lineage/out/soong/.intermediates/external/webp/src/libwebp-encode/android_arm64_armv8-a_kryo_static_core/obj/external/webp/src/enc/picture_csp_enc.o external/webp/src/enc/picture_csp_enc.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: aarch64--linux-android
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/picture_csp_enc-058f5f.c
clang.real: note: diagnostic msg: /tmp/picture_csp_enc-058f5f.sh
clang.real: note: diagnostic msg:

********************
[ 4% 4218/98372] //external/libxml2:libxml2 clang parser.c [arm]

Once again, clang is saying it can't find libc++.so, wanna check again that it hasn't disappeared?
When I run builds it isn't crashing like this since I put back libc++.so in the prebuilts/misc repo.
Otherwise, for some reason for your build you'll have to put libc++.so in whatever folder clang is expecting it and that should solve the issue you're seeing
 

Uldiniad

Senior Member
Mar 17, 2016
346
269
Okay thank you. I give it up.
In my normaly ubuntu building works and thats ok.

maby that can help you:

[ 4% 4210/98372] //external/webp/src:libwebp-encode clang enc/picture_csp_enc.c
FAILED: /home/mcenzie/android/lineage/out/soong/.intermediates/external/webp/src/libwebp-encode/android_arm64_armv8-a_kryo_static_core/obj/external/webp/src/enc/picture_csp_enc.o
PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4053586/bin/clang -c -Iexternal/webp/src/enc -Iexternal/webp/src -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DNDEBUG -O2 -g -Wstrict-aliasing=2 -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/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -mcpu=kryo -Iexternal/webp/include -Iexternal/libcxx/include -Iexternal/libcxxabi/include -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 -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_deprecated -O2 -DANDROID -DWEBP_SWAP_16BIT_CSP -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/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/mcenzie/android/lineage/out/soong/.intermediates/external/webp/src/libwebp-encode/android_arm64_armv8-a_kryo_static_core/obj/external/webp/src/enc/picture_csp_enc.o.d -o /home/mcenzie/android/lineage/out/soong/.intermediates/external/webp/src/libwebp-encode/android_arm64_armv8-a_kryo_static_core/obj/external/webp/src/enc/picture_csp_enc.o external/webp/src/enc/picture_csp_enc.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: aarch64--linux-android
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/picture_csp_enc-058f5f.c
clang.real: note: diagnostic msg: /tmp/picture_csp_enc-058f5f.sh
clang.real: note: diagnostic msg:

********************
[ 4% 4218/98372] //external/libxml2:libxml2 clang parser.c [arm]

what build number of windows where you on? I was on 16299 (Fall Creator's Update)
 

Mcenzie

Senior Member
Apr 7, 2012
73
16
I'm Insider on 17618. Maybe this is the probleme.
Today I make Ubuntu and los 15.1 new.
 
Last edited:

Uldiniad

Senior Member
Mar 17, 2016
346
269
Can someone help me build oreo aosp from google source in a detailed manned with the mentioned tutorial?

BTM i am a newbie in building rom.

Thanks In Advance!

I've never built aosp because I don't like aosp. So I can't help much and won't make a guide for aosp.
What I can do is give you some advice. Everyone's been a noob, and as I've said in previous posts, in modding communities, you're generally on your own. Lots of googling, lots of mistakes (and learning from them) and some scattered help from people on places like this, IRC, etc.
The only thing I can help with is the 64-bit files you'll need for making builds. So I recommend you fork the repos that I forked (you can check my GitHub to see which ones I forked) from aosp and lineage and make sure you fork them from aosp only. Once you have your forked repos from aosp, cherrypick my commits to your branch (you'll also need to modify ijar like in the commit I repopick). Then sync the aosp source code and put your repos in your roomservice.xml.

That's all, now time to go on your quest.
Don't let the dragons bite
 
  • Like
Reactions: lucasguapo23

Mcenzie

Senior Member
Apr 7, 2012
73
16
It looks like it is now solved for 17123 too (not sure at what point after 16299 it broke). I've replaced the previous bison, flex and libc++.so in prebuilts/misc today and reuploaded them to GitHub. The error appears rarely and relaunching the build seems to fix it (at least, it works for me).


So now i'm on 17623. When I sync whitout sudo commands i become this :

Fetching projects: 14% (89/634) error: cannot open /home/mcenzie/android/lineage/.repo/projects/prebuilts/lineage-sdk.git/FETCH_HEAD: Permission denied

error: Cannot fetch platform/prebuilts/misc
error: Cannot fetch LineageOS/android_prebuilts_lineage-sdk

error: Exited sync due to fetch errors

With sudo it finished. Is that normaly?!

Next...

source build/envsetup.sh && repopick 208102

mcenzie@DESKTOP-6H0IEPU:~/android/lineage$ source build/envsetup.sh && repopick 208102
including device/generic/car/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/uml/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
Applying change number 208102...
--> Subject: "Adapt ijar for WSL"
--> Project path: build/make
--> Change number: 208102 (Patch Set 208102)
['git fetch github', u'refs/changes/02/208102/3']
error: cannot open .git/FETCH_HEAD: Permission denied

Traceback (most recent call last):
File "/home/mcenzie/android/lineage/vendor/lineage/build/tools/repopick.py", line 401, in <module>
if result != 0 and os.stat(FETCH_HEAD).st_size != 0:
OSError: [Errno 2] No such file or directory: 'build/make/.git/FETCH_HEAD'

with sudo :

mcenzie@DESKTOP-6H0IEPU:~/android/lineage$ sudo source build/envsetup.sh && repopick 208102
sudo: source: command not found

There is a way to get full access to all files whithout sudo commands?
 

Uldiniad

Senior Member
Mar 17, 2016
346
269
So now i'm on 17623. When I sync whitout sudo commands i become this :

Fetching projects: 14% (89/634) error: cannot open /home/mcenzie/android/lineage/.repo/projects/prebuilts/lineage-sdk.git/FETCH_HEAD: Permission denied

error: Cannot fetch platform/prebuilts/misc
error: Cannot fetch LineageOS/android_prebuilts_lineage-sdk

error: Exited sync due to fetch errors

With sudo it finished. Is that normaly?!

Next...

source build/envsetup.sh && repopick 208102

mcenzie@DESKTOP-6H0IEPU:~/android/lineage$ source build/envsetup.sh && repopick 208102
including device/generic/car/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/uml/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
Applying change number 208102...
--> Subject: "Adapt ijar for WSL"
--> Project path: build/make
--> Change number: 208102 (Patch Set 208102)
['git fetch github', u'refs/changes/02/208102/3']
error: cannot open .git/FETCH_HEAD: Permission denied

Traceback (most recent call last):
File "/home/mcenzie/android/lineage/vendor/lineage/build/tools/repopick.py", line 401, in <module>
if result != 0 and os.stat(FETCH_HEAD).st_size != 0:
OSError: [Errno 2] No such file or directory: 'build/make/.git/FETCH_HEAD'

with sudo :

mcenzie@DESKTOP-6H0IEPU:~/android/lineage$ sudo source build/envsetup.sh && repopick 208102
sudo: source: command not found

There is a way to get full access to all files whithout sudo commands?

just change the permission to the files/folders with chmod (can google it). I personally chmod -R 777 --verbose at /android/lineage
 

Mcenzie

Senior Member
Apr 7, 2012
73
16
Ok thansk again.


It doesn´t work again.

With and without make bacon WITH_DEXPREOPT=false

[ 99% 1446/1447] glob bionic/libc/kernel/uapi/linux/**/*.h
[ 2% 2769/98369] build /home/mcenzie/android/lineage/out/target/produc...lus3/obj/ETC/nonplat_mac_permissions.xml_intermediates/nonplat_keys.tm
FAILED: /home/mcenzie/android/lineage/out/target/product/oneplus3/obj/ETC/nonplat_mac_permissions.xml_intermediates/nonplat_keys.tmp
/bin/bash -c "m4 -s device/qcom/sepolicy/ssg/keys.conf system/sepolicy/reqd_mask/keys.conf > /home/mcenzie/android/lineage/out/target/product/oneplus3/obj/ETC/nonplat_mac_permissions.xml_intermediates/nonplat_keys.tmp"
/bin/bash: m4: command not found
[ 2% 2778/98369] APK certs list: /home/mcenzie/android/lineage/out/tar...CKAGING/apkcerts_intermediates/lineage_oneplus3-apkcerts-81305b7998.tx
ninja: build stopped: subcommand failed.
16:51:01 ninja failed with: exit status 1

#### failed to build some targets (07:28 (mm:ss)) ####
 

Uldiniad

Senior Member
Mar 17, 2016
346
269
Ok thansk again.


It doesn´t work again.

With and without make bacon WITH_DEXPREOPT=false

[ 99% 1446/1447] glob bionic/libc/kernel/uapi/linux/**/*.h
[ 2% 2769/98369] build /home/mcenzie/android/lineage/out/target/produc...lus3/obj/ETC/nonplat_mac_permissions.xml_intermediates/nonplat_keys.tm
FAILED: /home/mcenzie/android/lineage/out/target/product/oneplus3/obj/ETC/nonplat_mac_permissions.xml_intermediates/nonplat_keys.tmp
/bin/bash -c "m4 -s device/qcom/sepolicy/ssg/keys.conf system/sepolicy/reqd_mask/keys.conf > /home/mcenzie/android/lineage/out/target/product/oneplus3/obj/ETC/nonplat_mac_permissions.xml_intermediates/nonplat_keys.tmp"
/bin/bash: m4: command not found
[ 2% 2778/98369] APK certs list: /home/mcenzie/android/lineage/out/tar...CKAGING/apkcerts_intermediates/lineage_oneplus3-apkcerts-81305b7998.tx
ninja: build stopped: subcommand failed.
16:51:01 ninja failed with: exit status 1

#### failed to build some targets (07:28 (mm:ss)) ####

it is saying that m4 command is not found. maybe try apt-get install m4, see if that helps?
 

alincl

New member
Mar 19, 2018
2
1
Unable to locate...

I followed the instructions, but after the first command i got this output:
root@A-PC:~# apt-get install android-sdk-platform-tools bc build-essential ccache curl g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop openjdk-8-jdk pngcrush repo rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'lib32readline6-dev' instead of 'lib32readline-dev'
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

Package pngcrush 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 libesd0-dev
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: Package 'pngcrush' has no installation candidate
E: Unable to locate package repo
E: Unable to locate package schedtool

Can you help, please?
 

Mcenzie

Senior Member
Apr 7, 2012
73
16
it is saying that m4 command is not found. maybe try apt-get install m4, see if that helps?

Yes now is installed.

Now this once again:

[ 10% 9029/86427] //external/e2fsprogs/lib/ext2fs:libext2fs clang gen_bitmap64.c
FAILED: /home/mcenzie/android/lineage/out/soong/.intermediates/external/e2fsprogs/lib/ext2fs/libext2fs/android_arm64_armv8-a_kryo_static_core/obj/external/e2fsprogs/lib/ext2fs/gen_bitmap64.o
PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-4053586/bin/clang -c -Iexternal/e2fsprogs/lib/ext2fs -Iexternal/e2fsprogs/lib/ext2fs -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DNDEBUG -O2 -g -Wstrict-aliasing=2 -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/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -mcpu=kryo -Iexternal/e2fsprogs/lib -Iexternal/e2fsprogs/lib/et -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Isystem/core/libsparse/include -Iexternal/e2fsprogs/lib/uuid -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 -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_deprecated -W -Wall -Wno-unused-parameter -Wno-macro-redefined -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/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/mcenzie/android/lineage/out/soong/.intermediates/external/e2fsprogs/lib/ext2fs/libext2fs/android_arm64_armv8-a_kryo_static_core/obj/external/e2fsprogs/lib/ext2fs/gen_bitmap64.o.d -o /home/mcenzie/android/lineage/out/soong/.intermediates/external/e2fsprogs/lib/ext2fs/libext2fs/android_arm64_armv8-a_kryo_static_core/obj/external/e2fsprogs/lib/ext2fs/gen_bitmap64.o external/e2fsprogs/lib/ext2fs/gen_bitmap64.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: aarch64--linux-android
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/gen_bitmap64-06f359.c
clang.real: note: diagnostic msg: /tmp/gen_bitmap64-06f359.sh
clang.real: note: diagnostic msg:

********************
[ 10% 9038/86427] Building bootanimation
ninja: build stopped: subcommand failed.
14:23:11 ninja failed with: exit status 1

#### failed to build some targets (01:00:29 (hh:mm:ss)) ####

The libc++.so is here.

And can this help ?:

https://review.lineageos.org/#/c/167539/

Also is the error by los or windows?
So I can write this in a windows forum ?

Thank you again.

---------- Post added at 08:55 PM ---------- Previous post was at 08:54 PM ----------

I followed the instructions, but after the first command i got this output:


Can you help, please?

You have to try with sudo command : sudo apt-get install ....
 
Last edited:

alincl

New member
Mar 19, 2018
2
1
You have to try with sudo command : sudo apt-get install ....

I ran the command as root already, so no sudo required.
The fix I found is another one: ht tps://unix.stackexchange .com/questions/140119/every-package-has-no-installation-candidate

Basically, edit /etc/apt/sources.list to add more repos.

Then, I ran into other problems:
1. the xml code at step 8 isn't complete; it returns a parsing error message - for me this one worked:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
	<project name="TheMuppets/Asus_Z00A" path="Asus/Z00A" remote="github" />
	<remove-project name="platform/prebuilts/misc" />
	<remove-project name="LineageOS/android_prebuilts_build-tools" />
	<project name="Uldiniad/android_prebuilts_misc" path="prebuilts/misc" remote="github" />
	<project name="Uldiniad/android_prebuilts_build-tools" path="prebuilts/build-tools" remote="github" />
</manifest>

2. at steps 12 and 13 I'm not sure what <your device codename> should look like (in my case, I guess Asus_Z00A?)

3. my Ubuntu is installed on Windows 10 C: partition (not that I had a choice) and I guess the 44 GB free space left might not be enough (?)... so, bummer...
 
  • Like
Reactions: 0LDST4R

Uldiniad

Senior Member
Mar 17, 2016
346
269
I ran the command as root already, so no sudo required.
The fix I found is another one: ht tps://unix.stackexchange .com/questions/140119/every-package-has-no-installation-candidate

Basically, edit /etc/apt/sources.list to add more repos.

Then, I ran into other problems:
1. the xml code at step 8 isn't complete; it returns a parsing error message - for me this one worked:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
	<project name="TheMuppets/Asus_Z00A" path="Asus/Z00A" remote="github" />
	<remove-project name="platform/prebuilts/misc" />
	<remove-project name="LineageOS/android_prebuilts_build-tools" />
	<project name="Uldiniad/android_prebuilts_misc" path="prebuilts/misc" remote="github" />
	<project name="Uldiniad/android_prebuilts_build-tools" path="prebuilts/build-tools" remote="github" />
</manifest>

2. at steps 12 and 13 I'm not sure what <your device codename> should look like (in my case, I guess Asus_Z00A?)

3. my Ubuntu is installed on Windows 10 C: partition (not that I had a choice) and I guess the 44 GB free space left might not be enough (?)... so, bummer...

on step 8 I said that you must add the following lines to the roomservice.xml if it exists and that otherwise you must make one. so step 8 is not incomplete.

44GB will most likely not be enough. I recommend a 256GB SSD with windows 64-bit and the least applications possible on it

I don't know what your device's codename is for lineage, you'll have to check their wiki or github
 

Uldiniad

Senior Member
Mar 17, 2016
346
269
Yes now is installed.

Now this once again:

[ 10% 9029/86427] //external/e2fsprogs/lib/ext2fs:libext2fs clang gen_bitmap64.c
FAILED: /home/mcenzie/android/lineage/out/soong/.intermediates/external/e2fsprogs/lib/ext2fs/libext2fs/android_arm64_armv8-a_kryo_static_core/obj/external/e2fsprogs/lib/ext2fs/gen_bitmap64.o
PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-4053586/bin/clang -c -Iexternal/e2fsprogs/lib/ext2fs -Iexternal/e2fsprogs/lib/ext2fs -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DNDEBUG -O2 -g -Wstrict-aliasing=2 -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/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -mcpu=kryo -Iexternal/e2fsprogs/lib -Iexternal/e2fsprogs/lib/et -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Isystem/core/libsparse/include -Iexternal/e2fsprogs/lib/uuid -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 -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_deprecated -W -Wall -Wno-unused-parameter -Wno-macro-redefined -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/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/mcenzie/android/lineage/out/soong/.intermediates/external/e2fsprogs/lib/ext2fs/libext2fs/android_arm64_armv8-a_kryo_static_core/obj/external/e2fsprogs/lib/ext2fs/gen_bitmap64.o.d -o /home/mcenzie/android/lineage/out/soong/.intermediates/external/e2fsprogs/lib/ext2fs/libext2fs/android_arm64_armv8-a_kryo_static_core/obj/external/e2fsprogs/lib/ext2fs/gen_bitmap64.o external/e2fsprogs/lib/ext2fs/gen_bitmap64.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: aarch64--linux-android
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/gen_bitmap64-06f359.c
clang.real: note: diagnostic msg: /tmp/gen_bitmap64-06f359.sh
clang.real: note: diagnostic msg:

********************
[ 10% 9038/86427] Building bootanimation
ninja: build stopped: subcommand failed.
14:23:11 ninja failed with: exit status 1

#### failed to build some targets (01:00:29 (hh:mm:ss)) ####

The libc++.so is here.

And can this help ?:

https://review.lineageos.org/#/c/167539/

Also is the error by los or windows?
So I can write this in a windows forum ?

Thank you again.


the patch you linked is a patch made by kxzxxx (GitHub). I cherrypicked it to lineage-15.1. I put it as part of the steps (the repopick step). So your build environment already has that patch (which is necessary and is a WSL issue not a lineage issue) if you're following the instructions every time. Meaning repeating the repo sync, then the source build envsetup, the repopick and finally the brunch. I got some libc++.so errors but generally when launching brunch again it keeps going without throwing the error again
 
  • Like
Reactions: Mcenzie

Uldiniad

Senior Member
Mar 17, 2016
346
269
Redstone 4 builds currently hanging

Sad to announce that I am constantly running into hangs under Redstone 4. I'm looking into the issues but I can't promise that builds will be working by the time Redstone 4 is released. Brunch is hanging because of dex2oat and disabling dex2oat with the dexpreopt option is also causing hangs now.

If you want to make builds that complete, I recommend staying on Fall Creator's Update (build 16299) and using WITH_DEXPREOPT=false as a workaroud for the dex2oat issue.
 
  • Like
Reactions: Mcenzie

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Useful resources




    https://github.com/MicrosoftDocs/WSL/issues/412#issuecomment-575923176
    12
    WSL 2.0 is OUT, build all the droids!

    Hi all,

    Microsoft just released the Windows 10 May 2020 update. But the bigger news is that it comes with WSL2. The TLDR of it is that Windows now has a Linux kernel bundled with it and that's game changing. And what that means for us is out of the box / seamless linux-like functionality for all teh things (goodbye Lineage hax patches for WSL1).

    I have updated OP https://xdaforums.com/showpost.php?p=75579631&postcount=1 and the useful resources post https://xdaforums.com/showpost.php?p=75579631&postcount=2 with the latest information I have so far. Note that with wsl2 using mnt is a readily available option and the wsl installation location can easily be changed as well :) Lots more flexibility

    Lastly, wanted to say thanks to all for your patience. I started this project while I was in the middle of university. I did this "for fun" with the goal of seeing if compiling Android on Windows (via WSL) would be remotely possible and if I personally would be able to pull that off. Apparently, I did :p. Part of this work (added with other work I did with Lineage) allowed me to get the Android job I currently have and I'm grateful for it.
    I know WSL 1 was a bit of a pain to work with and that headaches and frustration came from it. The good news, is those days are over. And the future is now.

    If you have questions that are not answered already in other posts, send them through. I will be randomly checking the thread. Although given that wsl2 doesn't need anywhere near as much maintenance as wsl1 I will probably be more hands off than I used to be (e.g. update the docs for newer versions of Android or Windows, etc.).

    Take care,
    Uldiniad
    11
    Pie (wsl flavour) is out of the oven

    Hey everyone,

    TL;DR
    It is now possible to build lineage-16.0 on wsl! Just follow the updated guide from start to finish (syncing 16.0 on top of 15.1 is not recommended) and enjoy.
    DO NOT COMPLAIN ABOUT ANY ERRORS THAT ARE NOT STRICTLY DUE TO THE BUILD ENVIRONMENT (WSL). Many devices are not ready to build yet!

    Also, as always, I recommend building on the latest version of Windows. October Update was released recently: https://www.microsoft.com/en-ca/software-download/windows10

    For those still insterested in building 15.1 (ignore the repopick step): https://web.archive.org/web/2018061...ng/guide-how-to-build-lineageos-15-1-t3750175 (as mentioned in my previous announcement, do not report any errors, I will ignore them, since I do not have the means to maintain more than one branch on wsl)

    Full version:
    It has been some time since the last update. I apologise for the crickets.
    I didn't want to write a post until I was able to guarantee I could build lineage-16.0 without issues on wsl. I downloaded the sources as soon as they were released but was unable to complete a full build for my device without cherry-picking lots of patches for it and decided against it since I wanted to reduce the scope of the errors to the build environment alone. I only recently thought of building a generic image instead (which would accomplish what I wanted). Thankfully, wsl had less problems this time cause Google were cool with updating their bison and flex prebuilts (thereby now making them 64-bit) and killed off ijar (hopefully forever). So only dex2oat needed a patch this time around :D
    The wsl-compile-lineage-16.0 patches are merged (https://review.lineageos.org/#/q/st...h:lineage-16.0+topic:wsl-compile-lineage-16.0). So no additional steps required there. Otherwise, make sure to install m4 since it spat out an error about it missing.

    Thank you for your support,

    Uldiniad

    P.S. Feel free to ask any questions related to this and check my previous announcements to know my goals and standards for this side-project (https://xdaforums.com/showpost.php?p=77321912&postcount=261 for example)
    P.P.S. I am working on making an official wiki page on the LineageOS website which will be more convenient than this thread. I might consider leaving the thread open for feedback once it is open, but I might also consider having feedback reported via official means (JIRA probably).
    6
    Want a piece of Pie?

    Hey everyone, got some news to share.

    As you may have heard, the Pie is now out of the oven. Given that,
    1. At the moment building android on WSL is 100% experimental
    2. There seems to be little to no interest from Google and Microsoft to officially support wsl as an android build environment
    3. I'm working alone with limited time and knowledge of both the android build environment and the inner workings of wsl
    4. I plan on supporting the latest version of lineage available
    I am therefore starting research and work on lineage-16.0 and will be leaving lineage-15.1 as it currently stands.
    As windows updates come, wsl will change and may bring new unforeseen errors to the oreo build environment. Since I will not be maintaing that branch anymore, it may mean that the best option to keep building 15.1 is to not update to the latest build of windows if it causes errors. Given this situation I will be paying less attention to bug reports for 15.1 as time goes by and 16.x takes its place (especially since I do not have 15.1 synced anymore and will not be able to reproduce errors).

    For 16.x, it entails I will proceed to ram my head into the wsl wall until it gives up or I do.

    Hoping we'll all get a piece of the Pie,

    Uldiniad