[HELP/Q&A][SourceBuilding,AllDevices] The Source Building Q&A Help Thread

Is This Thread helpfull?


  • Total voters
    187
Search This thread

psxda97

Senior Member
Nov 1, 2015
206
71
Hi,
I'm trying to build a AOSP-CAF for my old Moto G 2014. I downloaded the source. since it is not officially supported, how can I add device tree for compiling?
Can I use LOS device tree of my device with this source?

Any help would be highly appreciated. I'm having a hard time understanding this.
Thanks in advance :)
 

nikhilpal2705

Senior Member
Jul 8, 2014
76
65
Lucknow
Moto G 2015
Xiaomi Redmi 5
Building Nitrogen OS for MotoG3.
Always getting this error. Even i tried clean Build but same error.
Please help guys.
Code:
ninja: error: '/home/nikhilpal2705/android/nitrogen/out/target/product/osprey/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/export_
includes', needed by '/home/nikhilpal2705/android/nitrogen/out/target/product/osprey/obj/SHARED_LIBRARIES/libaudiopolicyservice_intermediates/
import_includes', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
 
#### make failed to build some targets (24 seconds) ####
 

CM_developer

Senior Member
Oct 21, 2017
118
37
Don't look at node_fns.mk.
I have had the same error. But the cause was somewhere else - look in your device ".mk" files.

I copied incorrectly one line:

Code:
 $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk

and really - ")" is missing ;)

You just saved me from having to redownload the source code again lol thank you so much!!!:laugh:
 

Ayrond_626

Member
Feb 15, 2018
5
0
I have this error when I try to compile Lineage OS 13.0 for arm64:
Code:
In file included from kernel/htc/msm8916/include/linux/time.h:6:0,
                 from bionic/libc/include/sys/time.h:33,
                 from bionic/libc/include/time.h:33,
                 from system/core/include/log/log.h:34,
                 from hardware/qcom/display-caf/msm8916/libqdutils/mdp_version.cpp:32:
kernel/htc/msm8916/include/linux/math64.h:5:23: fatal error: asm/div64.h: No such file or directory
 #include <asm/div64.h>

Any idea how to resolve it ??
 

quake73

Senior Member
Jul 26, 2013
736
1,583
Xiaomi Poco F3
I'm facing a build difficulty here, it says that chrono_utils.h is missing eventhough /system/core/base/chrono_utils.h exists. Here's the full log:

https://hastebin.com/ocatecihot.pl

Greatly appreciate all the help I can get

The file may be there but the compiler isnt looking into that location. If there is an Android.mk file in device/oneplus/bacon/init then try adding system/core/base/include to the line LOCAL_C_INCLUDES.
 
  • Like
Reactions: CedArctic

swapk007

Senior Member
Jan 3, 2011
56
3
I am trying to build AOSP 8.1.0 For GALAxyS GT-I9000 I am not developer, I am trying to do by following guide on XDA But I am unable to understand the following Pls help me through this.

Quote:

swapnil@swapnil-945GCM-S2L:~/android$ . build/envsetup.sh; lunch aosp_arm-eng; make -j2 including device/asus/fugu/vendorsetup.sh 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-mips64/vendorsetup.sh including device/generic/mini-emulator-mips/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 device/google/dragon/vendorsetup.sh including device/google/marlin/vendorsetup.sh including device/google/muskie/vendorsetup.sh including device/google/taimen/vendorsetup.sh including device/huawei/angler/vendorsetup.sh including device/lge/bullhead/vendorsetup.sh including device/linaro/hikey/vendorsetup.sh including device/samsung/i9000/vendorsetup.sh including sdk/bash_completion/adb.bash

============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=8.1.0 TARGET_PRODUCT=aosp_arm TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_PLATFORM_VERSION=OPM1 TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a TARGET_CPU_VARIANT=generic 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.13.0-37-generic-x86_64-with-Ubuntu-16.04-xenial HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=OPM5.171019.017 OUT_DIR=out
AUX_OS_VARIANT_LIST=

