Re: [android-building] how to build Android.bp Build Docs?

2020-08-07 Thread 'Colin Cross' via Android Building
You can see the latest version from AOSP master at
https://ci.android.com/builds/latest/branches/aosp-build-tools/targets/linux/view/soong_build.html,
or if you've completed a build locally the docs should be
at $OUT_DIR/soong/docs/soong_build.html.

On Fri, Aug 7, 2020 at 9:28 AM Chen Wang  wrote:

> hello,
> when I google aosp build related articles on internet, I got this
> https://note.qidong.name/demo/soong_build/, I think it should be
> constructed from the aosp sourcecode but I don't know how to make this with
> the latst version (10)?
> Anybody can help direct me on this? Thanks in advance.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/139c8de2-93fc-4944-99b7-a93624217ba0n%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRQfM7UEkqKL0ysr8Naqcr0eNBYDURfxA%3DKL9MwpquxPww%40mail.gmail.com.


Re: [android-building] how to debug soong?

2020-08-06 Thread 'Colin Cross' via Android Building
See
https://android.googlesource.com/platform/build/soong/+/master/README.md#running-soong-in-a-debugger

On Thu, Aug 6, 2020 at 6:14 PM Chen Wang  wrote:

> hello,
> I want to setup env to debug soong code to see what is happening when
> runSoong. Is there any guide/manual on how to setup this? Thanks in adv.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/2a78af86-8058-4c4e-b6e4-fa9be93d3766n%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRT6iBYQhpxri5Li%3Dn-grGBnVwVLMCWGB-%3DeXNR_YWTHug%40mail.gmail.com.


Re: [android-building] make android images Bad page map in process soong_build

2020-05-14 Thread 'Colin Cross' via Android Building
This looks like a similar issue we saw in 2017 on build servers running
kernel 3.13.0, we haven't seen it recently. Try updating your kernel.

On Thu, May 14, 2020 at 7:56 PM Minghui Ma  wrote:

