I am currently compiling a custom recovery for an android phone. Sources are synced, device tree etc. all set up correctly. Now I am facing a rather banal-looking error during build. cp refuses to copy a directory, because -r is not specified in the build file.
I obviously tried to find the build file (rw_recovery/out/build_omni_daisy.ninja) and add the -r argument, but it seems to be regenerated at the beginning of every build process, as the process still fails and the previously changed line appears unchanged when opening the file after the attempted build.
These are the build steps:
. build/envsetup.sh
lunch omni_daisy-eng #config for the device
mka bootimage #device uses boot.img as recovery
This command leaves me with the following error:
[ 99% 6883/6884] Prebuilt (rw_recovery/out/target/product/daisy/kernel)
FAILED: rw_recovery/out/target/product/daisy/kernel
/bin/bash -c "(rm -f /home/luca/rw_recovery/out/target/product/daisy/kernel) && (cp rw_recovery/out/target/product/daisy/obj/KERNEL_OBJ/arch/arm64/boot/ rw_recovery/out/target/product/daisy/kernel )"
cp: -r not specified; omitting directory 'rw_recovery/out/target/product/daisy/obj/KERNEL_OBJ/arch/arm64/boot/'
ninja: build stopped: subcommand failed.
17:13:06 ninja failed with: exit status 1
I would love to hear any suggestions about how to force ninja to execute the command with -r. Alternatively, suggestions about where to find the file from which the above mentioned build file is recreated after executing mka command are much welcomed as well.
Related
Trying to build libwally-core C library for Android on Windows in Cygwin with supplied autotools scripts:
libwally-core
After running
bash tools/build_android_libraries.sh
or
bash tools/autogen.sh
I get the following error:
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: error: AC_CONFIG_MACRO_DIRS([build-aux/m4]) conflicts with
ACLOCAL.AMFLAGS=-I build-aux/m4
autoreconf-2.69: libtoolize failed with exit status: 1
I tried the following things to no avail:
Re-saved all scripts with Unix line-endings (LF only)
Commenting out "ACLOCAL_AMFLAGS = -I tools/build-aux/m4" in Makefile.am
The error happens at the following place in libtool's source in libtoolize.in:
macrodir="$ac_macrodir"
test -z "$macrodir" && macrodir="$am_macrodir"
if test -n "$am_macrodir" && test -n "$ac_macrodir"; then
test "$am_macrodir" = "$ac_macrodir" \
|| func_fatal_error "AC_CONFIG_MACRO_DIR([$ac_macrodir]) conflicts with ACLOCAL_AMFLAGS=-I $am_macrodir."
fi
I assume that the above makes sure that AC_CONFIG_MACRO_DIR and value after "-I" in ACLOCAL_AMFLAGS are identical (checked for identical line endings with hex editor too). The values are identical in both configure.ac and Makefile.am. However, even if I comment out setting ACLOCAL_AMFLAGS in Makefile.am, the error persits.
I would like to compile the library and generate libwallycore.so. Any insight would be much appreciated.
I trying to build chromium android apk with this instruction
But on GN configuration step I have following problem after arguments file editing and saving
ERROR at //build/config/android/internal_rules.gni:1966:13: Script returned non-zero exit code.
exec_script("//build/android/gyp/find.py",
^----------
Current dir: /home/artem/chromium/src/out/Default/
Command: python -- /home/artem/chromium/src/build/android/gyp/find.py ../../third_party/android_tools/sdk/extras/google/google_play_services/libproject/google-play-services_lib/res
Returned 1.
stderr:
../../third_party/android_tools/sdk/extras/google/google_play_services/libproject/google-play-services_lib/res does not exist
See //build/config/android/rules.gni:634:3: whence it was called.
process_resources(process_resources_target_name) {
^-------------------------------------------------
See //third_party/android_tools/BUILD.gn:120:1: whence it was called.
android_resources("google_play_services_default_resources") {
^------------------------------------------------------------
See //base/BUILD.gn:1074:7: which caused the file to be included.
"//third_party/android_tools:cpu_features",
^-----------------------------------------
Then I try manually download google play services with command from this issue thread:
sudo ./build/android/play_services/update.py download
And get this warning:
Your version of the Google Play services library is not up to date. You might run into issues building or running the app. Please run `./build/android/play_services/update.py download` to retry downloading it.
After that I try to build full browser apk
ninja -C out/Default chrome_public_apk
and get error:
ninja: Entering directory `out/Default'
ninja: fatal: chdir to 'out/Default' - No such file or directory
Is there the way to fix this issue and build working apk file?
This works for me:
Run this command at chromium folder:
git rebase-update
gclient sync
Download google play services:
sudo ./build/android/play_services/update.py download
Configure GN: gn args opt/Full
Add this line to file: target_os="android"
Build apk with command: ninja -C opt/Full chrome_public_apk
Cocos2d-x 3.7.1 + ndk r10e project on Mac trying to debug in Eclipse. Days pass and the errors keep coming...
I can build and run using cocos compile and cocos run with -p android -m debug --ndk-mode NDK_DEBUG=1 from the terminal in proj.android.
My app runs Ok (eventually) on my x86 emulator no problem.
Typing 'ndk-gdb' in the terminal from ./proj.android and I get the error
ERROR: Could not find gdb.setup under ./libs/
BUT the file gdb.setup (and gdbserver & libcocos2dcpp.so) can be seen in ./proj.android/libs/x86 !?
My AndroidManifest.xml includes android:debuggable="true"
My jni/Application.mk includes APP_ABI := x86 (only)
If anyone can tell me how I can diagnose or fix this problem then I guess I owe them a beer (in Yorkshire btw)
UPDATE: I have tried running up GDB using the --verbose flag. The output shows
Using gdb setup init: ./libs/armeabi/gdb.setup
Using app out directory: ./obj/local/armeabi
Guess I need to change to settings/init file somewhere??
I ran into the same problem. It seems something changed in recent version of Android Build tools.
The trick is:
ERROR: Could not find gdb.setup under ./libs/
It expects gdb.setup is in the directory libs but NOT libs/armeabi
so the simple workground is to copy gdb.setup and gdbserver from "libs/cpu" to "libs" and it works like a magic!
This is a bug caused by adb from android sdk.Issue 191085: ndk-gdb issue - Could not find gdb.setup under ./libs/ (even though it's there)
Currently previewl channel's adb whose version is 1.0.35 still has the same problem.
Without revert adb to 1.0.31.A simple workaround would be modify ndk-gdb a little: change the line if [ $? = 0 ]; then which is below adb_var_shell BCFILES run-as $PACKAGE_NAME /system/bin/sh -c "ls lib/*.bc" to if [ $? = 1 ]; then
My background is in HTML/JS, so compiling is new for me. While attempting to build my python project in Kivy to an Android .apk, I am getting an error I do not understand:
Command failed: ./distribute.sh -m "kivy"
Here is a portion of the tail end of the debug output...
Compiling /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/xmllib.py ...
Compiling /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/xmlrpclib.py ...
Compiling /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/zipfile.py ...
make: [libinstall] Error 1 (ignored)
PYTHONPATH=/Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7 LD_LIBRARY_PATH=/Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python/Python-2.7.2: \
/Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python/Python-2.7.2/hostpython -Wi -t /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/compileall.py \
-d /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages -f \
-x badsyntax /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages
Listing /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages ...
PYTHONPATH=/Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7 LD_LIBRARY_PATH=/Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python/Python-2.7.2: \
/Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python/Python-2.7.2/hostpython -Wi -t -O /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/compileall.py \
-d /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages -f \
-x badsyntax /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages
Listing /Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages ...
PYTHONPATH=/Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7 LD_LIBRARY_PATH=/Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python/Python-2.7.2: \
/Users/Travis/buildozer/.buildozer/android/platform/python-for-android/build/python/Python-2.7.2/hostpython -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
Leaving ARM environment
cp: build/lib.linux-x86_64-2.7/_ctypes*.so: No such file or directory
# Command failed: ./distribute.sh -m "kivy" -d "myapp"
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
Here is the full debug, for those who want it...
https://www.dropbox.com/s/45lgdhk5y4uj8eg/KivyDebug.txt?dl=1
Also, my buildozer.spec file...
https://www.dropbox.com/s/g5p43jjts49rzza/buildozer.spec?dl=1
EDIT: Downgrading Cython per the advice HERE did not help.
EDIT2: Tried changing requirements to kivy==master. No luck.
EDIT3: Tried chmod -R 777 on both source and buildozer folders. No luck.
OK, I came across the answer to my own problem a while ago and I'm posting it here in case someone else makes the same boneheaded mistake. Basically, I did not read the instructions carefully enough in the documentation. The instructions clearly state "navigate to your project directory and run: buildozer init". I did not navigate to the project folder. I was building in my user directory, hence "/Users/Travis/". Hence the "No such file or directory" error.
You may be asking "How do you expect buildozer to know where your project is?"
Well, the next step says to configure "buildozer.spec", and in there, there is a place to put your path to the main.py, which by default is ".", so I changed that. It actually worked up to the point that it has to write any files.
So, if you're having the same issue as me, you might just need to read more carefully.
I'm trying to compile Android FS, on OSX 10.8.5, and I'm getting an error that seems related to the fact that the build is being done on OSX.
I did all the brew installations and the compilation is being done on a case-sensitive FS,
yet I'm getting the following:
target arm C++: libwebrtc_apm <= out/target/product/generic/obj/STATIC_LIBRARIES/libwebrtc_apm_intermediates/proto/external/webrtc/src/modules/audio_processing/test/unittest.pb.cc
Symlink: out/target/product/generic/system/vendor/lib/libbltsville_cpu.so -> ./libbltsville_ticpu.so
Symlink: out/target/product/generic/system/vendor/lib/libbltsville_ticpu.so -> ./libbltsville_ticpu.2.1.0.0.so
Install: out/host/darwin-x86/bin/minigzip
cp: the -R and -r options may not be specified together.
make: * [out/target/product/generic/system/vendor/lib/libbltsville_ticpu.so] Error 1
make: * Deleting file `out/target/product/generic/system/vendor/lib/libbltsville_ticpu.so'
make: * Waiting for unfinished jobs....
Any ideas?
I know that -R can solve this issue, but the build is being done by scripts and it'll be very hard to change all the spots where -avr will be -avR!!
I'm looking for a way to replace the cp command to a more linux like command....
So I got an answer for this conundrum:
The Makefile & main.mk located in build/core
Are the rogue files that made the trouble, hope this'll help someone.