============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=8.1.0 TARGET_PRODUCT=aosp_arm TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a TARGET_CPU_VARIANT=generic HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.13.0-37-generic-x86_64-with-Ubuntu-16.04-xenial HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=OPM5.171019.017
OUT_DIR=out

ninja: no work to do. ninja: no work to do. wildcard(out/target/product/generic/clean_steps.mk) was changed, regenerating... [681/996] including ./system/sepolicy/Android.mk ... ./system/sepolicy/Android.mk:111: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version [996/996] including ./tools/tradefederation/core/Android.mk ... PRODUCT_COPY_FILES device/generic/goldfish/fstab.ranchu:root/fstab.ranchu ignored. PRODUCT_COPY_FILES device/generic/goldfish/fstab.ranchu.early:root/fstab.ranchu.early ignored. platform_testing/build/tasks/tests/instrumentation_metric_test_list.mk: warning: continuous_instrumentation_metric_tests: Unknown installed file for module perf-setup.sh platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module EmergencyInfoTests platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh [ 0% 1/64340] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_cl.c FAILED: out/target/product/generic/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_cl.bc /bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript32-linux-androideabi -fsigned-char -Wno-deprecated -Werror -Werror -Wall -Wextra -Iframeworks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS -x renderscript frameworks/rs/driver/runtime/rs_cl.c -o out/target/product/generic/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_cl.bc" clang.real: error: unable to execute command: Bus error (core dumped) clang.real: error: clang frontend command failed due to signal (use -v to see invocation) Android clang version 3.8.275480 (based on LLVM 3.8.275480) Target: renderscript32--linux-android Thread model: posix InstalledDir: /proc/self/cwd/prebuilts/clang/host/linux-x86/clang-3289846/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: Error generating preprocessed source(s). [ 0% 2/64340] Ensuring Jack server is installed and started Jack server already installed in "/home/swapnil/.jack-server" Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/swapnil/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher ninja: build stopped: subcommand failed. 12:19:39 ninja failed with: exit status 1
failed to build some targets (13:40 (mm:ss))
 

CM_developer

Senior Member
Oct 21, 2017
118
37
I am trying to build AOSP 8.1.0 For GALAxyS GT-I9000 I am not developer, I am trying to do by following guide on XDA But I am unable to understand the following Pls help me through this.

Quote:

swapnil@swapnil-945GCM-S2L:~/android$ . build/envsetup.sh; lunch aosp_arm-eng; make -j2 including device/asus/fugu/vendorsetup.sh 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-mips64/vendorsetup.sh including device/generic/mini-emulator-mips/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 device/google/dragon/vendorsetup.sh including device/google/marlin/vendorsetup.sh including device/google/muskie/vendorsetup.sh including device/google/taimen/vendorsetup.sh including device/huawei/angler/vendorsetup.sh including device/lge/bullhead/vendorsetup.sh including device/linaro/hikey/vendorsetup.sh including device/samsung/i9000/vendorsetup.sh including sdk/bash_completion/adb.bash

============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=8.1.0 TARGET_PRODUCT=aosp_arm TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_PLATFORM_VERSION=OPM1 TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a TARGET_CPU_VARIANT=generic 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.13.0-37-generic-x86_64-with-Ubuntu-16.04-xenial HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=OPM5.171019.017 OUT_DIR=out
AUX_OS_VARIANT_LIST=

============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=8.1.0 TARGET_PRODUCT=aosp_arm TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a TARGET_CPU_VARIANT=generic HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.13.0-37-generic-x86_64-with-Ubuntu-16.04-xenial HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=OPM5.171019.017
OUT_DIR=out