> hi all
>  i make android images on ubuntu  but sometimes the server hang, I found
> the log from /var/log/kern.log like below:
>
> May 13 22:39:49 buildsrv-198 kernel: [562085.261803] BUG: Bad rss-counter
> state mm:88126ec7bb80 idx:1 val:1
> May 13 22:51:50 buildsrv-198 kernel: [562801.158633] general protection
> fault:  [#2] SMP
> May 13 22:51:50 buildsrv-198 kernel: [562801.249985] Modules linked in:
> iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat
> nf_conntrack ip_tables x_tables esn_cfs(OF) binfmt_misc ipmi_devintf dcdbas
> x86_pkg_temp_thermal coretemp kvm_intel kvm mxm_wmi crct10dif_pclmul
> crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul
> glue_helper ablk_helper cryptd lpc_ich mei_me mei shpchp ipmi_si wmi
> acpi_power_meter mac_hid lp parport tg3 ahci ptp libahci megaraid_sas
> pps_core
> May 13 22:51:50 buildsrv-198 kernel: [562801.547292] CPU: 49 PID: 196401
> Comm: GC Thread#33 Tainted: GF   B DO 3.13.0-32-generic #57-Ubuntu
> May 13 22:51:50 buildsrv-198 kernel: [562801.647136] Hardware name: Dell
> Inc. PowerEdge R730xd/0WCJNT, BIOS 2.8.0 005/17/2018
> May 13 22:51:50 buildsrv-198 kernel: [562801.746548] task:
> 8800273917f0 ti: 880134d46000 task.ti: 880134d46000
> May 13 22:51:50 buildsrv-198 kernel: [562801.845820] RIP:
> 0010:[]  [] down_read_trylock+0x9/0x30
> May 13 22:51:50 buildsrv-198 kernel: [562801.946341] RSP:
> :880134d476c8  EFLAGS: 00010282
> May 13 22:51:50 buildsrv-198 kernel: [562802.046345] RAX: 
> RBX: 881267e68080 RCX: 880134d47828
> May 13 22:51:50 buildsrv-198 kernel: [562802.146566] RDX: 
> RSI: 0001 RDI: 80122b41290e
> May 13 22:51:50 buildsrv-198 kernel: [562802.246571] RBP: 880134d476c8
> R08: 000c R09: 
> May 13 22:51:50 buildsrv-198 kernel: [562802.346575] R10: 88107fffbf00
> R11: 0013 R12: 881267e68081
> May 13 22:51:50 buildsrv-198 kernel: [562802.446796] R13: ea0027b91000
> R14: 80122b41290e R15: 880134d47808
> May 13 22:51:50 buildsrv-198 kernel: [562802.547263] FS:
> 7f93b9169700() GS:88203ed0() knlGS:
> May 13 22:51:50 buildsrv-198 kernel: [562802.649305] CS:  0010 DS: 
> ES:  CR0: 80050033
> May 13 22:51:50 buildsrv-198 kernel: [562802.751346] CR2: 821b4840
> CR3: 0001170ea000 CR4: 003407e0
> May 13 22:51:50 buildsrv-198 kernel: [562802.854774] DR0: 
> DR1:  DR2: 
> May 13 22:51:50 buildsrv-198 kernel: [562802.957740] DR3: 
> DR6: fffe0ff0 DR7: 0400
> May 13 22:51:50 buildsrv-198 kernel: [562803.060107] Stack:
> May 13 22:51:50 buildsrv-198 kernel: [562803.161742]  880134d476f8
> 81184b45 ea0027b91000 
> May 13 22:51:50 buildsrv-198 kernel: [562803.266012]  880134d47900
> 881267e68081 880134d47768 81184d9f
> May 13 22:51:50 buildsrv-198 kernel: [562803.370635]  ea0031a71b80
> 880134d47828 880134d47828 
> May 13 22:51:50 buildsrv-198 kernel: [562803.473982] Call Trace:
> May 13 22:51:50 buildsrv-198 kernel: [562803.574946]  []
> page_lock_anon_vma_read+0x55/0x110
> May 13 22:51:50 buildsrv-198 kernel: [562803.675928]  []
> page_referenced+0x19f/0x310
> May 13 22:51:50 buildsrv-198 kernel: [562803.775281]  []
> shrink_page_list+0x45c/0xa60
> May 13 22:51:50 buildsrv-198 kernel: [562803.873599]  []
> shrink_inactive_list+0x1c2/0x530
> May 13 22:51:50 buildsrv-198 kernel: [562803.971592]  []
> shrink_lruvec+0x355/0x6f0
> May 13 22:51:50 buildsrv-198 kernel: [562804.068770]  []
> shrink_zone+0x66/0x1a0
> May 13 22:51:50 buildsrv-198 kernel: [562804.164644]  []
> do_try_to_free_pages+0xe0/0x540
> May 13 22:51:50 buildsrv-198 kernel: [562804.260438]  []
> try_to_free_pages+0xec/0x180
> May 13 22:51:50 buildsrv-198 kernel: [562804.356260]  []
> __alloc_pages_nodemask+0x7d6/0xb80
> May 13 22:51:50 buildsrv-198 kernel: [562804.452624]  []
> alloc_pages_vma+0x9a/0x140
> May 13 22:51:50 buildsrv-198 kernel: [562804.549125]  []
> do_huge_pmd_anonymous_page+0x10b/0x410
> May 13 22:51:50 buildsrv-198 kernel: [562804.646384]  []
> handle_mm_fault+0x198/0xf00
> May 13 22:51:50 buildsrv-198 kernel: [562804.743674]  []
> ? wake_up_state+0x10/0x20
> May 13 22:51:50 buildsrv-198 kernel: [562804.841042]  []
> ? wake_futex+0x66/0x90
> May 13 22:51:50 buildsrv-198 kernel: [562804.937896]  []
> __do_page_fault+0x184/0x560
> May 13 22:51:50 buildsrv-198 kernel: [562805.034942]  []
> ? acct_account_cputime+0x1c/0x20
> May 13 22:51:50 buildsrv-198 kernel: [562805.132337]  []
> ? account_user_time+0x8b/0xa0
> May 13 22:51:50 buildsrv-198 kernel: [562805.229542]  []
> ? 

Re: [android-building] Generate external/llvm Intrinsics.gen and Attributes.inc on android10

2020-03-02 Thread 'Colin Cross' via Android Building
Those files are generated by the llvm_tblgen modules in
external/llvm/Android.bp.  You'll find their outputs at:
out/soong/.intermediates/external/llvm/llvm-gen-attributes/gen/llvm/IR/Attributes.inc
out/soong/.intermediates/external/llvm/llvm-gen-intrinsics/gen/llvm/IR/Intrinsics.gen

As a hack you could copy those files to the places where the Android.mk
files create them, just be aware they will not be updated if you make
changes to the source files and rebuild.  You could also try reverting the
change that removed generating those files in Make:
commit 7ebb1e3516ebd630aa3fe94f9b4cca2c2dbb09ae
Author: Dan Willemsen 
Date:   Thu Nov 1 00:16:34 2018 -0700

Disable tblgen in Make

The last user of these have been removed. simpleperf is still using
LLVM_HOST_BUILD_MK and LLVM_DEVICE_BUILD_MK, so these can't all be
removed yet.

Test: treehugger
Change-Id: I0b3966fa5630e9795a1e7d7b9658f9a2bcad5271

You'll likely have better success building opt, llvm-link and llc using
Android.bp files than trying to get the old Android.mk files to work though.

On Mon, Mar 2, 2020 at 12:49 PM Paschalis Mpeis 
wrote:

> Hi there,
>
> I am building some tools from *external/llvm*, specifically *opt*,
> *llvm-link*, and* llc*.
> For this, I revived the relevant Android.mk from previous commits
> (for each of the tools, and a relevant portion at
> external/llvm/Android.mk).
> They are normally picked up by the soong build system, and I can for
> example call: `m opt`.
>
> However, these tools depend on *two intermediates*:
>
>-
>
> target/product//gen/EXECUTABLES/opt_intermediates/llvm/IR/Attributes.inc
>-
>
> target/product//gen/EXECUTABLES/opt_intermediates/llvm/IR/Intrinsics.gen
>
> I have enabled FORCE_BUILD_LLVM_COMPONENTS (see here
> 
> )
> and I can see there are relevant entries for what I want at lines: 148
> 
>  and  154
> 
> .
>
> So, is my question is: is there a way to generate those 2 intermediate
> files using the existing Android.bp setup on android10-release branch
> 
> ?
>
> Cheers,
> Paschalis
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/6e937488-80cb-42c8-b15c-087cafb7c400%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRT279w0e%2BT%2B3o2zEQBc0JFEo6gEjfgrJjiLq%3DSXpZ25MQ%40mail.gmail.com.


Re: [android-building] “compatibility.mk” in aosp of vts building means

2020-01-16 Thread 'Colin Cross' via Android Building
COMPATIBILITY.* variables are set here:
https://cs.android.com/android/platform/superproject/+/master:build/make/core/definitions.mk;l=2899?q=file:build%2Fmake%20COMPATIBILITY%5C
.
You normally add modules to android-vts.zip by setting LOCAL_TEST_SUITES :=
vts in an Android.mk file or test_suites: ["vts"] in an Android.bp file.

On Thu, Jan 16, 2020 at 9:23 AM xiang tianyu 
wrote:

> hellp ,can you help me with this problem about "compatibility.mk" of vts
> building system.
>
>
> the source code of "compatibility.mk" is in aosp code ,it's path is
> "build/make/core/tasks/tools/compatibility.mk"
>
>
> there is a line in "compatibility.mk" which is "test_artifacts :=
> $(COMPATIBILITY.$(test_suite_name).FILES)"
>
>
> I try to change the $(test_suite_name) ,but it can not package files to
> android-vts.zip,how does the COMPATIBILITY work?
>
>
> I can not find the defination of COMPATIBILITY.
>
>
> wish your help ,thank you
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/769ed951-666c-44f6-baff-cc2da905518b%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRRANUya7Y5ap%3DzOsZvawAwpjPomppKZH8fB-jxRt2nhvg%40mail.gmail.com.


Re: [android-building] mm including n number of files

2020-01-06 Thread 'Colin Cross' via Android Building
In Q and earlier, `mm` builds and installs the modules in the current
directory and usually subdirectories, but does not build or install
dependencies outside the current directory, but `mma` will build and
install modules in the current directory and their dependencies.  In AOSP
master `mm` is an alias for `mma`, so it will build and install
dependencies.

On Mon, Jan 6, 2020 at 10:09 AM Pranitha Reddy <
pranitha.alugube...@gmail.com> wrote:

> Hello sir,
>
> mm command is used for building and installing all the modules in the
> current directory, My query is why does it includes all the Android.mk
> present in other directories(not the current one). Does mm command installs
> both modules and their dependencies?
>
> Thanks in advance!!
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/f6021264-4662-421e-81e0-2a9bef8ee104%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRRejVW1%2BCUw5JoQUYg4MLZ_YG%3Deaa_Od-y5oPFDo0X2GQ%40mail.gmail.com.


Re: [android-building] Error when building android 9 source (ubuntu 18.04)

2019-12-18 Thread 'Colin Cross' via Android Building
Signal 4 is SIGILL, meaning the binary contained an illegal instruction.
Parts of the ART build assume that the host CPU supports at least SSE4.2
and POPCNT (
https://cs.android.com/android/platform/superproject/+/master:art/build/Android.bp;l=188).
What CPU are you building on?

On Wed, Dec 18, 2019 at 11:35 AM Eliane Fonseca 
wrote:

> The error message is attached below. It always fails at this point, with
> the same exact error message. The error is:
>
> [ 4% 809/19992] Hidden API:
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
> FAILED:
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
> /bin/bash -c "(rm -f
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
> ) && (cp
> \"out/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar\"
> \"out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar\"
> ) && (rm -rf
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi
> ) && (mkdir -p
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi
> ) && (unzip -q
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
> 'classes*.dex' -d
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi
> ) && (find
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi
> -name \"classes*.dex\" | sort | sed 's/^/--dex=/' | xargs
> out/host/linux-x86/bin/hiddenapi
> --light-greylist=out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt
> --dark-greylist=out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt
> --blacklist=out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt ) &&
> (out/soong/host/linux-x86/bin/soong_zip -o
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar
> -C
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi
> -D
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi
> ) && (out/soong/host/linux-x86/bin/merge_zips -D -zipToNotStrip
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar
> -stripFile \"classes*.dex\"
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
> out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar
> out/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar
> )" xargs: out/host/linux-x86/bin/hiddenapi: terminated by signal 4
>
> PS. I posted this isssue on Stack Overflow but they closed my thread and
> asked me to post here.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/3e4a52ba-a9bd-4fbb-805b-35e8ea56ae44%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRSXpztQThCV2Kai5JKDOmLd9EC9i8HkmmXVGZRMGNzgVA%40mail.gmail.com.


Re: [android-building] cant build aosp src (oreo 8.1.0 r3), always fails (tried different targets)

2019-11-20 Thread 'Colin Cross' via Android Building
See https://groups.google.com/g/android-building/c/0kzPnw3akxg

On Wed, Nov 20, 2019 at 4:07 PM Eliane Fonseca 
wrote:

> when building aosp android-8.1.0_r3 always fails, trying to build with
> emulator on a low-spec pc (and i have installed all required components per
> the android compiling instructions), here is the latest console output:
>
> (the target product was mini_emulator_x86 but i also tried aosp_x86 with
> the same error and I had to modify the build ID because it was causing
> another error "too long build fingerprint")
> 
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=8.1.0
> TARGET_PRODUCT=mini_emulator_x86
> TARGET_BUILD_VARIANT=userdebug
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=x86
> TARGET_ARCH_VARIANT=x86
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-5.0.0-36-generic-x86_64-with-Ubuntu-18.04-bionic
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=OC-MR1
> OUT_DIR=out
> 
> ninja: no work to do.
> [1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
> out/build-mini_emulator_x86.ninja is missing, regenerating...
> [680/995] including ./system/sepolicy/Android.mk ...
> ./system/sepolicy/Android.mk:111: warning: BOARD_SEPOLICY_VERS not
> specified, assuming current platform version
> [995/995] including ./tools/tradefederation/core/Android.mk ...
> 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
> [  2% 1493/57217] target  C: sh <= external/mksh/src/eval.c
> external/mksh/src/eval.c:634:21: warning: implicit conversion from 'int'
> to 'char' changes value from 192 to -64 [-Wconstant-conversion]
> *dp++ = 0x80 | '@';
>   ~ ~^
> 1 warning generated.
> [  2% 1509/57217] target  C: sh_vendor <= external/mksh/src/eval.c
> external/mksh/src/eval.c:634:21: warning: implicit conversion from 'int'
> to 'char' changes value from 192 to -64 [-Wconstant-conversion]
> *dp++ = 0x80 | '@';
>   ~ ~^
> 1 warning generated.
> [  3% 1916/57217] target  C:
> e2fsdroid_st...l/e2fsprogs/contrib/android/block_range.c
> In file included from external/e2fsprogs/contrib/android/block_range.c:3:
> In file included from external/e2fsprogs/contrib/android/block_range.h:5:
> In file included from external/e2fsprogs/lib/ext2fs/ext2fs.h:71:
> external/e2fsprogs/lib/ext2fs/ext2_types.h:30:9: warning: '__bitwise'
> macro redefined [-Wmacro-redefined]
> #define __bitwise
> ^
> bionic/libc/kernel/uapi/linux/types.h:25:9: note: previous definition is
> here
> #define __bitwise __bitwise__
> ^
> 1 warning generated.
> [  3% 1917/57217] target  C:
> e2fsdroid_st...al/e2fsprogs/contrib/android/block_list.c
> In file included from external/e2fsprogs/contrib/android/block_list.c:1:
> In file included from external/e2fsprogs/contrib/android/block_list.h:4:
> In file included from external/e2fsprogs/contrib/android/fsmap.h:11:
> In file included from external/e2fsprogs/lib/ext2fs/ext2fs.h:71:
> external/e2fsprogs/lib/ext2fs/ext2_types.h:30:9: warning: '__bitwise'
> macro redefined [-Wmacro-redefined]
> #define __bitwise
> ^
> bionic/libc/kernel/uapi/linux/types.h:25:9: note: previous definition is
> here
> #define __bitwise __bitwise__
> ^
> 1 warning generated.
> [  3% 1918/57217] target  C:
> e2fsdroid_st...xternal/e2fsprogs/contrib/android/fsmap.c
> In file included from external/e2fsprogs/contrib/android/fsmap.c:1:
> In file included from external/e2fsprogs/contrib/android/fsmap.h:11:
> In file included from external/e2fsprogs/lib/ext2fs/ext2fs.h:71:
> external/e2fsprogs/lib/ext2fs/ext2_types.h:30:9: warning: '__bitwise'
> macro redefined [-Wmacro-redefined]
> #define __bitwise
> ^
> 

Re: [android-building] Lots of 'Disallowed PATH tool "manpath"...' when building Android Q

2019-11-18 Thread 'Colin Cross' via Android Building
I was able to reproduce this on Fedora 30, it's something to do with the
environment BASH_ENV=/usr/share/Modules/init/bash, which is causing
arbitrary bash code that can use any binary to be run on every
non-interactive bash shell startup.

On Mon, Nov 18, 2019 at 9:50 AM Michael Goffioul 
wrote:

> Yes, I've already looked into that, but there's not much of a trace, e.g.:
>
> 2019/11/18 11:22:34.837088 build/soong/ui/build/sandbox_linux.go:86:
> [prebuilts/build-tools/linux-x86/bin/nsjail -H android-build -e -u nobody
> -g nobody -B / --disable_clone_newcgroup -- /bin/bash -c if [ $(hostname)
> == "android-build" ]; then echo "Android" "Success"; else echo Failure; fi]
> 2019/11/18 11:22:34.877084 build/soong/ui/build/path.go:105: Disallowed
> PATH tool "manpath" used: []string{"manpath"}
> 2019/11/18 11:22:34.877237 build/soong/ui/build/path.go:107: See
> https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools
> for more information.
>
> I've a feeling that it's coming from bash itself. I've looked into the
> local and system profile/bashrc and anything I could think of, but I can't
> really pinpoint where it's coming from.
>
> On Mon, Nov 18, 2019 at 12:40 PM 'Dan Willemsen' via Android Building <
> android-building@googlegroups.com> wrote:
>
>> If you check out/soong.log, there should be trace logs that include the
>> parent processes all the way up to ninja.
>>
>> It sounds like one of the existing tools that we allow through is always
>> trying to call manpath? Let me know what you find, we've definitely been
>> shrinking this list on master.
>>
>> - Dan
>>
>> On Thu, Nov 14, 2019 at 3:54 PM Michael Goffioul <
>> michael.goffi...@gmail.com> wrote:
>>
>>> I'm using Fedora 30 to build AOSP. Since Android Q, when building, the
>>> terminal output is littered with hundreds of messages like the following:
>>>
>>> 17:23:06 Disallowed PATH tool "manpath" used: []string{"manpath"}
>>> 17:23:06 See
>>> https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools
>>> for more information.
>>>
>>> I've looked almost everywhere, but I can't find where "manpath" is
>>> actually used. Has anybody encountered the same problem?
>>>
>>> Thanks,
>>> Michael.
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-building@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-building+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-building+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/android-building/c9a8a0ea-2492-4e7f-9816-11b9b91f6696%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> --
>> You received this message because you are subscribed to the "Android
>> Building" mailing list.
>> To post to this group, send email to android-building@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-building+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to android-building+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/android-building/CALQgHd%3DmqvANYjYSZyP_1%3DtbMgoddYSLEMTkn3NuUTJF_qML7A%40mail.gmail.com
>> 
>> .
>>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/CAB-99LtJOhcEKr8m_nExyByvOzb_opZxJvk4xovia7d-oYkhdA%40mail.gmail.com
> 

Re: [android-building] OpenJDK 8 or OpenJDK 9 for AOSP 10: which one?

2019-10-25 Thread 'Colin Cross' via Android Building
Correction, EXPERIMENTAL_JAVA_LANUAGE_LEVEL_9=true is the default in
master, and is moving to required with
https://android-review.googlesource.com/c/platform/build/soong/+/1151196.

On Thu, Oct 24, 2019 at 3:32 PM Colin Cross  wrote:

> The source for Android 10 includes prebuilt java toolchains used for
> compiling the platform in prebuilts/jdk/jdk8 and prebuilts/jdk/jdk9, so
> there should be no need to provide any OpenJDK version.
>
> The platform always uses javac from OpenJDK9 to compile
> (prebuilts/jdk/jdk9/linux-x86/bin/javac), OpenJDK8 is EOL upstream.
> Those comments are about selecting what language features are being
> targeted by the OpenJDK 9 toolchain.  In Android 10, we default to passing
> -source 1.8 -target 1.8 to javac to target OpenJDK8 language features,
> unless you set EXPERIMENTAL_USE_OPENJDK9=true on the command line, which
> will default to passing -source 1.9 -target 1.9.  There is no reason to do
> this in Android 10, as there is no platform support for Java language 9
> features.  In master you can use EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true to
> get the same effect.
>
> On Thu, Oct 24, 2019 at 7:40 AM John W. Blue  wrote:
>
>> Hello,
>>
>>
>>
>> I read here:
>>
>>
>>
>>
>> https://android.googlesource.com/platform/build/+/refs/tags/android-10.0.0_r6/core/java_common.mk
>>
>>
>>
>> # TODO(ccross): allow 1.9 for current and unbundled once we have SDK
>> system modules
>>
>> LOCAL_JAVA_LANGUAGE_VERSION := 1.8
>>
>>   else
>>
>> # DEFAULT_JAVA_LANGUAGE_VERSION is 1.8, unless TARGET_OPENJDK9 in which
>> case it is 1.9
>>
>>
>>
>> So is OpenJDK 8 the recommended version or is OpenJDK 9?  And is
>> java_common.mk file the only way to tell?
>>
>>
>>
>> John
>>
>> --
>> --
>> You received this message because you are subscribed to the "Android
>> Building" mailing list.
>> To post to this group, send email to android-building@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-building+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to android-building+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/android-building/68b4db88bc69402a9b2a89458fe3258e%40mail.rrcic.com
>> <https://groups.google.com/d/msgid/android-building/68b4db88bc69402a9b2a89458fe3258e%40mail.rrcic.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRS2t%2BY4uOGQa09597qg6xmZ7yES3OViRmOA8uwzaKebhQ%40mail.gmail.com.


Re: [android-building] OpenJDK 8 or OpenJDK 9 for AOSP 10: which one?

2019-10-24 Thread 'Colin Cross' via Android Building
The source for Android 10 includes prebuilt java toolchains used for
compiling the platform in prebuilts/jdk/jdk8 and prebuilts/jdk/jdk9, so
there should be no need to provide any OpenJDK version.

The platform always uses javac from OpenJDK9 to compile
(prebuilts/jdk/jdk9/linux-x86/bin/javac), OpenJDK8 is EOL upstream.
Those comments are about selecting what language features are being
targeted by the OpenJDK 9 toolchain.  In Android 10, we default to passing
-source 1.8 -target 1.8 to javac to target OpenJDK8 language features,
unless you set EXPERIMENTAL_USE_OPENJDK9=true on the command line, which
will default to passing -source 1.9 -target 1.9.  There is no reason to do
this in Android 10, as there is no platform support for Java language 9
features.  In master you can use EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true to
get the same effect.

On Thu, Oct 24, 2019 at 7:40 AM John W. Blue  wrote:

> Hello,
>
>
>
> I read here:
>
>
>
>
> https://android.googlesource.com/platform/build/+/refs/tags/android-10.0.0_r6/core/java_common.mk
>
>
>
> # TODO(ccross): allow 1.9 for current and unbundled once we have SDK
> system modules
>
> LOCAL_JAVA_LANGUAGE_VERSION := 1.8
>
>   else
>
> # DEFAULT_JAVA_LANGUAGE_VERSION is 1.8, unless TARGET_OPENJDK9 in which
> case it is 1.9
>
>
>
> So is OpenJDK 8 the recommended version or is OpenJDK 9?  And is
> java_common.mk file the only way to tell?
>
>
>
> John
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/68b4db88bc69402a9b2a89458fe3258e%40mail.rrcic.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRSU7KTJMfnRDAs6o0hCpKdbX3fY%2BrSY6Lw-gf0eC%3DJT1w%40mail.gmail.com.


Re: [android-building] Build error: There is insufficient memory for the Java Runtime Environment to continue.

2019-10-18 Thread 'Colin Cross' via Android Building
You'll need to pass a lower -j value to m.  The parallelism selection only
takes the number of CPUs into account, and not the total memory.  This is
something we are looking to improve on.

On Fri, Oct 18, 2019 at 8:46 AM Zelong  wrote:

> zelong@zelong-ThinkPad-T430:/media/zelong/2828a0f1-cc41-4428-854d-a7a18c59f5c6/android_source$
> m
> 
> PLATFORM_VERSION_CODENAME=R
> PLATFORM_VERSION=R
> TARGET_PRODUCT=aosp_arm
> TARGET_BUILD_VARIANT=eng
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> TARGET_ARCH_VARIANT=armv7-a-neon
> TARGET_CPU_VARIANT=generic
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-4.15.0-65-generic-x86_64-Ubuntu-16.04.6-LTS
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=QT
> OUT_DIR=out
> 
> [ 47% 627/1310] //packages/apps/CarrierConfig:CarrierConfig r8
> FAILED:
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/dex/CarrierConfig.jar
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/proguard_dictionary
> rm -rf
> "out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/dex"
> && mkdir -p
> "out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/dex"
> && rm -f
> "out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/proguard_dictionary"
> && out/soong/host/linux-x86/bin/r8-compat-proguard -JXX:OnError='cat
> hs_err_pid%p.log' -JXX:CICompilerCount=6 -JXX:+UseDynamicNumberOfGCThreads
> -injars
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/javac/CarrierConfig.jar
> --output
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/dex
> --force-proguard-compatibility --no-data-resources -printmapping
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/proguard_dictionary
> --min-api 1  -libraryjars
> out/soong/.intermediates/libcore/mmodules/core_platform_api/core.platform.api.stubs/android_common/turbine-combined/core.platform.api.stubs.jar:out/soong/.intermediates/libcore/core-lambda-stubs/android_common/turbine-combined/core-lambda-stubs.jar
> -libraryjars
> out/soong/.intermediates/frameworks/base/ext/android_common/turbine-combined/ext.jar:out/soong/.intermediates/frameworks/base/framework/android_common/turbine-jarjar/framework.jar:out/soong/.intermediates/frameworks/base/media/updatable_media_stubs/android_common/turbine-combined/updatable_media_stubs.jar:out/soong/.intermediates/frameworks/opt/telephony/telephony-common/android_common/turbine-jarjar/telephony-common.jar
> -forceprocessing -include build/make/core/proguard.flags -include
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/gen/proguard.options
> -include packages/apps/CarrierConfig/proguard.flags -dontoptimize
> -dontobfuscate --debug && touch
> "out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/proguard_dictionary"
> && out/soong/host/linux-x86/bin/soong_zip --ignore_missing_files -L 0 -o
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/dex/classes.dex.jar
> -C
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/dex
> -f
> "out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/dex/classes*.dex"
> && out/soong/host/linux-x86/bin/merge_zips -D -stripFile "**/*.class"
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/dex/CarrierConfig.jar
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/dex/classes.dex.jar
> out/soong/.intermediates/packages/apps/CarrierConfig/CarrierConfig/android_common/javac/CarrierConfig.jar
> OpenJDK 64-Bit Server VM warning: INFO:
> os::commit_memory(0xaef0, 272629760, 0) failed; error='Not
> enough space' (errno=12)
> #
> *# There is insufficient memory for the Java Runtime Environment to
> continue.*
> *# Native memory allocation (mmap) failed to map 272629760 bytes for
> committing reserved memory.*
> *# An error report file with more information is saved as:*
> *#
> /media/zelong/2828a0f1-cc41-4428-854d-a7a18c59f5c6/android_source/hs_err_pid3639.log*
> #
> # -XX:OnError="cat hs_err_pid%p.log"
> #   Executing /bin/sh -c "cat hs_err_pid3639.log" ...
> os::fork_and_exec failed: Not enough space (ENOMEM=12)
> [ 48% 631/1310] R8:
> out/target/common/obj/APPS/Dialer_intermediates/dex/classes.dex
> Stripped invalid locals information from 1 method.
> In
> ./out/target/common/obj/APPS/Dialer_intermediates/classes.jar:android/support/v7/widget/Toolbar.class:
>   Methods with invalid locals information:
>   void android.support.v7.widget.Toolbar.onLayout(boolean, int, int, int,
> int)
>   Type information in locals-table is inconsistent. Cannot 

Re: [android-building] Unable to download content during build

2019-10-16 Thread 'Colin Cross' via Android Building
Network connections are blocked using nsjail by default, as they break
build hermeticity.
https://android.googlesource.com/platform/build/soong/+/master/ui/build/sandbox_linux.go#161
is
where it is enforced, you can disable it by
setting BUILD_BROKEN_USES_NETWORK := true in your BoardConfig.mk.

On Wed, Oct 16, 2019 at 10:15 AM Michael Goffioul <
michael.goffi...@gmail.com> wrote:

> Thanks, I figured it must be somehow block. What I would like to
> understand is _how_ this is achieved technically.
>
>
> On Wed, Oct 16, 2019 at 12:58 PM 'Wesolowski, Krzysztof' via Android
> Building  wrote:
>
>> It's blocked by sandboxing of build system, isolating that only repo
>> content is used. Probably wget or external connections are blocked.
>>
>> BR, K
>>
>> Get Outlook for Android 
>>
>> --
>> *From:* android-building@googlegroups.com <
>> android-building@googlegroups.com> on behalf of Michael Goffioul <
>> michael.goffi...@gmail.com>
>> *Sent:* Tuesday, October 15, 2019 9:58:18 PM
>> *To:* Android Building 
>> *Subject:* [android-building] Unable to download content during build
>>
>> I have several custom modules that download content (if not already
>> present) during build, with wget. This uses additional rules in the
>> corresponding Android.mk files. These used to work in Pie, but in Q the
>> rule fail with "Name or service not found". Running the exact same command
>> outside the build system runs fine. Can somebody describe the mechanism at
>> play here, and maybe points to source files where the restriction is
>> implemented?
>>
>> Thanks,
>> Michael.
>>
>> --
>> --
>> You received this message because you are subscribed to the "Android
>> Building" mailing list.
>> To post to this group, send email to android-building@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-building+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>> 
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to android-building+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/android-building/403e25aa-3db5-499a-a7f7-e05814b66fa6%40googlegroups.com
>> 
>> .
>>
>> --
>> --
>> You received this message because you are subscribed to the "Android
>> Building" mailing list.
>> To post to this group, send email to android-building@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-building+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to android-building+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/android-building/VE1P174MB00787459500593F9D0B659AC91920%40VE1P174MB0078.EURP174.PROD.OUTLOOK.COM
>> 
>> .
>>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/CAB-99LsvY8ffMGZhOTmGEn_gmyd8sGnXyhtX84zoqAxy%2B93DFw%40mail.gmail.com
> 

Re: [android-building] Benchmarktest64 directory

2019-10-15 Thread 'Colin Cross' via Android Building
That's not surprising, none of our internal workflows involve flashing the
built userdata.img, as that would effectively wipe all the data on the
device.  We always use adb push (that's what the atest tool does) or adb
sync to run tests and benchmarks.

I think a patch to update fs_config would be fine though.

On Tue, Oct 15, 2019 at 8:27 AM Paul Elliott  wrote:

> Hi Colin,
>
> We're just building the data image and loading that, not using adb sync,
> which potentially explains the differences. If I look at the data image I
> can definitely see that the permissions are wrong.
>
> Paul.
>
> On Monday, October 14, 2019 at 11:22:28 PM UTC+1, Colin Cross wrote:
>>
>> How are you getting the benchmarks on to the device?  In my testing (`m
>> libjavacore-benchmarks`, `adb sync data` they are marked executable.
>>
>> On Fri, Oct 11, 2019 at 10:49 AM Paul Elliott  wrote:
>>
>>> Hi Colin,
>>>
>>> The curious bit is that even as root I am having to change the tests
>>> inside benchmarktest(64) to be executable because they too have no
>>> permissions, which is why I was curious about this as it clearly breaks
>>> automation for us, and therefore likely for anyone else. We could
>>> potentially submit a patch for this to add the directory to fs_config.cpp,
>>> however given the lack of mention by anyone else, was unsure if we were
>>> missing something, basically.
>>>
>>> Paul.
>>>
>>> On Thursday, October 10, 2019 at 9:12:11 PM UTC+1, Colin Cross wrote:
>>>>
>>>> Likely an oversight.  It has been this way for benchmarks defined in
>>>> Make since 2016.  Maybe the benchmark test runners are running as root?
>>>>
>>>> On Thu, Oct 10, 2019 at 10:22 AM Paul Elliott  wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Prior to android 9, all benchmarks and test suites were generally
>>>>> built into /data/nativetest(64), however recently in Android 9, some (but
>>>>> not all) tests have been ending up getting built into
>>>>> /data/benchmarktest(64), due to a change aligning soong with make -
>>>>> https://android-review.googlesource.com/c/platform/build/soong/+/479681
>>>>>
>>>>> This would be fine, however due to its lack of inclusion
>>>>> in system/core/libcutils/fs_config.cpp, this folder is created without any
>>>>> permissions whatsoever.
>>>>>
>>>>> I have checked this is still the case in Android 10, and indeed
>>>>> master. Is this an oversight, or am I missing something?
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Paul.
>>>>>
>>>>> --
>>>>> --
>>>>> You received this message because you are subscribed to the "Android
>>>>> Building" mailing list.
>>>>> To post to this group, send email to android-...@googlegroups.com
>>>>> To unsubscribe from this group, send email to
>>>>> android-...@googlegroups.com
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/android-building?hl=en
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Android Building" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to android-...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/android-building/989e4b75-4366-4b18-b534-dd12f2c022a4%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/android-building/989e4b75-4366-4b18-b534-dd12f2c022a4%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>&

Re: [android-building] Benchmarktest64 directory

2019-10-14 Thread 'Colin Cross' via Android Building
How are you getting the benchmarks on to the device?  In my testing (`m
libjavacore-benchmarks`, `adb sync data` they are marked executable.

On Fri, Oct 11, 2019 at 10:49 AM Paul Elliott  wrote:

> Hi Colin,
>
> The curious bit is that even as root I am having to change the tests
> inside benchmarktest(64) to be executable because they too have no
> permissions, which is why I was curious about this as it clearly breaks
> automation for us, and therefore likely for anyone else. We could
> potentially submit a patch for this to add the directory to fs_config.cpp,
> however given the lack of mention by anyone else, was unsure if we were
> missing something, basically.
>
> Paul.
>
> On Thursday, October 10, 2019 at 9:12:11 PM UTC+1, Colin Cross wrote:
>>
>> Likely an oversight.  It has been this way for benchmarks defined in Make
>> since 2016.  Maybe the benchmark test runners are running as root?
>>
>> On Thu, Oct 10, 2019 at 10:22 AM Paul Elliott  wrote:
>>
>>> Hi all,
>>>
>>> Prior to android 9, all benchmarks and test suites were generally built
>>> into /data/nativetest(64), however recently in Android 9, some (but not
>>> all) tests have been ending up getting built into /data/benchmarktest(64),
>>> due to a change aligning soong with make -
>>> https://android-review.googlesource.com/c/platform/build/soong/+/479681
>>>
>>> This would be fine, however due to its lack of inclusion
>>> in system/core/libcutils/fs_config.cpp, this folder is created without any
>>> permissions whatsoever.
>>>
>>> I have checked this is still the case in Android 10, and indeed master.
>>> Is this an oversight, or am I missing something?
>>>
>>> Thanks in advance,
>>>
>>> Paul.
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/android-building/989e4b75-4366-4b18-b534-dd12f2c022a4%40googlegroups.com
>>> <https://groups.google.com/d/msgid/android-building/989e4b75-4366-4b18-b534-dd12f2c022a4%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/fce01460-04f9-49a1-b73b-f4c89c8a4ab4%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/fce01460-04f9-49a1-b73b-f4c89c8a4ab4%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRSUvHonrEz3eoUPi%2Bj%2B3uSsqJE2gVFyq7s3PABrYs-xiw%40mail.gmail.com.


Re: [android-building] Benchmarktest64 directory

2019-10-10 Thread 'Colin Cross' via Android Building
Likely an oversight.  It has been this way for benchmarks defined in Make
since 2016.  Maybe the benchmark test runners are running as root?

On Thu, Oct 10, 2019 at 10:22 AM Paul Elliott  wrote:

> Hi all,
>
> Prior to android 9, all benchmarks and test suites were generally built
> into /data/nativetest(64), however recently in Android 9, some (but not
> all) tests have been ending up getting built into /data/benchmarktest(64),
> due to a change aligning soong with make -
> https://android-review.googlesource.com/c/platform/build/soong/+/479681
>
> This would be fine, however due to its lack of inclusion
> in system/core/libcutils/fs_config.cpp, this folder is created without any
> permissions whatsoever.
>
> I have checked this is still the case in Android 10, and indeed master. Is
> this an oversight, or am I missing something?
>
> Thanks in advance,
>
> Paul.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/989e4b75-4366-4b18-b534-dd12f2c022a4%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRQPB4gBrfymm13k4452OtihHL9urzQMjXzgp6WFO6jH%3DA%40mail.gmail.com.


Re: [android-building] Android.bp to support architectural files

2019-10-09 Thread 'Colin Cross' via Android Building
Use a single module, and put the differences into multilib lib32/lib64
clauses:

multilib: {
lib32: {
srcs: ["foo32.c"],
},
lib64: {
srcs: ["foo32.c"],
},
},

On Wed, Oct 9, 2019 at 1:09 PM REGURI AKANKSHA 
wrote:

> Suppose say a module  has name - x and compile_multilib =32 and other
> module has name - x and compile_multilib = 64. When executed this would
> result in module duplication? How can this duplication be solved?
> Thanks in advance
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/63c8a7f0-b53a-473c-82d6-f623df2fa8cf%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRS76XHJ0M9XjV12_n%2Bt2yMR4kgc5q6AGfQZ7vQgtS80pw%40mail.gmail.com.


Re: [android-building] Android.bp accessibility

2019-10-04 Thread 'Colin Cross' via Android Building
Soong cannot access variables defined in Make.

For variables defined in Android.bp files this is documented at
https://android.googlesource.com/platform/build/soong/+/master/README.md#variables
:
"Variables are scoped to the remainder of the file they are declared in, as
well as any child blueprint files."


On Fri, Oct 4, 2019 at 9:57 AM REGURI AKANKSHA 
wrote:

> Is there any case that  Android.bp can access variables declared in other
> files.
> say a variable "platform" is declared in some .mk file Can Android.bp now
> use that variable "platform"
> As per my knowledge it's "no" but I want to make sure about this
> Thanks in advance
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/0b6fc82b-4d66-4ad4-b0d1-3fbb4f192a22%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRTwNDjBZe-2BxFLBD36k47s%3D41St9KauOxEXNxX6Qvh4g%40mail.gmail.com.


Re: [android-building] Not booting after adding app to priv-app

2019-09-09 Thread 'Colin Cross' via Android Building
It's hard to tell without logs (you can get adb access for early crashes
like this by pre-installing an ADB public key using PRODUCT_ADB_KEYS), but
my guess is you need to add something to
https://android.googlesource.com/platform/frameworks/base/+/master/data/etc/privapp-permissions-platform.xml?pli=1
 or
https://android.googlesource.com/device/google/marlin/+/master/permissions/privapp-permissions-marlin.xml

On Mon, Sep 9, 2019 at 7:01 AM Vishnu M J 
wrote:

> Hi,
>
> I have been trying to add a apk to priv-app.
>
> Following are the steps i did:
>
> Made a folder named Testapk in packages/apps
> Copied apk to folder with name Testapk.apk
> In same directory, created an Android.mk file with following contents:
>
> LOCAL_PATH := $(call my-dir)
>
>
> include $(CLEAR_VARS)
>
>
> LOCAL_MODULE_TAGS := optional
>
>
> LOCAL_MODULE := Testapk
>
>
> LOCAL_CERTIFICATE := PRESIGNED
>
>
> LOCAL_SRC_FILES := Testapk.apk
>
>
> LOCAL_MODULE_CLASS := APPS
>
>
> LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
>
>
> LOCAL_PRIVILEGED_MODULE := true
>
>
> TARGET_OUT_DATA_APPS_PRIVILEGED := $(TARGET_OUT_DATA)/priv-app
>
>
> include $(BUILD_PREBUILT)
>
>
> Then, added Testapk to core.mk
>
>
> Build is successful and i can see my apk in priv-app folder in
> out/target/product/sailfish/system/priv-app. After flashing, the device
> wont boot up. Its stuck on Android logo.
>
>
> (I am using google pixel-sailfish. Branch is android-9.0.0_r33)
>
> (On adding apk to system/apps, i can boot and the apk works fine)
>
>
> Can someone help me on this???
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/78f67bd6-2e90-40ea-81a8-1a4f1644b8a0%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRSqLEhfK1V_V4gVO7fYwSKnj35%3DWCTMAEMfE6n9mSjqNw%40mail.gmail.com.


Re: [android-building] Re: Build on master branch: failed to find module "fizz-buzz" variant "linux_glibc_x86_64_dylib"

2019-09-03 Thread 'Colin Cross' via Android Building
Thanks for the reports, this should be fixed by
https://android-review.googlesource.com/c/platform/build/soong/+/1113046.

On Tue, Sep 3, 2019 at 7:03 AM 张光刘  wrote:

> me too...
> /Volumes/Aosp  make -j12
> 
> PLATFORM_VERSION_CODENAME=R
> PLATFORM_VERSION=R
> TARGET_PRODUCT=aosp_arm
> TARGET_BUILD_VARIANT=eng
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> TARGET_ARCH_VARIANT=armv7-a-neon
> TARGET_CPU_VARIANT=generic
> HOST_ARCH=x86_64
> HOST_OS=darwin
> HOST_OS_EXTRA=Darwin-18.6.0-x86_64-10.14.5
> HOST_BUILD_TYPE=release
> BUILD_ID=PI
> OUT_DIR=out
> 
> [ 33% 1/3] test android/soong/rust
> FAILED: out/soong/.bootstrap/soong-rust/test/test.passed
> out/soong/.bootstrap/bin/gotestrunner -p ./build/soong/rust -f
> out/soong/.bootstrap/soong-rust/test/test.passed --
> out/soong/.bootstrap/soong-rust/test/test -test.short
> --- FAIL: TestDefaultCrateName (0.05s)
> panic: failed to find module "fizz-buzz" variant
> "linux_glibc_x86_64_dylib".
> all modules: [fizz-buzz(darwin_x86_64_dylib)
> libarena_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libarena_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libfmt_macros_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libfmt_macros_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libgraphviz_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libgraphviz_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libserialize_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libserialize_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libstd_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libstd_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libsyntax_ext_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libsyntax_ext_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libsyntax_pos_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libsyntax_pos_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libsyntax_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libsyntax_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libterm_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libterm_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libtest_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libtest_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)] [recovered]
> panic: failed to find module "fizz-buzz" variant
> "linux_glibc_x86_64_dylib".
> all modules: [fizz-buzz(darwin_x86_64_dylib)
> libarena_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libarena_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libfmt_macros_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libfmt_macros_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libgraphviz_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libgraphviz_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libserialize_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libserialize_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libstd_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libstd_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libsyntax_ext_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libsyntax_ext_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libsyntax_pos_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libsyntax_pos_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libsyntax_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libsyntax_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libterm_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libterm_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)
> libtest_x86_64-unknown-linux-gnu(darwin_x86_64_dylib)
> libtest_x86_64-unknown-linux-gnu(android_arm64_armv8-a_dylib)]
>
> goroutine 4 [running]:
> testing.tRunner.func1(0xc000166300)
> prebuilts/go/darwin-x86/src/testing/testing.go:830 +0x392
> panic(0x1418d60, 0xc0002b4720)
> prebuilts/go/darwin-x86/src/runtime/panic.go:522 +0x1b5
> android/soong/android.(*TestContext).ModuleForTests(0xc206c0,
> 0x14a50cf, 0x9, 0x14ae8dd, 0x18, 0x1ca782a906d9, 0x11f71f0)
> /Volumes/Aosp/build/soong/android/testing.go:92 +0x3ff
> android/soong/rust.TestDefaultCrateName(0xc000166300)
> /Volumes/Aosp/build/soong/rust/rust_test.go:119 +0x7f
> testing.tRunner(0xc000166300, 0x14c2380)
> prebuilts/go/darwin-x86/src/testing/testing.go:865 +0xc0
> created by testing.(*T).Run
> prebuilts/go/darwin-x86/src/testing/testing.go:916 +0x35a
> 19:07:38 soong bootstrap failed with: exit status 1
>
> 在 2019年8月31日星期六 UTC+8上午1:37:38,Quang Hòa Trần写道:
>>
>> Hi there,
>>
>> I tried building the recent master branch on MacOS 10.14.5 and it was
>> failed with the error as follows:
>>
>> PLATFORM_VERSION_CODENAME=R
>>
>> PLATFORM_VERSION=R
>>
>> TARGET_PRODUCT=aosp_arm
>>
>> TARGET_BUILD_VARIANT=eng
>>
>> TARGET_BUILD_TYPE=release
>>
>> TARGET_ARCH=arm
>>
>> TARGET_ARCH_VARIANT=armv7-a-neon
>>
>> TARGET_CPU_VARIANT=generic
>>
>> HOST_ARCH=x86_64
>>
>> HOST_OS=darwin
>>
>> 

Re: [android-building] Adding HIDL service to vendor with prebuilt libraries (Android P)

2019-08-08 Thread 'Colin Cross' via Android Building
Likely libTest.so is built incorrectly and xxx.hardware.test@1.0-service is
ending up with an incorrect DT_NEEDED entry.  Can you show the output of
objdump -x lib/libTest.so and objdump -x
$OUT/vendor/bin/hw/xxx.hardware.test@1.0-service?  My guess is that SONAME
in libTest.so is "out/target/product/xxx/obj/lib/libTest.so" and that gets
copied into NEEDED in xxx.hardware.test@1.0-service.

On Thu, Aug 8, 2019 at 9:50 AM Tore Offermann <
tore.offerm...@tara-systems.de> wrote:

> Hello everyone,
>
> I am currently fighting adding a vendor HIDL service with prebuilt
> libraries on Android Pie.
>
> The HIDL service is created in vendor/...
> It depends on some prebuilt libraries.
>
> The prebuilt libraries are added to the Makefile for the service as
> follows:
>
> include $(CLEAR_VARS)
> LOCAL_PROPRIETARY_MODULE := true
> LOCAL_MODULE_SUFFIX := .so
> LOCAL_MODULE_CLASS := SHARED_LIBRARIES
> LOCAL_MODULE := libTest
> LOCAL_SRC_FILES := lib/libTest.so
> #include $(BUILD_PREBUILT)
>
> During android make the library is correctly copied to /vendor/lib and
> after I flash the device the lib is also available in that folder.
>
> I added the lib to the HIDL service makefile:
>
> include $(CLEAR_VARS)
>
> LOCAL_MODULE := xxx.hardware.test@1.0-service
> LOCAL_PROPRIETARY_MODULE := true
> LOCAL_MODULE_CLASS := EXECUTABLES
> LOCAL_MODULE_RELATIVE_PATH := hw
> LOCAL_INIT_RC := xxx.hardware.t...@1.0-service.rc
> LOCAL_CFLAGS := -Werror
>
> LOCAL_SRC_FILES := service.cpp
>
> LOCAL_C_INCLUDES := $(subst ${ANDROID}/,,$(LOCAL_C_INCLUDES))
>
>
> LOCAL_SHARED_LIBRARIES := \
> xxx.hardware.test@1.0 \
> libhidlbase \
> libhidltransport \
> libbase \
> liblog \
> libutils \
> libTest
>
> include $(BUILD_EXECUTABLE)
>
> No issues during make, but after I start the device the linker complains
> with:
>
> 08-08 10:13:34.014  6814  6814 F linker  : CANNOT LINK EXECUTABLE
> "/vendor/bin/hw/xxx.hardware.test@1.0-service": library
> "out/target/product/xxx/obj/lib/libTest.so" not found
>
> Not sure how this can happen?
> I would suppose that the linker should check for the lib in /vendor/lib.
>
> Could it have something to do with:
>
> LOCAL_PRELINK_MODULE := false
>
> Thanks in advance!
>
> BR,
> Tore
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/d6699eb8-3c08-4ac1-8e74-fb8634b1bd1f%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRSmfp3KRh5OyauULYjbOyZhwjvb%3Dr2xWnY89y%2BAZdB_8A%40mail.gmail.com.


Re: [android-building] Android.bp files for interlinked subdirectories

2019-08-08 Thread 'Colin Cross' via Android Building
Each module should have export_include_dirs: ["inc"], and then anything
that links against it will get those headers.

On Thu, Aug 8, 2019 at 9:50 AM Mohammed Shakir  wrote:

> Hi Sir/Madam,
>
> I am working on a project where multiple interlinked modules are present.
> I am trying to make it compile.
>
> For example, my directory structure is like below.
>
> Root
> |
> |---> Android.bp
> |
> |---> Module1
> | |
> | |---> Android.bp
> | |
> | |---> inc
> | |
> | |---> src
> | |
> | |---> SubModule
> |   |
> |   |---> Android.bp
> |   |
> |   |---> inc
> |   |
> |   |---> src
> |
> |---> Module2
> | |
> | |---> Android.bp
> | |
> | |---> inc
> | |
> | |---> src
> |
> |---> Module3
>   |
>   |---> Android.bp
>   |
>   |---> inc
>   |
>   |---> src
>
>
> In my case, all three modules linked to each other, so they need to share
> their header files with each other.
>
> I have tried to use *include_dirs: ["inc", "SubModule/inc",
> "../Module2/inc", "../Module3/inc"] *in the Android.bp of Module1, I got '
> *module"MyTestApplication" variant "android_common": Path is outside
> directory*'
>
> Could you please check in to it and give a proper method on how to include
> these directories to my Makefile.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/1b012337-ca35-4c4e-84e5-cb0550a27d33%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRSoJzydrMvLiTZOCa6oc-%3DE-mZji%2BuWtpzpX6iTcuChYQ%40mail.gmail.com.


Re: [android-building] Building an old specific commit in one AOSP project

2019-07-01 Thread 'Colin Cross' via Android Building
That change likely arrived in AOSP as part of the lollipop release drop, so
there are no more fine-grained builds available.

On Mon, Jul 1, 2019 at 8:05 AM Alex  wrote:

> This idea is great but it works only if the project has been built by the
> CI with head the targeted commit.
> However, in most cases the CI did not build every changes (I'm looking at
> a commit from 2015)
>
> For example:
> Project: frameworks/av
> CommitId: aa4da6fa7ca2454f0713de0a5a583b5b8160166
>
> The commit is merged in the master branch with the commit
> bacd813565c77010485b7f487630a079ef2a6899.
> Still, *frameworks/av *was not built with this head, the two closest
> (built by the CI) are ~700 files changed
>
> $ git log -1 --pretty="%H %aD" b70b09c9f96e78a45332c93a0eadd99cf6fe9645
> b70b09c9f96e78a45332c93a0eadd99cf6fe9645 Fri, 21 Aug 2015 00:58:17 +
> $ git log -1 --pretty="%H %aD" bacd813565c77010485b7f487630a079ef2a6899
> bacd813565c77010485b7f487630a079ef2a6899 Fri, 21 Aug 2015 17:30:09 +
> $ git log -1 --pretty="%H %aD" 84c1e5a90348afca09be0745ab731880d740e10d
> 84c1e5a90348afca09be0745ab731880d740e10d Fri, 21 Aug 2015 21:13:58 +
>
> $ git --no-pager diff --shortstat
> b70b09c9f96e78a45332c93a0eadd99cf6fe9645
> bacd813565c77010485b7f487630a079ef2a6899
>  721 files changed, 74085 insertions(+), 21394 deletions(-)
>
> $ git --no-pager diff --shortstat
> bacd813565c77010485b7f487630a079ef2a6899
> 84c1e5a90348afca09be0745ab731880d740e10d
>  721 files changed, 21414 insertions(+), 74059 deletions(-)
>
> So from either manifest file, it is not possible to build the specific
> commit because the changes are not synchronised with the rest of AOSP.
> Any idea that could solve this problem ?
>
>
> Le vendredi 28 juin 2019 18:33:28 UTC+2, Colin Cross a écrit :
>>
>> You can download the manifest_*.xml file from any build from the date
>> that you want, then use repo sync -m /tmp/manifest_*.xml to sync the
>> revisions from that manifest.
>>
>> On Fri, Jun 28, 2019 at 7:56 AM Alex  wrote:
>>
>>> Hi folks,
>>>
>>> I did not find any related post to my question so I decided to create
>>> one. However, feel free to link any relevant post I may have missed.
>>>
>>> Problem: I would like to build one project in AOSP at a very specific
>>> commit.
>>>
>>> The procedure:
>>>
>>>- Find the commit ID
>>>- Find the appropriate manifest branch (git tag --contains
>>>$COMMIT_ID ) in the appropriate project in the mirror
>>>- Init the manifest branch from the mirror
>>>- Checkout the project at $COMMIT_ID
>>>- Source build/envsetup.sh and do a *mma*
>>>
>>>
>>> However, if this procedure mostly works, sometimes you have a problem
>>> because the dependencies of your project as not synced and the build fail.
>>>
>>> Since Google on its CI (
>>> https://ci.android.com/builds/branches/aosp-master/grid ) always build
>>> the tree with the last commit on each repo, the idea was to checkout *every
>>> *project in AOSP at the date of the commit I want to build (e.g.
>>> $COMMIT_ID is 15.06.2019, let's checkout every project at this date).
>>> However, this *fails* because some project are not synced (during the
>>> sync from the mirror) with their history (e.g prebuilts tools).
>>>
>>> I also tried to checkout the master branch from the AOSP mirror but the
>>> problem remains (e.g. clone-depth of some project is still 1).
>>>
>>> My question is rather easy: how do one build a specific commit in one of
>>> AOSP project.
>>>
>>>
>>> Ps : If you want to reproduce the problem, you may try to build commit 
>>> 830cb39cb2a0f1bf6704d264e2a5c5029c175dd7
>>> from platform/system/bt on branch android-9.0.0_r17 .
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-...@googlegroups.com.
>>> To view this

Re: [android-building] Building an old specific commit in one AOSP project

2019-06-28 Thread 'Colin Cross' via Android Building
You can download the manifest_*.xml file from any build from the date that
you want, then use repo sync -m /tmp/manifest_*.xml to sync the revisions
from that manifest.

On Fri, Jun 28, 2019 at 7:56 AM Alex  wrote:

> Hi folks,
>
> I did not find any related post to my question so I decided to create one.
> However, feel free to link any relevant post I may have missed.
>
> Problem: I would like to build one project in AOSP at a very specific
> commit.
>
> The procedure:
>
>- Find the commit ID
>- Find the appropriate manifest branch (git tag --contains $COMMIT_ID
>) in the appropriate project in the mirror
>- Init the manifest branch from the mirror
>- Checkout the project at $COMMIT_ID
>- Source build/envsetup.sh and do a *mma*
>
>
> However, if this procedure mostly works, sometimes you have a problem
> because the dependencies of your project as not synced and the build fail.
>
> Since Google on its CI (
> https://ci.android.com/builds/branches/aosp-master/grid ) always build
> the tree with the last commit on each repo, the idea was to checkout *every
> *project in AOSP at the date of the commit I want to build (e.g.
> $COMMIT_ID is 15.06.2019, let's checkout every project at this date).
> However, this *fails* because some project are not synced (during the
> sync from the mirror) with their history (e.g prebuilts tools).
>
> I also tried to checkout the master branch from the AOSP mirror but the
> problem remains (e.g. clone-depth of some project is still 1).
>
> My question is rather easy: how do one build a specific commit in one of
> AOSP project.
>
>
> Ps : If you want to reproduce the problem, you may try to build commit 
> 830cb39cb2a0f1bf6704d264e2a5c5029c175dd7
> from platform/system/bt on branch android-9.0.0_r17 .
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/a5befb35-0739-434b-8964-b5ecdfa00eb0%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRTScOYrfOLcMuMMZxtuouRHmz7v97iAKWpd3VzQKFSsCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: Why did you name it Soong, Kati, Ninja ?

2019-05-15 Thread 'Colin Cross' via Android Building
Soong is from Noonian Soong
, who built Androids.
I don't remember what Kati means, it's not Star Trek related (the project
predates Soong), I think it's a play on words in Japanese.

On Wed, May 15, 2019 at 11:41 AM 'Glenn Kasten' via Android Building <
android-building@googlegroups.com> wrote:

> Kati  and Soong
>  appear to be
> from Star Trek.
> I assume that Ninja comes from here
> 
> :-)
>
> On Tuesday, May 14, 2019 at 10:13:28 PM UTC-7, CK RYU wrote:
>>
>> Hi,
>>
>>
>>
>> I have question about the soong build system.
>>
>>
>>
>> I want to know why did you name it Soong, Kati, Ninja?
>>
>> Is the name meaningful?'
>>
>>
>>
>> Thanks,
>>
>>
>>
>> CK.RYU
>>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/d8d519db-c921-41dc-b353-d92f0fbe1602%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRQUnee7z%3DX7SPJR7XiZ9GOamGQ44GxGot5d32kTLFK8Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Add prebuilt jar to system image - android 9.0

2019-05-14 Thread 'Colin Cross' via Android Building
You can probably use something like:

java_import {
name: "mylibrary-jar",
jars: ["mylibrary.jar"],
}

java_library {
name: "mylibrary",
static_libs: ["mylibrary-jar"],
installable: true,
}

On Mon, May 13, 2019 at 6:36 PM Vinayak Soni 
wrote:

> Classes.
>
> On Tuesday, May 7, 2019 at 1:22:15 PM UTC-7, Colin Cross wrote:
>>
>> What is in the jar, class files or dex files?
>>
>> On Tue, May 7, 2019 at 12:42 PM Vinayak Soni  wrote:
>>
>>> Hi Colin,
>>>
>>> How to write an Android.bp for a prebuilt jar that needs to be added to
>>> PRODUCT_BOOT_JARS?
>>>
>>> Thanks,
>>> Vinayak
>>>
>>> On Monday, March 18, 2019 at 3:36:17 PM UTC-7, Colin Cross wrote:
>>>>
>>>> The basics on Android.bp files are documented at
>>>> https://android.googlesource.com/platform/build/soong/+/master/README.md,
>>>> and the documentation on the module types and their properties is at
>>>> https://ci.android.com/builds/latest/branches/aosp-build-tools/targets/linux/view/soong_build.html
>>>> .
>>>>
>>>> On Mon, Mar 18, 2019 at 2:52 PM KarenL  wrote:
>>>>
>>>>> I actually have everything in vendor and I'd prefer to keep it there.
>>>>> I'm not sure how to include whats in vendor in framework.jar.
>>>>> This is the structure of the stuff I have in vendor that I would like
>>>>> to include.
>>>>> vendor/xxx/lib -> the prebuilt jars are here
>>>>> vendor/xxx/src/com/aaa/bbb/ccc => the source files are here
>>>>>
>>>>> Question: Should I add an Android.bp to vendor/xxx/
>>>>> It sounds like that should contain the java_import section you already
>>>>> mentioned.
>>>>> How do I include the source files in the new Android.bp?
>>>>>
>>>>> Question: How do I reference this not module from Android.bk in
>>>>> frameworks/base/Android.bp?
>>>>>
>>>>> Is there any documentation on how to set up Android.bp files. I've
>>>>> been looking around and I cant find anything.
>>>>>
>>>>> I need the extra classes because I'm adding a new system service to
>>>>> the build that I'm making.
>>>>>
>>>>> Thank you again for your help.
>>>>>
>>>>>
>>>>>
>>>>> On Monday, March 18, 2019 at 2:33:13 PM UTC-7, Colin Cross wrote:
>>>>>>
>>>>>> All of that is up to you.  All Android.bp files found in the tree are
>>>>>> parsed, so you can create a directory anywhere (maybe under vendor/ so 
>>>>>> you
>>>>>> can minimize changes to AOSP files).  Put the prebuilt jars in that
>>>>>> directory too.
>>>>>>
>>>>>> static_libs takes a list of module names.
>>>>>> android.hardware.radio-V1.0-java is a module created
>>>>>> by hardware/interfaces/radio/1.0/Android.bp.  The modules can be defined
>>>>>> anywhere in the tree.
>>>>>>
>>>>>> Taking a step back, what are you trying to accomplish?  Why do you
>>>>>> need extra classes in framework.jar?  Maybe it would be better to keep 
>>>>>> them
>>>>>> outside framework.jar but add them to the default classpath using
>>>>>> PRODUCT_BOOT_JARS?  Or ship them as a separate shared library that apps 
>>>>>> can
>>>>>> opt into loading?
>>>>>>
>>>>>> On Mon, Mar 18, 2019 at 1:34 PM KarenL  wrote:
>>>>>>
>>>>>>> What directory should my prebuilt jars go into? Where are the pother
>>>>>>> static_libs, like android.hardware.radio-V1.0-java, picked up from?
>>>>>>> Where do I add this new Android.bp with the below content?
>>>>>>>
>>>>>>> All I want to add to framework.jar are 2 prebuilt jars and 2 source
>>>>>>> files. Do I need to create a new folder structure under frameworks/base 
>>>>>>> for
>>>>>>> these? If so - what does that structure look like.
>>>>>>>
>>>>>>> Thank you for your help.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Monday, March 18, 2019 at 1:06:45 PM UTC-7, Colin Cross wrote

Re: [android-building] avbtool: command not found

2019-05-08 Thread 'Colin Cross' via Android Building
Did you run source build/envsetup.sh and lunch as described at
https://source.android.com/setup/build/building?

On Wed, May 8, 2019 at 9:02 AM Michael Burrows 
wrote:

> Hey guys. My computer with ubuntu crashed which resulted in me not being
> able to run avbtool command
>
> I have my AOSP folder named AOSP.
>
> I run the *make avbtool *command inside that folder as follows:
>
> /AOSP$ make avbtool
> 
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=9
> TARGET_PRODUCT=aosp_arm
> TARGET_BUILD_VARIANT=eng
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> TARGET_ARCH_VARIANT=armv7-a-neon
> TARGET_CPU_VARIANT=generic
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-4.18.0-17-generic-x86_64-Ubuntu-18.10
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=PQ2A.190305.002
> OUT_DIR=out
> 
> ninja: no work to do.
> ninja: no work to do.
> No need to regenerate ninja file
> No need to regenerate ninja file
>
> ninja: no work to do.
>
> When I try using the avbtool to get information about my system.img
>
> *AOSP$  avbtool info_image --image system.img *
> avbtool: command not found
>
> running the ls command shows avbtool.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/31b3b212-22ce-48ea-a327-89c38842389f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRQ0%3D9rfikhTmj8HXp%2BBnAxR-8EB42_Yn08qGuzAimCf5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Add prebuilt jar to system image - android 9.0

2019-05-07 Thread 'Colin Cross' via Android Building
What is in the jar, class files or dex files?

On Tue, May 7, 2019 at 12:42 PM Vinayak Soni 
wrote:

> Hi Colin,
>
> How to write an Android.bp for a prebuilt jar that needs to be added to
> PRODUCT_BOOT_JARS?
>
> Thanks,
> Vinayak
>
> On Monday, March 18, 2019 at 3:36:17 PM UTC-7, Colin Cross wrote:
>>
>> The basics on Android.bp files are documented at
>> https://android.googlesource.com/platform/build/soong/+/master/README.md,
>> and the documentation on the module types and their properties is at
>> https://ci.android.com/builds/latest/branches/aosp-build-tools/targets/linux/view/soong_build.html
>> .
>>
>> On Mon, Mar 18, 2019 at 2:52 PM KarenL  wrote:
>>
>>> I actually have everything in vendor and I'd prefer to keep it there.
>>> I'm not sure how to include whats in vendor in framework.jar.
>>> This is the structure of the stuff I have in vendor that I would like to
>>> include.
>>> vendor/xxx/lib -> the prebuilt jars are here
>>> vendor/xxx/src/com/aaa/bbb/ccc => the source files are here
>>>
>>> Question: Should I add an Android.bp to vendor/xxx/
>>> It sounds like that should contain the java_import section you already
>>> mentioned.
>>> How do I include the source files in the new Android.bp?
>>>
>>> Question: How do I reference this not module from Android.bk in
>>> frameworks/base/Android.bp?
>>>
>>> Is there any documentation on how to set up Android.bp files. I've been
>>> looking around and I cant find anything.
>>>
>>> I need the extra classes because I'm adding a new system service to the
>>> build that I'm making.
>>>
>>> Thank you again for your help.
>>>
>>>
>>>
>>> On Monday, March 18, 2019 at 2:33:13 PM UTC-7, Colin Cross wrote:
>>>>
>>>> All of that is up to you.  All Android.bp files found in the tree are
>>>> parsed, so you can create a directory anywhere (maybe under vendor/ so you
>>>> can minimize changes to AOSP files).  Put the prebuilt jars in that
>>>> directory too.
>>>>
>>>> static_libs takes a list of module names.
>>>> android.hardware.radio-V1.0-java is a module created
>>>> by hardware/interfaces/radio/1.0/Android.bp.  The modules can be defined
>>>> anywhere in the tree.
>>>>
>>>> Taking a step back, what are you trying to accomplish?  Why do you need
>>>> extra classes in framework.jar?  Maybe it would be better to keep them
>>>> outside framework.jar but add them to the default classpath using
>>>> PRODUCT_BOOT_JARS?  Or ship them as a separate shared library that apps can
>>>> opt into loading?
>>>>
>>>> On Mon, Mar 18, 2019 at 1:34 PM KarenL  wrote:
>>>>
>>>>> What directory should my prebuilt jars go into? Where are the pother
>>>>> static_libs, like android.hardware.radio-V1.0-java, picked up from?
>>>>> Where do I add this new Android.bp with the below content?
>>>>>
>>>>> All I want to add to framework.jar are 2 prebuilt jars and 2 source
>>>>> files. Do I need to create a new folder structure under frameworks/base 
>>>>> for
>>>>> these? If so - what does that structure look like.
>>>>>
>>>>> Thank you for your help.
>>>>>
>>>>>
>>>>>
>>>>> On Monday, March 18, 2019 at 1:06:45 PM UTC-7, Colin Cross wrote:
>>>>>>
>>>>>> You need to use java_import modules to create a module for the jars.
>>>>>> Something like:
>>>>>>
>>>>>> java_import {
>>>>>> name: "my_prebuilt_jars",
>>>>>> jars: [
>>>>>> "my_prebuilt_jar1.jar",
>>>>>> "my_prebuilt_jar2.jar",
>>>>>> ],
>>>>>> }
>>>>>>
>>>>>> Then you can add to static_libs:
>>>>>> "my_prebuilt_jars"
>>>>>>
>>>>>> On Mon, Mar 18, 2019 at 12:35 PM KarenL  wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> I would like to add a couple of prebuilt jars and some source files
>>>>>>> to the Android 9 aosp image that I"m building.
>>>>>>> With lower versions of Android I've added these easily to
>>>

Re: [android-building] android.jar does not contain all the class files?

2019-05-03 Thread 'Colin Cross' via Android Building
android.jar only contains classes that are part of the public SDK.  You can
see the AOSP source for UiAutomationConnection.java at
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/UiAutomationConnection.java
.
The @hide annotation in the javadoc marks it as a private platform API,
which is why it is not visible in android.jar.

On Fri, May 3, 2019 at 1:37 PM  wrote:

> I downloaded the offical SDK and unzip it. What I am interested in is
> UiAutomationConnection.java(.class) but I do not see it. However, I do see
> UiAutomation.class. Any thoughts?
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] How to do a make clean for a single module

2019-04-17 Thread 'Colin Cross' via Android Building
Try rm -rf out/soong/.intermediates//

On Wed, Apr 17, 2019 at 10:05 PM Peter Stephens  wrote:

> I need to clean out my module so that I can do static analysis on the
> code.  The analysis too needs to "observe" a build for my module.  How is
> this achieved with the new (soong) build system?
>
> - Pete
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Need help exposing library / class paths in AOSP P (Android 9) from my own .jar file inside vendor

2019-04-15 Thread 'Colin Cross' via Android Building
PRODUCT_BOOT_JARS can't be set in your Android.mk, it has to be set in your
product makefiles that are selected by your lunch target.

On Mon, Apr 15, 2019 at 11:20 AM Elliott Mazzuca  wrote:

> Thaks for the fast reply Colin!
>
> I tried adding the suggested change into my local Android.mk file and now
> i get the following issue:
>
> vendor//sample/mycustomelib/apk/anotherSampelFolder/*Android.mk:20*:
> error: cannot assign to readonly variable: PRODUCT_BOOT_JARS
>
>
> why is this considered a readonly variable?  is there a prerequisite step
> i need to do before setting this?
>
> thanks again!
>
> On Monday, April 15, 2019 at 12:48:37 PM UTC-4, Colin Cross wrote:
>>
>> You can set PRODUCT_BOOT_JARS in your product makefile to add a jar to
>> the bootclasspath, but I'd suggest providing it as a library that the apps
>> that need it can load.
>>
>> On Mon, Apr 15, 2019 at 8:06 AM Elliott Mazzuca 
>> wrote:
>>
>>> I tried to give a specific title and i will elaborate a bit more:
>>>
>>> *What i am trying to do is expose the classes that are inside my jar
>>> file so they are on the default class path.*
>>>
>>> I have a sample app to test if this is working that i created that would
>>> uses these classes.  But they don't appear in the images class path.  so i
>>> get a "ClassNotFound Exception" when i try to instantiate.
>>>
>>>
>>>
>>>
>>> I have a custom .Jar file where i have my own package, lets call
>>> it com.sample.myCustomLibrary
>>>
>>> This jar file is created in the vendor space in AOSP P (android 9) using
>>> an Android.bp file.
>>>
>>>
>>> inside my Android.bp file, i have a "java_library"
>>>
>>> that looks like this:
>>>
>>> // myCustomLibrary.jar
>>> java_library {
>>> name: "com.sample.myCustomLibrary",
>>> owner: "sampleOwner",
>>> installable: true,
>>>
>>>
>>>
>>>
>>> javacflags = [
>>> "-Xmaxwarns 999",
>>> ],
>>>
>>>
>>> srcs: [
>>> "lib/src/main/java/**/*.java",
>>> ],
>>>
>>>
>>> dxflags: [// not sure if i need this, but
>>> it didn't work
>>> "--core-library",
>>> "--multi-dex",
>>> ],
>>>
>>>
>>> optimize: {
>>> proguard_flags_files: [
>>> "lib/src/main/proguard-rules.pro",
>>> ],
>>> },
>>>
>>>
>>>
>>>
>>> vendor: true,  // not sure if i need this but it didn't work
>>> dex_preopt: {  // not sure if i need this but it didn't work
>>> app_image: true,
>>> },
>>> }
>>>
>>>
>>>
>>>
>>>
>>> I also added some of the classes to "preloaded-classes"  under
>>> frameworks/base/config/preloaded-classes
>>>
>>>
>>> When i create a new AOSP build, i can see that the classes that i put
>>> into this "preloaded-classes" file are not exposed:
>>>
>>>
>>> W/Zygote: Class not found for preloading:
>>> com.sample.myCustomLibrary.sampleClass1
>>> W/Zygote: Class not found for preloading:
>>> com.sample.myCustomLibrary.sampleClass2
>>> W/Zygote: Class not found for preloading:
>>> com.sample.myCustomLibrary.sampleClass3
>>>
>>> and i added the package to the
>>> /build/make/core/tasks/check_boot_jars/package_whitelist.txt
>>>
>>> com\.sample\.myCusomLibrary
>>>
>>> though i can't get my classes inside my pacakge to show up on the
>>> default class path.
>>>
>>> Any ideas on the missing steps i need to take?
>>>
>>> thanks!
>>>
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>&g

Re: [android-building] Need help exposing library / class paths in AOSP P (Android 9) from my own .jar file inside vendor

2019-04-15 Thread 'Colin Cross' via Android Building
You can set PRODUCT_BOOT_JARS in your product makefile to add a jar to the
bootclasspath, but I'd suggest providing it as a library that the apps that
need it can load.

On Mon, Apr 15, 2019 at 8:06 AM Elliott Mazzuca  wrote:

> I tried to give a specific title and i will elaborate a bit more:
>
> *What i am trying to do is expose the classes that are inside my jar file
> so they are on the default class path.*
>
> I have a sample app to test if this is working that i created that would
> uses these classes.  But they don't appear in the images class path.  so i
> get a "ClassNotFound Exception" when i try to instantiate.
>
>
>
>
> I have a custom .Jar file where i have my own package, lets call
> it com.sample.myCustomLibrary
>
> This jar file is created in the vendor space in AOSP P (android 9) using
> an Android.bp file.
>
>
> inside my Android.bp file, i have a "java_library"
>
> that looks like this:
>
> // myCustomLibrary.jar
> java_library {
> name: "com.sample.myCustomLibrary",
> owner: "sampleOwner",
> installable: true,
>
>
>
>
> javacflags = [
> "-Xmaxwarns 999",
> ],
>
>
> srcs: [
> "lib/src/main/java/**/*.java",
> ],
>
>
> dxflags: [// not sure if i need this, but it
> didn't work
> "--core-library",
> "--multi-dex",
> ],
>
>
> optimize: {
> proguard_flags_files: [
> "lib/src/main/proguard-rules.pro",
> ],
> },
>
>
>
>
> vendor: true,  // not sure if i need this but it didn't work
> dex_preopt: {  // not sure if i need this but it didn't work
> app_image: true,
> },
> }
>
>
>
>
>
> I also added some of the classes to "preloaded-classes"  under
> frameworks/base/config/preloaded-classes
>
>
> When i create a new AOSP build, i can see that the classes that i put into
> this "preloaded-classes" file are not exposed:
>
>
> W/Zygote: Class not found for preloading:
> com.sample.myCustomLibrary.sampleClass1
> W/Zygote: Class not found for preloading:
> com.sample.myCustomLibrary.sampleClass2
> W/Zygote: Class not found for preloading:
> com.sample.myCustomLibrary.sampleClass3
>
> and i added the package to the
> /build/make/core/tasks/check_boot_jars/package_whitelist.txt
>
> com\.sample\.myCusomLibrary
>
> though i can't get my classes inside my pacakge to show up on the default
> class path.
>
> Any ideas on the missing steps i need to take?
>
> thanks!
>
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] FAILED: out/soong/.bootstrap/soong-aosp-generator/pkg/aosp/soong/generator.a

2019-04-01 Thread Colin Cross
vendor/aosp/build/soong/generator/generator.go is not a file that exists in
our tree, and android.PathForSourceRelaxed has never existed in our tree.
You'll have to report this to whoever you got your non-AOSP code from.

On Mon, Apr 1, 2019 at 9:38 AM Flávio Silva  wrote:

> error while executing make
>
> 
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=9
> TARGET_PRODUCT=aosp_sagit
> TARGET_BUILD_VARIANT=user
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm64
> TARGET_ARCH_VARIANT=armv8-a
> TARGET_CPU_VARIANT=cortex-a73
> TARGET_2ND_ARCH=arm
> TARGET_2ND_ARCH_VARIANT=armv8-a
> TARGET_2ND_CPU_VARIANT=cortex-a73
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-4.9.0-8-amd64-x86_64-Debian-GNU/Linux-9-(stretch)
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=PQ1A.181205.006.A1
> OUT_DIR=out
> PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf-msm8998
> hardware/qcom/display-caf-msm8998 hardware/qcom/media-caf-
> msm8998
> 
> [1/1] out/soong/.minibootstrap/minibp out/soong/.bootstrap/build.ninja
> [55/56] glob prebuilts/ndk/stl.bp
> [38/78] compile
> out/soong/.bootstrap/soong-aosp-generator/pkg/aosp/soong/generator.a
> FAILED:
> out/soong/.bootstrap/soong-aosp-generator/pkg/aosp/soong/generator.a
> GOROOT='prebuilts/go/linux-x86'
> prebuilts/go/linux-x86/pkg/tool/linux_amd64/compile -c 8 -o
> out/soong/.bootstrap/soo
> ng-aosp-generator/pkg/aosp/soong/generator.a -p aosp/soong/generator
> -complete -I out/soong/.bootstrap/blueprint-par
> ser/pkg -I out/soong/.bootstrap/blueprint-deptools/pkg -I
> out/soong/.bootstrap/blueprint-pathtools/pkg -I out/soong/
> .bootstrap/blueprint-proptools/pkg -I out/soong/.bootstrap/blueprint/pkg
> -I out/soong/.bootstrap/soong/pkg -I out/so
> ong/.bootstrap/blueprint-bootstrap-bpdoc/pkg -I
> out/soong/.bootstrap/blueprint-bootstrap/pkg -I out/soong/.bootstrap
> /soong-env/pkg -I out/soong/.bootstrap/soong-android/pkg -I
> out/soong/.bootstrap/soong-shared/pkg -pack vendor/aosp/
> build/soong/generator/generator.go
> vendor/aosp/build/soong/generator/variables.go
> vendor/aosp/build/soong/generator/generator.go:230:38: undefined:
> android.PathForSourceRelaxed
> [45/78] compile
> out/soong/.bootstrap/soong-cc-config/test/android/soong/cc/config.a
> ninja: build stopped: subcommand failed.
> 12:35:20 soong bootstrap failed with: exit status 1
>
>  failed to build some targets (08:52 (mm:ss)) 
>
>
>
>
> thanks for the help
>
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] sdk 23 bytecode does not match source

2019-03-25 Thread Colin Cross
Studio is decompiling the android.jar shipped with the SDK, which only
contains the public API of each class with the implementation replaced with
an exception.

On Mon, Mar 25, 2019 at 7:34 AM Robert Durkacz 
wrote:

> I have built ApiDemos sample code with sdk 23 and get wrong behaviour with
> InstallPackage demo. I trace problem into SDK code with debugger. Android
> Studio decompiles sdk code for me showing frequent throws of Runtime Error
> ("Stub!"). I download source code for SDK level 23 and the source code is a
> gross mismatch to what debugger sees. Source code likewise is different to
> decompiled code, with none of those exception throws. Can someone tell me
> what is going on?
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Add prebuilt jar to system image - android 9.0

2019-03-18 Thread Colin Cross
The basics on Android.bp files are documented at
https://android.googlesource.com/platform/build/soong/+/master/README.md,
and the documentation on the module types and their properties is at
https://ci.android.com/builds/latest/branches/aosp-build-tools/targets/linux/view/soong_build.html
.

On Mon, Mar 18, 2019 at 2:52 PM KarenL  wrote:

> I actually have everything in vendor and I'd prefer to keep it there. I'm
> not sure how to include whats in vendor in framework.jar.
> This is the structure of the stuff I have in vendor that I would like to
> include.
> vendor/xxx/lib -> the prebuilt jars are here
> vendor/xxx/src/com/aaa/bbb/ccc => the source files are here
>
> Question: Should I add an Android.bp to vendor/xxx/
> It sounds like that should contain the java_import section you already
> mentioned.
> How do I include the source files in the new Android.bp?
>
> Question: How do I reference this not module from Android.bk in
> frameworks/base/Android.bp?
>
> Is there any documentation on how to set up Android.bp files. I've been
> looking around and I cant find anything.
>
> I need the extra classes because I'm adding a new system service to the
> build that I'm making.
>
> Thank you again for your help.
>
>
>
> On Monday, March 18, 2019 at 2:33:13 PM UTC-7, Colin Cross wrote:
>>
>> All of that is up to you.  All Android.bp files found in the tree are
>> parsed, so you can create a directory anywhere (maybe under vendor/ so you
>> can minimize changes to AOSP files).  Put the prebuilt jars in that
>> directory too.
>>
>> static_libs takes a list of module names.
>> android.hardware.radio-V1.0-java is a module created
>> by hardware/interfaces/radio/1.0/Android.bp.  The modules can be defined
>> anywhere in the tree.
>>
>> Taking a step back, what are you trying to accomplish?  Why do you need
>> extra classes in framework.jar?  Maybe it would be better to keep them
>> outside framework.jar but add them to the default classpath using
>> PRODUCT_BOOT_JARS?  Or ship them as a separate shared library that apps can
>> opt into loading?
>>
>> On Mon, Mar 18, 2019 at 1:34 PM KarenL  wrote:
>>
>>> What directory should my prebuilt jars go into? Where are the pother
>>> static_libs, like android.hardware.radio-V1.0-java, picked up from?
>>> Where do I add this new Android.bp with the below content?
>>>
>>> All I want to add to framework.jar are 2 prebuilt jars and 2 source
>>> files. Do I need to create a new folder structure under frameworks/base for
>>> these? If so - what does that structure look like.
>>>
>>> Thank you for your help.
>>>
>>>
>>>
>>> On Monday, March 18, 2019 at 1:06:45 PM UTC-7, Colin Cross wrote:
>>>>
>>>> You need to use java_import modules to create a module for the jars.
>>>> Something like:
>>>>
>>>> java_import {
>>>> name: "my_prebuilt_jars",
>>>> jars: [
>>>> "my_prebuilt_jar1.jar",
>>>> "my_prebuilt_jar2.jar",
>>>> ],
>>>> }
>>>>
>>>> Then you can add to static_libs:
>>>> "my_prebuilt_jars"
>>>>
>>>> On Mon, Mar 18, 2019 at 12:35 PM KarenL  wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I would like to add a couple of prebuilt jars and some source files to
>>>>> the Android 9 aosp image that I"m building.
>>>>> With lower versions of Android I've added these easily to
>>>>> frameworks.jar. This was straight forward to do when framework.jar was
>>>>> built using a make file. Its a lot less clear how to do this using
>>>>> blueprint files and soong.
>>>>>
>>>>> This is what I've tried and its not enough.
>>>>>
>>>>> Add a new folder to frameworks/base for my source files:
>>>>> frameworks/base/myfolder/java/com/xxx
>>>>>
>>>>> Edit the Android.bp file in frameworks/base and add source files to
>>>>> the "srcs" list
>>>>> "myfolder/java/com/xxx/source1.java"
>>>>> "myfolder/java/com/xxx/source2.java"
>>>>>
>>>>> Edit the "static_libs" list and add my prebuilt jars
>>>>> "prebuilt_jar1",
>>>>> "prebuilt_jar2",
>>>>>
>>>>> I'm not sure where to put these prebuilt jars.
>>>>> Do th

Re: [android-building] Add prebuilt jar to system image - android 9.0

2019-03-18 Thread Colin Cross
All of that is up to you.  All Android.bp files found in the tree are
parsed, so you can create a directory anywhere (maybe under vendor/ so you
can minimize changes to AOSP files).  Put the prebuilt jars in that
directory too.

static_libs takes a list of module names.  android.hardware.radio-V1.0-java
is a module created by hardware/interfaces/radio/1.0/Android.bp.  The
modules can be defined anywhere in the tree.

Taking a step back, what are you trying to accomplish?  Why do you need
extra classes in framework.jar?  Maybe it would be better to keep them
outside framework.jar but add them to the default classpath using
PRODUCT_BOOT_JARS?  Or ship them as a separate shared library that apps can
opt into loading?

On Mon, Mar 18, 2019 at 1:34 PM KarenL  wrote:

> What directory should my prebuilt jars go into? Where are the pother
> static_libs, like android.hardware.radio-V1.0-java, picked up from?
> Where do I add this new Android.bp with the below content?
>
> All I want to add to framework.jar are 2 prebuilt jars and 2 source files.
> Do I need to create a new folder structure under frameworks/base for these?
> If so - what does that structure look like.
>
> Thank you for your help.
>
>
>
> On Monday, March 18, 2019 at 1:06:45 PM UTC-7, Colin Cross wrote:
>>
>> You need to use java_import modules to create a module for the jars.
>> Something like:
>>
>> java_import {
>> name: "my_prebuilt_jars",
>> jars: [
>> "my_prebuilt_jar1.jar",
>> "my_prebuilt_jar2.jar",
>> ],
>> }
>>
>> Then you can add to static_libs:
>> "my_prebuilt_jars"
>>
>> On Mon, Mar 18, 2019 at 12:35 PM KarenL  wrote:
>>
>>> Hi
>>>
>>> I would like to add a couple of prebuilt jars and some source files to
>>> the Android 9 aosp image that I"m building.
>>> With lower versions of Android I've added these easily to
>>> frameworks.jar. This was straight forward to do when framework.jar was
>>> built using a make file. Its a lot less clear how to do this using
>>> blueprint files and soong.
>>>
>>> This is what I've tried and its not enough.
>>>
>>> Add a new folder to frameworks/base for my source files:
>>> frameworks/base/myfolder/java/com/xxx
>>>
>>> Edit the Android.bp file in frameworks/base and add source files to the
>>> "srcs" list
>>> "myfolder/java/com/xxx/source1.java"
>>> "myfolder/java/com/xxx/source2.java"
>>>
>>> Edit the "static_libs" list and add my prebuilt jars
>>> "prebuilt_jar1",
>>> "prebuilt_jar2",
>>>
>>> I'm not sure where to put these prebuilt jars.
>>> Do they go somewhere inside myfolder? Where are the other static libs in
>>> this list picked up from?
>>> Do I need to create .bp files inside myfolder to build this new part?
>>>
>>> Do you have any suggestions as to how to add prebuilt jars to Android 9.
>>>
>>> Thanks for your help.
>>> Karen
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-buildi...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-buildi...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Add prebuilt jar to system image - android 9.0

2019-03-18 Thread Colin Cross
You need to use java_import modules to create a module for the jars.
Something like:

java_import {
name: "my_prebuilt_jars",
jars: [
"my_prebuilt_jar1.jar",
"my_prebuilt_jar2.jar",
],
}

Then you can add to static_libs:
"my_prebuilt_jars"

On Mon, Mar 18, 2019 at 12:35 PM KarenL  wrote:

> Hi
>
> I would like to add a couple of prebuilt jars and some source files to the
> Android 9 aosp image that I"m building.
> With lower versions of Android I've added these easily to frameworks.jar.
> This was straight forward to do when framework.jar was built using a make
> file. Its a lot less clear how to do this using blueprint files and soong.
>
> This is what I've tried and its not enough.
>
> Add a new folder to frameworks/base for my source files:
> frameworks/base/myfolder/java/com/xxx
>
> Edit the Android.bp file in frameworks/base and add source files to the
> "srcs" list
> "myfolder/java/com/xxx/source1.java"
> "myfolder/java/com/xxx/source2.java"
>
> Edit the "static_libs" list and add my prebuilt jars
> "prebuilt_jar1",
> "prebuilt_jar2",
>
> I'm not sure where to put these prebuilt jars.
> Do they go somewhere inside myfolder? Where are the other static libs in
> this list picked up from?
> Do I need to create .bp files inside myfolder to build this new part?
>
> Do you have any suggestions as to how to add prebuilt jars to Android 9.
>
> Thanks for your help.
> Karen
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Annotation processor and Aar files in android.bp files

2019-03-04 Thread Colin Cross
android_library_import is used with aars with resources in the build, for
example see
https://android.googlesource.com/platform/prebuilts/sdk/+/master/current/androidx/Android.bp#1359
produces a bunch of resources in its intermediates directory
at 
out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.slice_slice-core-nodeps/android_common/.

https://android.googlesource.com/platform/external/dagger2/+/master/Android.bp#51
has an example of using a java_import in a java_plugin module, and
https://android.googlesource.com/platform/external/dagger2/+/master/Android.bp#134
uses it as an annotation processor.


On Mon, Mar 4, 2019 at 4:28 PM Ayush Vijay  wrote:

> Hey there,
>
> I am trying to add aar file import though android_library_import {name:...
> , aars: []} and for some reason it's not importing res files. I had to
> extract aar into res and jars to make it work. Does anyone have figured out
> how to import complete aars?
>
> I am also having issues with importing annotationprocessor (butterknife).
> I am importing it as regular jar import but unfortunately annotations are
> not working. Anyone tried anything similar and found the fix?
>
> - Ayush
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] How to define optional_subdirs per target architecture on android.bp

2019-02-19 Thread Colin Cross
subdirs and optional_subdirs are completely ignored now, all Android.bp
files in the tree are loaded.

On Tue, Feb 19, 2019 at 9:33 AM Hyungjoo Bak  wrote:

> Hi,
>
>
> Can optional_subirs be defined per architecture?
>
> I need to define optional_subdirs depending on target architecture.
> For instance, if target CPU is arm, optional_subdirs needs to be set to
> "arm", and if target cpu s x86, "x86"
>
> Thanks
> Jason
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: How to include prebuilt jars using bp in Android P

2019-01-18 Thread Colin Cross
I'd suggest combining the two:

java_import {
  name: "myPrebuiltJar-prebuilt",
  jars: ["myPrebuiltJar.jar"],
  }

java_library {
name: "myPrebuiltJar",
static_libs: ["myPrebuiltJar-prebuilt"],
installable: true,
}


On Fri, Jan 18, 2019 at 9:02 AM Ronny Pau  wrote:

> I have the same problem too.
>
> I have a prebuilt jar that needs to be brought in, I have tried both
> java_import and java_library directives and neither works. Ideas?
>
> >>> java_import - seems to only create immediates but doesn't actually
> bring the the jar to my target directory
> java_import {
>   name: "myPrebuiltJar",
>   jars: ["myPrebuiltJar.jar"],
>   }
>
> >>> java_library - I see some immediates and the jar in my target
> directory, but callers that makes use of the library do not recognize /
> cannot import my package (build time error)
> java_library {
> name: "myPrebuiltJar",
> srcs: ["myPrebuiltJar.jar"],
> installable: true,
> }
>
> On Wednesday, 5 December 2018 12:26:29 UTC-5, Zoran Jovanovic wrote:
>>
>> Ah, sorry for misunderstanding.
>>
>>
>> Put "installable: true" somewhere under "java_library" in your library's
>> blueprint.
>>
>>
>> Cheers
>>
>> --
>>
>> Zoran Jovanovic
>> SW Architect
>> Sony Mobile Communications Inc.
>> Lund, Sweden
>>
>>
>> 
>> From: android-...@googlegroups.com  on
>> behalf of Ajay kumar 
>> Sent: Wednesday, November 28, 2018 08:51
>> To: Android Building
>> Subject: [android-building] Re: How to include prebuilt jars using bp in
>> Android P
>>
>> Hi Zoran,
>> Thanks for your reply.
>> Our intention is to include this jar in system/frameworks as like
>> frameworks.jar(which has been built on an engineering environment), it has
>> to be used by a system service in frameworks. can you tell me how this can
>> be achievable ??
>>
>> Thanks,
>> Ajay
>>
>> On Tuesday, November 20, 2018 at 9:02:21 PM UTC+5:30, Ajay kumar wrote:
>> Hi
>> Added jar file :
>>
>> this my Android.bp
>>
>> java_import {
>>   name: "my-services",
>>   jars: ["my-services.jar"],
>>   }
>>
>>
>> am getting build error :
>> ninja: error:
>> 'out/target/common/obj/JAVA_LIBRARIES/my-services_intermediates/javalib.jar',
>> needed by
>> 'out/target/product/mydevice/dex_bootjars/system/framework/arm64/boot.art',
>> missing and no known rule to make it
>>
>> I've added my-services in base.mk under
>> build/make/target/product/ and device/google/mydevice.mk<
>> http://mydevice.mk/> to PRODUCT_PACKAGES.
>>
>>
>> Thanks
>> Ajay
>>
>>
>> --
>> --
>> You received this message because you are subscribed to the "Android
>> Building" mailing list.
>> To post to this group, send email to android-...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-buildi...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to android-buildi...@googlegroups.com> android-building+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] AOSP build system in general

