Syntax error when building from android source - Android Q&A, Help & Troubleshooting

First of all, I didn't modified any file so it seems that it was already downloaded with syntax error. I followed the instructions from here and here when preparing the building environment. When I run make -j8 I got the error:
FAILED: out/target/common/obj/all-event-log-tags.txt
/bin/bash -c "build/tools/merge-event-log-tags.py -o out/target/common/obj/all-event-log-tags.txt frameworks/base/core/java/android/app/admin/SecurityLogTags.logtags frameworks/base/core/java/android/content/EventLogTags.logtags frameworks/base/core/java/android/net/EventLogTags.logtags frameworks/base/core/java/android/speech/tts/EventLogTags.logtags frameworks/base/core/java/android/webkit/EventLogTags.logtags frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/EventLogTags.logtags frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags frameworks/base/services/core/java/com/android/server/EventLogTags.logtags frameworks/base/services/core/java/com/android/server/am/EventLogTags.logtags frameworks/ex/common/java/com/android/common/GoogleLogTags.logtags frameworks/native/services/surfaceflinger/EventLog/EventLogTags.logtags frameworks/opt/telephony/src/java/com/android/internal/telephony/EventLogTags.logtags packages/apps/QuickSearchBox/src/com/android/quicksearchbox/EventLogTags.logtags packages/apps/Settings/src/com/android/settings/EventLogTags.logtags packages/providers/CalendarProvider/src/com/android/providers/calendar/EventLogTags.logtags packages/providers/ContactsProvider/src/com/android/providers/contacts/EventLogTags.logtags packages/services/Telephony/src/com/android/phone/EventLogTags.logtags system/bt/main/../EventLogTags.logtags system/core/liblog/event.logtags system/core/libsysutils/EventLogTags.logtags system/core/logcat/event.logtags system/core/logd/event.logtags"
File "build/tools/merge-event-log-tags.py", line 51
except getopt.GetoptError, err:
^
SyntaxError: invalid syntax
[ 0% 92/35341] host C++: aapt <= frameworks/base/tools/aapt/Main.cpp
ninja: build stopped: subcommand failed.
16:27:01 ninja failed with: exit status 1
make: *** [build/core/main.mk:21: run_soong_ui] Error 1
#### make failed to build some targets (53 seconds) ####
Click to expand...
Click to collapse
In this merge-event-log-tags.py file, at line 51, it has:
try:
opts, args = getopt.getopt(sys.argv[1:], "ho:m:")
except getopt.GetoptError, err:
print str(err)
print __doc__
sys.exit(2)
Click to expand...
Click to collapse
Also, this is my first time posting here and also first time trying to build android so if you guys need more information to help troubleshoot this, please let me know

fabiotk said:
First of all, I didn't modified any file so it seems that it was already downloaded with syntax error. I followed the instructions from here and here when preparing the building environment. When I run make -j8 I got the error:
In this merge-event-log-tags.py file, at line 51, it has:
Also, this is my first time posting here and also first time trying to build android so if you guys need more information to help troubleshoot this, please let me know
Click to expand...
Click to collapse
I've got this same problem trying to build 8.1.0. Did you (or anyone else) ever figure this out?
http://dpaste.com/0C1QWKE

UnderSampled said:
I've got this same problem trying to build 8.1.0. Did you (or anyone else) ever figure this out?
http://dpaste.com/0C1QWKE
Click to expand...
Click to collapse
Hello, yes, I solved it by making Python2 the default version instead of python3
Code:
sudo ln -sf /usr/bin/python2 /usr/bin/python

Related

[SOLVED] Building Error

Hi XDA friends!
I'm building pac-rom for trltexx but I'm always ending with this error:
Code:
ln: failed to access ‘/home/mone/android/pac-rom/out/target/product/trltexx/pac_trltexx-ota-3cf4b0d877.zip’: No such file or directory
build/core/Makefile:1757: recipe for target 'bacon' failed
make: *** [bacon] Error 1
Any advice?
Looks like the all process goes well but it doesn't create "pac_trltexx-ota-3cf4b0d877.zip" and my build ends in a very hated (and soo red ) "make failed to build some targets"
_mone said:
Hi XDA friends!
I'm building pac-rom for trltexx but I'm always ending with this error:
Code:
ln: failed to access ‘/home/mone/android/pac-rom/out/target/product/trltexx/pac_trltexx-ota-3cf4b0d877.zip’: No such file or directory
build/core/Makefile:1757: recipe for target 'bacon' failed
make: *** [bacon] Error 1
Any advice?
Looks like the all process goes well but it doesn't create "pac_trltexx-ota-3cf4b0d877.zip" and my build ends in a very hated (and soo red ) "make failed to build some targets"
Click to expand...
Click to collapse
+1
Solved editing build/core/makefile

Sony - Xperia - SGP611 - Custom Rom build error