ninja: no work to do. ninja: no work to do. wildcard(out/target/product/generic/clean_steps.mk) was changed, regenerating... [681/996] including ./system/sepolicy/Android.mk ... ./system/sepolicy/Android.mk:111: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version [996/996] including ./tools/tradefederation/core/Android.mk ... PRODUCT_COPY_FILES device/generic/goldfish/fstab.ranchu:root/fstab.ranchu ignored. PRODUCT_COPY_FILES device/generic/goldfish/fstab.ranchu.early:root/fstab.ranchu.early ignored. platform_testing/build/tasks/tests/instrumentation_metric_test_list.mk: warning: continuous_instrumentation_metric_tests: Unknown installed file for module perf-setup.sh platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module EmergencyInfoTests platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh [ 0% 1/64340] bc: libclcore.bc <= frameworks/rs/driver/runtime/rs_cl.c FAILED: out/target/product/generic/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_cl.bc /bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript32-linux-androideabi -fsigned-char -Wno-deprecated -Werror -Werror -Wall -Wextra -Iframeworks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS -x renderscript frameworks/rs/driver/runtime/rs_cl.c -o out/target/product/generic/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_cl.bc" clang.real: error: unable to execute command: Bus error (core dumped) clang.real: error: clang frontend command failed due to signal (use -v to see invocation) Android clang version 3.8.275480 (based on LLVM 3.8.275480) Target: renderscript32--linux-android Thread model: posix InstalledDir: /proc/self/cwd/prebuilts/clang/host/linux-x86/clang-3289846/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: Error generating preprocessed source(s). [ 0% 2/64340] Ensuring Jack server is installed and started Jack server already installed in "/home/swapnil/.jack-server" Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/swapnil/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher ninja: build stopped: subcommand failed. 12:19:39 ninja failed with: exit status 1
failed to build some targets (13:40 (mm:ss))

I know one wants to do this, but your easiest way of doing this is to download the 8.0.0 (earlier version) and see if it seems to work. It could be a bug in the source
 

yeshwanthvshenoy

Senior Member
Dec 12, 2016
74
254
Chennai
yeshwanthvshenoy.github.io
Hi, Trying to build GZOSP for Titan and facing this error:

Code:
device/qcom/sepolicy/common/attributes:58:ERROR 'Duplicate declaration of type' at token ';' on line 4866:
attribute hal_vehicle;
checkpolicy:  error(s) encountered while parsing configuration

Checked the device.te from device tree, nothing mentioning HAL is present there. Any guide would be great.
 

Nemeziz 56th

Senior Member
Oct 10, 2012
326
70
XCXC
LG V30
Compiling Kernel Error

Hello everyone,

i need help. I was trying to compile a kernel for my xperia z2 on ubuntu 18.04 with arm-eabi-4.8 and the procedure was aborted with a error. Maybe someone can help?