2019-01-18 Thread Colin Cross
You can get ninja to print the commands it would run with -t commands.  You
can do that in the Android build with:
NINJA_ARGS="-t commands droid" m
droid is the default goal, you can replace it with any other goal you want,
including a module name ("framework"), an installed file ("$(getbuildvar
PRODUCT_OUT)/system/framework/framework.jar"), or an intermediate
("out/soong/.intermediates/frameworks/base/framework/android_common/combined/framework.jar").

On Fri, Jan 18, 2019 at 9:02 AM Robert Durkacz 
wrote:

> I thank JBQ for addressing my question. It is phrased as an objection to
> my proposal but I find that it is really in support because it allows me to
> point out that what I am asking for is perfectly normal and possible.
>
> JBQ wrote:
> "There are three main parts to a build system: figuring out what the
> possible commands are, figuring out which of those commands need to run and
> in which order, and actually running them.
>
> "While a shell script would conceivably be able to express the first one,
> it would struggle with some of the the second part (especially around
> incremental builds), and a readable implementation of the third part would
> likely be sequential, resulting in impractically long build times."
>
> I think there are two main parts because the first part is specified by
> the programmer, the one who sets up the build.  In 'make' that is called
> the recipes.
> For the programmer who is using that build system, it can be beneficial to
> run the next two parts separately because this gives visibility and
> accessibility when things go wrong or to do something a little different to
> what the original programmer might have thought of (including transferring
> to a different build system).
> make can do the second part separately with the -n option. It produces a
> script, which can be executed, thereby doing the third part separately and
> allowing any amount of intervention between parts two and three.
>
> It is quite true that the script is just a sequence of commands and does
> not reflect make's option (-j) to execute commands in parallel processes. I
> would class it is an interesting question whether you could retain
> parallelism somehow while going through a script as an intermediate step. I
> would not think of it as such an obstacle to give up the script option
> entirely.
>
> If a script is too much to expect then at least a transcript of the
> commands that the build system executes would be almost as good if these
> could be captured and turned into a script.
>
> Android not so long ago would have used make. Whatever benefits were
> gained by going to a new and seemingly complex system, did they really
> require throwing away these beneficial features of make that give a
> programmer a way to take control of the build process?
>
>
>>
>>> --
>> --
>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] How to maintain android binaries checksum intact. after rebuild of AOSP.

