✦✦✦ [GUIDE] Build LineageOS ✦ How To use Github ✦✦✦

Search This thread

zogthegreat

Senior Member
Jan 30, 2013
115
36
Montreal
not brunch sorry. Run: repo sync -j1

Running repo sync -j1 gave me the following:

Fetching project device/generic/x86_64
Fetching project TheMuppets/proprietary_vendor_qcom_binaries
fatal: Couldn't find remote ref refs/heads/lineage-15.1

When I look at "TheMuppets/proprietary_vendor_qcom_binaries/Android.mk: it seems that the the source is depreciated:

$(error This repo is now deprecated. Move your blobs to your device's vendor repo.)

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
include $(call all-makefiles-under,$(LOCAL_PATH)/$(TARGET_BOARD_PLATFORM))
endif
 

FSadino

Retired Forum Moderator
Oct 27, 2011
3,802
5,228
Blue River City
OnePlus One
OnePlus 3
Running repo sync -j1 gave me the following:

Fetching project device/generic/x86_64
Fetching project TheMuppets/proprietary_vendor_qcom_binaries
fatal: Couldn't find remote ref refs/heads/lineage-15.1

When I look at "TheMuppets/proprietary_vendor_qcom_binaries/Android.mk: it seems that the the source is depreciated:

$(error This repo is now deprecated. Move your blobs to your device's vendor repo.)

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
include $(call all-makefiles-under,$(LOCAL_PATH)/$(TARGET_BOARD_PLATFORM))
endif

Remove first line inside:
"TheMuppets/proprietary_vendor_qcom_binaries/Android.mk"
 

zogthegreat

Senior Member
Jan 30, 2013
115
36
Montreal
Remove first line inside:
"TheMuppets/proprietary_vendor_qcom_binaries/Android.mk"

I couldn't find the actual TheMuppets/proprietary_vendor_qcom_binaries/Android.mk file, so I made a fork of the "Muppets" source, "patched it" by removing the line that you told me and I added it to my roomservice.xml:

<?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_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="zogthegreat/proprietary_vendor_qcom_binaries" path="device/samsung/proprietary_vendor_qcom_binaries" remote="github" revision="zogthegreat-patch-1" />
</manifest>


I was able to sync my repo, but now my build is failing with the follow:

zog@X220:~/work/los$ croot
zog@X220:~/work/los$ time brunch klte
including vendor/lineage/vendorsetup.sh
Looking for dependencies in device/samsung/klte
Looking for dependencies in device/samsung/klte-common
Looking for dependencies in device/samsung/msm8974-common
Looking for dependencies in device/samsung/qcom-common
Looking for dependencies in hardware/samsung
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
Looking for dependencies in kernel/samsung/msm8974
kernel/samsung/msm8974 has no additional dependencies.
Looking for dependencies in packages/apps/FlipFlap
packages/apps/FlipFlap has no additional dependencies.

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
LINEAGE_VERSION=15.1-20181113-UNOFFICIAL-klte
TARGET_PRODUCT=lineage_klte
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.0-10-generic-x86_64-with-Ubuntu-18.10-cosmic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM7.181105.004
OUT_DIR=/home/zog/work/los/out
AUX_OS_VARIANT_LIST=
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=lineage_klte
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.0-10-generic-x86_64-with-Ubuntu-18.10-cosmic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM7.181105.004
OUT_DIR=/home/zog/work/los/out
============================================
[44/44] bootstrap /home/zog/work/los/out/soong/.minibootstrap/build.ninja.in
[4/4] /home/zog/work/los/out/soong/.bootstrap/bin/minibp /home/zog/work/los/out/soong/.bootstrap/build.ninja
[873/874] glob vendor/qcom/opensource/interfaces/wifi/supplicant/1.0/Android.bp
[56/56] /home/zog/work/los/out/soong/.bootstrap/bin/soong_build /home/zog/work/los/out/soong/build.ninja
/home/zog/work/los/out/build-lineage_klte.ninja is missing, regenerating...
[412/1154] including ./frameworks/av/camera/Android.mk ...
frameworks/av/camera/cameraserver/Android.mk:18: warning: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0
[1154/1154] including ./vendor/qcom/opensource/rcs-service/Android.mk ...
[ 99% 1277/1278] glob vendor/qcom/opensource/interfaces/wifi/supplicant/1.0/Android.bp
[ 0% 139/77640] host C++: conscrypt_generate_constants <= external/conscrypt/constants/src/gen/cpp/generate_constants.cpp
FAILED: /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/constants/src/gen/cpp/generate_constants.o
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++ -I device/samsung/klte-common/include -I external/conscrypt -I /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates -I /home/zog/work/los/out/host/linux-x86/gen/EXECUTABLES/conscrypt_generate_constants_intermediates -I libnativehelper/include_deprecated \$(cat /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -c -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/= -target x86_64-linux-gnu -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8 -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/backward -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/x86_64-linux -std=gnu++14 -fPIE -D_USING_LIBCXX -nostdinc++ -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/constants/src/gen/cpp/generate_constants.d -o /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/constants/src/gen/cpp/generate_constants.o external/conscrypt/constants/src/gen/cpp/generate_constants.cpp"
prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[ 0% 144/77640] Check module type: /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/link_type
ninja: build stopped: subcommand failed.
11:52:28 ninja failed with: exit status 1

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


I can see where the build is failing, but I don't understand the output.
 

FSadino

Retired Forum Moderator
Oct 27, 2011
3,802
5,228
Blue River City
OnePlus One
OnePlus 3
I couldn't find the actual TheMuppets/proprietary_vendor_qcom_binaries/Android.mk file, so I made a fork of the "Muppets" source, "patched it" by removing the line that you told me and I added it to my roomservice.xml:

<?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_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="zogthegreat/proprietary_vendor_qcom_binaries" path="device/samsung/proprietary_vendor_qcom_binaries" remote="github" revision="zogthegreat-patch-1" />
</manifest>


I was able to sync my repo, but now my build is failing with the follow:

zog@X220:~/work/los$ croot
zog@X220:~/work/los$ time brunch klte
including vendor/lineage/vendorsetup.sh
Looking for dependencies in device/samsung/klte
Looking for dependencies in device/samsung/klte-common
Looking for dependencies in device/samsung/msm8974-common
Looking for dependencies in device/samsung/qcom-common
Looking for dependencies in hardware/samsung
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
Looking for dependencies in kernel/samsung/msm8974
kernel/samsung/msm8974 has no additional dependencies.
Looking for dependencies in packages/apps/FlipFlap
packages/apps/FlipFlap has no additional dependencies.

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
LINEAGE_VERSION=15.1-20181113-UNOFFICIAL-klte
TARGET_PRODUCT=lineage_klte
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.0-10-generic-x86_64-with-Ubuntu-18.10-cosmic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM7.181105.004
OUT_DIR=/home/zog/work/los/out
AUX_OS_VARIANT_LIST=
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=lineage_klte
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.0-10-generic-x86_64-with-Ubuntu-18.10-cosmic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM7.181105.004
OUT_DIR=/home/zog/work/los/out
============================================
[44/44] bootstrap /home/zog/work/los/out/soong/.minibootstrap/build.ninja.in
[4/4] /home/zog/work/los/out/soong/.bootstrap/bin/minibp /home/zog/work/los/out/soong/.bootstrap/build.ninja
[873/874] glob vendor/qcom/opensource/interfaces/wifi/supplicant/1.0/Android.bp
[56/56] /home/zog/work/los/out/soong/.bootstrap/bin/soong_build /home/zog/work/los/out/soong/build.ninja
/home/zog/work/los/out/build-lineage_klte.ninja is missing, regenerating...
[412/1154] including ./frameworks/av/camera/Android.mk ...
frameworks/av/camera/cameraserver/Android.mk:18: warning: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0
[1154/1154] including ./vendor/qcom/opensource/rcs-service/Android.mk ...
[ 99% 1277/1278] glob vendor/qcom/opensource/interfaces/wifi/supplicant/1.0/Android.bp
[ 0% 139/77640] host C++: conscrypt_generate_constants <= external/conscrypt/constants/src/gen/cpp/generate_constants.cpp
FAILED: /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/constants/src/gen/cpp/generate_constants.o
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++ -I device/samsung/klte-common/include -I external/conscrypt -I /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates -I /home/zog/work/los/out/host/linux-x86/gen/EXECUTABLES/conscrypt_generate_constants_intermediates -I libnativehelper/include_deprecated \$(cat /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -c -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/= -target x86_64-linux-gnu -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8 -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/backward -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/x86_64-linux -std=gnu++14 -fPIE -D_USING_LIBCXX -nostdinc++ -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/constants/src/gen/cpp/generate_constants.d -o /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/constants/src/gen/cpp/generate_constants.o external/conscrypt/constants/src/gen/cpp/generate_constants.cpp"
prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[ 0% 144/77640] Check module type: /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/link_type
ninja: build stopped: subcommand failed.
11:52:28 ninja failed with: exit status 1

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


I can see where the build is failing, but I don't understand the output.

sudo apt-get install libncurses5:i386
 

zogthegreat

Senior Member
Jan 30, 2013
115
36
Montreal
Grrr!!! So I was able to install the dependencies and retry compiling. 3 mins into the build, it failed again:

[ 0% 174/77640] host C++: protoc-gen-javastream <= frameworks/base/tools/streaming_proto/Errors.cpp
FAILED: /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/protoc-gen-javastream_intermediates/Errors.o
/bin/bash -c "PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++ -I device/samsung/klte-common/include -I frameworks/base/tools/streaming_proto -I /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/protoc-gen-javastream_intermediates -I /home/zog/work/los/out/host/linux-x86/gen/EXECUTABLES/protoc-gen-javastream_intermediates -I libnativehelper/include_deprecated \$(cat /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/protoc-gen-javastream_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -c -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/= -target x86_64-linux-gnu -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8 -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/backward -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/x86_64-linux -std=gnu++14 -fPIE -D_USING_LIBCXX -DANDROID_STRICT -nostdinc++ -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/protoc-gen-javastream_intermediates/Errors.d -o /home/zog/work/los/out/host/linux-x86/obj/EXECUTABLES/protoc-gen-javastream_intermediates/Errors.o frameworks/base/tools/streaming_proto/Errors.cpp"
prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[ 0% 177/77640] Merge android manifest files: /home/zog/work/los/out/target/common/...works/base/core/res/AndroidManifest.xml frameworks/base/core/res/LineageManifest.xml
ninja: build stopped: subcommand failed.
19:00:39 ninja failed with: exit status 1

#### failed to build some targets (03:33 (mm:ss)) ####


I've been Googling the line 2 second line where it says "FAILED", but I haven't found anything that seems relevant. I also Googled the end part where it says "Merge android manifest files", but I can't tell if I have a problem there or not. Here is a copy of my LineageManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (c) 2017 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android">

<!-- Allows an application to override the power key action
@hide <p>Not for use by third-party applications.
-->
<permission android:name="android.permission.PREVENT_POWER_KEY"
android:protectionLevel="signature|privileged" />

<!-- Used to launch a common app (FlipFlap) for devices with flip cover. -->
<protected-broadcast android:name="lineageos.intent.action.LID_STATE_CHANGED" />

<!-- Used for long press power torch feature - automatic turn off on timeout -->
<protected-broadcast
android:name="com.android.server.policy.PhoneWindowManager.ACTION_TORCH_OFF" />

<!-- Used to notify when SU is used. -->
<protected-broadcast android:name="android.intent.action.SU_SESSION_CHANGED" />
</manifest>
 

Tainruk

Member
Mar 2, 2018
5
1
Hey all

I'm trying to build LineageOS 16.0 for the note 3 (HLTE) on ubuntu 18.10, but I get some errors about O_TMPFILE.

FAILED: /home/lars/android/lineage/out/target/product/hlte/obj/SHARED_LIBRARIES/audio.primary.msm8974_intermediates/voice.o
/bin/bash -c "PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-4691093/bin/clang -I device/samsung/hlte-common/include -I external/tinyalsa/include -I external/tinycompress/include -I external/expat/lib -I system/media/audio_route/include -I system/media/audio_effects/include -I hardware/qcom/audio-caf/msm8974/hal/msm8974 -I hardware/qcom/audio-caf/msm8974/hal/audio_extn -I hardware/qcom/audio-caf/msm8974/hal/voice_extn -I hardware/qcom/audio-caf/msm8974/hal -I /home/lars/android/lineage/out/target/product/hlte/obj/SHARED_LIBRARIES/audio.primary.msm8974_intermediates -I /home/lars/android/lineage/out/target/product/hlte/gen/SHARED_LIBRARIES/audio.primary.msm8974_intermediates -I libnativehelper/include_jni \$(cat /home/lars/android/lineage/out/target/product/hlte/obj/SHARED_LIBRARIES/audio.primary.msm8974_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem /home/lars/android/lineage/out/target/product/hlte/obj/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -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 -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=\$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -msoft-float -march=armv7-a -mfloat-abi=softfp -mfpu=neon -mcpu=krait -mfpu=neon-vfpv4 -D__ARM_FEATURE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -std=gnu99 -fstrict-aliasing -DPLATFORM_MSM8974 -DUSE_VENDOR_EXTN -Wno-error -DFLUENCE_ENABLED -DAFE_PROXY_ENABLED -DHFP_ENABLED -DCOMPRESS_VOIP_ENABLED -DAUDIO_EXTN_FORMATS_ENABLED -DHW_VARIANTS_ENABLED -DLOW_LATENCY_PRIMARY -DMP2_OFFLOAD_ENABLED -DLOW_LATENCY_CAPTURE_USE_CASE=1 -DHWDEP_CAL_ENABLED -fPIC -D_USING_LIBCXX -DANDROID_STRICT -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch -MD -MF /home/lars/android/lineage/out/target/product/hlte/obj/SHARED_LIBRARIES/audio.primary.msm8974_intermediates/voice.d -o /home/lars/android/lineage/out/target/product/hlte/obj/SHARED_LIBRARIES/audio.primary.msm8974_intermediates/voice.o hardware/qcom/audio-caf/msm8974/hal/voice.c"
In file included from hardware/qcom/audio-caf/msm8974/hal/voice.c:26:
In file included from system/core/libcutils/include/cutils/log.h:1:
In file included from system/core/liblog/include/log/log.h:34:
In file included from system/core/liblog/include/log/log_read.h:26:
In file included from bionic/libc/include/fcntl.h:95:
bionic/libc/include/bits/fortify/fcntl.h:63:26: error: use of undeclared identifier 'O_TMPFILE'
__clang_error_if(__open_modes_useful(flags), "'open' " __open_too_few_args_error) {
^
bionic/libc/include/bits/fortify/fcntl.h:46:71: note: expanded from macro '__open_modes_useful'
#define __open_modes_useful(flags) (((flags) & O_CREAT) || ((flags) & O_TMPFILE) == O_TMPFILE)
^
bionic/libc/include/bits/fortify/fcntl.h:63:26: error: use of undeclared identifier 'O_TMPFILE'
bionic/libc/include/bits/fortify/fcntl.h:46:85: note: expanded from macro '__open_modes_useful'
#define __open_modes_useful(flags) (((flags) & O_CREAT) || ((flags) & O_TMPFILE) == O_TMPFILE)
^
bionic/libc/include/bits/fortify/fcntl.h:70:29: error: use of undeclared identifier 'O_TMPFILE'
__clang_warning_if(!__open_modes_useful(flags) && modes,
^
bionic/libc/include/bits/fortify/fcntl.h:46:71: note: expanded from macro '__open_modes_useful'
#define __open_modes_useful(flags) (((flags) & O_CREAT) || ((flags) & O_TMPFILE) == O_TMPFILE)
^
bionic/libc/include/bits/fortify/fcntl.h:70:29: error: use of undeclared identifier 'O_TMPFILE'
bionic/libc/include/bits/fortify/fcntl.h:46:85: note: expanded from macro '__open_modes_useful'
#define __open_modes_useful(flags) (((flags) & O_CREAT) || ((flags) & O_TMPFILE) == O_TMPFILE)
^
bionic/libc/include/bits/fortify/fcntl.h:83:26: error: use of undeclared identifier 'O_TMPFILE'
__clang_error_if(__open_modes_useful(flags), "'openat' " __open_too_few_args_error) {
^
bionic/libc/include/bits/fortify/fcntl.h:46:71: note: expanded from macro '__open_modes_useful'
#define __open_modes_useful(flags) (((flags) & O_CREAT) || ((flags) & O_TMPFILE) == O_TMPFILE)
^
bionic/libc/include/bits/fortify/fcntl.h:83:26: error: use of undeclared identifier 'O_TMPFILE'
bionic/libc/include/bits/fortify/fcntl.h:46:85: note: expanded from macro '__open_modes_useful'
#define __open_modes_useful(flags) (((flags) & O_CREAT) || ((flags) & O_TMPFILE) == O_TMPFILE)
^
bionic/libc/include/bits/fortify/fcntl.h:90:29: error: use of undeclared identifier 'O_TMPFILE'
__clang_warning_if(!__open_modes_useful(flags) && modes,
^
Any seen this before and have an idea of what is wrong?

Found out that I should:

repopick -t pie-mode-bits

https://review.lineageos.org/#/q/bra...:pie-mode-bits

from this

Regards, Lars
 
Last edited:

misco55

New member
Nov 14, 2018
3
0
Help S4 mini i9195 serranoltexx

Hi, my device is a Samsung S4 mini (i9195) and the codename is serranoltexx.
my repo is: //github.com/LineageOS/android.git -b cm-14.1

I make $ source build / envsetup.sh and perfect, but $ breakfast serranoltexx I get this error: build / core / product_config.mk: 254: *** _nic.PRODUCTS. [[Device / samsung / serranoltexx / lineage.mk]] : "vendor / samsung / serrano-common / serrano-common-vendor.mk" does not exist. High.
build / core / product_config.mk: 254: *** _nic.PRODUCTS. [[device / samsung / serranoltexx / lineage.mk]]: "vendor / samsung / serrano-common / serrano-common-vendor.mk" does not exist High.

** Do not have a product spec for: 'lineage_serranoltexx'
** Do you have the right repo manifest?

Jump to the option: Extracting proprietary blobs from block-based OTAs, I assemble the image well, I position myself in the directory where are the sources of my device:
~ / android / lineage / device / samsung / serranoltexx #, I enter the command ./extract-files.sh ~ / android / system_dump / and I get this error: db: error: remote object '/ system / bin / btnvtool' does not exist

I check the remote object and if it exists.

Can you give me a hand to give me light in the matter?

Thank you.
 

FSadino

Retired Forum Moderator
Oct 27, 2011
3,802
5,228
Blue River City
OnePlus One
OnePlus 3
Hi, my device is a Samsung S4 mini (i9195) and the codename is serranoltexx.
my repo is: //github.com/LineageOS/android.git -b cm-14.1

I make $ source build / envsetup.sh and perfect, but $ breakfast serranoltexx I get this error: build / core / product_config.mk: 254: *** _nic.PRODUCTS. [[Device / samsung / serranoltexx / lineage.mk]] : "vendor / samsung / serrano-common / serrano-common-vendor.mk" does not exist. High.
build / core / product_config.mk: 254: *** _nic.PRODUCTS. [[device / samsung / serranoltexx / lineage.mk]]: "vendor / samsung / serrano-common / serrano-common-vendor.mk" does not exist High.

** Do not have a product spec for: 'lineage_serranoltexx'
** Do you have the right repo manifest?

Jump to the option: Extracting proprietary blobs from block-based OTAs, I assemble the image well, I position myself in the directory where are the sources of my device:
~ / android / lineage / device / samsung / serranoltexx #, I enter the command ./extract-files.sh ~ / android / system_dump / and I get this error: db: error: remote object '/ system / bin / btnvtool' does not exist

I check the remote object and if it exists.

Can you give me a hand to give me light in the matter?

Thank you.

Add repo blobs directly into manifest.
Search here https://github.com/TheMuppets
 
  • Like
Reactions: misco55

zogthegreat

Senior Member
Jan 30, 2013
115
36
Montreal
OK, I took a big step back, wiped my hard drive and reinstalled Ubuntu 16.04. After that, I was able to successfully build LineageOS 14.1 for my Samsung S5.

I then ran "make clobber" and reinitialized my my build tree with:

repo init -u https://github.com/LineageOS/android.git -b lineage-15.1

However when I try to sync my repo, I get the following error:

Syncing work tree: 78% (512/656) error: Your local changes to the following files would be overwritten by checkout:
res/xml/device_info_settings.xml
Please, commit your changes or stash them before you can switch branches.
Aborting
Syncing work tree: 100% (656/656), done.

packages/apps/Settings/: discarding 858 commits
error: packages/apps/Settings/: LineageOS/android_packages_apps_Settings checkout b9634cdec5784b2bc341712865172b8910828d03


I've tried to add "<project name="LineageOS/android_packages_apps_Settings" path="vendor/samsung" remote="github" />" to my roomservice.xml, but I still get the same error.

Does anyone have any suggestions?

Thanks!

zog
 

FSadino

Retired Forum Moderator
Oct 27, 2011
3,802
5,228
Blue River City
OnePlus One
OnePlus 3
OK, I took a big step back, wiped my hard drive and reinstalled Ubuntu 16.04. After that, I was able to successfully build LineageOS 14.1 for my Samsung S5.

I then ran "make clobber" and reinitialized my my build tree with:

repo init -u https://github.com/LineageOS/android.git -b lineage-15.1

However when I try to sync my repo, I get the following error:

Syncing work tree: 78% (512/656) error: Your local changes to the following files would be overwritten by checkout:
res/xml/device_info_settings.xml
Please, commit your changes or stash them before you can switch branches.
Aborting
Syncing work tree: 100% (656/656), done.

packages/apps/Settings/: discarding 858 commits
error: packages/apps/Settings/: LineageOS/android_packages_apps_Settings checkout b9634cdec5784b2bc341712865172b8910828d03


I've tried to add "<project name="LineageOS/android_packages_apps_Settings" path="vendor/samsung" remote="github" />" to my roomservice.xml, but I still get the same error.

Does anyone have any suggestions?

Thanks!

zog

make clobber is not enough if you want to sync entirely new branches.
I recommend you create new working directory for 15.1 branch
 

zogthegreat

Senior Member
Jan 30, 2013
115
36
Montreal
After building LineageOS Oreo, I made a new directory and I tried to compile LineageOS Pie. When I tried to start jack server, I encountered a java error:

zog@x220:~/work/pie$ export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx6g"
zog@x220:~/work/pie$ ./prebuilts/sdk/tools/jack-admin start-server
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx6g -cp /home/zog/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
zog@x220:~/work/pie$ ./prebuilts/sdk/tools/jack-diagnose
/home/zog/work/pie/prebuilts/jdk/jdk9/linux-x86/bin/java': Failed to parse version, please ensure you're running a supported java

zog@x220:~/work/pie$ java -version
openjdk version "9"
OpenJDK Runtime Environment (build 9+181-android4627429)
OpenJDK 64-Bit Server VM (build 9+181-android4627429, mixed mode)

Which version of java do I need for Android Pie?
 

FSadino

Retired Forum Moderator
Oct 27, 2011
3,802
5,228
Blue River City
OnePlus One
OnePlus 3
After building LineageOS Oreo, I made a new directory and I tried to compile LineageOS Pie. When I tried to start jack server, I encountered a java error:

zog@x220:~/work/pie$ export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx6g"
zog@x220:~/work/pie$ ./prebuilts/sdk/tools/jack-admin start-server
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx6g -cp /home/zog/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
zog@x220:~/work/pie$ ./prebuilts/sdk/tools/jack-diagnose
/home/zog/work/pie/prebuilts/jdk/jdk9/linux-x86/bin/java': Failed to parse version, please ensure you're running a supported java

zog@x220:~/work/pie$ java -version
openjdk version "9"
OpenJDK Runtime Environment (build 9+181-android4627429)
OpenJDK 64-Bit Server VM (build 9+181-android4627429, mixed mode)

Which version of java do I need for Android Pie?

Really don't know, try to update to latest stable
 

Top Liked Posts

  • There are no posts matching your filters.
  • 66
    https%3A%2F%2Fs25.postimg.org%2Fk4tz2dr2n%2Flineageos_logo.jpg

    How-to Build LineageOS


    Introduction

    These instructions will hopefully assist you to start with a stock device, unlock the bootloader (if necessary), and then download the required tools as well as the very latest source code for LineageOS (based on Google’s Android operating system) for your device. Using these, you can build both LineageOS and LineageOS Recovery image from source code, and then install them both to your device.

    It is difficult to say how much experience is necessary to follow these instructions. While this guide is certainly not for the very very very uninitiated, these steps shouldn’t require a PhD in software development either. Some readers will have no difficulty and breeze through the steps easily. Others may struggle over the most basic operation. Because people’s experiences, backgrounds, and intuitions differ, it may be a good idea to read through just to ascertain whether you feel comfortable or are getting over your head.

    Remember, you assume all risk of trying this, but you will reap the rewards! It’s pretty satisfying to boot into a fresh operating system you baked at home :). And once you’re an Android-building ninja, there will be no more need to wait for “nightly” builds from anyone. You will have at your fingertips the skills to build a full operating system from code to a running device, whenever you want. Where you go from there– maybe you’ll add a feature, fix a bug, add a translation, or use what you’ve learned to build a new app or port to a new device– or maybe you’ll never build again– it’s all really up to you.





    What you’ll need

    * A device (supported by LineageOS)
    * A relatively recent 64-bit computer (Linux, OS X, or Windows) with a reasonable amount of RAM and about 100 GB of free storage (more if you enable ccache or build for multiple devices). The less RAM you have, the longer the build will take (aim for 8 GB or more). Using SSDs results in considerably faster build times than traditional hard drives.
    * A USB cable compatible with the OnePlus One (typically micro USB)
    * A decent internet connection & reliable electricity :)
    * Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with recovery. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /. etc.



    Summary

    1. Install SDK
    2. Install build packages
    3. Java
    4. Create the directories
    5. Install the repo command
    6. Initialize the LineageOS source repository
    7. Download the source code
    8.Prepare the device-specific code
    9. Extract proprietary blobs
    10. Turn on caching to speed up build
    11. Configure jack
    12. Start the build
    13. Install the build




    Build LineageOS and LineageOS Recovery​



    1. Install SDK

    If you haven’t previously installed adb and fastboot, you can download them from Google. Extract it using:
    Code:
    unzip platform-tools-latest-linux.zip -d ~

    Now we have to add adb and fastboot to our path. Open ~/.profile and add the following:

    Code:
    # add Android SDK platform tools to path
    if [ -d "$HOME/platform-tools" ] ; then
        PATH="$HOME/platform-tools:$PATH"
    fi

    Then, run this to update your environment.
    Code:
    source ~/.profile



    2. Install build packages

    Several packages are needed to build LineageOS. You can install these using your distribution’s package manager.

    You’ll need:

    Code:
    bc bison build-essential ccache curl flex 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 pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev

    For Ubuntu versions older than 16.04 (xenial), substitute:

    libwxgtk3.0-dev → libwxgtk2.8-dev




    3. Java

    Different versions of LineageOS require different JDK (Java Development Kit) versions.

    LineageOS 11.0-13.0: OpenJDK 1.7 (install openjdk-7-jdk)*
    LineageOS 14.1: OpenJDK 1.8 (install openjdk-8-jdk)

    * Ubuntu 16.04 and newer do not have OpenJDK 1.7 in the standard package repositories. See Ask Ubuntu question How do I install openjdk 7 on Ubuntu 16.04 or higher Note that the suggestion to use PPA openjdk-r is outdated (the PPA has never updated their offering of openjdk-7-jdk, so it lacks security fixes); skip that answer even if it is the most upvoted.



    4. Create the directories

    You’ll need to set up some directories in your build environment.

    To create them:

    Code:
    $ mkdir -p ~/bin
    $ mkdir -p ~/android/system



    5. Install the repo command

    Enter the following to download the repo binary and make it executable (runnable):

    Code:
    $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo

    Put the ~/bin directory in your path of execution

    In recent versions of Ubuntu, ~/bin should already be in your PATH. You can check this by opening ~/.profile with a text editor and verifying the following code exists (add it if it is missing):

    Code:
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi

    Then, use this to update your environment.

    Code:
    source ~/.profile



    6. Initialise the LineageOS source repository

    Enter the following to initialize the repository:

    Code:
    $ cd ~/android/system
    $ repo init -u https://github.com/LineageOS/android.git -b lineage-16.0



    7. Download the source code

    To start the download of the source code to your computer:

    Code:
    $ repo sync

    The Lineage manifests include a sensible default configuration for repo, which we strongly suggest you use (i.e. don’t add any options to sync). For reference, our default values are -j 4 and -c. The -j 4 part means that there will be four simultaneous threads/connections. If you experience problems syncing, you can lower this to -j 3 or -j 2. -c will ask repo to pull in only the current branch, instead of the entire LineageOS history.



    8. Prepare the device-specific code

    After the source downloads, ensure you’re in the root of the source code (cd ~/android/system), then type:
    You have to change DEVICE with the codename of your device (for example: Oneplus ONE codename is bacon)

    Code:
    $ source build/envsetup.sh
    $ breakfast "DEVICE"

    This will download your device’s device specific configuration and kernel.

    Important: Some maintainers require a vendor directory to be populated before breakfast will succeed. If you receive an error here about vendor makefiles, jump down to Extract proprietary blobs. The first portion of breakfast should have succeded, and after completing you can rerun breakfast



    9. Extract proprietary blobs

    Method 1
    Now ensure your device is connected to your computer via the USB cable, with ADB and root enabled, and that you are in the ~/android/system/device/your_device/codename folder. Then run the extract-files.sh script:

    Code:
    $ ./extract-files.sh

    The blobs should be pulled into the ~/android/system/vendor/your_device folder. If you see “command not found” errors, adb may need to be placed in ~/bin.


    Method 2 (Recomended)
    Search for your device blobs on TheMuppets or Donkeycoiote and add them to local manifest



    10. Turn on caching to speed up build


    You can speed up subsequent builds by running:

    Code:
    $ export USE_CCACHE=1

    And adding that line to your ~/.bashrc file. Then, specify the maximum amount of disk space you want cache to use by typing this from the top of your Android tree:

    Code:
    $ prebuilts/misc/linux-x86/ccache/ccache -M 50.0G

    Where 50G corresponds to 50GB of cache. This needs to be run once. Anywhere from 25GB-100GB will result in very noticeably increased build speeds (for instance, a typical 1hr build time can be reduced to 20min). If you’re only building for one device, 25GB-50GB is fine. If you plan to build for several devices that do not share the same kernel source, aim for 75GB-100GB. This space will be permanently occupied on your drive, so take this into consideration. See more information about ccache on Google’s Android build environment initialization page.



    11. Configure jack

    Jack is the new Java compiler used from Lineage 14. It is known to run out of memory

    Simple fix is to run this command:

    Code:
    $ export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m"

    Adding that command to your ~/.bashrc file will automatically configure Jack to allocate a sufficient amount of memory.
    If this doesn't help, you can reduce the number of Jacks to 1 in config.properties

    $HOME/.jack-server/config.properties
    jack.server.max-service=1



    12. Start the build

    Time to start building! Now, type:

    Code:
    $ croot
    $ brunch [COLOR="red"]device[/COLOR]

    Remember, device is the codename for your device

    The build should begin.



    13. Install the build

    Assuming the build completed without errors (it will be obvious when it finishes), type the following in the terminal window the build ran in:

    Code:
    $ cd $OUT

    There you’ll find all the files that were created. The two files we’re interested in are:

    recovery.img, which is the LineageOS recovery image.
    lineage-14.1-build_date-UNOFFICIAL-device.zip, which is the LineageOS installer package.





    Success! So… what’s next?​

    You’ve done it! Welcome to the elite club of self-builders. You’ve built your operating system from scratch, from the ground up. You are the master/mistress of your domain… and hopefully you’ve learned a bit on the way and had some fun too.
    Now, what to do next? You can jump to next section of this guide to understand how Github works and how to pick some commits from other developers/teams to improve your custom ROM​


    This guide was taken from Official LineageOS wiki and all credits goes to LineageOS Maintainers :D
    23


    What is Github and how to use it



    GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. It is a powerful tool with many features available and here i´m going to talk about how you can use it to help you build and customize your "Custom ROM"




    Summary

    1. Repositories
    2. How to add/remove repositories
    3. How to add/remove remotes
    4. Repository Fork





    1. Repositories


    Now that you have built custom lineage from source to your device, you can explore deeper and see how things work and change them according to your needs.
    First we are going to se what is inside .repo folder

    Code:
    cd ~/working_dir/.repo
    ls

    It will show you something similar to this:

    Captura_de_ecr_2017-09-07_22-39-15.png


    Inside the .repo folder are the necessary "manifest files" that tell the repo sync command what to include or remove from our project when synchronizing with the source

    Open manifest.xml

    Code:
     gedit ~/working_dir/.repo/manifest.xml

    Inside that file you have all information about which repositories belongs to source. These are the base repositories to build LineageOS.
    Inside ~/working_dir/.repo/local_manifests/roomservice.xml you can see the repositories needed to build for your specific device. This file is created after breakfast device step and includes, besides others, device tree and kernel.





    2. How to add/remove repositories


    Lets take a look at how we use roomservice.xml to add/remove repo's from our project, i will use Oneplus ONE device tree for example

    Code:
     <project name="LineageOS/android_device_oneplus_bacon" path="device/oneplus/bacon" remote="github" revision="cm-14.1" />

    * project name="LineageOS/android_device_oneplus_bacon Name of repository (without https://github.com)
    * path="device/oneplus/bacon" Here is where the files will reside in our working directory
    * remote="github" Is the for remote we are using, in this case is github (see below how to add/remove remotes to your project)
    * revision="cm-14.1" Revision is the branch we want to sync

    Image:
    Captura_de_ecr_2017-09-08_20-03-54.png






    3. How to add/remove remotes


    Code:
    <remote fetch="https://github.com" name="github" />

    * remote fetch="https://github.com Url for remote you want to add to your project (in this case, we are working with github)

    * name="github" This is the name for remote





    Now that you understand the concept of repository, you can "fork" one and start making your
    changes and keep it up to date with LineageOS source. For that, you need a Github Account.​




    4. Repository Fork



    In this example, i will fork Oneplus ONE device tree

    1. Create Github Account

    2. Go to https://github.com/LineageOS/android_device_oneplus_bacon and tap on Fork button. After that you can see that repository on you Github account

    Image:

    Captura_de_ecr_2017-09-08_21-23-01.png


    3. Now that you have "forked" one repository, you need to edit ~/working_dir/.repo/local_manifests/roomservice.xml and change the default location to your location on your github.[/SIZE]

    Image:

    Captura_de_ecr_2017-09-08_21-31-19.png




    This is the basic steps you need to understand how to use Github to keep your code saved and updated. On next section, i will tell you how use Git so you can work on your project and start to pick some cool commits from others projects.
    3
    if I have a unsopported device (zuk z2 pro) how can sobstitute the breakfast and brunch command?

    This thread is for supported devices, that will be my next guide
    2
    A3 2017

    Hi , I have Galaxy A3 2017 I got to point of breakfast and I cound download files for my phone. What I have to do if I want to have Lineage OS Nuggat in my phone. I hate original rom :-{

    breakfast a3y17lte
    including vendor/cm/vendorsetup.sh
    build/core/product_config.mk:249: *** Can not locate config makefile for product "lineage_a3y17lte". Stop.
    build/core/product_config.mk:249: *** Can not locate config makefile for product "cm_a3y17lte". Stop.
    build/core/product_config.mk:249: *** Can not locate config makefile for product "lineage_a3y17lte". Stop.
    Device a3y17lte not found. Attempting to retrieve device repository from LineageOS Github
    Repository for a3y17lte not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
    build/core/product_config.mk:249: *** Can not locate config makefile for product "lineage_a3y17lte". Stop.
    build/core/product_config.mk:249: *** Can not locate config makefile for product "lineage_a3y17lte". Stop.

    ** Don't have a product spec for: 'lineage_a3y17lte'
    ** Do you have the right repo manifest?

    Is that mean that I have to wait for support from LineageOS dvlpr team <?
    Roman