In file included from drivers/video/msm/mdss/mdss_mdp_trace.h:255:0,
from drivers/video/msm/mdss/mdss_mdp.c:61:
include/trace/define_trace.h:79:43: fatal error: ./mdss_mdp_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
scripts/Makefile.build:307: recipe for target 'drivers/video/msm/mdss/mdss_mdp.o' failed
make[4]: *** [drivers/video/msm/mdss/mdss_mdp.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/video/msm/mdss' failed
make[3]: *** [drivers/video/msm/mdss] Error 2
scripts/Makefile.build:443: recipe for target 'drivers/video/msm' failed
make[2]: *** [drivers/video/msm] Error 2
scripts/Makefile.build:443: recipe for target 'drivers/video' failed
make[1]: *** [drivers/video] Error 2
Makefile:950: recipe for target 'drivers' failed
make: *** [drivers] Error 2
 
Hello everyone I have a problem trying to compile some roms and I have this error..
who can help me solve this problem I really appreciate


[100% 1/1] /home/waynee/android/derp/out/soong/.bootstrap/bin/soong_build /home/
FAILED: /home/waynee/android/derp/out/soong/build.ninja
/home/waynee/android/derp/out/soong/.bootstrap/bin/soong_build -t -l /home/wayne
e/android/derp/out/.module_paths/Android.bp.list -b /home/waynee/android/derp/ou
t/soong -n /home/waynee/android/derp/out -d /home/waynee/android/derp/out/soong/
build.ninja.d -globFile /home/waynee/android/derp/out/soong/.bootstrap/build-glo
bs.ninja -o /home/waynee/android/derp/out/soong/build.ninja Android.bp
error: vendor/aosip/build/soong/Android.bp:30:8: module "generated_kernel_includ
es": cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
15:30:47 soong bootstrap failed with: exit status 1

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


real 1m28,229s
user 1m9,767s
sys 0m25,494s
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
6,941
6,958
Sydney
Hello everyone I have a problem trying to compile some roms and I have this error..
who can help me solve this problem I really appreciate
If you read the few posts above yours, you will see that this thread is old and therefore not read/followed/viewed by many people.

For more help on building ROMs, try the following thread. https://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763

Also, when posting logs, you would be better off using a text hosting service like www.hastebin.com or del.dog
 

Top Liked Posts

  • There are no posts matching your filters.
  • 78
    I have been wandering around the question and answers forum for some time now...i noticed a thing that most of them who had errors building from source have been left un answered..

    i assume the following reasons for this

    1)no dev would really care to search through and help out
    2)users are scared to pm dev's
    3)their posts are getting lost due to no actiivity within seconds of posting

    as a outcome of all the above

    the user isn't getting help

    so i thought of making a thread for just source build errors..

    so this this thread will focus on providing answers for all the problems that you are facing while building from source......


    now i would like the users to follow a format similar to this for reporting

    1)A full error encountered (pastie or any similar site's
    2)your device name
    3)your device tree that you have used for compiling(github link)
    4)which rom are you building(cm aokp etc)
    5)The guide which you are using to build(link)


    another kind request please spread the link for this thread as many may benefit from it....

    and find developers who are interested in helping....

    feel free to give suggestions....

    Before you move ahead make sure you copy paste this into the terminal

    32bit users(ics & below)
    HTML:
    sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind squashfs-tools zip curl pngcrush schedtool ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libwxgtk2.6-dev

    64bit ( you need this in addition with 32bit packages)

    HTML:
    sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
      x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
      libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
      libxml2-utils gcc-4.3-multilib g++-4.3-multilib g++-multilib

    common build errors


    HTML:
    build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/YG/m805_892x/device_m805_892x.mk]]: "device/YG/m805_892x/m805_892x-vendor-blobs.mk" does not exist. Stop.

    cause for problem
    device_m805_892x.mk
    Here in your device folder it is calling a make file which is required for compiling as in this case (device_m805_892x.mk) has a reference to
    (device/YG/m805_892x/m805_892x-vendor-blobs.mk)

    check if

    (m805_892x-vendor-blobs.mk)

    is there in vendors folder... as in this case this is not found ..


    solution

    1)remove the reference to that makefile..
    2)check the path for makefile(these are case sensitive)
    3)correct the makefile in vendor folder to match that in the makefile that has called it


    2)

    HTML:
    make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/m805_892x/system/app/RomManager.apk'. Stop.
    make: *** Waiting for unfinished jobs....


    cause for the problem

    Here the script is written to copy rommanager.apk to system app during the build process...
    But the apk is missing which is stoping the make process

    solution


    cd into vendors/cm

    then type this

    HTML:
    ./get-prebuilts


    IF some dev helps you out show your appreciation by using the thanks button
    8
    the last one reserved
    5
    Im experiencing the same issue, Must of been some changes pushed over to the cyanogen repo..



    Can you please elaborate on this..

    goto packages/apps/dsp

    rename Android.mk to
    Android.mk.Disabled
    4
    So I've subscribed to this thread and I'll help when I can I've built about seven different ROMs and have had to solve allot of issues lol

    Sent from my SAMSUNG-SGH-I577 using xda premium

    thank you for helping..i too have done a lot of source builds and faced hell lot of problems so i made this as a general thread to get help and help other's too...