2018-12-21 Thread Colin Cross
We work pretty hard to make sure that the contents of the system image
don't change unless the source tree is changed, and AOSP master should be
in pretty good shape, although bugs do creep in sometimes.  The build time
and build number are stored in system/build.prop and change on every build
though.  The build number can be fixed on the command line with m
BUILD_NUMBER=12345, but there is currently no way to fix the build date.
You would need to edit build/make/tools/buildinfo_common.sh to not use
$DATE to get the current timestamp.  We would accept patches that made the
build date settable from the command line.

On Fri, Dec 21, 2018 at 7:58 AM  wrote:

> Hi Android Experts,
>
>
>
>We need some help / information that, Is there any way
> to keep android images (system.img, boot.img etc ) checksum [md5sum/crc32]
> same even after fresh build or recompilation??. Even though without
> changing a single bit in the AOSP Source code if we rebuild it, Android
> binaries checksum keeps changing. As I can understand that the
> compilers/linkers adds the date and time-stamp to the images/binaries after
> each build which causes the change in the checksum.  So my question, Is
> there any way to avoid this change in image checksum after every rebuild.
> it should change only when we change any source code. kindly update.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: Flashing AOSP on Pixel3/Blueline

2018-11-12 Thread Colin Cross
The documented way to flash a device is fastboot flashall.  I'd suggest
trying that first, and it will tell you which images it's flashing.

On Mon, Nov 12, 2018, 4:22 PM Doug Swalen  Add Crosshatch and Walleye to the list of Pixel devices I can't flash and
> boot AOSP on.
>
> So in summary, Sailfish I can build straight clean unmodified AOSP and
> flash and successfully boot to. But Walleye, Blueline, and Crosshatch all
> try to boot after flashing but then wind up back at the bootloader. I don't
> have Marlin or Taimen devices so I can't check them.
>
> This is very frustrating. It sure seems like beginning with Walleye
> something has changed in the flashing procedures because what worked for
> Sailfish no longer works. But I have been unable to locate any information
> suggesting any change has taken place.
>
> So I don't get what's going on except that I can't make AOSP and
> successfully flash it to Walleye, Blueline, or Crosshatch.
>
> On Monday, October 22, 2018 at 12:22:50 PM UTC-7, Doug Swalen wrote:
>>
>> I'm not entirely sure this is the right forum for this question but I
>> don't see any other forum that is a better fit either...
>>
>> So previously with Pixel/Sailfish when I would build and flash AOSP it
>> was straightforward. I'd do the build and then flash four files copied from
>> the out/target/product/sailfish directory...
>>
>> fastboot flash boot boot.img
>> fastboot flash system system.img
>> fastboot flash userdata userdata.img
>> fastboot flash vendor vendor.img
>>
>> This procedure would work on Pixel...as it had worked for my Nexus
>> devices previously as well.
>>
>> But with Pixel 3 the steps outlined above do not work. After flashing the
>> aforementioned files, I do fastboot reboot and a splash screen appears for
>> a second like the boot is going to go through but then I'm taken back to
>> the bootloader.
>>
>> I can still put the Factory back on but whenever I try to put AOSP on the
>> way I'd been doing it, it doesn't work. I don't think this is a build issue
>> because I'm doing an unmodified AOSP build with no code changes so the
>> build should be good.
>>
>> I went looking for instructions to see if there's been any change in
>> flashing procedure or a listing of what needs to be flashed but the only
>> document I found was located here...
>>
>> https://source.android.com/setup/build/running
>>
>> ...and it's not current (doesn't mention either the Pixel 2 or 3 line of
>> devices when doing builds)
>>
>> I did notice that it recommended using fastboot flashall but it wasn't
>> clear on what was to be flashed. Am I to just grab every .img file out of
>> my out/target/product/blueline directory and run flashall? Or some subset
>> of those files?
>>
>> If anyone can clue me in on the best method for flashing AOSP on the
>> Pixel 3, given that my old method is apparently no longer operative, I
>> would be very grateful.
>>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Android.bp compatibility with Android.mk

2018-10-26 Thread Colin Cross
Android.mk files can reference Android.bp dependencies.

On Fri, Oct 26, 2018, 10:26 AM  Hi,
>
>
>
> I have libraries built using Android.mk and many clients have reported
> they are using Android.bp to build their own applications but they can’t
> link my library because Android.mk does not export the libraries to
> Android.bp environment.
>
>
>
> One solution I am trying is to convert my Android.mk file to Android.bp
> file in order to export my libraries to the clients. Once this is done,
> will my libraries built using Android.bp be exported to clients using
> Android.bp as well as Android.mk? Or only clients using Android.bp will be
> able to link against my libraries?
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: Android full mirror download size

2018-10-23 Thread Colin Cross
Use repo init -u https://android.googlesource.com/platform/manifest -b
master --mirror to only sync projects that are in the master manifest.

On Tue, Oct 23, 2018 at 10:10 AM Vincent Victor 
wrote:

> Do we have any way using which only mirror for master branch could be
> maintained and used for syncing clients?
>
> On Tuesday, 23 October 2018 02:08:24 UTC+5:30, andrew_esh wrote:
>>
>> I maintain a full mirror on a volume that I recently had to upsize to
>> 250G, and I just found out that that size is not enough. I'll have to
>> upsize it again to finish my sync.
>>
>> On Friday, October 19, 2018 at 10:18:59 AM UTC-5, Vincent Victor wrote:
>>>
>>> I am creating a local Android full mirror using commands mentioned on
>>> official Android website as follows:
>>>
>>> mkdir -p /usr/local/aosp/mirror
>>> cd /usr/local/aosp/mirror
>>> repo init -u https://android.googlesource.com/mirror/manifest --mirror
>>> repo sync
>>>
>>> It already downloaded 173GB and still going on. Do we have any idea that
>>> how much will be the final size? Am I doing anything wrong here?
>>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: Android full mirror download size

2018-10-22 Thread Colin Cross
Mirrors are much bigger than a normal checkout, at least a few hundred GB.

On Mon, Oct 22, 2018 at 7:17 AM Vincent Victor 
wrote:

> Download was ongoing till 238 GB and then I killed it. Could not afford to
> keep it continue. One more thing, I was downloading in home folder instead
> of /usr/local/, could this be the problem?
>
> On Saturday, 20 October 2018 08:12:27 UTC+5:30, Glenn Kasten wrote:
>>
>> According to section Hardware Requirements of
>> https://source.android.com/setup/build/requirements
>> only 100 gig is needed.  So either that doc is wrong,
>> or your download has gone wild.  Please post here if it finishes,
>> and if so what the actual size is.
>>
>> On Friday, October 19, 2018 at 8:18:59 AM UTC-7, Vincent Victor wrote:
>>>
>>> I am creating a local Android full mirror using commands mentioned on
>>> official Android website as follows:
>>>
>>> mkdir -p /usr/local/aosp/mirror
>>> cd /usr/local/aosp/mirror
>>> repo init -u https://android.googlesource.com/mirror/manifest --mirror
>>> repo sync
>>>
>>> It already downloaded 173GB and still going on. Do we have any idea that
>>> how much will be the final size? Am I doing anything wrong here?
>>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: Soong confusion

2018-10-02 Thread Colin Cross
Ninja fixes almost all of the incremental build issues because it rebuilds
whenever the command line changes, so for example changing LOCAL_CFLAGS in
an Android.mk file will rebuild everything that has new cflags.  There were
a few remaining corner cases that cause incremental build issues, usually
around multiple generated source files that are put in the same directory,
leading to old files that are no longer generated being used in the build,
but the majority of those should be fixed in P.  The only big remaining
issue is that we can't uninstall files that are no longer necessary, so
removing a module completely may leave its output file in the final images
until you run "m installclean", which only deletes the final installed
files and doesn't take long to rebuild.  All of our build servers use
incremental for continuous builds, running "m installclean" between each
build.  We consider anything that doesn't produce an identical result for
an incremental build and a clean build to be a bug.

On Tue, Oct 2, 2018 at 12:56 AM  wrote:

> Colin,
> are you meaning that incremental builds are fine starting from Oreo or P?
> I don't have a deep knowledge of all AOSP build structure, but I was
> thinking that in  order to fix incremental build issues al the Makefile
> shall be converted to Blueprint files...at the moment only a subset of
> makefiles have been migrated, do you think that, at a certain point in
> time, all the Makefile will be substituted by Blueprint?
>
>
> Just out of curiosity have you ever analysed a migration to Yocto build
> system? For sure it is not a trivial move, but Yocto has already solved lot
> of issues that are common to AOSP build system and it is for sure a very
> modular build system...
>
> BR,
> Alessio
>
> Il giorno martedì 12 dicembre 2017 23:08:35 UTC+1, Colin Cross ha scritto:
>>
>>
>>
>> As Glenn pointed out, the purpose for Soong is not primarily performance,
>> it is correctness and reliability.  Before Soong (and the conversion to
>> Ninja was part of Soong), incremental builds were completely unreliable,
>> requiring significant knowledge of the internals of the Android build for
>> platform developers to get anything done.  Wiping the entire output
>> directory and rebuilding was common.  Incremental builds are now reliable
>> enough to be used in our continuous build infrastructure.
>>
>> Debugging typos in Android.mk files was also very painful.  LOCAL_CFALGS
>> instead of LOCAL_CFLAGS gets silently ignored, deleting a module that still
>> has users doesn't break incremental builds but breaks clean builds,
>> overwriting variables that are being used by other modules, subtle
>> differences between := and =, or ifdef blah and ifneq(,$(blah)).  All of
>> these problems are fundamental to the way that Make works and can't be
>> fixed.
>>
>> We've explored various options with Make (for a while we had a modified
>> version of Make that would cache its build rules).  The conversion to Ninja
>> (and all of the speed and reliability improvements that came with it) was
>> done by using Kati instead of Make, and we've continued to invest in new
>> features there.  But most of the improvements have come from moving the
>> very complex build code out of the terrible Make language and into a high
>> level, maintainable, testable language.
>>
>> Android is mature; it deserves a mature build system.
>>>
>>> Jacob Abrams
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-buildi...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-buildi...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> On Mon, Dec 11, 2017 at 1:50 PM, Jacob Abrams  wrote:
>>
>>> Hello,
>>>
>>> I would like to voice protest over the AOSP build system switch from
>>> Make to Soong. Make is not a perfect tool but it is well documented and
>>> extremely stable. The introduction of ninja into AOSP was seamless and
>>> acceptable. However, migrating away from Make to a totally new 

Re: [android-building] Building Marlin For Nexus 5X -- Cannot Flash Build Product To Device.

2018-09-25 Thread Colin Cross
marlin images are for the Pixel XL, they are not compatible with the Nexus
5x (bullhead).

On Tue, Sep 25, 2018 at 12:31 AM American Justice Corp <
americanjusticec...@gmail.com> wrote:

> Target Device: Nexus 5X
> Development Host: Linux, Slackware 14.2, 64-Bit, x86_64 Desktop Hardware.
>
> This posting is regarding installing, (flashing) a "userdebug" build of
> marlin, (repo sync'd on 21 Sept. 2018), to a Nexus 5X Device,
> that is built unmodified via the "repo" commands, "lunch" and "make droid".
>
> Android Studio, and Platform Tools are installed and up to date. Android
> Studio has been used successfully to build sample Apps, push them to device,
> and run them on device.
>
> The repo folder on the Development Host is sync'd, (as of 21 September
> 2018).
>
> After a "repo init" and "repo sync", the lunch menu has 37 items. Item #19
> is "aosp_marlin-userdebug"
>
> After selecting "aosp_marlin-userdebug", (#19), from the Lunch Menu, "make
> "adb" and "make fastboot" work.
>
> adb and fastboot command line programs,  (whether from Platform Tools,  or
> after "make adb" or "make fast boot"), work fine for shell access to the
> device, push, pull, bootloader unlock, and flashing with files obtained
> from here:
>
> https://developers.google.com/android/images
>
> The commands in flash-all.sh all work fine to successfully flash device
> with its latest "Factory" image, (Bullhead),  ID: 8.1.0
> (OPM6.171019.030.K1, Sep 2018)
>
>
> Then, running "make droid", (for aosp-marlin-userdebug"), successfully
> builds the various Target Device Image Files, for Marlin, and puts them in
> $OUT. (After a Glacial Epoch of Time).
>
>
> Prior to flashing the device with the Image Files created from "make
> droid", I tried to flash the device with a Marlin System Image, ID:
> image-marlin-njh34c.zip from  *marlin-njh34c-factory-be914eaa.zip*
> )
> The error message I get is:
>
> *fastboot -w update image-marlin-njh34c.zip*
>
> *   *
>
> *Bootloader Version...: BHZ31b*
>
> *Baseband Version.: M8994F-2.6.41.5.01*
>
> *Serial Number: 0255046c4c403d85*
>
> *   *
>
> *extracting android-info.txt (0 MB) to RAM...*
>
> *Checking 'product' FAILED*
>
>
> *Device product is 'bullhead'.*
>
> *Update requires 'marlin' or 'sailfish'.*
>
>
> So, as far as I can tell, the "build" process works fine, but if the
> "stock" Marlin image cannot be installed on the device, how can one built
> from source be flashed onto the device?
>
>
> I picked an earlier release, Major Version "7" Because I thought it should
> work. I will update this post after I try the latest "marlin" and
> "sailfish" Updates in version "8" and "9"
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: Jack server is not respecting ~/jack-settings

2018-09-12 Thread Colin Cross
Jack is no longer used in P, and while jack_server_setup.mk is still
present in the pie-dev branch the only reference to it was removed by
https://android-review.googlesource.com/c/platform/build/+/496351/5/core/main.mk#b198
.

On Wed, Sep 12, 2018 at 7:30 AM Baran Jean-Marie 
wrote:

> This is still an issue in Android 8.1 and Android 9. The script
> jack_server_setup.mk
> 
> is still called (when generating the target dist for example), and
> unfortunately resets the ports in ~/.jack-server/config.properties. One has
> to remove the uninstall/install steps in this makefile for keeping the port
> untouched, or somehow prevent this makefile from being called.
>
> Jean-Marie.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] How to pass options to ninja when building a module?

2018-09-11 Thread Colin Cross
Try NINJA_ARGS="-d keeprsp" mma

On Tue, Sep 11, 2018 at 9:35 AM bx L  wrote:

> Hello everyone,
> I'm currently studying Android building procedures (with Android 8.0).
> I build some modules with "mma" and I see that ninja output logs to
> ./out/verbose.log.gz.
> When I check the logs, I find that Ninja creates some ".rsp files" to
> represent long strings during the build. I would rather print the original
> strings or keep the  rsp files. A relative link is as followed:
> https://groups.google.com/forum/#!topic/ninja-build/TyIdDE8zNUo
> It seems like that I should pass the "-d keeprsp" option to ninja.
> However, I find that the build system is so complicated, and I find no
> way to do that. I try to modify ./out/ninja-aosp_x86_64.sh and build with
> the script, but it fails (due to the lack of the parameters or environment,
> I guess).
> So how can I pass the option to ninja? Is there any other way to know
> the contents in .rsp files?
> Any suggestion would be appreciated:)
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] C_INCLUDES must be under the source or output directories in Android O build

2018-08-03 Thread Colin Cross
You must have LOCAL_PATH := $(call my-dir) at the top of each Android.mk

On Fri, Aug 3, 2018, 8:51 AM  wrote:

> Hello, I have the same problem.  I tried to build this on Android O : 8.0
> I wrote a libfuzzer demo under tools/fuzzers/fuzz_me_fuzzer follow  the
> steps of https://source.android.com/devices/tech/debug/libfuzzer,like
> this:
>
> extern "C" int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) {
>   FuzzMe(buf, len);
>   return 0;
> }
>
> and Android.mk:
>
> OCAL_PATH:= $(call my-dir)
>
> include $(CLEAR_VARS)
>
> LOCAL_SRC_FILES := fuzz_me_fuzzer.cpp
> LOCAL_CFLAGS += -Wno-multichar -g -O0
> LOCAL_MODULE_TAGS := optional
> LOCAL_CLANG := true
> LOCAL_MODULE:= fuzz_me_fuzzer
>
> Include $(BUILD_FUZZ_TEST)
>
> Use command:
>
> make -j$(nproc) fuzz_me_fuzzer SANITIZE_TARGET="address coverage"
>
> get error:
>
> ninja: error: '/src/fuzz_me_fuzzer.cpp', needed by
> 'out/target/product/generic/obj_asan/EXECUTABLES/fuzz_me_fuzzer_intermediates/src/fuzz_me_fuzzer.o',
> missing and no known rule to make it
> 20:25:06 ninja failed with: exit status 1
>
> so ,I think I should make it first.Use command:
>
> mmm tools/fuzzers/fuzz_me_fuzzer/
>
> get error:  C_INCLUDES must be under the source or output directories,
>
> where should I put the files? If I want to write some simple Android
> native code, where should I put the files? Should I use ‘mmm’ or other
> commands?
>
> -Wang
>
> 在 2018年7月18日星期三 UTC+8上午11:56:05,Dan Willemsen写道:
>>
>> So we don't support using files during the build from outside of the
>> source or output directories. That's what this check is intended to check
>> for, so if you're trying that, put all of your source into the source
>> directory.
>>
>> There are a couple of other things that can trigger this check -- I've
>> seen both of these in practice:
>>
>> 1. Using $(VAR)/include in your LOCAL_C_INCLUDES, but when VAR isn't set.
>> The build system then gets "/include", and before this check would attempt
>> to look at the filesystem in that location. If that happened to be present
>> on a machine, it could end up using that inappropriately.
>>
>> 2. Using an absolute path to a directory within the source path. This
>> happens when someone overzealously uses $(abspath) or similar. Instead,
>> make sure that all of your paths are relative paths from the top of the
>> source tree. During a build, the working directory is always at the top of
>> the source tree.
>>
>> - Dan
>>
>> On Tue, Jul 17, 2018 at 11:56 AM RMApps Solution 
>> wrote:
>>
>>> Hello,
>>> I have problem to build in vendor/folder/subfolder. When try to do mm in
>>> that path, i got this errror:
>>>
>>> build/core/binary.mk:1485: error: vendor/folder/subfolder/Android.mk:
>>> libXXX: C_INCLUDES must be under the source or output directories .
>>>
>>> I tried to build this on Android O : 8.0
>>>
>>> Anyone had this problem ?
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-buildi...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-buildi...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Heap size increase without jack help

2018-05-24 Thread Colin Cross
How much memory does your build machine have?

On Thu, May 24, 2018 at 8:20 AM John Kasaki  wrote:

> Hello!I'm building the master branch of AOSP without jack and face some
> trouble.Here is the log:
> [  4% 1/21] Target Java:
> out/target/co...r_intermediates/classes-full-debug.jar
> FAILED:
> out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar
> /bin/bash -c "(rm -f
> out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar ) &&
> (rm -rf out/target/common/obj/APPS/Dialer_intermediates/classes
> out/target/common/obj/APPS/Dialer_intermediates/anno ) && (mkdir -p
> out/target/common/obj/APPS/Dialer_intermediates/ ) && (mkdir -p
> out/target/common/obj/APPS/Dialer_intermediates/classes
> out/target/common/obj/APPS/Dialer_intermediates/anno ) &&
> (out/soong/host/linux-x86/bin/zipsync -d
> out/target/common/obj/APPS/Dialer_intermediates/srcjars -l
> out/target/common/obj/APPS/Dialer_intermediates/srcjar-list -f \"*.java\"
> out/target/common/obj/APPS/Dialer_intermediates/aapt2.srcjar ) && (if [ -s
> out/target/common/obj/APPS/Dialer_intermediates/java-source-list -o -s
> out/target/common/obj/APPS/Dialer_intermediates/srcjar-list ] ; then
> out/soong/host/linux-x86/bin/soong_javac_wrapper
> prebuilts/jdk/jdk9/linux-x86/bin/javac -Xmaxerrs 999 -encoding UTF-8
> -sourcepath \"\" -g -XDskipDuplicateBridges=true -XDstringConcat=inline
> -encoding UTF-8   -bootclasspath
> out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/core-lambda-stubs_intermediates/classes-header.jar
> -classpath
> 

Re: [android-building] Re: Android 8.1 build error in ubuntu 14.04

2018-05-17 Thread Colin Cross
Probably the filesystem issue with DT_UNKNOWN, fixed by
https://android-review.googlesource.com/c/platform/system/tools/hidl/+/650080

On Thu, May 17, 2018, 7:31 AM Fish Zheng  wrote:

> Hello,
>Did you fix this issue? or any update?
>I just got the same compiling error as yours.
>
>However I got two very strange comparison result, I can build it on a
> Ubuntu-14.04.5 VMware but failed to do it on one bare metal Ubuntu-14.04.5
> workstation.
>I can promise I do install these 2 Ubuntu ENV using the same
> installation iso. I also install the same dependencies or tools for example:
> ```
>$ sudo apt-get install git ccache automake lzop bison gperf
> build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib
> python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev
> squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng
>$ sudo apt-get install python-wand python-crypto liblz4-tool
> ```
>This means that in my current opinion, the software environment is the
> same except for hardware (VMware vs. Bare metal).
>I am very confused of this now.
>
>
> On Thursday, March 15, 2018 at 10:52:45 PM UTC+8, zeo...@naver.com wrote:
>>
>> Hi
>> When i try to build AOSP O(8.1.0), i got this error.
>> Can anyone help me on this?
>>
>> [  0% 9/47545] target Generated: android.hardware.usb-V1.1-java <=
>> hardware/interfaces/usb/1.1/types.hal
>> FAILED:
>> out/target/common/gen/JAVA_LIBRARIES/android.hardware.usb-V1.1-java_intermediates/android/hardware/usb/V1_1/PortStatus_1_1.java
>> /bin/bash -c "out/host/linux-x86/bin/hidl-gen -o
>> out/target/common/gen/JAVA_LIBRARIES/android.hardware.usb-V1.1-java_intermediates
>> -Ljava -randroid.hardware:hardware/interfaces
>> -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1
>> ::types.PortStatus_1_1"
>> ERROR: Failed to lookup type 'PortMode' at
>> hardware/interfaces/usb/1.1/types.hal:22.21-28
>> ERROR: Failed to lookup type 'PortStatus' at
>> hardware/interfaces/usb/1.1/types.hal:45.5-14
>> ERROR: Failed to lookup type 'PortMode_1_1' at
>> hardware/interfaces/usb/1.1/types.hal:51.14-25
>> ERROR: Failed to lookup type 'PortMode_1_1' at
>> hardware/interfaces/usb/1.1/types.hal:56.5-16
>> ERROR: Could not parse android.hardware.usb@1.1::types.PortStatus_1_1.
>> Aborting.
>> [  0% 10/47545] target Generated: android.hardware.usb-V1.1-java <=
>> hardware/interfaces/usb/1.1/types.hal
>> FAILED:
>> out/target/common/gen/JAVA_LIBRARIES/android.hardware.usb-V1.1-java_intermediates/android/hardware/usb/V1_1/PortMode_1_1.java
>> /bin/bash -c "out/host/linux-x86/bin/hidl-gen -o
>> out/target/common/gen/JAVA_LIBRARIES/android.hardware.usb-V1.1-java_intermediates
>> -Ljava -randroid.hardware:hardware/interfaces
>> -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1
>> ::types.PortMode_1_1"
>> ERROR: Failed to lookup type 'PortMode' at
>> hardware/interfaces/usb/1.1/types.hal:22.21-28
>> ERROR: Failed to lookup type 'PortStatus' at
>> hardware/interfaces/usb/1.1/types.hal:45.5-14
>> ERROR: Failed to lookup type 'PortMode_1_1' at
>> hardware/interfaces/usb/1.1/types.hal:51.14-25
>> ERROR: Failed to lookup type 'PortMode_1_1' at
>> hardware/interfaces/usb/1.1/types.hal:56.5-16
>> ERROR: Could not parse android.hardware.usb@1.1::types.PortMode_1_1.
>> Aborting.
>> [  0% 11/47545] target Generated: android.hardware.usb-V1.1-java <=
>> hardware/interfaces/usb/1.1/IUsb.hal
>> FAILED:
>> out/target/common/gen/JAVA_LIBRARIES/android.hardware.usb-V1.1-java_intermediates/android/hardware/usb/V1_1/IUsb.java
>> /bin/bash -c "out/host/linux-x86/bin/hidl-gen -o
>> out/target/common/gen/JAVA_LIBRARIES/android.hardware.usb-V1.1-java_intermediates
>> -Ljava -randroid.hardware:hardware/interfaces
>> -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1::IUsb"
>> ERROR: Failed to lookup type 'PortMode' at
>> hardware/interfaces/usb/1.1/types.hal:22.21-28
>> ERROR: Failed to lookup type 'PortStatus' at
>> hardware/interfaces/usb/1.1/types.hal:45.5-14
>> ERROR: Failed to lookup type 'PortMode_1_1' at
>> hardware/interfaces/usb/1.1/types.hal:51.14-25
>> ERROR: Failed to lookup type 'PortMode_1_1' at
>> hardware/interfaces/usb/1.1/types.hal:56.5-16
>> ERROR: Failed to lookup type 'android.hardware.usb@1.0::IUsb' at
>> hardware/interfaces/usb/1.1/IUsb.hal:21.24-53
>> ERROR: Could not parse android.hardware.usb@1.1::IUsb. Aborting.
>> [  0% 12/47545] target Generated: android.hardware.usb-V1.1-java <=
>> hardware/interfaces/usb/1.1/IUsbCallback.hal
>> FAILED:
>> out/target/common/gen/JAVA_LIBRARIES/android.hardware.usb-V1.1-java_intermediates/android/hardware/usb/V1_1/IUsbCallback.java
>> /bin/bash -c "out/host/linux-x86/bin/hidl-gen -o
>> out/target/common/gen/JAVA_LIBRARIES/android.hardware.usb-V1.1-java_intermediates
>> -Ljava -randroid.hardware:hardware/interfaces
>> -randroid.hidl:system/libhidl/transport android.hardware.usb@1.1
>> ::IUsbCallback"
>> ERROR: Failed to lookup type 

Re: [android-building] Build Android 8.0 error.Help me,please!

2017-12-26 Thread Colin Cross
"mokee-api-stubs" is not a module that exists in AOSP, you'll have to get
help from wherever you got your source from.

On Tue, Dec 26, 2017 at 3:09 AM,  wrote:

> FAILED: /home/jack/Mokee/O/out/target/common/docs/mokee-api-stubs-
> timestamp
> /bin/bash -c "(mkdir -p /home/jack/Mokee/O/out/target/
> common/obj/JAVA_LIBRARIES/mokee-api-stubs_intermediates/ ) && (rm -f
> /home/jack/Mokee/O/out/target/common/obj/JAVA_LIBRARIES/
> mokee-api-stubs_intermediates/droiddoc-src-list ) && (touch
> /home/jack/Mokee/O/out/target/common/obj/JAVA_LIBRARIES/
> mokee-api-stubs_intermediates/droiddoc-src-list ) && (echo -n
> 'mokee-sdk/sdk/src/java/mokee/alarmclock/ClockContract.java
> mokee-sdk/sdk/src/java/mokee/alarmclock/MoKeeAlarmClock.java
> mokee-sdk/sdk/src/java/mokee/app/CustomTile.java
> mokee-sdk/sdk/src/java/mokee/app/CustomTileListenerService.java
> mokee-sdk/sdk/src/java/mokee/app/MKContextConstants.java
> mokee-sdk/sdk/src/java/mokee/app/MKStatusBarManager.java
> mokee-sdk/sdk/src/java/mokee/app/MKTelephonyManager.java
> mokee-sdk/sdk/src/java/mokee/app/Profile.java
> mokee-sdk/sdk/src/java/mokee/app/ProfileGroup.java
> mokee-sdk/sdk/src/java/mokee/app/ProfileManager.java
> mokee-sdk/sdk/src/java/mokee/app/StatusBarPanelCustomTile.java
> mokee-sdk/sdk/src/java/mokee/content/Intent.java
> mokee-sdk/sdk/src/java/mokee/externalviews/ExternalView.java
> mokee-sdk/sdk/src/java/mokee/externalviews/ExternalViewProperties.java
> mokee-sdk/sdk/src/java/mokee/externalviews/ExternalViewProviderService.java
> mokee-sdk/sdk/src/java/mokee/hardware/DisplayMode.java
> mokee-sdk/sdk/src/java/mokee/hardware/HSIC.java
> mokee-sdk/sdk/src/java/mokee/hardware/LiveDisplayConfig.java
> mokee-sdk/sdk/src/java/mokee/hardware/LiveDisplayManager.java
> mokee-sdk/sdk/src/java/mokee/hardware/MKHardwareManager.java
> mokee-sdk/sdk/src/java/mokee/hardware/ThermalListenerCallback.java
> mokee-sdk/sdk/src/java/mokee/hardware/TouchscreenGesture.java
> mokee-sdk/sdk/src/java/mokee/media/AudioSessionInfo.java
> mokee-sdk/sdk/src/java/mokee/media/MKAudioManager.java
> mokee-sdk/sdk/src/java/mokee/media/MediaRecorder.java
> mokee-sdk/sdk/src/java/mokee/os/Build.java 
> mokee-sdk/sdk/src/java/mokee/os/Concierge.java
> mokee-sdk/sdk/src/java/mokee/power/PerformanceManager.java
> mokee-sdk/sdk/src/java/mokee/power/PerformanceManagerInternal.java
> mokee-sdk/sdk/src/java/mokee/power/PerformanceProfile.java
> mokee-sdk/sdk/src/java/mokee/preference/ConstraintsHelper.java
> mokee-sdk/sdk/src/java/mokee/preference/GlobalSettingSwitchPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/MKGlobalSettingSwitchPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/MKSecureSettingListPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/MKSecureSettingSwitchPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/MKSystemSettingDropDownPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/MKSystemSettingListPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/MKSystemSettingSwitchPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/RemotePreference.java
> mokee-sdk/sdk/src/java/mokee/preference/RemotePreferenceManager.java
> mokee-sdk/sdk/src/java/mokee/preference/RemotePreferenceUpdater.java
> mokee-sdk/sdk/src/java/mokee/preference/SecureSettingSwitchPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/SelfRemovingDropDownPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/SelfRemovingListPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/SelfRemovingPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/SelfRemovingSwitchPreference.java
> mokee-sdk/sdk/src/java/mokee/preference/SettingsHelper.java
> mokee-sdk/sdk/src/java/mokee/preference/SystemSettingSwitchPreference.java
> mokee-sdk/sdk/src/java/mokee/profiles/AirplaneModeSettings.java
> mokee-sdk/sdk/src/java/mokee/profiles/BrightnessSettings.java
> mokee-sdk/sdk/src/java/mokee/profiles/ConnectionSettings.java
> mokee-sdk/sdk/src/java/mokee/profiles/LockSettings.java
> mokee-sdk/sdk/src/java/mokee/profiles/RingModeSettings.java
> mokee-sdk/sdk/src/java/mokee/profiles/StreamSettings.java
> mokee-sdk/sdk/src/java/mokee/providers/DataUsageContract.java
> mokee-sdk/sdk/src/java/mokee/providers/MKSettings.java
> mokee-sdk/sdk/src/java/mokee/providers/WeatherContract.java
> mokee-sdk/sdk/src/java/mokee/util/ColorUtils.java
> mokee-sdk/sdk/src/java/mokee/util/palette/ColorCutQuantizer.java
> mokee-sdk/sdk/src/java/mokee/util/palette/ColorUtils.java
> mokee-sdk/sdk/src/java/mokee/util/palette/DefaultGenerator.java
> mokee-sdk/sdk/src/java/mokee/util/palette/Palette.java
> mokee-sdk/sdk/src/java/mokee/weather/MKWeatherManager.java
> mokee-sdk/sdk/src/java/mokee/weather/RequestInfo.java
> mokee-sdk/sdk/src/java/mokee/weather/WeatherInfo.java
> mokee-sdk/sdk/src/java/mokee/weather/WeatherLocation.java
> mokee-sdk/sdk/src/java/mokee/weather/util/WeatherUtils.java
> mokee-sdk/sdk/src/java/mokee/weatherservice/ServiceRequest.java
> 

Re: [android-building] How to ensure that the flag enabled in the intermediate .mk files is updated and visible to Soong

2017-12-22 Thread Colin Cross
No, that is not possible.  Even without soong it's not possible to do
reliably - Android.mk files for a directory are sometimes parsed without
the rest of the tree, so one module may or may not see flags that were set
in another module.

On Thu, Dec 21, 2017 at 8:29 PM, Priyanka Bose <dolabose...@gmail.com>
wrote:

> Hi Colin,
>
> Thanks for the reply !
> Ok but then it might not be possible to update this flag so early in the
> build.
> The flag can only be set in my development code and that is enabled in its
> Android.mk file.
>
> So do you have any other suggestions then as to how can I add srcs and
> libs  as a part of conditional flag in  my Android.bp
> based on whether that flag is enabled/disabled in it's Android.mk file.
>
> Thanks in advance !
>
> Best Regards
> Priyanka
>
> On Friday, December 22, 2017 at 2:13:50 AM UTC+5:30, Colin Cross wrote:
>>
>> soong_config.mk is parsed very early, before any of the Android.mk files
>> and many of the files in build/make/core.  You probably need to set your
>> variable in your product's BoardConfig.mk file.
>>
>> On Thu, Dec 21, 2017 at 12:07 PM, Priyanka Bose <dolab...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I need to add a conditional flag based on which I need to include my
>>> srcs and libs when they are enabled.
>>> As  some suggestions in the other posts, I have added a  struct variable
>>> under productvariable in the variables.go.
>>> Then included the same in the soong_config.mk file.
>>> Made the changes in my .bp file to include that productvariable struct.
>>> In my .go file , I have checked for the condition variable ( which I am
>>> enabling in one of the .mk files) and based on that updating the flag.
>>>
>>> The problem is regardless of whether I enable or disable the flag in my
>>> .mk file, all files get compiled .
>>> The compilation is success but when I checked the
>>> /out/soong/soong.variables file generated after my build, I see that the
>>> new product variable is present
>>>  in the variable.go but that is null , hence not updated.
>>>
>>> Can you tell me how to  ensure that my specific soong variable is
>>> updated based on the flags I set in the mk files.
>>> And also accordingly the set of srcs are compiled
>>>
>>> Best Regards
>>> Priyanka
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-buildi...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-buildi...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] errors in building AOSP master

2017-12-22 Thread Colin Cross
I expect the ! in your directory name is causing the problem.  ! is a
special character in bash, and something somewhere in the build is using a
full path and not escaping it.  Finding all the places that need escaping
is probably a losing battle, so I'd suggest moving to another directory.
We should probably add checks to forbid special characters in the source
and out directories.

On Thu, Dec 21, 2017 at 10:37 PM, Maksim Akristiniy <
maxim.akristi...@gmail.com> wrote:

> Ok, lets dig inside, there is my variables :
> ANDROID_DEV_SCRIPTS=/home/maxim/prj/!hdd_slow/aX_master_
> google/development/scripts:/home/maxim/prj/!hdd_slow/aX_
> master_google/prebuilts/devtools/tools:/home/maxim/
> prj/!hdd_slow/aX_master_google/external/selinux/
> prebuilts/bin:/home/maxim/prj/!hdd_slow/aX_master_google/
> prebuilts/misc/linux-x86/dtc:/home/maxim/prj/!hdd_slow/aX_
> master_google/prebuilts/misc/linux-x86/libufdt
> ANDROID_PRE_BUILD_PATHS=/home/maxim/prj/!hdd_slow/aX_master_
> google/prebuilts/jdk/jdk8/linux-x86/bin:
> ANDROID_BUILD_TOP=/home/maxim/prj/!hdd_slow/aX_master_google
> ANDROID_PRODUCT_OUT=/home/maxim/prj/!hdd_slow/aX_master_
> google/out/target/product/generic_arm64
> ANDROID_JAVA_TOOLCHAIN=/home/maxim/prj/!hdd_slow/aX_master_
> google/prebuilts/jdk/jdk8/linux-x86/bin
> ANDROID_TARGET_OUT_TESTCASES=/home/maxim/prj/!hdd_slow/aX_
> master_google/out/target/product/generic_arm64/testcases
> OUT=/home/maxim/prj/!hdd_slow/aX_master_google/out/target/
> product/generic_arm64
> OLDPWD=/home/maxim/prj/!hdd_slow
> ANDROID_HOST_OUT_TESTCASES=/home/maxim/prj/!hdd_slow/aX_
> master_google/out/host/linux-x86/testcases
> ANDROID_BUILD_PATHS=/home/maxim/prj/!hdd_slow/aX_master_
> google/out/soong/host/linux-x86/bin:/home/maxim/prj/!hdd_
> slow/aX_master_google/out/host/linux-x86/bin:/home/
> maxim/prj/!hdd_slow/aX_master_google/prebuilts/gcc/linux-
> x86/aarch64/aarch64-linux-android-4.9/bin:/home/maxim/
> prj/!hdd_slow/aX_master_google/prebuilts/gcc/linux-
> x86/arm/arm-linux-androideabi-4.9/bin:/home/maxim/prj/!hdd_
> slow/aX_master_google/development/scripts:/home/
> maxim/prj/!hdd_slow/aX_master_google/prebuilts/devtools/
> tools:/home/maxim/prj/!hdd_slow/aX_master_google/
> external/selinux/prebuilts/bin:/home/maxim/prj/!hdd_slow/
> aX_master_google/prebuilts/misc/linux-x86/dtc:/home/
> maxim/prj/!hdd_slow/aX_master_google/prebuilts/misc/linux-
> x86/libufdt:/home/maxim/prj/!hdd_slow/aX_master_google/
> prebuilts/android-emulator/linux-x86_64:
> PATH=/home/maxim/prj/!hdd_slow/aX_master_google/
> prebuilts/jdk/jdk8/linux-x86/bin:/home/maxim/prj/!hdd_slow/
> aX_master_google/out/soong/host/linux-x86/bin:/home/
> maxim/prj/!hdd_slow/aX_master_google/out/host/linux-x86/bin:
> /home/maxim/prj/!hdd_slow/aX_master_google/prebuilts/gcc/
> linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/
> maxim/prj/!hdd_slow/aX_master_google/prebuilts/gcc/linux-
> x86/arm/arm-linux-androideabi-4.9/bin:/home/maxim/prj/!hdd_
> slow/aX_master_google/development/scripts:/home/
> maxim/prj/!hdd_slow/aX_master_google/prebuilts/devtools/
> tools:/home/maxim/prj/!hdd_slow/aX_master_google/
> external/selinux/prebuilts/bin:/home/maxim/prj/!hdd_slow/
> aX_master_google/prebuilts/misc/linux-x86/dtc:/home/
> maxim/prj/!hdd_slow/aX_master_google/prebuilts/misc/linux-
> x86/libufdt:/home/maxim/prj/!hdd_slow/aX_master_google/
> prebuilts/android-emulator/linux-x86_64:/home/maxim/
> Android/Sdk/platform-tools:/home/maxim/bin:/home/maxim/
> bin:/home/maxim/.local/bin:/usr/local/sbin:/usr/local/bin:
> /usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
> PWD=/home/maxim/prj/!hdd_slow/aX_master_google
> JAVA_HOME=/home/maxim/prj/!hdd_slow/aX_master_google/
> prebuilts/jdk/jdk8/linux-x86
> ANDROID_TOOLCHAIN=/home/maxim/prj/!hdd_slow/aX_master_
> google/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
> ANDROID_TOOLCHAIN_2ND_ARCH=/home/maxim/prj/!hdd_slow/aX_
> master_google/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin
> ANDROID_JAVA_HOME=/home/maxim/prj/!hdd_slow/aX_master_
> google/prebuilts/jdk/jdk8/linux-x86
> PYTHONPATH=/home/maxim/prj/!hdd_slow/aX_master_google/
> development/python-packages:
> ANDROID_EMULATOR_PREBUILTS=/home/maxim/prj/!hdd_slow/aX_
> master_google/prebuilts/android-emulator/linux-x86_64
> ANDROID_HOST_OUT=/home/maxim/prj/!hdd_slow/aX_master_
> google/out/host/linux-x86
>
>
> четверг, 21 декабря 2017 г., 22:38:19 UTC+3 пользователь Colin Cross
> написал:
>>
>> It's trying to read a file called /home/maxim/prj, but that doesn't
>> appear on the command line, so I'm not sure why.  Maybe it's coming from
>> your environment?  What do you see when you run:
>> env | grep prj
>>
>>
>> On Thu, Dec 21, 2017 at 7:53 AM,

Re: [android-building] No response after “lunch" command

2017-12-21 Thread Colin Cross
The patch stack at
https://android-review.googlesource.com/c/platform/build/soong/+/575773
removes >700k lstat calls from finder, I'm curious if it makes any
difference for you.

On Thu, Dec 21, 2017 at 12:41 PM, Peter Warrington <sothisispe...@gmail.com>
wrote:

> Thank you for all your help and good luck with improving finder! With
> regards to memory, I have a measly 4GB of ram so that is probally slowing
> finder down and I do expect it to be slow (I do plan on upgrading in case
> you are wondering). However, I do not believe what I am experiencing is the
> same as what Alessandro is experiencing. Again, Thanks for all your help!
>
> On Thursday, December 21, 2017 at 8:14:39 PM UTC, Colin Cross wrote:
>>
>> Yeah, this is showing very slow lstat calls:
>> [pid  4007] <... lstat resumed> {st_mode=S_IFDIR|0777, st_size=4096,
>> ...}) = 0 <0.020417>
>> vs. mine:
>> [pid 219359] <... lstat resumed> {st_mode=S_IFREG|0640, st_size=323161,
>> ...}) = 0 <0.46>
>>
>> I don't know why yours would be so much slower, maybe just round trip
>> latency to the external drive and not enough memory to keep them all in
>> the inode cache?
>>
>> We can improve finder to drastically reduce the number of lstat calls,
>> but ninja is going to have to stat most of the files to determine what
>> needs building so I don't know how much improvement you will see.
>>
>>
>> On Thu, Dec 21, 2017 at 11:56 AM, Peter Warrington <sothis...@gmail.com>
>> wrote:
>>
>>> Sorry about that. Is this attached strace any better?
>>>
>>> On Thursday, December 21, 2017 at 7:36:22 PM UTC, Colin Cross wrote:
>>>>
>>>> I don't see the data I'd expect with -T, it should have a time in angle
>>>> brackets after each finished syscall:
>>>> [pid 219359] <... lstat resumed> {st_mode=S_IFREG|0640, st_size=323161,
>>>> ...}) = 0 <0.46>
>>>>
>>>>
>>>> On Thu, Dec 21, 2017 at 3:05 AM, Peter Warrington <sothis...@gmail.com>
>>>> wrote:
>>>>
>>>>> Attached is a much longer strace with the -T option used.
>>>>>
>>>>> On Wednesday, December 20, 2017 at 11:16:53 PM UTC, Colin Cross wrote:
>>>>>>
>>>>>> The results of the finder are cached in out/.module_paths/files.db,
>>>>>> so once the command has completed successfully once the next runs will be
>>>>>> much faster.  You could try wiping that file to reproduce it again, or 
>>>>>> run
>>>>>> with a different value for OUT_DIR (OUT_DIR=out2 lunch ...).
>>>>>>
>>>>>> On Wed, Dec 20, 2017 at 1:58 PM, Peter Warrington <
>>>>>> sothis...@gmail.com> wrote:
>>>>>>
>>>>>>> Hello, the command has now started to work like normal after leaving
>>>>>>> it for a while, so my problem might not be the same as Alessandro's.
>>>>>>> Unfortunately, I cannot upload a bigger stack trace until tomorrow 
>>>>>>> because
>>>>>>> of the time in my timezone. Sorry!
>>>>>>>
>>>>>>> On Wednesday, December 20, 2017 at 9:48:34 PM UTC, Colin Cross wrote:
>>>>>>>>
>>>>>>>> Can you attach a longer strace with -T ?
>>>>>>>>
>>>>>>>> On Wed, Dec 20, 2017 at 1:28 PM, Peter Warrington <
>>>>>>>> sothis...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Thank you! That is very interesting. In case it helps, I
>>>>>>>>> benchmarked my external HDD and it has an average read rate of 92.0 
>>>>>>>>> MB/s
>>>>>>>>> and an average access time of 16.37 msec. However, I didn't have any
>>>>>>>>> trouble with this previously.
>>>>>>>>>
>>>>>>>>> On Wednesday, December 20, 2017 at 9:06:16 PM UTC, Colin Cross
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Nothing looks wrong in that strace, it is making forward
>>>>>>>>>> progress.  It needs to read every directory and stat every file in 
>>>>>>>>>> the
>>>>>>>>>> tree, is your filesystem very slow for some reason?
>>>>>>>>>>
>>>>>>>>>> One dif

Re: [android-building] How to ensure that the flag enabled in the intermediate .mk files is updated and visible to Soong

2017-12-21 Thread Colin Cross
soong_config.mk is parsed very early, before any of the Android.mk files
and many of the files in build/make/core.  You probably need to set your
variable in your product's BoardConfig.mk file.

On Thu, Dec 21, 2017 at 12:07 PM, Priyanka Bose 
wrote:

> Hi,
>
> I need to add a conditional flag based on which I need to include my srcs
> and libs when they are enabled.
> As  some suggestions in the other posts, I have added a  struct variable
> under productvariable in the variables.go.
> Then included the same in the soong_config.mk file.
> Made the changes in my .bp file to include that productvariable struct.
> In my .go file , I have checked for the condition variable ( which I am
> enabling in one of the .mk files) and based on that updating the flag.
>
> The problem is regardless of whether I enable or disable the flag in my
> .mk file, all files get compiled .
> The compilation is success but when I checked the
> /out/soong/soong.variables file generated after my build, I see that the
> new product variable is present
>  in the variable.go but that is null , hence not updated.
>
> Can you tell me how to  ensure that my specific soong variable is updated
> based on the flags I set in the mk files.
> And also accordingly the set of srcs are compiled
>
> Best Regards
> Priyanka
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] errors in building AOSP master

2017-12-21 Thread Colin Cross
It's trying to read a file called /home/maxim/prj, but that doesn't appear
on the command line, so I'm not sure why.  Maybe it's coming from your
environment?  What do you see when you run:
env | grep prj


On Thu, Dec 21, 2017 at 7:53 AM, Maksim Akristiniy <
maxim.akristi...@gmail.com> wrote:

> Hi all,
>
> downloaded aosp master
> source build/envsetup.sh
> lunch aosp_arm64-eng
> make
>
> error, what can be problem ? :
> [  3% 64/2058] Docs droiddoc: out/target/common/docs/ahat
> FAILED: out/target/common/docs/ahat-timestamp
> /bin/bash -c "(rm -rf  out/host/common/obj/JAVA_
> LIBRARIES/ahat_intermediates/srcjars ) && (mkdir -p
> out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/ ) && (rm -f
> out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/droiddoc-src-list )
> && (touch  
> out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/droiddoc-src-list
> ) && (echo -n 'art/tools/ahat/src/main/com/android/ahat/AhatHandler.java
> art/tools/ahat/src/main/com/android/ahat/AhatHttpHandler.java
> art/tools/ahat/src/main/com/android/ahat/BitmapHandler.java
> art/tools/ahat/src/main/com/android/ahat/Column.java
> art/tools/ahat/src/main/com/android/ahat/Doc.java
> art/tools/ahat/src/main/com/android/ahat/DocString.java
> art/tools/ahat/src/main/com/android/ahat/DominatedList.java
> art/tools/ahat/src/main/com/android/ahat/HeapTable.java
> art/tools/ahat/src/main/com/android/ahat/HtmlDoc.java
> art/tools/ahat/src/main/com/android/ahat/HtmlEscaper.java
> art/tools/ahat/src/main/com/android/ahat/Main.java
> art/tools/ahat/src/main/com/android/ahat/Menu.java
> art/tools/ahat/src/main/com/android/ahat/ObjectHandler.java
> art/tools/ahat/src/main/com/android/ahat/ObjectsHandler.java
> art/tools/ahat/src/main/com/android/ahat/OverviewHandler.java
> art/tools/ahat/src/main/com/android/ahat/Query.java
> art/tools/ahat/src/main/com/android/ahat/RootedHandler.java
> art/tools/ahat/src/main/com/android/ahat/SiteHandler.java
> art/tools/ahat/src/main/com/android/ahat/SitePrinter.java
> art/tools/ahat/src/main/com/android/ahat/SizeTable.java
> art/tools/ahat/src/main/com/android/ahat/StaticHandler.java
> art/tools/ahat/src/main/com/android/ahat/SubsetSelector.java
> art/tools/ahat/src/main/com/android/ahat/Summarizer.java
> art/tools/ahat/src/main/com/android/ahat/dominators/DominatorsComputation.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/AhatArrayInstance.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/AhatClassInstance.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/AhatClassObj.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/AhatHeap.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/AhatInstance.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/AhatPlaceHolderClassObj.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/AhatPlaceHolderInstance.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/AhatSnapshot.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Diff.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/DiffFields.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Diffable.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/DiffedFieldValue.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/
> DominatorReferenceIterator.java art/tools/ahat/src/main/com/
> android/ahat/heapdump/Field.java art/tools/ahat/src/main/com/
> android/ahat/heapdump/FieldValue.java art/tools/ahat/src/main/com/
> android/ahat/heapdump/HprofFormatException.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Instances.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Parser.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/PathElement.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Reference.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/RootType.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Site.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Size.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/SkipNullsIterator.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Sort.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/SuperRoot.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Type.java
> art/tools/ahat/src/main/com/android/ahat/heapdump/Value.java
> art/tools/ahat/src/main/com/android/ahat/proguard/ProguardMap.java ' >>
> out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/droiddoc-src-list )
> && (for d in  out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/src
> ; do find \$d -name '*.java' -and -not -name '.*' >>
> out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/droiddoc-src-list
> 2> /dev/null ; done ; true ) && (build/soong/scripts/extract-srcjars.sh
> out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/srcjars
> out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/droiddoc-srcjar-list
> ) && (( prebuilts/jdk/jdk8/linux-x86/bin/javadoc
>  -encoding UTF-8 -source 1.8
>  

Re: [android-building] No response after “lunch" command

2017-12-21 Thread Colin Cross
I don't see the data I'd expect with -T, it should have a time in angle
brackets after each finished syscall:
[pid 219359] <... lstat resumed> {st_mode=S_IFREG|0640, st_size=323161,
...}) = 0 <0.46>


On Thu, Dec 21, 2017 at 3:05 AM, Peter Warrington <sothisispe...@gmail.com>
wrote:

> Attached is a much longer strace with the -T option used.
>
> On Wednesday, December 20, 2017 at 11:16:53 PM UTC, Colin Cross wrote:
>>
>> The results of the finder are cached in out/.module_paths/files.db, so
>> once the command has completed successfully once the next runs will be much
>> faster.  You could try wiping that file to reproduce it again, or run with
>> a different value for OUT_DIR (OUT_DIR=out2 lunch ...).
>>
>> On Wed, Dec 20, 2017 at 1:58 PM, Peter Warrington <sothis...@gmail.com>
>> wrote:
>>
>>> Hello, the command has now started to work like normal after leaving it
>>> for a while, so my problem might not be the same as Alessandro's.
>>> Unfortunately, I cannot upload a bigger stack trace until tomorrow because
>>> of the time in my timezone. Sorry!
>>>
>>> On Wednesday, December 20, 2017 at 9:48:34 PM UTC, Colin Cross wrote:
>>>>
>>>> Can you attach a longer strace with -T ?
>>>>
>>>> On Wed, Dec 20, 2017 at 1:28 PM, Peter Warrington <sothis...@gmail.com>
>>>> wrote:
>>>>
>>>>> Thank you! That is very interesting. In case it helps, I benchmarked
>>>>> my external HDD and it has an average read rate of 92.0 MB/s and an 
>>>>> average
>>>>> access time of 16.37 msec. However, I didn't have any trouble with this
>>>>> previously.
>>>>>
>>>>> On Wednesday, December 20, 2017 at 9:06:16 PM UTC, Colin Cross wrote:
>>>>>>
>>>>>> Nothing looks wrong in that strace, it is making forward progress.
>>>>>> It needs to read every directory and stat every file in the tree, is your
>>>>>> filesystem very slow for some reason?
>>>>>>
>>>>>> One difference I see between the old implementation using the find
>>>>>> tool and the new implementation is that find seems to be able to avoiding
>>>>>> calling stat on every directory entry, because the relevant information
>>>>>> (whether the entry is a subdirectory or a file) is contained in the 
>>>>>> return
>>>>>> from the getdents64 syscall.  The Go implementation is ignoring that
>>>>>> information and has to call lstat to get it.
>>>>>>
>>>>>> On Wed, Dec 20, 2017 at 11:32 AM, Peter Warrington <
>>>>>> sothis...@gmail.com> wrote:
>>>>>>
>>>>>>> Attached is a partial strace.
>>>>>>>
>>>>>>> On Wednesday, December 20, 2017 at 7:06:31 PM UTC, Colin Cross wrote:
>>>>>>>>
>>>>>>>> From the stack trace after ctrl-c, lunch will be waiting for the
>>>>>>>> child soong_ui process to complete.  An strace of that process would be
>>>>>>>> interesting.
>>>>>>>>
>>>>>>>> On Mon, Dec 18, 2017 at 4:12 PM, Alessandro Brucato <
>>>>>>>> ale13...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> This is the output of strace attached to the process in which I
>>>>>>>>> execute "lunch".
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> <https://lh3.googleusercontent.com/-Rk-T1kCPUnA/WjhYORJYCKI/GSY/LIzqOc58jvkTpj7dowKqjz1OsKoAy0dZQCLcBGAs/s1600/strace.PNG>
>>>>>>>>>
>>>>>>>>> When "lunch" is stuck, the output of strace ends with "wait4(-1,".
>>>>>>>>> All the remaining part appears when I abort "lunch" with CTRL+C.
>>>>>>>>>
>>>>>>>>> Maybe this issue is due to the fact that I'm using a guest in
>>>>>>>>> Virtualbox?
>>>>>>>>>
>>>>>>>>> Il giorno lunedì 18 dicembre 2017 23:45:48 UTC+1, Colin Cross ha
>>>>>>>>> scritto:
>>>>>>>>>>
>>>>>>>>>> Can you capture the full output of all the stack traces?
>>>>>>>>>>
&g

Re: [android-building] No response after “lunch" command

2017-12-20 Thread Colin Cross
The results of the finder are cached in out/.module_paths/files.db, so once
the command has completed successfully once the next runs will be much
faster.  You could try wiping that file to reproduce it again, or run with
a different value for OUT_DIR (OUT_DIR=out2 lunch ...).

On Wed, Dec 20, 2017 at 1:58 PM, Peter Warrington <sothisispe...@gmail.com>
wrote:

> Hello, the command has now started to work like normal after leaving it
> for a while, so my problem might not be the same as Alessandro's.
> Unfortunately, I cannot upload a bigger stack trace until tomorrow because
> of the time in my timezone. Sorry!
>
> On Wednesday, December 20, 2017 at 9:48:34 PM UTC, Colin Cross wrote:
>>
>> Can you attach a longer strace with -T ?
>>
>> On Wed, Dec 20, 2017 at 1:28 PM, Peter Warrington <sothis...@gmail.com>
>> wrote:
>>
>>> Thank you! That is very interesting. In case it helps, I benchmarked my
>>> external HDD and it has an average read rate of 92.0 MB/s and an average
>>> access time of 16.37 msec. However, I didn't have any trouble with this
>>> previously.
>>>
>>> On Wednesday, December 20, 2017 at 9:06:16 PM UTC, Colin Cross wrote:
>>>>
>>>> Nothing looks wrong in that strace, it is making forward progress.  It
>>>> needs to read every directory and stat every file in the tree, is your
>>>> filesystem very slow for some reason?
>>>>
>>>> One difference I see between the old implementation using the find tool
>>>> and the new implementation is that find seems to be able to avoiding
>>>> calling stat on every directory entry, because the relevant information
>>>> (whether the entry is a subdirectory or a file) is contained in the return
>>>> from the getdents64 syscall.  The Go implementation is ignoring that
>>>> information and has to call lstat to get it.
>>>>
>>>> On Wed, Dec 20, 2017 at 11:32 AM, Peter Warrington <sothis...@gmail.com
>>>> > wrote:
>>>>
>>>>> Attached is a partial strace.
>>>>>
>>>>> On Wednesday, December 20, 2017 at 7:06:31 PM UTC, Colin Cross wrote:
>>>>>>
>>>>>> From the stack trace after ctrl-c, lunch will be waiting for the
>>>>>> child soong_ui process to complete.  An strace of that process would be
>>>>>> interesting.
>>>>>>
>>>>>> On Mon, Dec 18, 2017 at 4:12 PM, Alessandro Brucato <
>>>>>> ale13...@gmail.com> wrote:
>>>>>>
>>>>>>> This is the output of strace attached to the process in which I
>>>>>>> execute "lunch".
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <https://lh3.googleusercontent.com/-Rk-T1kCPUnA/WjhYORJYCKI/GSY/LIzqOc58jvkTpj7dowKqjz1OsKoAy0dZQCLcBGAs/s1600/strace.PNG>
>>>>>>>
>>>>>>> When "lunch" is stuck, the output of strace ends with "wait4(-1,".
>>>>>>> All the remaining part appears when I abort "lunch" with CTRL+C.
>>>>>>>
>>>>>>> Maybe this issue is due to the fact that I'm using a guest in
>>>>>>> Virtualbox?
>>>>>>>
>>>>>>> Il giorno lunedì 18 dicembre 2017 23:45:48 UTC+1, Colin Cross ha
>>>>>>> scritto:
>>>>>>>>
>>>>>>>> Can you capture the full output of all the stack traces?
>>>>>>>>
>>>>>>>> It's getting stuck while trying to walk all the checked-out code
>>>>>>>> looking for various build files.  If it was completely deadlocked then 
>>>>>>>> it
>>>>>>>> would have died on its own, so it's probably stuck in a loop somehow.
>>>>>>>>
>>>>>>>> On Mon, Dec 18, 2017 at 8:12 AM, Alessandro Brucato <
>>>>>>>> ale13...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hello, I'm trying to build the Android source code for my Hikey
>>>>>>>>> 960 board.
>>>>>>>>> I'm following this video tutorial https://www.youtube.c
>>>>>>>>> om/watch?v=RD_NZRKiZBU in parallel to the official Android guide
>>>>>>>>> https://source.android.com/setup/devices#hikey-boards.
>>>>>>>>>
>>>>>>>>>

Re: [android-building] No response after “lunch" command

2017-12-20 Thread Colin Cross
Nothing looks wrong in that strace, it is making forward progress.  It
needs to read every directory and stat every file in the tree, is your
filesystem very slow for some reason?

One difference I see between the old implementation using the find tool and
the new implementation is that find seems to be able to avoiding calling
stat on every directory entry, because the relevant information (whether
the entry is a subdirectory or a file) is contained in the return from the
getdents64 syscall.  The Go implementation is ignoring that information and
has to call lstat to get it.

On Wed, Dec 20, 2017 at 11:32 AM, Peter Warrington <sothisispe...@gmail.com>
wrote:

> Attached is a partial strace.
>
> On Wednesday, December 20, 2017 at 7:06:31 PM UTC, Colin Cross wrote:
>>
>> From the stack trace after ctrl-c, lunch will be waiting for the child
>> soong_ui process to complete.  An strace of that process would be
>> interesting.
>>
>> On Mon, Dec 18, 2017 at 4:12 PM, Alessandro Brucato <ale13...@gmail.com>
>> wrote:
>>
>>> This is the output of strace attached to the process in which I execute
>>> "lunch".
>>>
>>>
>>>
>>> <https://lh3.googleusercontent.com/-Rk-T1kCPUnA/WjhYORJYCKI/GSY/LIzqOc58jvkTpj7dowKqjz1OsKoAy0dZQCLcBGAs/s1600/strace.PNG>
>>>
>>> When "lunch" is stuck, the output of strace ends with "wait4(-1,". All
>>> the remaining part appears when I abort "lunch" with CTRL+C.
>>>
>>> Maybe this issue is due to the fact that I'm using a guest in Virtualbox?
>>>
>>> Il giorno lunedì 18 dicembre 2017 23:45:48 UTC+1, Colin Cross ha scritto:
>>>>
>>>> Can you capture the full output of all the stack traces?
>>>>
>>>> It's getting stuck while trying to walk all the checked-out code
>>>> looking for various build files.  If it was completely deadlocked then it
>>>> would have died on its own, so it's probably stuck in a loop somehow.
>>>>
>>>> On Mon, Dec 18, 2017 at 8:12 AM, Alessandro Brucato <ale13...@gmail.com
>>>> > wrote:
>>>>
>>>>> Hello, I'm trying to build the Android source code for my Hikey 960
>>>>> board.
>>>>> I'm following this video tutorial https://www.youtube.c
>>>>> om/watch?v=RD_NZRKiZBU in parallel to the official Android guide
>>>>> https://source.android.com/setup/devices#hikey-boards.
>>>>>
>>>>>
>>>>> Everything went fine until I reached the command "lunch
>>>>> hikey960-userdebug". It blocks, without returning any output. I left it
>>>>> "working" for 1 hour and then I aborted it (even if I know that this
>>>>> command should take few seconds). If I execute only "lunch" it shows the
>>>>> list of available build targets, and when I select "hikey960-userdebug" it
>>>>> blocks. When I abort it with CTRL+C, it says "Still alive, killing
>>>>> subprocesses" and then it shows a lot of messages referring to threads.
>>>>> Here is the screenshot https://ibb.co/k32KQR
>>>>> I noticed that also the "make" command (inside the AOSP directory) has
>>>>> the same behaviour.
>>>>>
>>>>>
>>>>> This is the list of commands I've used during the process:
>>>>>
>>>>>
>>>>> sudo apt-get install openjdk-7-jdk
>>>>>
>>>>> sudo apt-get install git-core gnupg flex bison gperf build-essential
>>>>> zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386
>>>>> lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache
>>>>> libgl1-mesa-dev libxml2-utils xsltproc unzip
>>>>>
>>>>> mkdir output
>>>>>
>>>>> export OUT_DIR_COMMON_BASE=/home/brucedh/output/
>>>>>
>>>>> mkdir ~/bin
>>>>>
>>>>> PATH=~/bin:$PATH
>>>>>
>>>>> curl https://storage.googleapis.com/git-repo-downloads/repo >
>>>>> ~/bin/repo
>>>>>
>>>>> chmod a+x ~/bin/repo
>>>>>
>>>>> mkdir dev
>>>>>
>>>>> cd dev
>>>>>
>>>>> mkdir hikey960
>>>>>
>>>>> cd hikey960
>>>>>
>>>>> git config --global user.name ""
>>>>>
>>>>> git config --

Re: [android-building] No response after “lunch" command

2017-12-20 Thread Colin Cross
>From the stack trace after ctrl-c, lunch will be waiting for the child
soong_ui process to complete.  An strace of that process would be
interesting.

On Mon, Dec 18, 2017 at 4:12 PM, Alessandro Brucato <ale13br...@gmail.com>
wrote:

> This is the output of strace attached to the process in which I execute
> "lunch".
>
>
>
> <https://lh3.googleusercontent.com/-Rk-T1kCPUnA/WjhYORJYCKI/GSY/LIzqOc58jvkTpj7dowKqjz1OsKoAy0dZQCLcBGAs/s1600/strace.PNG>
>
> When "lunch" is stuck, the output of strace ends with "wait4(-1,". All the
> remaining part appears when I abort "lunch" with CTRL+C.
>
> Maybe this issue is due to the fact that I'm using a guest in Virtualbox?
>
> Il giorno lunedì 18 dicembre 2017 23:45:48 UTC+1, Colin Cross ha scritto:
>>
>> Can you capture the full output of all the stack traces?
>>
>> It's getting stuck while trying to walk all the checked-out code looking
>> for various build files.  If it was completely deadlocked then it would
>> have died on its own, so it's probably stuck in a loop somehow.
>>
>> On Mon, Dec 18, 2017 at 8:12 AM, Alessandro Brucato <ale13...@gmail.com>
>> wrote:
>>
>>> Hello, I'm trying to build the Android source code for my Hikey 960
>>> board.
>>> I'm following this video tutorial https://www.youtube.c
>>> om/watch?v=RD_NZRKiZBU in parallel to the official Android guide
>>> https://source.android.com/setup/devices#hikey-boards.
>>>
>>>
>>> Everything went fine until I reached the command "lunch
>>> hikey960-userdebug". It blocks, without returning any output. I left it
>>> "working" for 1 hour and then I aborted it (even if I know that this
>>> command should take few seconds). If I execute only "lunch" it shows the
>>> list of available build targets, and when I select "hikey960-userdebug" it
>>> blocks. When I abort it with CTRL+C, it says "Still alive, killing
>>> subprocesses" and then it shows a lot of messages referring to threads.
>>> Here is the screenshot https://ibb.co/k32KQR
>>> I noticed that also the "make" command (inside the AOSP directory) has
>>> the same behaviour.
>>>
>>>
>>> This is the list of commands I've used during the process:
>>>
>>>
>>> sudo apt-get install openjdk-7-jdk
>>>
>>> sudo apt-get install git-core gnupg flex bison gperf build-essential zip
>>> curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev
>>> x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev
>>> libxml2-utils xsltproc unzip
>>>
>>> mkdir output
>>>
>>> export OUT_DIR_COMMON_BASE=/home/brucedh/output/
>>>
>>> mkdir ~/bin
>>>
>>> PATH=~/bin:$PATH
>>>
>>> curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
>>>
>>> chmod a+x ~/bin/repo
>>>
>>> mkdir dev
>>>
>>> cd dev
>>>
>>> mkdir hikey960
>>>
>>> cd hikey960
>>>
>>> git config --global user.name ""
>>>
>>> git config --global user.email ""
>>>
>>> repo init -u https://android.googlesource.com/platform/manifest -b
>>> master
>>>
>>> repo sync –j4
>>>
>>> git clone https://android.googlesource.com/kernel/hikey-linaro
>>>
>>> cd hikey-linaro
>>>
>>> git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9
>>>
>>> make ARCH=arm64 menuconfig
>>>
>>> make ARCH=arm64 hikey960_defconfig
>>>
>>> PATH=/home/brucedh/dev/hikey960/prebuilts/gcc/linux-x86/
>>> aarch64/aarch64-linux-android-4.9/bin/:$PATH
>>>
>>> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j4
>>>
>>> cp arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb
>>> ../device/linaro/hikey-kernel/hi3660-hikey960.dtb-4.9
>>>
>>> cp arch/arm64/boot/Image.gz ../device/linaro/hikey-kernel/
>>> Image.gz-hikey960-4.9
>>>
>>> cd ~/dev/hikey960
>>>
>>> . ./build/envsetup.sh
>>>
>>> lunch hikey960-userdebug
>>>
>>>
>>>
>>> I'm using Ubuntu 16.04 LTS as guest on Virtualbox. I tried to do all the
>>> process once again from the beginning with a new virtualbox image, but I
>>> found the same problem.
>>>
>>> Thanks in advance!
>>>
>>

Re: [android-building] No response after “lunch" command

2017-12-20 Thread Colin Cross
There will be at least one goroutine with a different stack.  Can you
capture the full log and put it somewhere I can see?

On Tue, Dec 19, 2017 at 9:29 AM, Peter Warrington <sothisispe...@gmail.com>
wrote:

> Hello, I've had this same problem building for a different target too.
> When I press ctrl+c to exit I got the following output repeated:
>
> goroutine 6171 [chan send]:
> android/soong/finder.(*semaphore).Lock(...)
> build/soong/finder/finder.go:589
> android/soong/finder.(*threadPool).Run.func1(0xc4200f0500, 0xc420f5e720)
> build/soong/finder/finder.go:626 +0x41
> created by android/soong/finder.(*threadPool).Run
> build/soong/finder/finder.go:625 +0x62
>
> This seems to suggest that it is having trouble finding the files on my
> external HDD. A workaround of this in theory would be to disable "Soong"
> which replaces makefiles (See https://android.googlesource.
> com/platform/build/soong/) but I do not know if this is possible or how
> to do it.
>
> On Monday, December 18, 2017 at 10:45:48 PM UTC, Colin Cross wrote:
>>
>> Can you capture the full output of all the stack traces?
>>
>> It's getting stuck while trying to walk all the checked-out code looking
>> for various build files.  If it was completely deadlocked then it would
>> have died on its own, so it's probably stuck in a loop somehow.
>>
>> On Mon, Dec 18, 2017 at 8:12 AM, Alessandro Brucato <ale13...@gmail.com>
>> wrote:
>>
>>> Hello, I'm trying to build the Android source code for my Hikey 960
>>> board.
>>> I'm following this video tutorial https://www.youtube.c
>>> om/watch?v=RD_NZRKiZBU in parallel to the official Android guide
>>> https://source.android.com/setup/devices#hikey-boards.
>>>
>>>
>>> Everything went fine until I reached the command "lunch
>>> hikey960-userdebug". It blocks, without returning any output. I left it
>>> "working" for 1 hour and then I aborted it (even if I know that this
>>> command should take few seconds). If I execute only "lunch" it shows the
>>> list of available build targets, and when I select "hikey960-userdebug" it
>>> blocks. When I abort it with CTRL+C, it says "Still alive, killing
>>> subprocesses" and then it shows a lot of messages referring to threads.
>>> Here is the screenshot https://ibb.co/k32KQR
>>> I noticed that also the "make" command (inside the AOSP directory) has
>>> the same behaviour.
>>>
>>>
>>> This is the list of commands I've used during the process:
>>>
>>>
>>> sudo apt-get install openjdk-7-jdk
>>>
>>> sudo apt-get install git-core gnupg flex bison gperf build-essential zip
>>> curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev
>>> x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev
>>> libxml2-utils xsltproc unzip
>>>
>>> mkdir output
>>>
>>> export OUT_DIR_COMMON_BASE=/home/brucedh/output/
>>>
>>> mkdir ~/bin
>>>
>>> PATH=~/bin:$PATH
>>>
>>> curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
>>>
>>> chmod a+x ~/bin/repo
>>>
>>> mkdir dev
>>>
>>> cd dev
>>>
>>> mkdir hikey960
>>>
>>> cd hikey960
>>>
>>> git config --global user.name ""
>>>
>>> git config --global user.email ""
>>>
>>> repo init -u https://android.googlesource.com/platform/manifest -b
>>> master
>>>
>>> repo sync –j4
>>>
>>> git clone https://android.googlesource.com/kernel/hikey-linaro
>>>
>>> cd hikey-linaro
>>>
>>> git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9
>>>
>>> make ARCH=arm64 menuconfig
>>>
>>> make ARCH=arm64 hikey960_defconfig
>>>
>>> PATH=/home/brucedh/dev/hikey960/prebuilts/gcc/linux-x86/
>>> aarch64/aarch64-linux-android-4.9/bin/:$PATH
>>>
>>> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j4
>>>
>>> cp arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb
>>> ../device/linaro/hikey-kernel/hi3660-hikey960.dtb-4.9
>>>
>>> cp arch/arm64/boot/Image.gz ../device/linaro/hikey-kernel/
>>> Image.gz-hikey960-4.9
>>>
>>> cd ~/dev/hikey960
>>>
>>> . ./build/envsetup.sh
>>>
>>> lunch hikey960-userdebug
>>>
>>>
>>>
>

Re: [android-building] No response after “lunch" command

2017-12-18 Thread Colin Cross
Can you capture the full output of all the stack traces?

It's getting stuck while trying to walk all the checked-out code looking
for various build files.  If it was completely deadlocked then it would
have died on its own, so it's probably stuck in a loop somehow.

On Mon, Dec 18, 2017 at 8:12 AM, Alessandro Brucato 
wrote:

> Hello, I'm trying to build the Android source code for my Hikey 960 board.
> I'm following this video tutorial https://www.youtube.
> com/watch?v=RD_NZRKiZBU in parallel to the official Android guide
> https://source.android.com/setup/devices#hikey-boards.
>
>
> Everything went fine until I reached the command "lunch
> hikey960-userdebug". It blocks, without returning any output. I left it
> "working" for 1 hour and then I aborted it (even if I know that this
> command should take few seconds). If I execute only "lunch" it shows the
> list of available build targets, and when I select "hikey960-userdebug" it
> blocks. When I abort it with CTRL+C, it says "Still alive, killing
> subprocesses" and then it shows a lot of messages referring to threads.
> Here is the screenshot https://ibb.co/k32KQR
> I noticed that also the "make" command (inside the AOSP directory) has the
> same behaviour.
>
>
> This is the list of commands I've used during the process:
>
>
> sudo apt-get install openjdk-7-jdk
>
> sudo apt-get install git-core gnupg flex bison gperf build-essential zip
> curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev
> x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev
> libxml2-utils xsltproc unzip
>
> mkdir output
>
> export OUT_DIR_COMMON_BASE=/home/brucedh/output/
>
> mkdir ~/bin
>
> PATH=~/bin:$PATH
>
> curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
>
> chmod a+x ~/bin/repo
>
> mkdir dev
>
> cd dev
>
> mkdir hikey960
>
> cd hikey960
>
> git config --global user.name ""
>
> git config --global user.email ""
>
> repo init -u https://android.googlesource.com/platform/manifest -b master
>
> repo sync –j4
>
> git clone https://android.googlesource.com/kernel/hikey-linaro
>
> cd hikey-linaro
>
> git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9
>
> make ARCH=arm64 menuconfig
>
> make ARCH=arm64 hikey960_defconfig
>
> PATH=/home/brucedh/dev/hikey960/prebuilts/gcc/linux-
> x86/aarch64/aarch64-linux-android-4.9/bin/:$PATH
>
> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j4
>
> cp arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb
> ../device/linaro/hikey-kernel/hi3660-hikey960.dtb-4.9
>
> cp arch/arm64/boot/Image.gz ../device/linaro/hikey-kernel/
> Image.gz-hikey960-4.9
>
> cd ~/dev/hikey960
>
> . ./build/envsetup.sh
>
> lunch hikey960-userdebug
>
>
>
> I'm using Ubuntu 16.04 LTS as guest on Virtualbox. I tried to do all the
> process once again from the beginning with a new virtualbox image, but I
> found the same problem.
>
> Thanks in advance!
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: Soong confusion

2017-12-12 Thread Colin Cross
On Mon, Dec 11, 2017 at 1:50 PM, Jacob Abrams  wrote:

> Hello,
>
> I would like to voice protest over the AOSP build system switch from Make
> to Soong. Make is not a perfect tool but it is well documented and
> extremely stable. The introduction of ninja into AOSP was seamless and
> acceptable. However, migrating away from Make to a totally new tool with
> zero history is a serious set back. Why not instead choose Bazel, Tup,
> Gradle, Buck or simply stick with what works?
>
> I read the following statements from one of the developers of Soong build:
>
> > 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 parts to use at runtime.
>
> It is unclear what is meant by "reduce the number of different ways we
> build modules.", nor is it clear what is meant by "We would much rather
> compiling everything the same on all devices". This seems to conflict with
> the example of LLVM where the build basically consists of completely custom
> go code: https://android.googlesource.com/platform/external/llvm/+/
> master/soong/llvm.go
>
> Clearly this custom go code does not reduce the number of different ways
> modules are built.
>

Some teams have existing flows where they want to locally modify the way
they build, and we've supported those through the custom go code for those
modules.  In general we still try to avoid them.


> I assume this is an attempt to improve build performance yet again, but it
> ends up wasting thousands of engineering hours across the globe. Engineers
> must figure out a new system that likely contains numerous bugs and could
> possibly be destined for the dustbin if it is not maintained properly or
> turns out to be inferior. If the goal is to improve build performance
> perhaps Google engineers could explore an under-the-hood contribution to
> Make itself?
>

As Glenn pointed out, the purpose for Soong is not primarily performance,
it is correctness and reliability.  Before Soong (and the conversion to
Ninja was part of Soong), incremental builds were completely unreliable,
requiring significant knowledge of the internals of the Android build for
platform developers to get anything done.  Wiping the entire output
directory and rebuilding was common.  Incremental builds are now reliable
enough to be used in our continuous build infrastructure.

Debugging typos in Android.mk files was also very painful.  LOCAL_CFALGS
instead of LOCAL_CFLAGS gets silently ignored, deleting a module that still
has users doesn't break incremental builds but breaks clean builds,
overwriting variables that are being used by other modules, subtle
differences between := and =, or ifdef blah and ifneq(,$(blah)).  All of
these problems are fundamental to the way that Make works and can't be
fixed.

We've explored various options with Make (for a while we had a modified
version of Make that would cache its build rules).  The conversion to Ninja
(and all of the speed and reliability improvements that came with it) was
done by using Kati instead of Make, and we've continued to invest in new
features there.  But most of the improvements have come from moving the
very complex build code out of the terrible Make language and into a high
level, maintainable, testable language.

