Re: [android-building] Failed make -j8 - aosp_arm_eng - ubuntu

2017-09-13 Thread Colin Cross
Your CCACHE_DIR environment variable is set to /ccache/.ccache, set it to something that exists. On Tue, Sep 12, 2017 at 11:19 PM, aadi wrote: > i tried make clobber and make clean and increased the java heap size > but still getting the same error : > > [ 0% 75/62904] host C++: aapt <= framewo

Re: [android-building] Soong convert Android.mk file for shared lib that uses LOCAL_AIDL_INCLUDES

2017-09-12 Thread Colin Cross
12 September 2017 19:12:16 UTC+2, Colin Cross wrote: >> >> That's a mistake in the androidmk tool, it should have produced: >> aidl: { >> local_include_dirs: ["api"], >> } >> >> On Tue, Sep 12, 2017 at 6:10 AM, Michael Lekman >

Re: [android-building] SOONG - cc_prebuilt_library_shared

2017-09-12 Thread Colin Cross
See https://android.googlesource.com/platform/prebuilts/sdk/+/master/tools/Android.bp# for an example. In this case it would be something like: target: { android_arm: { srcs: ["lib/libmytest.so"], }, android_arm64: { srcs: ["lib64/libmytest.so"], }, }, On Tue, Sep

Re: [android-building] Soong convert Android.mk file for shared lib that uses LOCAL_AIDL_INCLUDES

2017-09-12 Thread Colin Cross
That's a mistake in the androidmk tool, it should have produced: aidl: { local_include_dirs: ["api"], } On Tue, Sep 12, 2017 at 6:10 AM, Michael Lekman wrote: > Hello, > > I am trying to convert my Android.mk file to Android.bp. > But it fails when I use aidl_includes. ANdroid.mk was convert

Re: [android-building] Soong errors while compiling.

2017-09-10 Thread Colin Cross
The cause should be somewhere above in the form: warning: does not match between Make and Soong: On Sat, Sep 9, 2017 at 5:36 AM, Januszek wrote: > Hello, I am trying to build Android 8.0. After I ran brunch I saw the > following errors: > > error: Soong variable check failed. > 14:18:09 ckati f

Re: [android-building] Android 7.0 build system doesn't generate .P ?

2017-09-07 Thread Colin Cross
hich as I > currently see is licensed under GPL 3 or higher. > I wonder if I'm missing something. > > > On Tuesday, September 5, 2017 at 7:27:50 PM UTC+2, Colin Cross wrote: > >> ccache changed its license to GPL3, so we are unlikely to upgrade. >> >> On M

Re: [android-building] Android 7.0 build system doesn't generate .P ?

2017-09-05 Thread Colin Cross
ccache changed its license to GPL3, so we are unlikely to upgrade. On Mon, Sep 4, 2017 at 10:58 PM, wrote: > Hello, > And if I got all that I said in the previous email correct, then, > from ccache point of view, the fix is to use newer ccache version - > https://ccache.samba.org/releasenotes.htm

Re: [android-building] FAILED: out/soong/.bootstrap/soong-android/test/test.passed

2017-09-05 Thread Colin Cross
The test called go's iotuil.TempDir to get a temporary directory, which failed. Is your system missing /tmp? On Tue, Sep 5, 2017 at 12:58 AM, aadi wrote: > ninja: no work to do. > > [1/9] test android/soong/android > > FAILED: out/soong/.bootstrap/soong-android/test/test.passed > > out/soong/.bo

Re: [android-building] How to export $(call local-generated-sources-dir) in Android.bp?

