Compiling Android from source, "no rule to make target" tbToolCM error - android

I'm trying to help out a friend of mine by compiling a ROM for the Samsung Galaxy Grand 2 (ms013g).
make: *** No rule to make target
'/home/quiche/cmsource/out/host/linux-x86/bin/dtbToolCM' needed by
'/home/quic/out/target/product/ms013g/dt.img '.
I keep getting this error i cannot fix, i tried the fix described here: CM12 build failed for oneplus one
and i also made sure android_device_qcom_common is in my local_manifest.xml.
Somewere else, someone suggested changing dtbToolCM to dtbTool, which i tried to no avail.

Seems like You need to add suitable kernel project to your local manifest
Downloading of android_kernel_samsung_klte project helped to me (I was building device_samsung_klte)

Please try this to add below to your Device.mk
BOARD_KERNEL_SEPARATED_DT :=true
Please see Android.mk for dtbtool.
Thank you.

Related

AOSP - Error: Overriding commands for target (...), previously defined at (...)

I'm trying to build AOSP for non - supported device (surnia - Moto E2 2015 LTE).
I solved lots of problems earlier but now I have one that I can't avoid. I saw a lot of people had that problem, but their was just warning...
What can I do? Or could you help me finding surnia device tree (but for stock AOSP)?
[100% 441/441] writing build rules ...
FAILED:
build/make/core/Makefile:28: error: overriding commands for target `out/target/product/surnia/system/vendor/lib/libHevcSwDecoder.so', previously defined at build/make/core/base_rules.mk:480
19:07:53 ckati failed with: exit status 1
#### failed to build some targets (01:22 (mm:ss)) ####
add this flag "BUILD_BROKEN_DUP_RULES := true" in your BoardConfig.mk this work for me
I've recently encountered a similar error. It's because of a duplicate entry in PRODUCT_COPY_FILES which both are trying to copy some file to the same destination out/target/product/surnia/system/vendor/lib/libHevcSwDecoder.so. This will cause en error.
For me, the duplicate entry was in the following file:
<AOSP_ROOT>/vendor/google_devices/<DEVICE_CODENAME>/<DEVICE_CODENAME>-vendor-blobs.mk
For you, I think you should be looking for surnia-vendor-blobs.mk. Open this file and find the PRODUCT_COPY_FILES entry that has the destination out/target/product/surnia/system/vendor/lib/libHevcSwDecoder.so, then you can remove it to resolve the error.
This is a workaround, unfortunately I couldn't figout out what's the root problem.
by the way, Welcome Peter to Stack Overflow!

libtime_genoff.so error while building android

I am trying to build Cyanogenmod 12.1 with my ubuntu.
Target device is Korea G3(F400x).
I used TheMuppets's proprietary for vendor/lge/ and other things from Cyanogenmod github, and pulled needed files from Cyanogenmod 12 which is running on my phone.
But when I try to build...(using command "brunch f400k") I can see this.
make: *** `/home/newnis/android/system/out/target/product/f400k/obj/SHARED_LIBRARIES/libandroid_servers_intermediates/LINKED/libandroid_servers.so'에서 필요로 하는 타겟 `/home/newnis/android/system/out/target/product/f400k/obj/lib/libtime_genoff.so'를 만들 규칙이 없습니다. 멈춤.
This is korean message, I think this will mean:
make: *** No rule to make target `/home/newnis/android/system/out/target/product/f400k/obj/lib/libtime_genoff.so` needed by `/home/newnis/android/system/out/target/product/f400k/obj/SHARED_LIBRARIES/libandroid_servers_intermediates/LINKED/libandroid_servers.so'. Stop.
in english.
I copied libandroid_servers.so from my phone, but result was same.
Also, I tried to find the libtime_genoff.so from my phone, but I could not find that.
I googled this problem, but I could not find any working solution.
Anyone knows the solution?
I fixed it.
Something was wrong with device/lge/f400k.
It's name(f400k) wasn't matched with f400 in vendor/lge/g3-common/Android.mk
I changed directory name to f400(I edited some file's name and files in device/lge/f400, too.), and it works.
Now it looks like it's compiling well...

ERROR: '__NDK_FPABI__' does not name a type

While compiling native code-base, I'm getting the following error -
<NDK-HOME>/platforms/android-17/arch-arm/usr/include/jni.h:235:68: error: expected ';' at end of member declaration
<NDK-HOME>/platforms/android-17/arch-arm/usr/include/jni.h:235:70: error: '\__NDK_FPABI__' does not name a type
...
With tons of repetitions.
Platform related details are as below -
Native OS: Windows 7 (64 bit) with Cygwin64
NDK Version: r9c
A similar problem has been reported here. However, even after modifying LOCAL_CFLAGS, I couldn't find the intermediate files as suggested.
Was wondering if some of you have faced this problem already and if so, do you guys have a work-around for this?
Alright, finally got rid of these __NDK_FPABI__ errors and my native code compiled just fine. Indeed, there were subtle hints in the intermediate files (*.i and *.ii) as suggested by Andrew in the link on my previous post; these are usually related to finding appropriate headers. Once relevant changes were made, things worked like a charm.
Few things I learned while debugging this issue -
The problem was related to header files. Certain headers were being picked up from /usr/include which otherwise should have been picked up from $NDK_HOME/platform/$ANDROID_VERSION/$ARCH/usr/include. Making necessary changes in the Android makefile fixed the issue for me.
Always resist the temptation of adding hot-fixes to NDK files. This will make your life a lot easier in the long run.
One should look for the intermediate files (*.i, *.ii, *s and few others) in $PROJECT_ROOT, instead of $PROJECT_ROOT/jni (assuming native code lies there).
The latest release of NDK, namely ndk-r9d fixes some of the issues with __NDK_FPABI__ related errors.
Hope this helps!

mk:1: *** missing separator. android NDK

I am trying to compile some source code but when i run the command
make -f android-9-armv7.mk
I get the following error
android-9-armv7.mk:1: * missing separator. Stop.
This is the contents of the file above:
And I have set the IMAGINE_PATH variable as well, cant seem to figure it out.
link ../imagine/make/shortcut/common-builds/android-9-armv7.mk
Compiling instructions
http://code.google.com/p/emu-ex-plus-alpha/wiki/Compiling
Imagine is locaed at C:/Imagine
I don't know where you've taken the sources, but all the android-9-armv7.mk files from different projects on that git has following content:
../imagine/make/shortcut/common-builds/android-9-armv7.mk
...there is no link keyword, which probably is why you get this error.
Also, please be informed that you're building this on Windows machine while documentation clearly states that it's supported only on Linux and Mac OS X.

Error's With AOSCompiler - CM10 - Galaxy Nexus/maguro

I trying to compile CM10 with AOSCompiler(using ubuntu). And i got 2 questions:
1.It's Saying me that it's can't find my device:
elichai#elichai-MT6840:~/.aoscompiler/build$ . build/envsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
elichai#elichai-MT6840:~/.aoscompiler/build$ lunch cm_maguro-userdebug
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/maguro/cm.mk]]: "device/samsung/tuna/device.mk" does not exist. Stop.
Device maguro not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_samsung_maguro
CyanogenMod/android_device_samsung_maguro already exists
Syncing repository to retrieve project.
Fetching projects: 100% (1/1), done.
Repository synced!
Looking for dependencies
Done
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/maguro/cm.mk]]: "device/samsung/tuna/device.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_maguro'
** Do you have the right repo manifest?
I tried to do just 'lunch' and choose my device from the list and it's gave me the same error.
I tried to use 'breakfast' and it's gave me the same error too.
2.The AOSCOmpiler Saying that:
Adb isn't running
Need adb to setup vendor files.
Is this something you are going to do yourself?
Please try again.
Even i added to the file '/etc/bash.bashrc this line:
export PATH=${PATH}:/home/elichai/Downloads/SDK/tools:/home/elichai/Downloads/SDK/platform-tools
(this is my SDK location) and now i can use 'adb' without going to the SDK folder. but it's still not working(the AOSCompiler).
Sorry, I know it's getting old, but, to to the export PATH=${PATH}:/home/elichai/Downloads/SDK/tools:/home/elichai/Downloads/SDK/platform-tools you should remove {}s
export PATH=$PATH:/home/elichai/Downloads/SDK/tools:/home/elichai/Downloads/SDK/platform-tools
That's what I did. I'm on Ubuntu 10.04
Also, you could add the paths to your .bashrc, assuming you are using bach as you shell.
I'm sure someone will correct me if I'm wrong.

Categories

Resources