Android is mature; it deserves a mature build system.
>
> Jacob Abrams
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


On Mon, Dec 11, 2017 at 1:50 PM, Jacob Abrams  wrote:

> Hello,
>
> I would like to voice protest over the AOSP build system switch from Make
> to Soong. Make is not a perfect tool but it is well documented and
> extremely stable. The introduction of ninja into AOSP was seamless and
> acceptable. However, migrating away from Make to a totally new tool with
> zero history is a serious set back. Why not instead choose Bazel, Tup,
> Gradle, Buck or simply stick with what works?
>
> I read the following statements from one of the developers of Soong build:
>
> > 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
> > 

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

2017-11-28 Thread Colin Cross
You have a mismatched sources in build/soong and external/clang, rerun repo
sync and make sure there are no errors.

On Mon, Nov 27, 2017 at 2:41 AM,  wrote:

> Hi Lou,
> Following your steps, I met this error when I using the
> external/clang/build.py.  I just wonder if there is some prerequisite for
> the building? Or I had made some mistake?
> 在此输入代码...ninja: no work to do.
> [1/2] soong_build docs out/stage1/soong/.bootstrap/docs/soong_build.html
> FAILED: out/stage1/soong/.bootstrap/docs/soong_build.html
> out/stage1/soong/.bootstrap/bin/soong_build -t -l
> out/stage1/.module_paths/Android.bp.list -b out/stage1/soong --docs
> out/stage1/soong/.bootstrap/docs/soong_build.html ./Android.bp
> error: external/clang/tools/driver/Android.bp:3:1: module "clang":
> target.host.compile_multilib: mismatched types *string and string
> error: external/clang/tools/clang-format/Android.bp:3:1: module
> "clang-format": target.host.compile_multilib: mismatched types *string and
> string
> error: external/clang/tools/clang-check/Android.bp:3:1: module
> "clang-check": target.host.compile_multilib: mismatched types *string and
> string
> [2/2] out/stage1/soong/.bootstrap/bin/soong_build
> out/stage1/soong/build.ninja
> FAILED: out/stage1/soong/build.ninja
> out/stage1/soong/.bootstrap/bin/soong_build -t -l
> out/stage1/.module_paths/Android.bp.list -b out/stage1/soong -n
> out/stage1 -d out/stage1/soong/build.ninja.d -o
> out/stage1/soong/build.ninja Android.bp
> error: external/clang/tools/clang-format/Android.bp:3:1: module
> "clang-format": target.host.compile_multilib: mismatched types *string and
> string
> error: external/clang/tools/driver/Android.bp:3:1: module "clang":
> target.host.compile_multilib: mismatched types *string and string
> error: external/clang/tools/clang-check/Android.bp:3:1: module
> "clang-check": target.host.compile_multilib: mismatched types *string and
> string
> ninja: build stopped: subcommand failed.
> 09:54:39 soong bootstrap failed with: exit status 1
> build/make/core/main.mk:21: recipe for target 'run_soong_ui' failed
> make: *** [run_soong_ui] Error 1
> Traceback (most recent call last):
>   File "external/clang/build.py", line 1077, in 
> main()
>   File "external/clang/build.py", line 1029, in main
> max_jobs=args.jobs, use_updated_version=False)
>   File "external/clang/build.py", line 202, in build
> max_jobs, use_updated_version, profile_task)
>   File "external/clang/build.py", line 265, in build_product
> cwd=android_path(), env=env)
>   File "external/clang/build.py", line 91, in check_call
> subprocess.check_call(cmd, *args, **kwargs)
>   File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['make', '-j28',
> 'clang-toolchain-minimal', 'clang-toolchain-full', 'llvm-tools']' returned
> non-zero exit status 2
>
>
>
>
>
> 在 2017年1月19日星期四 UTC+8上午5:02:17,Gagou Lou写道:
>
>> Hi all,
>>
>> I'm currently successfully building the clang toolchain under the NDK 10
>> under OSX.
>> But I'm a bit confused about how your building system is working...
>> (kati,ninja,soong, etc)
>>
>> As Clang rely on CMake, I was hoping to find the Clang configuration
>> command used by the NDK build system, but it seems more complicated...
>> After digging a bit in the *.mk files, it seems that you have a separated
>> build system which don't rely on the CMakefile contained in Clang sources.
>>
>> I'm currently using ./external/clang/build.py to build Clang toolchain.
>> The build process seems to do so many things. I mean, compiling Clang for
>> Linux or OSX is as simple as calling cmake with the right parameters
>> followed by make/ninja. But in the NDK, Clang compilation looks like so
>> complicated.
>>
>> So my questions are:
>> - How to generate a new Clang toolchain with my own Clang source code ?
>> - How the build system works in the NDK 10 ? What are all those
>> compilation (stage1, stage2, etc) simply for generating a Clang toolchain?
>> - Any hint where to start searching? (any documentation, files, etc)
>>
>> Thank you for your help,
>>
>> Gael
>>
>>
>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, 

Re: [android-building] Dependencies between Android.mk and Android.bp modules

2017-10-30 Thread Colin Cross
This is expected, Soong requires knowledge of all of its modules
dependencies.

On Mon, Oct 30, 2017 at 1:32 AM,  wrote:

> Hello,
>
> We are trying to create modules using BP that have dependencies to other
> modules defined in Android.mk.
>
> It seems that bp cannot link to the library (error: /Android.bp:4:1:
> "binaryinbp" depends on undefined module "libinmake"
>
> Is this expected behavior or some mistake on our side?
>
> Reproduction:
>
> Android.bp
> -
> cc_library_shared {
> name: "libinbp",
> }
>
> cc_binary {
> name: "binaryinbp",
> srcs: ["main.cpp"],
> shared_libs: [
> "libinbp",
> "libinmake"   // This is not possible, building gives error:
> binaryinbp" depends on undefined module "libinmake"
> ]
> }
>
>
>
> Android.mk
> -
> include $(CLEAR_VARS)
> LOCAL_MODULE := libinmake
> include $(BUILD_SHARED_LIBRARY)
>
> include $(CLEAR_VARS)
> LOCAL_SRC_FILES := main.cpp
> LOCAL_MODULE := binaryinmake
> LOCAL_SHARED_LIBRARIES := \
> libinmake \
> libinbp
> include $(BUILD_EXECUTABLE)
>
> Best regards,
> Krzysztof Wesolowski
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Error while building Android Source code

2017-10-27 Thread Colin Cross
The panicking function (android/soong/cc/config.setSdclangVars) doesn't
exist in our tree.

On Fri, Oct 27, 2017 at 2:08 AM, Alwin T Shaji 
wrote:

> Hi,
>
> I am trying to build Android O source code.
> But while building the source, I am getting the following error.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * 
> PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=8.0.0 TARGET_PRODUCT=msm8996
> TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_TYPE=release TARGET_ARCH=arm64
> TARGET_ARCH_VARIANT=armv8-a TARGET_CPU_VARIANT=generic TARGET_2ND_ARCH=arm
> TARGET_2ND_ARCH_VARIANT=armv7-a-neon TARGET_2ND_CPU_VARIANT=cortex-a9
> HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux
> HOST_OS_EXTRA=Linux-4.4.0-83-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=OPR6.170623.013 OUT_DIR=out
>  ninja: no work to do. [1/5]
> test android/soong/cc/config FAILED:
> out/soong/.bootstrap/soong-cc-config/test/test.passed
> out/soong/.bootstrap/bin/gotestrunner -p ./build/soong/cc/config -f
> out/soong/.bootstrap/soong-cc-config/test/test.passed --
> out/soong/.bootstrap/soong-cc-config/test/test -test.short panic: read
> /u/OCar: is a directory goroutine 1 [running]:
> android/soong/cc/config.setSdclangVars()
> /u/OCar/build/soong/cc/config/global.go:197 +0x20d4
> android/soong/cc/config.init.2()
> /u/OCar/build/soong/cc/config/global.go:169 +0xcc9
> android/soong/cc/config.init()
> /u/OCar/build/soong/cc/config/tidy_test.go:42 +0x3969 main.init()
> /u/OCar/out/soong/.bootstrap/soong-cc-config/test/test.go:34 +0x4e ninja:
> build stopped: subcommand failed. 14:23:49 soong bootstrap failed with:
> exit status 1 build/core/main.mk:21 : recipe for target
> 'run_soong_ui' failed make: *** [run_soong_ui] Error 1  make failed to
> build some targets   *
>
>
>
> Can anyone please help me in this.
>
> Thanks and Regards
> -Alwin
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] ERROR in building! clang.real: error: linker command failed with exit code 1

2017-10-25 Thread Colin Cross
There is a bad object in your ccache directory (specified with the
CCACHE_DIR environment variable), either look for 0 byte files in there and
remove them or wipe the whole thing.

On Wed, Oct 25, 2017 at 12:12 AM, Sanjay Shrestha 
wrote:

> [ 94% 77921/82366] target SharedLib: libldnhncr_32
> (/home/yaznas/validus/out/target/product/bullhead/obj_
> arm/SHARED_LIBRARIES/libldnhncr_intermediates/LINKED/libldnhncr.so)
> FAILED: /home/yaznas/validus/out/target/product/bullhead/obj_
> arm/SHARED_LIBRARIES/libldnhncr_intermediates/LINKED/libldnhncr.so
> /bin/bash -c "prebuilts/misc/linux-x86/ccache/ccache
> prebuilts/clang/host/linux-x86/clang-3859424/bin/clang++ -nostdlib
> -Wl,-soname,libldnhncr.so -Wl,--gc-sections -shared
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/lib/crtbegin_so.o
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/SHARED_LIBRARIES/
> libldnhncr_intermediates/EffectLoudnessEnhancer.o
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/SHARED_LIBRARIES/
> libldnhncr_intermediates/dsp/core/dynamic_range_compression.o
> -Wl,--whole-archive  -Wl,--no-whole-archive   /home/yaznas/validus/out/
> target/product/bullhead/obj_arm/STATIC_LIBRARIES/
> libunwind_llvm_intermediates/libunwind_llvm.a  /home/yaznas/validus/out/
> target/product/bullhead/obj_arm/STATIC_LIBRARIES/libcompiler_rt-extras_
> intermediates/libcompiler_rt-extras.a   /home/yaznas/validus/out/
> target/product/bullhead/obj_arm/STATIC_LIBRARIES/libatomic_intermediates/libatomic.a
> /home/yaznas/validus/out/target/product/bullhead/obj_
> arm/STATIC_LIBRARIES/libgcc_intermediates/libgcc.a -Wl,-z,noexecstack
> -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel
> -Wl,--fatal-warnings -Wl,--icf=safe -Wl,--hash-style=gnu
> -Wl,--no-undefined-version -Wl,--no-fix-cortex-a8   -target
> arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/
> arm-linux-androideabi-4.9/arm-linux-androideabi/bin
> -Wl,--exclude-libs,libunwind_llvm.a -Wl,--no-undefined
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/lib/libcutils.so
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/lib/liblog.so
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/lib/libc++.so
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/lib/libdl.so
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/lib/libc.so
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/lib/libm.so -o
> /home/yaznas/validus/out/target/product/bullhead/obj_arm/SHARED_LIBRARIES/
> libldnhncr_intermediates/LINKED/libldnhncr.so /home/yaznas/validus/out/
> target/product/bullhead/obj_arm/lib/crtend_so.o"
> prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin/ld:
> error: /home/yaznas/validus/out/target/product/bullhead/obj_
> arm/SHARED_LIBRARIES/libldnhncr_intermediates/EffectLoudnessEnhancer.o:
> file is empty
> prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin/ld:
> error: /home/yaznas/validus/out/target/product/bullhead/obj_
> arm/SHARED_LIBRARIES/libldnhncr_intermediates/dsp/core/dynamic_range_compression.o:
> file is empty
> clang.real: error: linker command failed with exit code 1 (use -v to see
> invocation)
> [ 94% 77922/82366] target SharedLib: libbundlewrapper_32
> (/home/yaznas/validus/out/target/product/bullhead/obj_
> arm/SHARED_LIBRARIES/libbundlewrapper_intermediates/LINKED/
> libbundlewrapper.so)
> [ 94% 77923/82366] target StaticExecutable: simpleperf_32
> (/home/yaznas/validus/out/target/product/bullhead/obj_
> arm/EXECUTABLES/simpleperf_intermediates/LINKED/simpleperf32)
> [ 94% 77924/82366] ld /home/yaznas/validus/out/soong/.intermediates/
> frameworks/compile/libbcc/bcinfo/libbcinfo/android_arm_
> armv7-a-neon_cortex-a53.a57_shared_core/libbcinfo.so
> [ 94% 77925/82366] ld /home/yaznas/validus/out/
> soong/.intermediates/external/llvm/libLLVM/android_arm64_
> armv8-a_cortex-a53_shared_core/libLLVM.so
> ninja: build stopped: subcommand failed.
> 12:39:57 ninja failed with: exit status 1
> make: *** [build/core/main.mk:21: run_soong_ui] Error 1
>
>
> This is the error im facing while trying to build for bullhead. Any
> solutions?
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this 

Re: [android-building] Help request to disable the obfuscation by build system

2017-10-16 Thread Colin Cross
Proguard is a whole program optimizer.  Your library is not being
obfuscated individually, it is being obfuscated as part of the entire
mmserver package.  You can disable proguard completely on mmserver using
LOCAL_PROGUARD_ENABLED := disabled above include $(BUILD_PACKAGE), or you
can try to find the right proguard flags to use with LOCAL_PROGUARD_FLAGS,
again above the include $(BUILD_PACKAGE).

On Mon, Oct 16, 2017 at 2:37 AM,  wrote:

> Hi Guys,
>
>
> We are trying to build our application using Android.mk and which has a
> jar dependency.
> The jar file is pre-build and needs to be kept unoptimized by build system
> to make it working.
>
> The problem we are facing here is, the jar file is getting obfuscated.
>
> Could you please provide a solution to disable the obfuscation in case of
> pre-build jar files?
>
> We tried many trials with proguard.flags and also followed the approaches
> by referring this https://android.googlesource.com/platform/
> build/+/7311a34%5E!/.
>
> For your reference, I am attaching the Android.mk.
>
> Please help us..
>
> Thanks,
>
>
> -Sreekanth
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] android-8.0.0_r12 build error on mac OS

2017-10-13 Thread Colin Cross
This is specifically a problem with intel's code, it is assuming that the
compiler targeting the machine doing the building can also be used to
target the device being built for.  That is true for a linux x86 build
machine targeting a linux x86 device, but it is not true for a mac build
machine.

On Fri, Oct 13, 2017 at 1:51 PM, Dean Wheatley 
wrote:

> I see a build error for android-8.0.0_r12 on mac OS
>
> [ 11% 1830/16140] target asm: 2ndbootloader.bin <=
> hardware/intel/bootstub/head.S
> FAILED: out/target/product//obj/EXECUTABLES/2ndbootloader.
> bin_intermediates/head.o
> /bin/bash -c "prebuilts/clang/host/darwin-x86/clang-3859424/bin/clang -I
> system/core/mkbootimg -I hardware/intel/bootstub -I
> out/target/product//obj/EXECUTABLES/2ndbootloader.bin_intermediates
> -I out/target/product//gen/EXECUTABLES/2ndbootloader.bin_intermediates
> -I libnativehelper/include/nativehelper \$(cat
> out/target/product//obj/EXECUTABLES/2ndbootloader.
> bin_intermediates/import_includes)  -I system/core/include -I
> system/media/audio/include -I hardware/libhardware/include -I
> hardware/libhardware_legacy/include -I hardware/ril/include -I
> libnativehelper/include -I frameworks/native/include -I
> frameworks/native/opengl/include -isystem frameworks/av/include -isystem
> out/target/product//obj/include -isystem 
> device/asus/fugu/kernel-headers
> -isystem bionic/libc/arch-x86/include -isystem bionic/libc/include -isystem
> bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-x86 -isystem
> bionic/libc/kernel/android/uapi -c  -m32 -ffreestanding -Wall -O1
> -DCMDLINE_SIZE=0x400 -DAOSP_HEADER_ADDRESS=0x10007800   -std=gnu99
> -DSTACK_OFFSET=0x10F0 -D__ASSEMBLY__ -MD -MF
> out/target/product//obj/EXECUTABLES/2ndbootloader.bin_intermediates/head.d
> -o 
> out/target/product//obj/EXECUTABLES/2ndbootloader.bin_intermediates/head.o
> hardware/intel/bootstub/head.S"
> hardware/intel/bootstub/head.S:59:10: error: mach-o section specifier
> uses an unknown section type
> .section ".text.head","ax",@progbits
>  ^
> [ 11% 1834/16140] build out/target/common/obj/JAVA_LIBRARIES/sdk_v15_
> intermediates/classes.jack
> ninja: build stopped: subcommand failed.
> 22:59:50 ninja failed with: exit status 1
> make: *** [run_soong_ui] Error 1
>
> I will attempt a build using prebuilts/clang/host/darwin-x86/ master
> branch instead, but I would like to know whether mac OS builds of the
> android-8.0.0* branches is supported.
>
> The build error points to http://llvm.org/doxygen/
> MCSectionMachO_8cpp_source.html line 232, but it's unclear to me what
> section type is needed.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] build/target/product/core.mk question

2017-10-13 Thread Colin Cross
No, you would delete that line completely.

On Fri, Oct 13, 2017 at 10:31 AM,  wrote:

> So if I wanted to build AOSP without the calculator would I edit the
> /build/target/product/core.mk to add a minus sign in front of
> "Calculator \"?
>
> For example:
>
> PRODUCT_PACKAGES += \
>BasicDreams \
>Browser \
> -  Calculator \
>
> Thanks!
>
> John
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> --- You received this message because you are subscribed to the Google
> Groups "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] How to build and use soong stand-alone?

2017-10-12 Thread Colin Cross
Soong isn't intended to be used standalone, it is tightly coupled to the
Android codebase.  You can use it on a subset of the Android codebase, for
example:

repo init -u https://android.googlesource.com/platform/manifest -b
build-tools
repo sync -j32
prebuilts/build-tools/build-prebuilts.sh

On Thu, Oct 12, 2017 at 11:15 AM, Hartmut Goebel <
h.goe...@crazy-compilers.com> wrote:

> Hallo,
>
> I'm going to build the Android platform-tools as stand-alone packages
> for a Linux-distribution (GuisSD). For this it seems to make sense to
> switch to the new soong-based build system.
>
> 1. How to I build soong without installing a full-blown Android build
> environment?
> 2. How to install soong to be used outside the Android build environment?
> 3. How to use soong without or outside the Android build environment?
>
>
> Re. 1.: I managed to start bootstrapping soong as follows:
>
> mkdir /tmp/sing-song/
> cd /tmp/sing-song/
>
> cp -r /tmp/soong-8.0.0_r17-checkout source
> cd source/
>
> mkdir build
> ln -s .. build/soong
> cp -r /tmp/blueprint-8.0.0_r17-checkout/ build/blueprint
>
> cd ..
> $PWD/source/bootstrap.bash
>
> This will give me
>   .blueprint.bootstrap
>   .bootstrap/
>   .minibootstrap/
>   soong -> /tmp/foo/source/build/soong/soong.bash
>   .soong.bootstrap
>
> Now when I run ./soong I get these errors:
>
> error: Android.bp:13:9: "androidmk/Blueprints": not found
> error: Android.bp:13:9: "cmd/*/Blueprints": not found
> error: Android.bp:13:9: "third_party/zip/Blueprints": not found
> error: Android.bp:13:9: "ui/*/Blueprints": not found
> ninja: error: rebuilding '/tmp/sing-song/.minibootstrap/build.ninja':
> subcommand failed
>
>
>
> Re 2.: Both soong and soong_ui are bash-scripts, checking if a new
> version needs to be bootstrapped – which will never be the case if they
> are installed vi some Linux package management. So how can these be
> installed into e.g. /usr/bin? How to make these scripts to *not* try to
> bootstrap soong?
>
> Re. 3: How is soong meant to be used? Unfortunately there is not even a
> short usage-instruction in the archive :-(
>
> Thanks in advance for any tips.
>
>
> --
> Regards
> Hartmut Goebel
>
> | Hartmut Goebel  | h.goe...@crazy-compilers.com   |
> | www.crazy-compilers.com | compilers which you thought are impossible |
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] classes.dex missing. Needed by junit.

2017-10-05 Thread Colin Cross
Your source tree is not checked out correctly, you have a pre-5.0 version
of at least external/junit.  Try repo sync -l and see if it shows any
errors.

On Wed, Oct 4, 2017 at 9:35 AM, Filipe Laíns  wrote:

>
> Building AOSP android-8.0.0_r17.
>
> ninja: error: 'out/target/common/obj/JAVA_LIBRARIES/core_intermediates/
> classes.dex.toc', needed by 'out/target/common/obj/JAVA_
> LIBRARIES/core-junit_intermediates/with-local/classes.dex', missing and no
> known rule to make it
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] How to modify LOCAL_SRC_FILES := ../../ in Android.bp

2017-10-01 Thread Colin Cross
If the source files are logically part of the module, move your Android.bp
file into the top directory that contains all the source files.  If you are
using source files from another module, export them from that module using
a filegroup module:

filegroup {
name: "my_exported_sources",
srcs: ["a.c", "b.c"],
}

And then in your module that was using ../.., use:
srcs: [
"my_local_srcs.c",
":my_exported_sources",
]

On Fri, Sep 29, 2017 at 9:51 PM, oanh le  wrote:

> Dear all,
> Android.mk support back directory
>
> LOCAL_SRC_FILES := ../../
>
> How to make it in Android.bp
>
> Thank you
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: Problems building android-8.0.0_r4 branch

2017-09-25 Thread Colin Cross
It is somewhat ironic that unicode support sources fail to build because of
unicode issues.

On my AOSP master build:
$ echo $LANG
en_US.UTF-8
$ file
out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src/android/icu/lang/UCharacterCategory.java
out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src/android/icu/lang/UCharacterCategory.java:
UTF-8 Unicode text
$ file
out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src/android/nfc/FormatException.java
out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src/android/nfc/FormatException.java:
ASCII text

Have you tried regenerating those files after setting LANG?
$ export LANG=en_US.UTF-8
$ rm
-rf 
out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates
$ m

On Mon, Sep 25, 2017 at 8:26 AM,  wrote:

> bump. I have encountered exactly the same issue. The files in question are
> located in " out/target/common/obj/JAVA_LIBRARIES/android_system_
> stubs_current_intermediates/src/android/icu/" (all files in 4 folders
> called: "lang", "math", "text" and "util"). They all seem to be stub
> classes generated by the build. Running file -i {path_to_filename} reveals
> that their character encoding is "iso-8859-1" which has problem with the
> unicode copywrite symbol. I have changed the locale of my linux system to
> en_US.utf8 which unfortunately has not helped. I am building on a Linux
> Virtual Machine if that's of any help.
>
>
> On Wednesday, September 6, 2017 at 5:58:50 PM UTC+1, Sean Hicks wrote:
>>
>> I'm trying to build the AOSP (Oreo) for the Nexus 5x. I am building on
>> Ubuntu 14.04.
>>
>>
>> I went to https://source.android.com/source/requirements and installed
>> all of the requirements. I even uninstalled my version of OpenJDK8 (161) in
>> favor of the 45 version on the site. By using sudo update-alternatives
>> --all, I made sure all of my java related commands point to this version of
>> java 8.
>>
>>
>> I got the binary preview blobs from https://developers.google
>> .com/android/blobs-preview and untar'd/ran after getting the AOSP.
>>
>>
>> From the build numbers page https://source.android.co
>> m/source/build-numbers I found the build for the nexus 5X is
>> OPR6.170623.013, corresponding to branch android-8.0.0_r4.
>>
>>
>> So, I repo init -b android-8.0.0_r4, followed by a repo sync, followed by
>> extracting my binary images (which placed them in vendor, as expected).
>> Then I did a lunch, selecting aosp-bullhead-userdebug (option 25), and then
>> make -j8.
>>
>>
>> After over an hour of building, the build fails (81 errors) on many of
>> the java files with the following error.
>>
>>
>> "error: unmappable character encoding for UTF-8 // ? 2016 and later:
>> Unicode, Inc. and others."
>>
>>
>> Does anyone know how I can resolve this build error?
>>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] How to use LOCAL_CC in Android.bp?

2017-09-16 Thread Colin Cross
This is not yet supported.  What is your use case for it?

On Fri, Sep 15, 2017 at 7:41 PM,  wrote:

> Hi everybody,
>
>   I want use LOCAL_CC in Android.bp, is there anyone know how to do this?
>
> Thanks!
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Soong: Is it possible to read a conditional variable/feature flag defined in a device.mk file?

2017-09-14 Thread Colin Cross
It needs to be plumbed through to soong using build/make/core/
soong_config.mk and build/soong/android/variable.go.

On Thu, Sep 14, 2017 at 1:56 PM, Michael Lekman 
wrote:

> Hello,
>
> Is it possible to access a feature flag set in a device setup mk file.
>
> For example:
> https://android.googlesource.com/device/lge/bullhead/+/
> master/device.mk#297
>
> TARGET_USES_NANOHUB_SENSORHAL
>
> Can we access it in a go file?
> if ctx.AConfig().IsEnvTrue("TARGET_USES_NANOHUB_SENSORHAL") { cflags =
> append(cflags, "-DTARGET_USES_NANOHUB_SENSORHAL") }
>
> I am trying to add a define and add a shared lib in my Android.bp file
> that are dependent on a conditional feature flag.
>
> BR
> /Michael
>
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: SOONG - cc_prebuilt_library_shared

2017-09-13 Thread Colin Cross
Oh, missed that, we don't currently have a way to vary the prebuilt based
on TARGET_BUILD_VARIANT.  What's the use case for it?

Try adding strip: none to turn off stripping.

On Wed, Sep 13, 2017 at 1:29 AM, Michael Lekman 
wrote:

> What is the requirements on prebuilt libraries?
>
> Symbols are missing and it breaks the build:
>
>  target Strip (mini debug info): libmytest (out/target/product/mytest/
> obj/lib/libmytest.so)
> 
> prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-
> 4.9/bin/aarch64-linux-android-nm: out/target/product/mytest/
> symbols/system/lib64/libmytest.so: no symbols
>
>
> Are debug symbols mandatory for prebuilt libs?
>
>
> On Tuesday, 12 September 2017 23:09:15 UTC+2, Michael Lekman wrote:
>>
>> What is the recommended way to set src file path to prebuilt libs? There
>> are different libs for target variants.
>>
>> Android.mk file:
>> LOCAL_PATH := $(call my-dir)
>>
>> PREBUILT_PATH := prebuilts/$(TARGET_BUILD_VARIANT)
>> PREBUILT_SYSTEM_PATH := $(PREBUILT_PATH)/system
>> PREBUILT_SYSTEM_BIN_PATH := = $(PREBUILT_SYSTEM_PATH)/lib
>> PREBUILT_SYSTEM_LIB64_PATH := $(PREBUILT_SYSTEM_PATH)/lib64
>>
>> include $(CLEAR_VARS)
>> LOCAL_MODULE := libmytest
>> LOCAL_MODULE_TAGS   := optional
>> LOCAL_MODULE_CLASS  := SHARED_LIBRARIES
>> LOCAL_MODULE_SUFFIX := .so
>> LOCAL_MULTILIB  := both
>> LOCAL_SRC_FILES_32 := $(PREBUILT_SYSTEM_LIB32_PATH)/
>> $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
>> LOCAL_SRC_FILES_64 := $(PREBUILT_SYSTEM_LIB64_PATH)/
>> $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
>> LOCAL_SHARED_LIBRARIES := liblog libutils libcutils libbase libpcrecpp
>> include $(BUILD_PREBUILT)
>>
>>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: SOONG - cc_prebuilt_library_shared

2017-09-13 Thread Colin Cross
Correction:
strip: {
none: true,
}

On Wed, Sep 13, 2017 at 10:14 AM, Colin Cross <ccr...@android.com> wrote:

> Oh, missed that, we don't currently have a way to vary the prebuilt based
> on TARGET_BUILD_VARIANT.  What's the use case for it?
>
> Try adding strip: none to turn off stripping.
>
> On Wed, Sep 13, 2017 at 1:29 AM, Michael Lekman <michael.lek...@gmail.com>
> wrote:
>
>> What is the requirements on prebuilt libraries?
>>
>> Symbols are missing and it breaks the build:
>>
>>  target Strip (mini debug info): libmytest (out/target/product/mytest/obj
>> /lib/libmytest.so)
>> 
>> prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-nm:
>> out/target/product/mytest/symbols/system/lib64/libmytest.so: no symbols
>>
>>
>> Are debug symbols mandatory for prebuilt libs?
>>
>>
>> On Tuesday, 12 September 2017 23:09:15 UTC+2, Michael Lekman wrote:
>>>
>>> What is the recommended way to set src file path to prebuilt libs? There
>>> are different libs for target variants.
>>>
>>> Android.mk file:
>>> LOCAL_PATH := $(call my-dir)
>>>
>>> PREBUILT_PATH := prebuilts/$(TARGET_BUILD_VARIANT)
>>> PREBUILT_SYSTEM_PATH := $(PREBUILT_PATH)/system
>>> PREBUILT_SYSTEM_BIN_PATH := = $(PREBUILT_SYSTEM_PATH)/lib
>>> PREBUILT_SYSTEM_LIB64_PATH := $(PREBUILT_SYSTEM_PATH)/lib64
>>>
>>> include $(CLEAR_VARS)
>>> LOCAL_MODULE := libmytest
>>> LOCAL_MODULE_TAGS   := optional
>>> LOCAL_MODULE_CLASS  := SHARED_LIBRARIES
>>> LOCAL_MODULE_SUFFIX := .so
>>> LOCAL_MULTILIB  := both
>>> LOCAL_SRC_FILES_32 := $(PREBUILT_SYSTEM_LIB32_PATH)/
>>> $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
>>> LOCAL_SRC_FILES_64 := $(PREBUILT_SYSTEM_LIB64_PATH)/
>>> $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
>>> LOCAL_SHARED_LIBRARIES := liblog libutils libcutils libbase libpcrecpp
>>> include $(BUILD_PREBUILT)
>>>
>>>
>> --
>> --
>> You received this message because you are subscribed to the "Android
>> Building" mailing list.
>> To post to this group, send email to android-building@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-building+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to android-building+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 <= frameworks/base/tools/aapt/Main.cpp
> FAILED: out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/Main.o
> .
> .
> .
> ccache: failed to create /ccache/.ccache (No such file or directory)
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2017-09-12 Thread Colin Cross
Java support for soong is still a work in progress and not ready for wide
use yet.

On Tue, Sep 12, 2017 at 10:37 AM, Michael Lekman <michael.lek...@gmail.com>
wrote:

> Thanks.
>
> It didn't translate LOCAL_RESOURCE_DIR and LOCAL_MANIFEST_FILE. Are they
> not supported anymore?
>
>
> On Tuesday, 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 <michael...@gmail.com>
>> 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 converted using
>>> androidmk.
>>>
>>>
>>> include $(CLEAR_VARS)
>>> LOCAL_MODULE := libmysharedlib
>>> LOCAL_SRC_FILES := \
>>> file.cpp \
>>> $(call all-Iaidl-files-under, api)
>>> LOCAL_CPPFLAGS := -std=gnu++11 -Wall
>>> LOCAL_C_INCLUDES += \
>>>  $(LOCAL_PATH) \
>>>  external/rapidjson/include
>>> LOCAL_LDFLAGS := -llog
>>> LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
>>> LOCAL_MULTILIB := both
>>> LOCAL_SHARED_LIBRARIES := \
>>> liblog \
>>> libbinder \
>>> libutils \
>>> libpowermanager \
>>>
>>> LOCAL_STATIC_LIBRARIES := libcutils
>>> LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/api
>>>
>>> include $(BUILD_SHARED_LIBRARY)
>>>
>>> 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
>>> Clang SA is not enabled
>>> error: vendor/my-shared-lib/Android.bp:38:18: unrecognized property
>>> "aidl_includes"
>>> error: vendor/my-shared-lib/Android.bp:74:18: unrecognized property
>>> "aidl_includes"
>>> ninja: build stopped: subcommand failed.
>>> 13:59:19 soong bootstrap failed with: exit status 1
>>> make: *** [run_soong_ui] Error 1
>>>
>>> BR
>>> /Michael
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-buildi...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-buildi...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 12, 2017 at 1:56 PM, Michael Lekman 
wrote:

> What is the recommended way to set src file path to prebuilt libs? There
> are different libs for target variants.
>
> Android.mk file:
> LOCAL_PATH := $(call my-dir)
>
> PREBUILT_PATH := prebuilts/$(TARGET_BUILD_VARIANT)
> PREBUILT_SYSTEM_PATH := $(PREBUILT_PATH)/system
> PREBUILT_SYSTEM_BIN_PATH := = $(PREBUILT_SYSTEM_PATH)/lib
> PREBUILT_SYSTEM_LIB64_PATH := $(PREBUILT_SYSTEM_PATH)/lib64
>
> include $(CLEAR_VARS)
> LOCAL_MODULE := libmytest
> LOCAL_MODULE_TAGS   := optional
> LOCAL_MODULE_CLASS  := SHARED_LIBRARIES
> LOCAL_MODULE_SUFFIX := .so
> LOCAL_MULTILIB  := both
> LOCAL_SRC_FILES_32 := $(PREBUILT_SYSTEM_LIB32_PATH)/
> $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
> LOCAL_SRC_FILES_64 := $(PREBUILT_SYSTEM_LIB64_PATH)/
> $(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
> LOCAL_SHARED_LIBRARIES := liblog libutils libcutils libbase libpcrecpp
> include $(BUILD_PREBUILT)
>
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 converted using
> androidmk.
>
>
> include $(CLEAR_VARS)
> LOCAL_MODULE := libmysharedlib
> LOCAL_SRC_FILES := \
> file.cpp \
> $(call all-Iaidl-files-under, api)
> LOCAL_CPPFLAGS := -std=gnu++11 -Wall
> LOCAL_C_INCLUDES += \
>  $(LOCAL_PATH) \
>  external/rapidjson/include
> LOCAL_LDFLAGS := -llog
> LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
> LOCAL_MULTILIB := both
> LOCAL_SHARED_LIBRARIES := \
> liblog \
> libbinder \
> libutils \
> libpowermanager \
>
> LOCAL_STATIC_LIBRARIES := libcutils
> LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/api
>
> include $(BUILD_SHARED_LIBRARY)
>
> 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
> Clang SA is not enabled
> error: vendor/my-shared-lib/Android.bp:38:18: unrecognized property
> "aidl_includes"
> error: vendor/my-shared-lib/Android.bp:74:18: unrecognized property
> "aidl_includes"
> ninja: build stopped: subcommand failed.
> 13:59:19 soong bootstrap failed with: exit status 1
> make: *** [run_soong_ui] Error 1
>
> BR
> /Michael
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 failed with: exit status 1
> build/core/main.mk:21: target 'run_soong_ui' recipe for target
> 'run_soong_ui' failed
> make: *** [run_soong_ui] Error 1
>
> Anyone Can help? I can't find solution.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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.html#_ccache_3_3
> I'm curious to know if AOSP O r4  branch has any plans to user newer ccache.
>
> regards,
> Venkat.
>
>
> On Monday, September 4, 2017 at 4:57:47 PM UTC+2,
> venkatakrishna...@gmail.com wrote:
>>
>> Hello,
>> I suspect a potential side-effect when Ninja, and ccache(shared with
>> multiple users on a workstation) are working together.
>> Consider the following scenario. This assumes a shared cache(CCACHE_DIR
>> set to /ccache/common_cachestore) for both the users.
>>
>> User A runs a build under /ws/aosp_A for a particular revision of AOSP,
>> and he produces the cache at /ccache/common_cachestore
>> User B runs a build under /ws/aosp_B, and for some of the files, cache hit
>> occurs, thus, all the compiler data is copied into user B's workspace.(this
>> includes the .d file) and thus, the Ninja dependency database now points to
>> the system headers from user A's workspace, because, ccache had produced .d
>> file with system header paths which are absolute, and thus, they point to
>> user A's workspace.
>>
>> Now, User B fetches updated content by doing a repo sync, and lets assume
>> the system headers are newer Or he deliberately changed some system headers
>> for some reason.
>> However, Ninja's dependency database points to the system headers from
>> User A's workspace, thus, it may so happen that it doesn't rebuild.
>>
>> (It is likely that I'm missing the very technical details of Ninja's
>> dependency database. Also, this is a once in blue moon scenario)
>> With an assumption that this is possible, I'm trying to think of a way to
>> have relative paths to system headers.
>>
>> Do I have a point? If I do, apparently, shared ccache should not be used
>> at all with AOSP?
>> thanks for your feedback in advance,
>>
>> Best regards,
>> Venkat.
>>
>>
>> On Friday, September 2, 2016 at 4:06:00 PM UTC+2, Chih-Wei Huang wrote:
>>>
>>> It's very helpful.
>>> Thank you very much!
>>>
>>> Dan Willemsen於 2016年9月1日星期四 UTC+8下午10時30分18秒寫道:

 We've switched to using ninja to do our builds, which defaults to
 reading the depfile into it's database, then deleting it. You can either
 keep the depfile:

   NINJA_ARGS="-d keepdepfile" m ...

 Or just ask ninja what the deps are for a specific file:
 (NINJA_EXTRA_ARGS has to be empty as a workaround in this case)

   NINJA_ARGS= "-t deps out/...o" m NINJA_EXTRA_ARGS=

 You can also see some of the other ninja tools and debug modes that are
 useful with -d/-t list:

 ninja subtools:
 browse  browse dependency graph in a web browser
  clean  clean built files
   commands  list all commands required to rebuild given targets
   deps  show dependencies stored in the deps log
  graph  output graphviz dot file for targets
  query  show inputs/outputs for a path
targets  list targets by their rule or depth in the DAG
 compdb  dump JSON compilation database to stdout
  recompact  recompacts ninja-internal data structures

 debugging modes:
   statsprint operation counts/timing info
   explain  explain what caused a command to execute
   keepdepfile  don't delete depfiles after they're read by ninja
   keeprsp  don't delete @response files on success
 multiple modes can be enabled via -d FOO -d BAR


 On Thu, Sep 1, 2016 at 7:05 AM Chih-Wei Huang 
 wrote:
>
> Hi,
> Anyone knows why Android 7.0 build system doesn't generate
> the .P file, the dependency file of the .o to be included?
> Without the .P file it's hard to debug the dependency issue.
> Or any alternative way to check the dependency of the .o in Android
> 7.0?
>
> --
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from 

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/.bootstrap/bin/gotestrunner -p ./build/soong/android -f
> out/soong/.bootstrap/soong-android/test/test.passed --
> out/soong/.bootstrap/soong-android/test/test -test.short
>
> --- FAIL: TestPrebuilts (0.00s)
>
> prebuilt_test.go:117: stat /tmp: no such file or directory
>
> FAIL
>
> [2/9] link out/soong/.bootstrap/soong_build/obj/a.out
>
> ninja: build stopped: subcommand failed.
>
> 13:27:31 soong bootstrap failed with: exit status 1
>
>
>  failed to build some targets (1 seconds) 
>
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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_headers_module"],
}


On Wed, Aug 23, 2017 at 9:02 PM, Chih-Wei Huang  wrote:
> Hi,
> I'd like to export the include path $(call local-generated-sources-dir) in
> Android.bp.
> In Android.mk I can do like
>
> LOCAL_EXPORT_C_INCLUDE_DIRS := $(call local-generated-sources-dir)
>
> However, seems there is no counterpart in Android.bp.
> I tried everything but none work.
> Isn't it possible?
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 AM, Gunjan Saxena  wrote:
> Hi,
>
> I need to include all sub-directory .mk files but one specific directory i
> want to exclude from it. Can you please tell as to what entries i need to
> make.
>
> I know  include $(call all-subdir-makefiles)  but this will call all
> sub-directory .Suppose i want to to exclude a/b/c/android.mk only and rest i
> need to include.
>
> What will be the corresponding entry in android.mk file in that case.
>
> Thanks,
> Gunjan
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 Android O with my device tree but
> I got the error
>
> [1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
> No need to regenerate ninja file
> ninja: error:
> 'out/host/common/obj/JAVA_LIBRARIES/apksig_intermediates/classes.jar',
> needed by
> 'out/host/common/obj/JAVA_LIBRARIES/signapk_intermediates/classes-full-debug.jar',
> missing and no known rule to make it
> 13:28:20 ninja failed with: exit status 1
> make: *** [run_soong_ui] Error 1
> make: Leaving directory `/home/cwhuang/git/oreo-x86'
>
>  make failed to build some targets (13 seconds) 
>
> After checking my codebase, I accidentally deleted tools/apksig/ dir.
> Then I added it back. However, I still got the error as before.
> It seems Ninja won't parse the new added Android.mk.
> How could I force it to do a full parsing?
> Do I need to do a clean build? (I don't think/hope so)
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 preview source code and have been studying
> the new android build system soong. Documentation suggests that there is
> “androidmk” tool which converts .mk files to .bp files.  I would like to
> make use of this tool for converting .mk file to .bp file.
>
> Running the tool threw below errors:
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:11:2: cannot find package
> "android/soong/androidmk/parser" in any of:
>
> /home/bodapati/o_master/build/src/android/soong/androidmk/parser
> (from $GOROOT)
>
> /home/bodapati/go/src/android/soong/androidmk/parser (from $GOPATH)
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:11:2: cannot find package
> "github.com/google/blueprint/parser" in any of:
>
> /home/bodapati/o_master/build/src/github.com/google/blueprint/parser
> (from $GOROOT)
>
> /home/bodapati/go/src/github.com/google/blueprint/parser (from
> $GOPATH)
>
>
>
> To resolve the missing dependencies, we manually copied these packages from
> build/soong into GOROOT’s src folder but some structure and property
> definitions are not present in these packages and compiling androidmk.go
> gave below errors :
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:99: undefined: androidScope
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:120: undefined:
> soongModuleTypes
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:123: undefined: clear_vars
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:132: undefined:
> conditionalTranslations
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:204: undefined:
> propertyPrefixes
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:217: undefined:
> conditionalTranslations
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:235: undefined:
> rewriteProperties
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:236: undefined:
> variableAssignmentContext
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:267: undefined:
> conditionalTranslations
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:271: undefined:
> conditionalTranslations
>
> build/soong/androidmk/cmd/androidmk/androidmk.go:271: too many errors
>
> I replaced the parser that was copied from  build/soong in GOROOT with the
> parser from this source https://github.com/google/blueprint.git. This
> resolved errors for undefined variables but gave below errors :
>
> go build github.com/google/blueprint/parser:
> prebuilts/go/linux-x86/pkg/tool/linux_amd64/compile: fork/exec
> prebuilts/go/linux-x86/pkg/tool/linux_amd64/compile: no such file or
> directory
>
> go build android/soong/androidmk/parser:
> prebuilts/go/linux-x86/pkg/tool/linux_amd64/compile: fork/exec
> prebuilts/go/linux-x86/pkg/tool/linux_amd64/compile: no such file or
> directory
>
> Can anyone help on how to get the tool running?
>
> Thank You.
>
>
>
>
>
> Thanks & Regards,
>
> B. Shalini
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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,
>
> My build can't find bison, but it's right there. 'repo sync' worked just
> fine.
>
>
> $ lsb_release -a
>
> No LSB modules are available.
>
> Distributor ID: Ubuntu
>
> Description: Ubuntu 16.04.2 LTS
>
> Release: 16.04
>
> Codename: xenial
>
>
> $ make clobber
>
>
> $ repo init -u https://android.googlesource.com/platform/manifest -b
> android-7.1.2_r12
>
>
> $ repo sync
>
> (definitely no errors here)
>
>
> $ source build/envsetup.sh
>
>
> $ lunch aosp_arm-eng
>
> 
>
> PLATFORM_VERSION_CODENAME=REL
>
> PLATFORM_VERSION=7.1.2
>
> TARGET_PRODUCT=aosp_arm
>
> TARGET_BUILD_VARIANT=eng
>
> TARGET_BUILD_TYPE=release
>
> 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.4.0-1020-aws-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=N2G47X
>
> OUT_DIR=out
>
> 
>
>
> $ make -j16
>
> ...
>
> Starting build with ninja
>
> ninja: Entering directory `.'
>
> [ 0% 343/35670] host Java: tagsouplib
> (out/host/common/obj/JAVA_LIBRARIES/tagsouplib_intermediates/classes)
>
> Note: Some input files use unchecked or unsafe operations.
>
> Note: Recompile with -Xlint:unchecked for details.
>
> [ 1% 361/35670] host Java: antlr-runtime
> (out/host/common/obj/JAVA_LIBRARIES/antlr-runtime_intermediates/classes)
>
> Note: Some input files use unchecked or unsafe operations.
>
> Note: Recompile with -Xlint:unchecked for details.
>
> [ 1% 613/35670] Yacc: aidl <= system/tools/aidl/aidl_language_y.yy
>
> FAILED: /bin/bash -c "prebuilts/misc/linux-x86/bison/bison -d
> --defines=out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.h
> -o
> out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.cpp
> system/tools/aidl/aidl_language_y.yy"
>
> /bin/bash: prebuilts/misc/linux-x86/bison/bison: No such file or directory
>
> [ 1% 613/35670] host Java: guavalib
> (out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/classes)
>
> warning: [options] bootstrap class path not set in conjunction with -source
> 1.7
>
> Note: Some input files use or override a deprecated API.
>
> Note: Recompile with -Xlint:deprecation for details.
>
> Note: Some input files use unchecked or unsafe operations.
>
> Note: Recompile with -Xlint:unchecked for details.
>
> 1 warning
>
> [ 1% 613/35670] host C: libcrypto-host <=
> external/boringssl/src/crypto/ec/p256-64.c
>
> ninja: build stopped: subcommand failed.
>
> build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
>
> make: *** [ninja_wrapper] Error 1
>
>
> $ ls -lah prebuilts/misc/linux-x86/bison/bison
>
> -rwxrwxr-x 1 ubuntu ubuntu 1.4M Jul 4 07:15
> prebuilts/misc/linux-x86/bison/bison
>
> Any ideas?
>
> Cheers,
>
> Eliot.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
> make: *** [ninja_wrapper] Error 1
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2017-05-23 Thread Colin Cross
The property in the Android.bp file should be "ext_avd", not
"Ext_avd".  The required capitalization in the go files is an
unfortunate consequence of reflection requiring exported go fields.

On Tue, May 23, 2017 at 12:29 AM, Jeffrey An <jeffrey...@gmail.com> wrote:
> Hi,
>
> Thanks for the answer! I understand the purpose of the soong build system.
>
> As you said, for local experimentation, I've tried like below,
> build/soong
>
> diff --git a/android/variable.go b/android/variable.go
> old mode 100644
> new mode 100755
> index 163113e..475cee0
> --- a/android/variable.go
> +++ b/android/variable.go
> @@ -75,6 +75,10 @@ type variableProperties struct {
> Cppflags []string
> }
> } `android:"arch_variant"`
> +
> +   Ext_avd struct {
> +   Srcs []string
> +   }
>  }
>
>  var zeroProductVariables variableProperties
> @@ -136,6 +140,8 @@ type productVariables struct {
> ArtUseReadBarrier *bool `json:",omitempty"`
>
> BtConfigIncludeDir *string `json:",omitempty"`
> +
> +   Ext_avd *string `json:",omitempty"`
>  }
>
> build/make
> diff --git a/core/soong_config.mk b/core/soong_config.mk
> old mode 100644
> new mode 100755
> index 576c8ab..cf08a8b
> --- a/core/soong_config.mk
> +++ b/core/soong_config.mk
> @@ -69,6 +69,7 @@ $(SOONG_VARIABLES): FORCE
> echo ''; \
> echo '"ArtUseReadBarrier": $(if $(filter
> false,$(PRODUCT_ART_USE_READ_BARRIER)),false,true),'; \
> echo ''; \
> +   echo '"Ext_avd": "$(BOARD_HAVE_EXT_AVDT)",'; \
> echo '"BtConfigIncludeDir":
> "$(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)"'; \
> echo '}') > $(SOONG_VARIABLES_TMP); \
> if ! cmp -s $(SOONG_VARIABLES_TMP) $(SOONG_VARIABLES); then \
>
> device/huawei/angler
> diff --git a/BoardConfig.mk b/BoardConfig.mk
> old mode 100644
> new mode 100755
> index 141d0a4..2e24d88
> --- a/BoardConfig.mk
> +++ b/BoardConfig.mk
> @@ -45,6 +45,7 @@ BOARD_USES_ALSA_AUDIO := true
>  BOARD_HAVE_BLUETOOTH := true
>  BOARD_HAVE_BLUETOOTH_BCM := true
>  BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR :=
> device/huawei/angler/bluetooth
> +BOARD_HAVE_EXT_AVDT := true
>
>  BOARD_USES_SECURE_SERVICES := true
>
> system/bt
> diff --git a/stack/Android.bp b/stack/Android.bp
> old mode 100644
> new mode 100755
> index 58c8fe9..82cf586
> --- a/stack/Android.bp
> +++ b/stack/Android.bp
> @@ -179,7 +179,10 @@ cc_library_static {
>  required: [
>  "libldacBT_enc",
>  "libldacBT_abr",
> -]
> +],
> +Ext_avd: {
> +   srcs: ["avdt/avdt_ext.cc"],
> +},
>  }
>
> And tried to build but got error.
> [2/2] bootstrap out/soong/.minibootstrap/build.ninja.in
> [1/1] out/soong/.bootstrap/bin/minibp out/soong/.bootstrap/build.ninja
> [1/2] glob device/*/*/Android.bp
> [1/2] soong_build docs out/soong/.bootstrap/docs/soong_build.html
> FAILED: out/soong/.bootstrap/docs/soong_build.html
> out/soong/.bootstrap/bin/soong_build  -t -b out/soong --docs
> out/soong/.bootstrap/docs/soong_build.html ./Android.bp
> error: system/bt/stack/Android.bp:183:12: unrecognized property "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:12: unrecognized property "Ext_avd"
> ninja: build stopped: subcommand failed.
> 16:25:21 soong bootstrap failed with: exit status 1
> make: *** [run_soong_ui] Error 1
> make: Leaving directory `/home/jeffrey/work/google/pdk'
>
>  make failed to build some targets (1 seconds) 
>
>
> Could you give me more advice here?
>
> Thanks,
>
>
> 2017년 5월 23일 화요일 오전 5시 13분 12초 UTC+9, 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 parts to use at runtime.
>>
>> For local experimentation, you can add flags with:
>> 1.  Add: Ext_avd struct { Srcs []string } to varaibleProperties in
>> build/soong/android/variable.go
>> 2.  Add: Ext_avd *bool `json:",omitempty"` to productVariables in the same
>> file
&g

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 parts to use at runtime.

For local experimentation, you can add flags with:
1.  Add: Ext_avd struct { Srcs []string } to varaibleProperties in
build/soong/android/variable.go
2.  Add: Ext_avd *bool `json:",omitempty"` to productVariables in the same file
3.  Modify build/make/core/soong_config.mk to pass BOARD_HAVE_EXT_AVDT to soong.

On Tue, May 16, 2017 at 11:12 PM, Jeffrey An  wrote:
> Hi,
>
>
>
> I have been studying android-o-preview-1 especially Soong and Go build
> system.
>
>
>
> I’d like to add new feature to Bluetooth stack and attachment is one way to
> do it.
>
> In the attachment, I can use #ifdef EXT_AVDT in the cc source file.
>
> As you can see in the attachment, BOARD_HAVE_EXT_AVDT := true in the
> BoardConfig.mk will enable EXT_AVDT in the system/bt stack.
>
> And Soong will always compile avdt_ext_avdt.cc file even if
> BOARD_HAVE_EXT_AVDT is not true in the BoardConfig.mk
>
>
>
> I’d like to know another way that avdt_ext_avdt.cc file would not be
> compiled without BOARD_HAVE_EXT_AVDT
>
>
>
> In the readme file in the Soong, you said
>
> ```
>
> cc_library {
>
> ...
>
> srcs: ["generic.cpp"],
>
> arch: {
>
> arm: {
>
> srcs: ["arm.cpp"],
>
> },
>
> x86: {
>
> srcs: ["x86.cpp"],
>
> },
>
> },
>
> }
>
> ```
>
>
>
> I tried to find example about it but I couldn’t find it.
>
>
>
> I want to change system/bt/stack/Android.bp like below
>
> …
>
> "smp/smp_utils.cc",
>
> "srvc/srvc_battery.cc",
>
> "srvc/srvc_dis.cc",
>
> "srvc/srvc_eng.cc",
>
> ],
>
> static_libs: [
>
> "libbt-hci",
>
> "libFraunhoferAAC",
>
> ],
>
> shared_libs: [
>
> "libcutils",
>
> "liblog",
>
> ],
>
> required: [
>
> "libldacBT_enc",
>
> ],
>
> ext-avdt: {
>
> srcs: ["avdt/avdt_ext_avdt.cc "],
>
> }
>
> }
>
> And  avdt_ext_avdt.cc file will be compiled when BoardConfig.mk file has
> BOARD_HAVE_EXT_AVDT := true
>
>
>
> Could anyone guide me how to do it?
>
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2017-05-14 Thread Colin Cross
You can try changing the default flags for the architecture you are
about, for example
https://android.git.corp.google.com/platform/build/soong/+/master/cc/config/arm64_device.go#49,
but it is likley to cause build problems in a few modules.  For
example, ART sets strict stack frame size limits that will probably
fail with global -O0.

On Thu, May 11, 2017 at 10:58 PM, Xie Wu <hhh0hh...@gmail.com> 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:
>>
>> 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 <hhh0...@gmail.com> wrote:
>> > Hi, I found some optimized variables when debugging so, such as
>> > libart.so.
>> > I tried "mma LOCAL_CFLAGS="-O0 -g"", but it does not work. (reference:
>> > How
>> > to make debug build of specific module under AOSP tree?)
>> > How can I disable optimization?
>> > Thanks.
>> >
>> > --
>> > --
>> > You received this message because you are subscribed to the "Android
>> > Building" mailing list.
>> > To post to this group, send email to android-...@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-buildi...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>> >
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Android Building" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to android-buildi...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 same problem. Any idea how to solve it?
>
>
> On Wednesday, September 7, 2016 at 1:07:09 AM UTC+2, Gianmarco Rengucci
> wrote:
>>
>> Hi everyone. I've sync'd AOSP 7.0.0_rc1 source code and cloned a few repos
>> (Hosted here)
>>
>> Everything seems good to go, but when i run make i get this error
>>
>> [  0% 1/35196] JarJar:
>> out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/classes-jarjar.jar
>>
>> FAILED: /bin/bash -c "java -jar out/host/linux-x86/framework/jarjar.jar
>> process external/conscrypt/jarjar-rules.txt
>> out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/classes-full-debug.jar
>> out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/classes-jarjar.jar"
>>
>> Error: Could not find or load main class com.tonicsystems.jarjar.Main
>>
>> ninja: build stopped: subcommand failed.
>>
>> make: *** [build/core/ninja.mk:149: ninja_wrapper] Error 1
>>
>>
>> My OS is BBQLinux, updated to the latest aur software and with OpenJDK 8.
>>
>> I'd gladly accept any advice, since i've been stuck here for a few hours.
>> Thanks!
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/mytest.

On Sat, Feb 18, 2017 at 7:51 AM, 'Ryan Philips' via Android Building
 wrote:
> Hi,
>
> I am trying to build a test source. I have created an external/mytest
> directory and the following in Android.mk
>
> include $(CLEAR_VARS)
> LOCAL_SRC_FILES := testextspi.c
> LOCAL_MODULE:= testextspi
> LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
> LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)
> include $(BUILD_EXECUTABLE)
>
>
> The problem is it builds and create obj files and creates the binary inside
> "./symbols/system/sbin/"
> But it does not create the same binary in /system/bin in the filesystem.
> which is /system/sbin/
>
> I am not sure what i am missing here..
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/building-kernels.html
> I am trying to build for a Nexus 5X so I've been using this row of the
> Kernels table:
> bullhead device/lge/bullhead-kernel kernel/msm bullhead_defconfig
>
> When I get down to this part [http://source.android.com/
> source/building-kernels.html#building], I run this command...
> make bullhead_defconfig
> ...and I get the following error message:
>
> ***
>
> *** Can't find default configuration "arch/arm/configs/bullhead_
> defconfig"!
>
> ***
>
> make[1]: *** [bullhead_defconfig] Error 1
>
> make: *** [bullhead_defconfig] Error 2
>
> Indeed, when I have a look in arch/arm/configs, I see that there is no
> file called bullhead_defconfig.
>
> Should I be using a different defconfig file?  If so, does the
> build-kernels documentation need to be updated?
>
> I should mention that I checked out commit 
> d28c62a152463152f5fbf84df30e1f0a68f2fc59
> (https://android.googlesource.com/kernel/msm.git/+/android-
> msm-bullhead-3.10-nougat-mr1.1)
>
> Full disclosure, this is my first time working with the Android source, so
> please be gentle :)
>
> Thanks!
>
> Andrew
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   >