2017-09-05 Thread Colin Cross
Your generated headers go in a genrule (or gensrcs) module: genrule { name: "generated_headers_module", } Then you import them and reexport them from another module: cc_library { name: "library", generated_headers: ["generated_headers_module"], export_generated_headers: ["generated

Re: [android-building] how to include all subdirectories in Android.mk except for one subdirectory

2017-08-30 Thread Colin Cross
Why not delete a/b/c/android.mk? It sounds like you are doing something overly complicated in your makefiles, and makefiles and complexity never go well together. If you really need to, you can use: include $(filter-out a/b/c/android.mk,$(call all-subdir-makefiles)) On Wed, Aug 30, 2017 at 6:41

Re: [android-building] Ninja is unable to find new added Android.mk?

2017-08-23 Thread Colin Cross
Kati is supposed to detect the new Android.mk, but if you put it back in a way that left it with an old timestamp it may not notice. Touch any makefile that is read and it should reread everything: touch Makefile On Tue, Aug 22, 2017 at 10:50 PM, Chih-Wei Huang wrote: > Hi, > I'm building Androi

Re: [android-building] Jack server unable to (re)start

2017-08-10 Thread Colin Cross
Have you tried jack-diagnose? We've seen problems on our build servers where a java process gets stuck in the kernel in a way that causes all future calls to ps -ax to hang. The jack startup tries to run ps, so the visible symptom is jack failures. Try running ps -ax, and if that hangs, reboot t

Re: [android-building] Conditional Compilation of source files based on environmental variable in soong build system

2017-08-05 Thread Colin Cross
One of the goals of soong is to reduce the number of different ways we compile the same code, which makes it much harder to determine if a change is going to break a build. We try to move as many of these decisions to runtime as possible. For example, you can compile the two subdirectories as sep

Re: [android-building] Running androidmk tool for converting .mk file to .bp file

2017-08-04 Thread Colin Cross
The O preview source code is not buildable, but all of the relevant code is in AOSP, so use that instead. Sync aosp normally, then run source build/envsetup.sh && m -j blueprint_tools to build the androidmk tool. On Fri, Aug 4, 2017 at 1:33 AM, wrote: > Hi, > > I have been working with o-master

Re: [android-building] Adding a flag in Android.bp

2017-08-02 Thread Colin Cross
Can you describe more about the flag you are trying to add? It would probably go in BaseCompilerProperties in build/soong/cc/compiler.go, then be parsed in baseCompiler.compilerFlags into a something that is passed to the compiler in TransformSourceToObj. On Wed, Aug 2, 2017 at 12:27 AM, Minseong

Re: [android-building] android-7.1.2_r12: prebuilts/misc/linux-x86/bison/bison: No such file or directory

2017-07-05 Thread Colin Cross
What does ls -l /lib/ld-linux.so.2 show? prebuilts/misc/linux-x86/bison/bison is a very old prebuilt binary that is still 32-bit, maybe you are missing the libc6:i386 package or the equivalent for your distribution? On Tue, Jul 4, 2017 at 3:44 AM, Eliot Stock <1...@eliotstock.com> wrote: > > Hi, >

Re: [android-building] LOCAL_IS_STATIC_JAVA_LIBRARY dose not get cleared

2017-06-29 Thread Colin Cross
Despite its naming, LOCAL_IS_STATIC_JAVA_LIBRARY is not intended to be set in module makefiles. It is set and then cleared by build/make/core/static_java_library.mk. I don't think setting it has any effect for BUILD_PREBUILT, you should be able to remove it. On Wed, Jun 28, 2017 at 7:30 PM, Benq

Re: [android-building] make: *** [ninja_wrapper] Error 1

2017-06-06 Thread Colin Cross
Look earlier in the log for a line that starts with FAILED: On Tue, Jun 6, 2017 at 7:57 AM, Aditya Parmar wrote: > Getting this error when running make -j16 > > > > [ 0% 148/15413] Building with Jack: > o...phonenumber_intermediates/classes.jack > ninja: build stopped: subcommand failed. > build

Re: [android-building] Soong build system conditional question

2017-05-23 Thread Colin Cross
erty "Ext_avd" > [2/2] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja > FAILED: out/soong/build.ninja > out/soong/.bootstrap/bin/soong_build -t -b out/soong -d > out/soong/build.ninja.d -o out/soong/build.ninja Android.bp > error: system/bt/stack/Android.bp:183:

Re: [android-building] Soong build system conditional question

2017-05-22 Thread Colin Cross
One of our goals for build health is to reduce the number of different ways we build modules. Adding too many build flags makes it harder to tell if a change will break the build, and hard to run tests. We would much rather compiling everything the same on all devices, and then determine which pa

Re: [android-building] Re: Disable JackServer in Android N

2017-05-18 Thread Colin Cross
Jack cannot be disabled in N. In AOSP master it can be disabled with ANDROID_COMPILE_WITH_JACK=false. On Thu, May 18, 2017 at 2:08 AM, William Smith wrote: > > > Here someone is trying to address the jack problems: > It seems to have helped some people. > https://android-review.googlesource.com/

Re: [android-building] How to disable optimization when building AOSP?

2017-05-14 Thread Colin Cross
that will probably fail with global -O0. On Thu, May 11, 2017 at 10:58 PM, Xie Wu wrote: > Thank you for your reply. if I want to build the whole AOSP without > optimization, what should I do? > > On Friday, May 12, 2017 at 12:31:09 PM UTC+8, Colin Cross wrote: >> >> Th

Re: [android-building] How to disable optimization when building AOSP?

2017-05-11 Thread Colin Cross
There is no generic way to disable optimization for a specific module. For art-related modules you can use mma -j ART_DEBUG_OPT_FLAG=-O0, and then use the version suffixed with "d", for example dex2oatd or dalvikvm -XXlib:libartd.so On Thu, May 11, 2017 at 6:51 PM, Xie Wu wrote: > Hi, I found som

Re: [android-building] Re: JarJar can not find or load main class.

2017-05-06 Thread Colin Cross
Can you send me out/host/linux-x86/framework/jarjar.jar and the contents of out/host/common/obj/JAVA_LIBRARIES/jarjar_intermediates/? What do java -version and javac -version show? Are all 3 of you using extra repos, or stock AOSP? On Sat, May 6, 2017 at 3:55 AM, Nairolf2 wrote: > I am having the

Re: [android-building] Adding a version_script help needed

2017-04-27 Thread Colin Cross
version_script is implemented for cc_library, but linker is a cc_binary. If you want a local hack, just add the necessary "-Wl,--version-script,..." flag to ldflags, and remove the check for version script arguments at https://android.googlesource.com/platform/build/soong/+/master/cc/check.go#76

Re: [android-building] Got 'Unable to find package java.lang' while generating android-icu4j-host

2017-04-06 Thread Colin Cross
The java.lang classes should be in /root/RR/out/host/common/obj/JAVA_LIBRARIES/core-oj-hostdex_intermediates/classes.jar, which is listed in -bootclasspath in your command line. Can you see if that file contains java.lang classes? On Mon, Apr 3, 2017 at 9:06 AM, Ben Ma wrote: > Now I'm stuck on

Re: [android-building] Re: Build AOSP with clang and generate LLVM bitcode

2017-03-27 Thread Colin Cross
The clang command lines that the build is using will look something like: clang -c file.cpp -o file.o By adding -emit-llvm -S, you are causing clang to write llvm bitcode to file.o, which is then later passed to the linker which is expecting to find an object file. To make this work you would need

Re: [android-building] Android.mk not copying to /system

2017-02-18 Thread Colin Cross
What command are you using to build? You generally need to ask the build system to install a module for you by adding it to PRODUCT_PACKAGES for the product you are building. If you are just testing locally, running mmma external/mytest should build and install everything defined in external/myte

Re: [android-building] building kernels problem: can't find bullhead_defconfig

2017-01-29 Thread Colin Cross
bullhead is an arm64 device, you need to run: export ARCH=arm64 export CROSS_COMPILE=aarch64-linux-android- On Sun, Jan 29, 2017 at 1:57 PM, Andrew Weiner wrote: > Hello community, > > I am trying to build the Android kernel following the instructions here: > http://source.android.com/source/bu

Re: [android-building] Building Clang toolchain with other Clang sources

2017-01-19 Thread Colin Cross
I'm not an expert in the NDK build, but it appears from https://android.googlesource.com/platform/ndk/+/master/build/tools/build-llvm.py that modern NDK builds just copy the platform clang prebuilts. Building the platform clang prebuilts is fairly well documented in your second link. Current clang

Re: [android-building] Building Clang toolchain with other Clang sources

2017-01-18 Thread Colin Cross
Can you clarify what you mean by "under the NDK 10"? The files in external/clang are used to build clang as part of an Android platform build, not using the NDK. external/clang/build.py follows the normal sequence for building compilers, which is to use an existing compiler to compile the new sou

Re: [android-building] Soong vs. Make: build time data?

2016-11-21 Thread Colin Cross
The answer differs depending on which platform version you are building and what you are changing in the incremental build. In M, builds are done entirely using make. All incremental builds take 1-2 minutes just to parse the makefiles. In N we introduced Kati, which is a precursor of the Soong p

Re: [android-building] error when i setup ASOP Trade Federation project

2016-11-09 Thread Colin Cross
See http://source.android.com/devices/tech/test_infra/tradefed/fundamentals/machine_setup.html for how to build tradefed. You need to run: source build/envsetup.sh tapas tradefed-all make -j8 On Tue, Nov 8, 2016 at 9:46 PM, 刘月 wrote: > hello,i need help :) > > when i build my ASOP project > > s

Re: [android-building] How to build fastboot for windows from Android N

2016-09-14 Thread Colin Cross
Windows builds are now integrated with the linux build, make fastboot should build both the linux and windows versions, and USE_MINGW=1 is unnecessary. On Wed, Sep 14, 2016 at 2:17 PM, Xiaofeng Lei wrote: > Hi all, > > Recently we moved to Android N from M, and I'm working on poring some > custom

Re: [android-building] LibCXX Build errors Android 7.0.0_r1

2016-09-06 Thread Colin Cross
The framework dumpstate was converted to c++, grouper's libdumpstate needs to be converted to match. See https://android.googlesource.com/device/htc/flounder/+/1ef2d9feeaf70605c04884f61205bd2ac8815574 for an example of the same change made for flounder. On Tue, Sep 6, 2016 at 1:07 PM, Daniel Daws

Re: [android-building] LibCXX Build errors Android 7.0.0_r1

2016-09-06 Thread Colin Cross
You left out the line that starts with FAILED:, which lists the exact command that failed. It appears you are trying to compile with device/asus/grouper, which has been removed from the tree and is no longer supported. Did you manually add that back to your source tree? On Tue, Sep 6, 2016 at 1:

Re: [android-building] LibCXX Build errors Android 7.0.0_r1

2016-09-05 Thread Colin Cross
Can you provide the full error message, everything from the line that starts with FAILED: to the beginning of the next command (it will look like [###/###]). On Sun, Sep 4, 2016 at 10:22 AM, Daniel Dawson wrote: > Hello, > > I'm building Android 7.0 when I encountered a string of errors halfway >

Re: [android-building] First time building,need some help with build errors

2016-08-31 Thread Colin Cross
You've got a permissions issue that is preventing reading some files: build/core/product_config.mk:239: vendor/lge/bullhead/device-vendor.mk: Permission denied Did you mix running as root and as the dehumanized users when syncing? If so, you will need to chown everything back to your user, someth

Re: [android-building] Problem when including external/llvm headers in art/compiler

2016-05-02 Thread Colin Cross
LOCAL_EXPORT_C_INCLUDE_DIRS. On Sat, Apr 30, 2016 at 2:42 PM, Paschalis Mpeis wrote: > Thanks for helping me out Colin Cross. > > So, as per your suggestions I did just the following changes: > art/compiler/Android.mk: (after this line) > .. > LOCAL_SHARED_LIBRARIES += libLLVM > .. > > O

<    1   2