Hi there all,
I have been trying for about a week to get a custom android 5 built for a client for their Xperia Z3 tablet i have followed all the instructions on the Sony website and am running Ubuntu 16, after getting the repositories and required sony Vendor files i finally get to the make -j4 command, this starts to run until it hits an error saying that there is no vendor file for scorpion_windy and then breaks the make process, my question is can i download this resource separately, and also if not how can i choose what files the make command uses can i not just skip the scorpion_windy file?
I am a complete noob and any assistance in this regard would be much appreciated!
Thanks in advance
The info on this thread is what I used http://forum.xda-developers.com/z3-...torial-stock-android-marshmallow-6-0-t3409486 It worked fine on LinuxMint KDE.
SGP611 Build errors
Hi There,
I appreciate the input, but i am attempting to compile the aosp archive, once i complete the setup and finally get to make -j4 the process runs along until it gives me an error regarding the file healthd and the specific error of battery monitor error, i have tried to do this in kit kat, jellybean and marshmallow now have all the sony device files followed the instructions here
developer.sonymobile.com/open-devices/aosp-build-instructions/how-to-build-aosp-marshmallow-for-unlocked-xperia-devices/
But no dice im pretty confused and frustrated at this point any thoughts would be very much appreciated
Can you post a copy of the error from the terminal console?
iancornelius said:
Can you post a copy of the error from the terminal console?
Click to expand...
Click to collapse
Hi There,
Thank you for your reply here is the error im getting
...
including ./vendor/sony/yukon-seagull/proprietary/Android.mk ...
including ./vendor/sony/yukon-tianchi/proprietary/Android.mk ...
No private recovery resources for TARGET_DEVICE scorpion_windy
make: *** No rule to make target 'external/openssl/flavor.mk'. Stop.
#### make failed to build some targets (01:02 (mm:ss)) ####
very frustrating when you learning
Ok so i cleaned my entire system and re synced my repos, and got much further in the process follwing the instructions exactly and now i get this error
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:44: recipe for target 'out/host/linux-x86/obj32/lib/libnativehelper.so' failed
make: *** [out/host/linux-x86/obj32/lib/libnativehelper.so] Error 1
make: *** Waiting for unfinished jobs....
#### make failed to build some targets (01:50:56 (hh:mm:ss)
Any help would be much appreciated!
Monkybomb said:
Ok so i cleaned my entire system and re synced my repos, and got much further in the process follwing the instructions exactly and now i get this error
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:44: recipe for target 'out/host/linux-x86/obj32/lib/libnativehelper.so' failed
make: *** [out/host/linux-x86/obj32/lib/libnativehelper.so] Error 1
make: *** Waiting for unfinished jobs....
#### make failed to build some targets (01:50:56 (hh:mm:ss)
Any help would be much appreciated!
Click to expand...
Click to collapse
I've recently built Nougat for my device and came across no errors and followed the guide to the single letter. Have you done everything it has asked to? Most importantly the first part regarding openjdk-8 and the other libraries to be installed.

[HELP] Error in 'make otapackage'

after i type make otapackage, after some time i get this error message and build stops. every time same error.
[ 69% 21776/31360] build out/target/product/hikari/gen/EXECUTABLES/iw_intermediates/version.c
FAILED: /bin/bash -c "external/iw/version.sh out/target/product/hikari/gen/EXECUTABLES/iw_intermediates/version.c"
fatal: No names found, cannot describe anything.
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (05:33:08 (hh:mm:ss)) ####
Click to expand...
Click to collapse
can anyone help?
Are you trying to make AOSP otapackage
Ashwinrg said:
Are you trying to make AOSP otapackage
Click to expand...
Click to collapse
yeah, AOSP. any solution? i'm still struck

Help Build Lineageos for Xiaomi Redmi Pro

Can someone please help me?
I'm having trouble while to compile my build.
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/system.prop', needed by '/home/neverson/android/system/out/target/product/omega/obj/ETC/system_build_prop_intermediates/build.prop', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/neverson/android/system'
What this error means and how can I fix it? Just for the context I have system.prop file. And I also tried disable ninja using export USE_NINJA=false. but the error remains.
You device tree?
thinhx2 said:
You device tree?
Click to expand...
Click to collapse
Here is my device tree
https://drive.google.com/open?id=0B0M07vEulBG8eGE3c2hUaUVhcTA
Dersaun said:
Here is my device tree
https://drive.google.com/open?id=0B0M07vEulBG8eGE3c2hUaUVhcTA
Click to expand...
Click to collapse
You can upload to github.
Hi,
Here is my device tree in github
https://github.com/Dersaun/android_device_Xiaomi_omega
your device tree is not complete
Dersaun said:
Can someone please help me?
I'm having trouble while to compile my build.
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/system.prop', needed by '/home/neverson/android/system/out/target/product/omega/obj/ETC/system_build_prop_intermediates/build.prop', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/neverson/android/system'
What this error means and how can I fix it? Just for the context I have system.prop file. And I also tried disable ninja using export USE_NINJA=false. but the error remains.
Click to expand...
Click to collapse
Hi sir did u fix this error can u tell me how u fixed this error

Build Android P aosp error

I am doing it according to the website.
https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-android-p-9-0-0
terminal picture
https://imgur.com/a/t08GNrC
[ 97% 86508/88632] //frameworks/base/libs/hwui:libhwui link libhwui.so
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
[ 97% 86509/88632] //frameworks/base/libs/hwui:libhwui link libhwui.so [arm]
Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
ninja: build stopped: subcommand failed.
20:00:42 ninja failed with: exit status 1
failed to build some targets (02:41:31 (hh:mm:ss))
Has anyone been able to figure this one out?
I even added "export LLVM_ENABLE_THREADS=1" to my .bashrc and nothing changed, still the same problem.
zagi988 said:
Has anyone been able to figure this one out?
I even added "export LLVM_ENABLE_THREADS=1" to my .bashrc and nothing changed, still the same problem.
Click to expand...
Click to collapse
Thanks, dude. "export LLVM_ENABLE_THREADS=1" works for me but not in the .bashrc
If it failed with same error, don't do anything and run "export LLVM_ENABLE_THREADS=1" then continue build the rom (type "make")
java.lang.OutOfMemory: Java heap space
I'm getting error while building Android 9
Exception in thread "main" Java.lang.OutOfMemory: Java heap space
ninja: build stopped: subcommand failed.
ninja failed with: exit status 1

Categories

Resources