Re: [android-building] Request for Guidance on Bundling Dynamically Generated JNI Library Inside APK Using Soong Build System

2024-07-23 Thread 'Dan Willemsen' via Android Building
The build system will install an APK with a correct layout for the platform
to use for their particular use case, just be sure to specify them as
`jni_libs: [...]` dependencies for the app. Manually changing that
shouldn't be necessary, though you may be able to adjust this behavior with
`use_embedded_native_libs: true`. This does not adjust what libraries your
APK can use, which is controlled by the platform. If you specify `jni_libs`
of platform-only libraries, those will be copied into your APK, not shared
with the system.

If your intent is to take that APK and use it elsewhere, you really should
be building with `tapas` instead of `lunch` to build a generic APK. That
changes a handful of behaviors, including this one.

- Dan

On Mon, Jul 22, 2024 at 1:05 PM MaHeMa  wrote:

> Dear All,
>
> I am writing to request guidance on dynamically generating a native JNI
> library and bundling it inside an APK using the Soong build system.
> Currently, the library is generated in the system lib64 folder, but the
> requirement is to include the library within the APK.
>
> Could you please provide detailed instructions or confirm if this is
> feasible with Soong build? Any assistance or documentation on achieving
> this would be greatly appreciated.
>
> Thank you for your support.
>
> On Tuesday 9 July 2024 at 21:25:06 UTC+5:30 MaHeMa wrote:
>
>> it cannot be device specific as my lib depends on other system libs too
>>
>> Please 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/fef504fb-536b-407b-b81a-fe062bb77bdcn%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/fef504fb-536b-407b-b81a-fe062bb77bdcn%40googlegroups.com?utm_medium=email&utm_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/CALQgHdm0%3DVshcMWTVr45mT9ewNHANj32COs6niZXmgu8A%3DB3-w%40mail.gmail.com.


Re: [android-building] Help, AOSP 12 add binary file

2024-07-23 Thread &#x27;Dan Willemsen' via Android Building
While using cc_prebuilt_binary is a good idea, and may fix other errors
(since ELF binaries aren't supposed to be in PRODUCT_COPY_FILES), it won't
solve this particular issue.

The issue here is that aosp_flame inherits from generic_system, and
generic_system claims to be generic -- it doesn't allow device custom
modules to be installed in /system. The easy solution is to install it into
/system-ext/bin/... or /product/bin/... instead (xbin isn't really used
anymore as far as I know). To do this with the cc_prebuilt_binary, just set
`system_ext_specific: true` or `product_specific: true`

- Dan

On Tue, Jul 23, 2024 at 11:37 AM Mattijs Korpershoek <
mkorpersh...@baylibre.com> wrote:

> Hi,
>
> On lun., juil. 22, 2024 at 04:38, willing tong 
> wrote:
>
> > I want add binary file into AOSP with build. But now there are some
> > problems,
> >
> > *ubuntu@ubuntu-System-Product-Name:~/Android_12_AOSP$
> > pwd/home/ubuntu/Android_12_AOSP*
> > *1. add this two line in the device/google/coral/device.mk  file with
> end *
> >
> >
> > *ubuntu@ubuntu-System-Product-Name:~/Android_12_AOSP$ cat
> > device/google/coral/device.mk | tail -2PRODUCT_COPY_FILES += \
> >  prebuilts/planx/planx-encrypt:system/xbin/planx-encrypt*
> >
> > *2. use "m" build response *
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > *[ 90% 194/214] including system/sepolicy/Android.mk
> > ...system/sepolicy/Android.mk:57: warning:
> BOARD_PLAT_PUBLIC_SEPOLICY_DIR
> > has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS
> > instead.system/sepolicy/Android.mk:62: warning:
> > BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use
> > SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.[ 99% 213/214] finishing build
> > rules ...FAILED: build/make/core/artifact_path_requirements.mk:26:
> warning:
> >  device/google/coral/aosp_flame.mk produces files inside
> > build/make/target/product/generic_system.mks artifact path requirement.
> > Offending entries:system/xbin/planx-encryptIn file included from
> > build/make/core/main.mk:1342:build/make/core/
> artifact_path_requirements.mk:26:
> > error: Build failed.19:37:07 ckati failed with: exit status 1 failed
> to
> > build some targets (20 seconds) *
> >
> > *Can someone help me ?*
>
> Have you considered using cc_prebuilt_binary instead?
>
> For an example, see:
>
> https://cs.android.com/android/platform/superproject/main/+/main:device/linaro/poplar/proprietary/hisilicon/Android.bp;l=76?q=cc_prebuilt_binary&start=11
>
> >
> > --
> > --
> > 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/7c5300d6-2849-41cc-9a27-b2a66b4ed733n%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/87h6cgpi1a.fsf%40baylibre.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/CALQgHdmHqE4T_d-ENA7iPWrD3vgt01aV%2BjA50kB-9tKdTm6_yA%40mail.gmail.com.


Re: [android-building] overriding PRODUCT_COPY_FILES entries

2024-07-09 Thread &#x27;Dan Willemsen' via Android Building
Yes, the "first" entry in PRODUCT_COPY_FILES for a destination wins, and
any others are ignored (and written to $OUT/product_copy_files_ignored.txt
during `dist` builds, though you can explicitly ask for it to be built with
`m` as well).

"first" can be a complicated topic with inherit-product however, so I'd
recommend verifying your changes carefully. The order between local
modifications to PRODUCT_* variables and inherit-product within a makefile
doesn't matter -- inherit-product just saves a list of files to be included
later, then combined into the inheritance tree.

- Dan

On Tue, Jul 9, 2024 at 11:54 AM 'chris simmonds' via Android Building <
android-building@googlegroups.com> wrote:

> Yes, make sure that B.mk is parsed before A.mk, because it is the first
> PRODUCT_COPY_FILES for a given destination that matters. For example, if I
> want to override the init.cutf_cvm.rc provided by aosp_cf.mk I can do it
> like this:
>
> PRODUCT_COPY_FILES +=
> $(LOCAL_PATH)/init.cutf_cvm.rc:vendor/etc/init/hw/init.cutf_cvm.rc
> $(call inherit-product, device/google/cuttlefish/vsoc_x86_64/phone/
> aosp_cf.mk)
>
> I suspect this works "by accident", but I have been using this trick in my
> device config for many years so I think it is reliable
>
> HTH,
> Chris Simmonds
>
> On Mon, 8 Jul 2024 at 17:34, Testing 33  wrote:
>
>> Hi, can we override specific PRODUCT_COPY_FILES entry ?
>> Example: if A.mk and B.mk are copying different files but at same
>> destination. then i want that B.mk's PRODUCT_COPY_FILES line should
>> override A.mk and that too without making any changes in A.mk.
>>
>> --
>> --
>> 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/a628996b-6338-4a96-b00c-ba357e8fcdb1n%40googlegroups.com
>> <https://groups.google.com/d/msgid/android-building/a628996b-6338-4a96-b00c-ba357e8fcdb1n%40googlegroups.com?utm_medium=email&utm_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/CAN%2BjWE9daQgFRZ0R5CsosamdJsPgu8iv4f72Si6%2BTe1EsLkRGw%40mail.gmail.com
> <https://groups.google.com/d/msgid/android-building/CAN%2BjWE9daQgFRZ0R5CsosamdJsPgu8iv4f72Si6%2BTe1EsLkRGw%40mail.gmail.com?utm_medium=email&utm_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/CALQgHdnB3zyOAVkxnPmU5C%3DQdTo30mPuEooG%2BWxXcTQ4k2D2pQ%40mail.gmail.com.


Re: [android-building] libncurses5 package missing from Ubuntu 23.10+

2023-09-29 Thread &#x27;Dan Willemsen' via Android Building
Try
https://android-review.googlesource.com/c/platform/prebuilts/clang/host/linux-x86/+/2760210
 instead

On Fri, Sep 29, 2023 at 1:37 PM xstefen  wrote:

>
> Would love to but one does not simply walk into *.corp.google.com
> On Friday, September 22, 2023 at 6:59:09 PM UTC-5 Stephen Hines wrote:
>
>> Feel free to cherry-pick
>> https://android-review.git.corp.google.com/c/platform/prebuilts/clang/host/linux-x86/+/2760210
>> in the meantime, and let me know if you have trouble with it. I'll be
>> following up with a more final solution, but this should also unblock you.
>>
>> Steve
>>
>> On Thu, Sep 21, 2023 at 3:08 PM 'enh' via Android Building <
>> android-...@googlegroups.com> wrote:
>>
>>> thanks! i talked to our llvm folks, and they've filed a bug to switch
>>> to prebuilts for this. in the meantime, they also point out that
>>>
>>> prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot/usr/lib/libncurses.so.5.9
>>> might be useful as a workaround :-)
>>>
>>> actually removing renderscript is a longer-term project... it's been
>>> deprecated for a couple of releases, and we're working on disabling it
>>> for apps with target api level $next_year, but it'll be a year or two
>>> after that until it can actually be removed fully.
>>>
>>> On Thu, Sep 21, 2023 at 1:34 PM 'Alexander Koskovich' via Android
>>> Building  wrote:
>>> >
>>> >
>>> > prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error
>>> while loading shared libraries: libncurses.so.5: cannot open shared object
>>> file: No such file or directory
>>> > 15:24:30 ninja failed with: exit status 1
>>> >
>>> > clang-3289846 is being used only for Renderscript currently it looks
>>> like. Super old version of Clang, 3.8. The package containing
>>> libncurses.so.5 is no longer found in Ubuntu 23.10+ or Debian testing.
>>> > On Thursday, September 21, 2023 at 12:37:41 PM UTC-4 enh wrote:
>>> >>
>>> >> what's the renderscript connection here? what's the build error
>>> you're seeing?
>>> >>
>>> >> On Wed, Sep 20, 2023 at 10:06 PM 'Alexander Koskovich' via Android
>>> >> Building  wrote:
>>> >> >
>>> >> > AOSP (main) won't compile starting from this version onward. Is
>>> there a plan to migrate renderscript to a newer Clang version or is that
>>> not likely?
>>> >> >
>>> >> > --
>>> >> > --
>>> >> > 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.
>>> >> > To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/android-building/f8c94f8b-5b50-475a-a41f-3115fbf7fc12n%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-...@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.
>>> > To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/android-building/e6eb685f-0a64-4d5a-bca2-7a923371642en%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-...@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 a topic in the
>>> Google Groups "Android Building" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/android-building/Sv_v2ApJZug/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> android-buildi...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/android-building/CAJgzZooGtV4gB1qqLjNxThQ%3DU3db3c_DQ4vEmkvt%2BDyvxJq-eg%40mail.gmail.com
>>> .
>>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post 

Re: [android-building] how the dist target is built?

2023-08-07 Thread &#x27;Dan Willemsen' via Android Building
I've described the `dist` command line argument as a modifier, as it's not
really a target itself. In general, it's changing the behavior of other
targets so that they also perform copies into $DIST_DIR.

1. there seem no Makefile in the AOSP root now, how does the make command
> find the make files?
>

We haven't actually been using the `make` tool for many years. `m` is the
suggested entry point to the build (which is implemented by soong_ui), but
`make` still works in some places due to this shell function
<https://cs.android.com/android/platform/superproject/main/+/main:build/make/envsetup.sh;drc=11f188c09ae2cd0446296f8bcf996f2e63f3a0e0;l=1903>
which
chooses between calling soong_ui and make depending on
<https://cs.android.com/android/platform/superproject/main/+/main:build/make/envsetup.sh;drc=11f188c09ae2cd0446296f8bcf996f2e63f3a0e0;l=1807>
where and how you call it.

2. there seems no dist target defined in the build/make repository
> explicitly, how should I understand it?
>

This is parsed out
<https://cs.android.com/android/platform/superproject/main/+/main:build/soong/ui/build/config.go;drc=6d1e348cc37df5f52b06ebcd9b722c03f7021096;l=949>
in soong_ui, and used directly in a few different places in soong_ui. But
the general `dist` setup in Android.bp files (and `$(call dist-for-goals`
in makefiles) is enabled via soong_ui passing in
<https://cs.android.com/android/platform/superproject/main/+/main:build/soong/ui/build/kati.go;drc=f2af38d2cceb85f93180e666ca88b796410f69db;l=390>
`DIST` to the makefile "packaging" step. That controls this conditional
<https://cs.android.com/android/platform/superproject/main/+/main:build/make/packaging/distdir.mk;drc=fd5f1e75964d0d5631f33597daf1e6b50dccb2e4;l=28>
which adds a dependency and this conditional
<https://cs.android.com/android/platform/superproject/main/+/main:build/make/packaging/distdir.mk;drc=fd5f1e75964d0d5631f33597daf1e6b50dccb2e4;l=40>
which
implements the actual copy rules. The dependencies to these `_dist_*`
targets are always set up in the main portion of the build, based on all
the goals(/targets) passed into dist-for-goals, here
<https://cs.android.com/android/platform/superproject/main/+/main:build/make/core/distdir.mk;drc=45c0c2c9ac5402b629c17fb0e3495b4ce994158a;l=211>
.

- Dan

On Mon, Aug 7, 2023 at 2:23 PM Yongqin Liu  wrote:

> Hi, All
>
> This may be a silly question, but I could not find how the dist target is
> executed,
> could anyone here help give some explanations on it?
>
> 1. there seem no Makefile in the AOSP root now, how does the make command
> find the make files?
> 2. there seems no dist target defined in the build/make repository
> explicitly, how should I understand it?
>
> Thanks,
> Yongqin Liu
>
> --
> --
> 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/48997402-f201-4929-b040-8459b003f520n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/48997402-f201-4929-b040-8459b003f520n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdn2xB7p1xgLGKUsFNyVF7GzafGs_hTAgJ_7fpSprs0VBg%40mail.gmail.com.


Re: [android-building] How to do Incremental build with updated compiler flags

2023-08-07 Thread &#x27;Dan Willemsen' via Android Building
We tried to make reading files from Soong difficult to do, since this is
very error prone, as shown by this thread. It looks like you may have
bypassed these protections by running very early during initialization.
>
> Also I think that go files are executed only in the clean build not in
> incremental build. Is it possible to retrigger go files execution in
> Incremental build to regenerate the build config(  not sure if re running
> the go files will affect the source file changes timestamps and hashes
> needed for Incremental build to work).
>
That's what these protections are for, because this happens with upstream
Soong -- everything read from Soong (files, environment variables, etc) is
tracked, and if any of those changes, the go code is re-executed.

If you manage to read any files in Soong, you must call AddNinjaFileDeps to
add those to Soong's dependencies. Any file listing or presence operations
must be going through the soong/blueprint Glob methods, and any reading of
environment variables must go through the soong's Config environment
functions (Getenv / GetenvWithDefault / IsEnvTrue / etc).

- Dan

On Mon, Aug 7, 2023 at 2:22 PM Vijay Ede  wrote:

> Thanks Dan for the response. Yes we are using a custom json file to
> maintain compiler flags and this json file is parsed in
> build/soong/cc/config/global.go file.
>
> I tried adding a Android.bp file to create a module with json file as src
> file and added this module as dependency in Android.bp file in folder
> containing global.go file.
>
> This did not work , I got “depends on undefined module test-json” error
> message in the build.
>
> Is there anyway to add json file as dependency to the go modules?
>
>
> Also I think that go files are executed only in the clean build not in
> incremental build. Is it possible to retrigger go files execution in
> Incremental build to regenerate the build config(  not sure if re running
> the go files will affect the source file changes timestamps and hashes
> needed for Incremental build to work).
>
>
>
> Thanks,
>
> Vijay
>
>
> On Thursday, August 3, 2023 at 8:12:12 PM UTC+5:30 Dan Willemsen wrote:
>
>> Any changes in .mk / .bp files should be producing correct incremental
>> builds -- in general since the ninja migration in Android N, though there
>> have been some bug fixes over the years since for some specific use cases.
>> Bug reports would be useful for any cases that you can reproduce on AOSP.
>>
>> change C/C++ compiler flags in the build configuration files like .json
>>>
>>
>> I'm unaware of any places where we load compiler flags from json files.
>> If you've made your own changes to the build system or compiler, that may
>> need more changes in the build system to produce correct incremental builds
>> (marking any additional files read as dependencies to wherever they're
>> read).
>>
>> One of the special cases is that we don't actually depend on the clang
>> compiler itself for incremental builds, so if you update it in place, that
>> may not trigger rebuilds. Our compiler updates are in version-specific
>> paths, and the path change will trigger a command line change, and thus
>> proper incremental builds.
>>
>> - Dan
>>
>> On Thu, Aug 3, 2023 at 9:06 AM Vijay Ede  wrote:
>>
>>> Hi,
>>> I want to check if we have an option to do incremental build after we
>>> change C/C++ compiler flags in the build configuration files like .json,
>>> .mk or .bp.
>>>
>>> Currently i am seeing if we update the compiler flags in the config file
>>> and do incremental build it is not taking the upadated flags. we have to
>>> delete the out/ folder and run full build again for updated flags to affect
>>> and this takes longer build times.
>>>
>>> The context i am looking for this is when we do toolchain version
>>> migration we might have some compiler related errors which might need
>>> update in compiler flags. So instead of doing clean build, i am looking for
>>> a way that rest of the build from the point of error continues with new
>>> flags.
>>>
>>> Thanks
>>> Vijay
>>>
>>> --
>>> --
>>> 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

Re: [android-building] How to do Incremental build with updated compiler flags

2023-08-03 Thread &#x27;Dan Willemsen' via Android Building
Any changes in .mk / .bp files should be producing correct incremental
builds -- in general since the ninja migration in Android N, though there
have been some bug fixes over the years since for some specific use cases.
Bug reports would be useful for any cases that you can reproduce on AOSP.

change C/C++ compiler flags in the build configuration files like .json
>

I'm unaware of any places where we load compiler flags from json files. If
you've made your own changes to the build system or compiler, that may need
more changes in the build system to produce correct incremental builds
(marking any additional files read as dependencies to wherever they're
read).

One of the special cases is that we don't actually depend on the clang
compiler itself for incremental builds, so if you update it in place, that
may not trigger rebuilds. Our compiler updates are in version-specific
paths, and the path change will trigger a command line change, and thus
proper incremental builds.

- Dan

On Thu, Aug 3, 2023 at 9:06 AM Vijay Ede  wrote:

> Hi,
> I want to check if we have an option to do incremental build after we
> change C/C++ compiler flags in the build configuration files like .json,
> .mk or .bp.
>
> Currently i am seeing if we update the compiler flags in the config file
> and do incremental build it is not taking the upadated flags. we have to
> delete the out/ folder and run full build again for updated flags to affect
> and this takes longer build times.
>
> The context i am looking for this is when we do toolchain version
> migration we might have some compiler related errors which might need
> update in compiler flags. So instead of doing clean build, i am looking for
> a way that rest of the build from the point of error continues with new
> flags.
>
> Thanks
> Vijay
>
> --
> --
> 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/4f428018-1cd4-4e6f-9897-d29cfe821479n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/4f428018-1cd4-4e6f-9897-d29cfe821479n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdnFvuNDE7ikBo46O_rO8AoLUusz1vwkfLiXD_rSAcBc7Q%40mail.gmail.com.


Re: [android-building] building lunch #48

2023-08-02 Thread &#x27;Dan Willemsen' via Android Building
FYI: The lunch number is only meaningful within a single lunch invocation
-- it can change every time you sync (or make edits to the
COMMON_LUNCH_CHOICES)

If I remember correctly, `arm_v7_v8` is a product that was set up for some
art testing, and isn't expected to build a full android image. The art docs
on how to use it are here:
https://cs.android.com/android/platform/superproject/main/+/main:art/test/README.chroot.md

- Dan

On Wed, Aug 2, 2023 at 11:13 AM Donald Harter  wrote:

> I am trying to build this but get errors like this:
> 
> PLATFORM_VERSION_CODENAME=VanillaIceCream
> PLATFORM_VERSION=VanillaIceCream
> PRODUCT_INCLUDE_TAGS=com.android.mainline
> TARGET_PRODUCT=arm_v7_v8
> TARGET_BUILD_VARIANT=eng
> 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-a15
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-6.4.1-x86_64-Ubuntu-22.04.2-LTS
> HOST_CROSS_OS=windows
> BUILD_ID=AOSP.MAIN
> OUT_DIR=out
> 
> wildcard(out/target/product/arm_v7_v8/clean_steps.mk) was changed,
> regenerating...
> [ 74% 1042/1407] build
> out/target/product/arm_v7_v8/obj/PACKAGING/check_vintf_all_intermediates/check_vintf_vendor.log
> FAILED:
> out/target/product/arm_v7_v8/obj/PACKAGING/check_vintf_all_intermediates/check_vintf_vendor.log
> /bin/bash -c "( out/host/linux-x86/bin/checkvintf --check-one --dirmap
> /vendor:out/target/product/arm_v7_v8/system/vendor --dirmap /apex:o
> ut/target/product/arm_v7_v8/obj/PACKAGING/check_vintf_all_intermediates/apex
> --property ro.boot.product.vendor.sku= > out/target/product/a
> rm_v7_v8/obj/PACKAGING/check_vintf_all_intermediates/check_vintf_vendor.log
> 2>&1 ) || ( cat out/target/product/arm_v7_v8/obj/PACKAGING/che
> ck_vintf_all_intermediates/check_vintf_vendor.log && exit 1 )"
> Checking vendor manifest.
> getDeviceHalManifest: Reading VINTF information.
> Sysprop ro.boot.product.vendor.sku=
> Fetch 'out/target/product/arm_v7_v8/system/vendor/etc/vintf/manifest.xml':
> NAME_NOT_FOUND
> Sysprop ro.boot.product.hardware.sku is missing, default to ''
> Fetch 'out/target/product/arm_v7_v8/system/vendor/manifest.xml':
> NAME_NOT_FOUND
> getDeviceHalManifest: status from fetching VINTF information: -2
> getDeviceHalManifest: -2 VINTF parse error: Cannot read
> out/target/product/arm_v7_v8/system/vendor/manifest.xml: No such file or
> directory
> ERROR: Cannot fetch vendor manifest.
> 23:56:35 ninja failed with: exit status 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/0ff58cac-01a6-46d7-ab01-5eabb10ad3d7n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/0ff58cac-01a6-46d7-ab01-5eabb10ad3d7n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DimY7mN3n_vP36iwrXqjbi0-onrwJYa_nRWDT3%2B3NR2Q%40mail.gmail.com.


Re: [android-building] Re: How to compile the user version for Android 12?

2023-08-02 Thread &#x27;Dan Willemsen' via Android Building
>
> I think by "user", you mean "release".
>

Just to clarify, it is "user". There used to be a "release" vs "debug"
choice too, but that hasn't existed or done anything for many years.

And yes, the list you see in the `lunch` menu is just a small selection of
targets someone thought would be commonly used. The vast majority of the
time I'd suggest just specifying what you want directly.

On Wed, Aug 2, 2023 at 11:12 AM utz...@gmail.com  wrote:

>
> You can lunch the same target with -user suffix. For example, if you lunch
> emulator_x86_64-userdebug to build userdebug variant ROM, and you can lunch
> emulator_x86_64-user to build user variant ROM. Don't worry if you can't
> see emulator_x86_64-user in the lunch list, you can lunch it direct.
> On Wednesday, August 2, 2023 at 12:38:33 AM UTC+8 Jun Zhang wrote:
>
>> How to compile the user version for Android 12
>> When I was compiling the source code for the Android 12 system, I found
>> that there was only a userdebug and no user was found. How should I add a
>> user or compile the user version
>>
> --
> --
> 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/9f2c9647-4e44-4ddd-b7c0-b05d4b9c32e9n%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/CALQgHdn8NGAd3MpW_t8rMf7M0uo6j3un2HqkNLBBtRhtaN7Uqw%40mail.gmail.com.


Re: [android-building] Compile zipalign.exe as 64-bit

2023-06-28 Thread &#x27;Dan Willemsen' via Android Building
There is build system support for 64-bit windows binaries, but it's not
very well tested. A change like
https://android-review.git.corp.google.com/c/platform/build/+/2645079 will
produce a 64-bit zipalign.exe.

On Wed, Jun 28, 2023 at 3:25 PM 'enh' via Android Building <
android-building@googlegroups.com> wrote:

> i suspect they mean "i want
> https://android-review.googlesource.com/c/platform/build/+/2380864";, the
> commit message for which mentions that there's no 64-bit Windows build
> support (but you shouldn't need it either --- the OS doesn't support zip64,
> so there'd be little use in being able to generate/modify zip64 files :-) ).
>
> On Wed, Jun 28, 2023 at 12:09 PM Fabien Sanglard <
> fabien.sangl...@gmail.com> wrote:
>
>> What do you mean by "32-bit limitation". Are you talking about zip64 file
>> format?
>>
>> On Wed, Jun 28, 2023 at 11:53 AM John  wrote:
>>
>>> I manage to compile zipalign on Linux and it outputs as linux-x86 and
>>> windows-x86. The question is how do I compile as 64-bit? I need 64-bit of
>>> zipalign.exe to avoid 32-bit limitation
>>>
>>> --
>>> --
>>> 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/9afd65cc-c829-4adf-a81c-9030b7d8677en%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/CALpSO9z3VCEtyeioWw5RdSNZ2Y1L-dABt3ukCJbEsfj6w_GCug%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/CAJgzZop%3DyBRz%2BT5LpTciYsp%2BOtj7AKX6Tax-aOXK2C-NLyziyw%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/CALQgHd%3DG0WEK%2BY9p-wgTxDCX-bmx2hSYZdHeHP7%2B88%3DYvNBKFg%40mail.gmail.com.


Re: [android-building] Re: How to skip robolectric host tests

2023-05-04 Thread &#x27;Dan Willemsen' via Android Building
Just m Settings would work as well, mma builds and installs everything
under the directory, which would include building the robotests (even if
you disable running them with DISABLE_ROBO_RUN_TESTS)

- Dan

On Fri, May 5, 2023 at 1:27 AM satur...@gmail.com 
wrote:

> I figured out how to do it. Also using mmm lets me specify the specific
> module so I don't even build the tests.
>
> mmm DISABLE_ROBO_RUN_TESTS=true packages/apps/Settings:Settings
>
> On Wednesday, May 3, 2023 at 12:54:41 PM UTC-7 satur...@gmail.com wrote:
>
>> I am working on Android 13 and I'm using `mm` in packages/apps/Settings
>> to make some changes there. I noticed that when you use `mm` it now builds
>> and runs robolectric host side unit tests every time but since I am trying
>> to iterate on code changes quickly I don't want to run the robolectric
>> tests every single time.
>>
>> How can use `mm` without running the robolectric tests?
>>
>> Jacob
>>
> --
> --
> 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/60d80852-5249-437e-aa53-a118175a0460n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/60d80852-5249-437e-aa53-a118175a0460n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DoDprwvmEX_STVvHPuhEH7ac%2BqQA8WQ12mBcCh1d3eZg%40mail.gmail.com.


Re: [android-building] execute envsetup.sh

2023-04-13 Thread &#x27;Dan Willemsen' via Android Building
The AOSP master source tree is >100GB on disk (though likely less due to
compression when downloading via git). You do need the full tree in order
to run a build.

If you aren't using it, the `--partial-clone` option to `repo init` can
help reduce the amount you need to download at first, though it does mean
that some git operations will need network access to fetch missing objects
on demand. If you don't care about the history, an alternative to that is
`--depth=1` (there can be issues around updating a tree that's created like
that, so in general I don't suggest it)

- Dan

On Thu, Apr 13, 2023 at 10:44 AM Artin Kennedy 
wrote:

>  Hi all,
> I am new in android. I want to use from m and mm macros. After googling I
> found that must  execute envsetup.sh.
>
> This is my main challenge.
>
> before getting build aosp, I get manifest with repo.  when runing "repo
> sync" after 6 hours, has downloaded 50G data and not stop downloading! Is
> it reasonable?
>
> How can I execute build/envsetup.sh?
>
> --
> --
> 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/562bdfc7-0f9f-4ebd-9766-98125e7c6f40n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/562bdfc7-0f9f-4ebd-9766-98125e7c6f40n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmFNX%2BGEQz_Uk0EbdXcj-%3D_MKLWDyh%3DpPFHJbO5WDaivg%40mail.gmail.com.


Re: [android-building] Encountered PHONY error on owners.mk when first full-building of aosp

2023-04-04 Thread &#x27;Dan Willemsen' via Android Building
Don't clone the manifest first, just run:

$ mkdir 
$ cd 
$ repo init -u https://android.googlesource.com/platform/manifest -b master
$ repo sync
$ source build/envsetup.sh
$ lunch aosp_redfin-userdebug (Even with aosp_arm64-eng, result is same)
$ make -j4

What's happening is that by cloning the manifest first, you end up with an
OWNERS file at the root of your source tree. This doesn't work with some of
the checks happening in our make interpreter (it assumes that dependencies
without a '/' are phony targets instead of real files, as make normally
doesn't depend on any of the files at the root of the source tree)

- Dan

On Tue, Apr 4, 2023 at 10:23 AM 김민경  wrote:

> I reset my aosp workspace.
> For it, I did repo init and sync and tried first building.
>
> But it fails with this error message.
>
>
> 
> build/make/core/tasks/owners.mk:25: error: real file
> "out/target/product/redfin/obj/PACKAGING/owners_intermediates/owners.zip"
> depends on PHONY target "OWNERS"
> 15:49:50 ckati failed with: exit status 1
>
>  failed to build some targets (03:32 (mm:ss)) 
>
> 
>
> I executed commands on ubuntu 18.04:
> $ git clone https://android.googlesource.com/platform/manifest
> $ cd manifest $ repo init -u
> https://android.googlesource.com/platform/manifest -b master
> $ repo sync
> $ source build/envsetup.sh
> $ lunch aosp_redfin-userdebug (Even with aosp_arm64-eng, result is same)
> $ make -j4 What should I do for successful building?
>
> --
> --
> 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/d70789d3-2a19-445c-93d7-cf67ce3aece2n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/d70789d3-2a19-445c-93d7-cf67ce3aece2n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdm3NvxJSuSG-1a5mRAUTkAiNsGEsWVLx%2BOzhbb3P_C7GQ%40mail.gmail.com.


Re: [android-building] How to build aapt2 for macOS?

2023-03-20 Thread &#x27;Dan Willemsen' via Android Building
Building device images is not supported on MacOS as of then, but we still
support building the SDK tools. You will need to checkout the source tree
on a case-sensitive filesystem (apfs works, it just needs a case-sensitive
volume set up). Other than repo, the only thing you should need to install
is Xcode and/or the xcode command line tools, but most of the same
instructions for Linux should work otherwise. Then to build aapt2, you just
need to run something like:

  source build/envsetup.sh
  lunch aosp_arm-eng
  m aapt2

- Dan

On Mon, Mar 20, 2023 at 11:21 PM Chen Dai  wrote:

> Hello,
>
> Because of  "Platform development on MacOS isn't supported as of June 22,
> 2021"
> Is there somewhere I can find out how to  build the aapt2 for mac?
>
>
> Thanks a lot!
>
> --
> --
> 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/CAPh7bjhKPEjs8BsW0kGkc3xD%3Dw7xoao3OMDd%2BxoM2%3DeVnguMNg%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/CALQgHdnainBmipQbHcMJDo5fikAzQGaT3UMgXteUpYt6YF4miw%40mail.gmail.com.


Re: [android-building] Re: missing and no known rule to make it

2023-03-03 Thread &#x27;Dan Willemsen' via Android Building
The code that prints that out is in ninja
<https://android.googlesource.com/platform/external/ninja/+/master/>, but
it really won't help to debug it from there -- it has printed everything it
knows.

ninja: error:
> '/home/vamsi/ctos/out/target/common/obj/JAVA_LIBRARIES/sap-api-java-static_intermediates/classes-header.jar',
> needed by
> '/home/vamsi/ctos/out/target/common/obj/APPS/Bluetooth_intermediates/classes-full-debug.jar',
> missing and no known rule to make it
>

This error message would be far better using Android.bp (the Bluetooth app
here was migrated in Android 11). It's very hard to get the makefiles to
produce a better error, so you have to work backwards from the files being
referenced. In this case the Bluetooth(*_intermediates) app(APPS) is
depending on something from the sap-api-java-static library, but that
doesn't exist. Usually that means that the sap-api-java-static library is
missing or not configured correctly.

- Dan

On Fri, Mar 3, 2023 at 2:08 PM Mutyala N V Durga Ashok 
wrote:

> Hi Dan / Krishna,
>
> ninja: error:
> '/home/vamsi/ctos/out/target/common/obj/JAVA_LIBRARIES/sap-api-java-static_intermediates/classes-header.jar',
> needed by
> '/home/vamsi/ctos/out/target/common/obj/APPS/Bluetooth_intermediates/classes-full-debug.jar',
> missing and no known rule to make it
>
> We are trying to search this log under build directory in AOSP and
> couldn't able to find it. Tried with "missing" , "no known rule ", "needed
> by" but nothing works
>
> Could you help me to point to the code where you are printing this log  ?
>
> On Tuesday, 19 February, 2019 at 11:03:42 pm UTC+5:30 krishna venkatesh
> wrote:
>
>> Looks to be your newly added code not conform to sepolicies never allow
>> rues.
>> So please apply proper sepolicies rules.
>> If fissible, please share your code.
>
> --
> --
> 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/a26c9c0c-4cb6-4469-8005-75a4dc2d1f51n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/a26c9c0c-4cb6-4469-8005-75a4dc2d1f51n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdnobrpRN_sVK7sqoNFvK2Q0ems0gqMUxz%3DuZDqJ%3DqDNFg%40mail.gmail.com.


Re: [android-building] How to include external header files in cc_binary build

2023-01-09 Thread &#x27;Dan Willemsen' via Android Building
A common way for this to work would be to use a static library:

Common/Android.bp:

  cc_library_static {
  name: "libCommon",
  srcs: ["Common.cpp"],
  export_include_dirs: ["."],
  }

Foo/Android.bp:

  cc_library_shared {
  name: "libFoo",
  static_libs: ["libCommon"],
  srcs: ["Foo.cpp"],
  }

That works best if the common code is actually common, and doesn't need to
try to include Foo.h or Bar.h at build time. It also works in the inverse
case, where Foo and Bar can be independently built static libraries
included by Common. It has the advantage that there's only one link that
provides both the sources and headers, so you can't accidentally forget
one, or change one but not the other. It'll also only build Common.cpp
once, even if it's used by both libFoo and libBar.

If that's not the case, I'd suggest some refactoring :-) But it is possible
to use a header-only library instead, along with a filegroup for the source:

Common/Android.bp:

  filegroup {
  name: "CommonSrcs",
  srcs: ["Common.cpp"],
  }
  cc_library_headers {
  name: "libCommonHdrs",
  export_include_dirs: ["."],
  }

Foo/Android.bp:

  cc_library_shared {
  name: "libFoo",
  header_libs: ["libCommonHdrs"],
  srcs: ["Foo.cpp", ":CommonSrcs"],
  }

cc_library_headers is really meant to be used only for header-only
libraries -- cases where there are no source files, and everything you need
is in the header files. So this is outside the expected use cases, which
may cause problems as the build system evolves in the future (though
misuses of this are fairly common).

- Dan

On Mon, Jan 9, 2023 at 2:28 PM Netanel Hadad  wrote:

> Hi,
>
> I'm trying to include cpp and header files from the external folder in
> soong build.
>
> I saw here
> <https://groups.google.com/g/android-building/c/CHOSvZNlnaY/m/I590b-rOBAAJ> 
> that
> for cpp files I can use *filegroup *and it indeed works, but I didn't
> find a way to include header files.
>
> In the example below, I want to include common files in both Foo and Bar
> Android.bp.
>
> - Root
> - - Android.bp
> -
> - - Common(folder)
> - - - Common.cpp
> - - - Common.h
> - - - Defs.h
> -
> - - Foo(folder)
> - - - Android.bp
> - - - Foo.cpp
> - - - Foo.h
> -
> - - Bar(folder)
> - - - Android.bp
> - - - Bar.cpp
> - - - Bar.h
>
> Regards,
> Netanel
>
> --
> --
> 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/b2e5a425-90a8-4358-920b-86b7e2def8d6n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/b2e5a425-90a8-4358-920b-86b7e2def8d6n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmSBnijSdkwjkn7gWBy3wJNXuruC2wKJFhdVa%2BVmb2rBw%40mail.gmail.com.


Re: [android-building] Re: dex2oatd fails due to unexpected mmap address

2022-09-28 Thread &#x27;Dan Willemsen' via Android Building
You can try this change, which was backported to Android 9 (P):
https://android-review.googlesource.com/c/platform/art/+/2226578/

- Dan

On Wed, Aug 24, 2022 at 5:50 PM Michael Goffioul 
wrote:

> On Sun, Aug 14, 2022 at 8:30 AM Michael Goffioul <
> michael.goffi...@gmail.com> wrote:
>
>>
>>
>> On Thu, Jul 28, 2022 at 8:58 PM 'Dan Willemsen' via Android Building <
>> android-building@googlegroups.com> wrote:
>>
>>> Have you tried to reproduce with a newer version of Android? Android 7
>>> is about 6 years old, so I wouldn't be expecting any changes to it.
>>>
>>> You may want to talk to your distribution, this could be a configuration
>>> change during the kernel upgrade. Breaking existing binaries is something
>>> the kernel generally attempts to avoid.
>>>
>>
>> I agree. So the most probable conclusion is that the problem comes from
>> the Android side, not the kernel/distribution side.
>>
>>
> After adding debug lines in dex2oatd source code, it appears the error
> comes from this line:
> https://cs.android.com/android/platform/superproject/+/android-7.1.2_r1:art/runtime/mem_map.cc;l=891
> where addr=0x70514000 and flags=0002. Correct me if I'm wrong, but
> given that the mmap flags do not include MAP_FIXED, the provided address is
> only interpreted as a hint, there's no guarantee that the mapped address
> will be the one provided as argument.
>
> --
> --
> 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-99LvRNThpX3m%2BRwAMfZiUwOnFtUSMbsOY%2B80eDc5pO%3DtowQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/android-building/CAB-99LvRNThpX3m%2BRwAMfZiUwOnFtUSMbsOY%2B80eDc5pO%3DtowQ%40mail.gmail.com?utm_medium=email&utm_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/CALQgHdmYwBPkgkSDvVqFVp6E8ZhH1zZXPt%2BnXj783VG9_CodHQ%40mail.gmail.com.


Re: [android-building] Cannot build Android 13 with audio.a2dp.default module

2022-09-13 Thread &#x27;Dan Willemsen' via Android Building
audio.a2dp.default is now part of the bluetooth mainline module
<https://source.android.com/docs/core/architecture/modular-system>, and
cannot be installed independently. It will be embedded in the mainline
module instead.

- Dan

On Tue, Sep 13, 2022 at 6:11 PM Michael Goffioul 
wrote:

> I'm using a source tree derived from manifest android-13.0.0_r4. The build
> also adds audio.a2dp.default to PRODUCT_PACKAGES. The ckati step then fails
> with the following error:
>
> build/make/core/tasks/platform_availability_check.mk:37: warning:
>  Following modules are requested to be installed. But are not available for
> platform because they do
>  not have "//apex_available:platform" or they depend on other modules that
> are not available for platform
> Offending entries:
> audio.a2dp.default:packages/modules/Bluetooth/system/audio_a2dp_hw
>
> Could you tell me how to avoid that error?
>
> Note that it seems I'm not the only one having that problem, I found this
> gerrit change that refers the exact same problem:
> https://android-review.googlesource.com/c/device/ti/beagle-x15/+/1919398
>
> 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/CAB-99LsR412BWPwztyQ5e-%3DV%3DYBHbSA6-0pOYqCAn0pTeW64gg%40mail.gmail.com
> <https://groups.google.com/d/msgid/android-building/CAB-99LsR412BWPwztyQ5e-%3DV%3DYBHbSA6-0pOYqCAn0pTeW64gg%40mail.gmail.com?utm_medium=email&utm_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/CALQgHd%3DeCFRWz4xqV8iR9GGTkMaqgwGABsKkuo_f78JXZ-RPLw%40mail.gmail.com.


Re: [android-building] Mirror manifest contains unavailable repo

2022-08-04 Thread &#x27;Dan Willemsen' via Android Building
This repo has been removed from the manifest in
https://android-review.googlesource.com/2176262

- Dan

On Thu, Aug 4, 2022 at 7:33 PM Al Sutton  wrote:

> Hey folks,
>
> The mirror manifest has a change[1] which adds a repo which isn't
> available from the AOSP servers.
>
> Does anyone know if it's coming soon, or should the change be reverted?
>
> Al.
>
>
> [1] -
>
> https://android.googlesource.com/mirror/manifest/+/277cb5cd26e85a8e4445156ace43c583f3806d28%5E%21/default.xml
>
> --
> --
> 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/d46c9da0-be5f-f779-1e19-f49bd0cd25e3%40alsutton.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/CALQgHdmXE1-HZx4BNCVaX0tPqh6iLFEBMtRMh5w3R0OUqsyo6Q%40mail.gmail.com.


Re: [android-building] platform/system/bpf is not reachable

2022-08-01 Thread &#x27;Dan Willemsen' via Android Building
There were some problems in our git infra, I believe they've mostly been
resolved now, so please try again.

Thanks,
Dan

On Mon, Aug 1, 2022 at 12:09 PM Amit Pundir  wrote:

> Hi Team,
>
> I'm not able to sync AOSP lately because platform/system/bpf is not
> reachable. I see:
>
> -
> platform/system/bpf:
> error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
> fatal: the remote end hung up unexpectedly
> error: Cannot fetch platform/system/bpf from
> https://android.googlesource.com/platform/system/bpf
> Fetching: 100% (1/1), done in 5.357s
> Garbage collecting: 100% (1/1), done in 0.005s
> Checking out: 100% (1141/1141), done in 3.552s
>
> error: Unable to fully sync the tree.
> error: Downloading network changes failed.
> Try re-running with "-j1 --fail-fast" to exit at the first error.
> -
>
> Weblink https://android.googlesource.com/platform/system/bpf returns
> an "INTERNAL: Internal error encountered" error too.
>
> Regards,
> Amit Pundir
>
> --
> --
> 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/CAMi1Hd3azt3CkY_vkUNbvV32zbKaTAPRULbZrobZK-sYivw%3Djw%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/CALQgHd%3DgJ0fx2ep2Tg2a5wtpL-86GUMarZ2SW0BTR1%3DntdydVA%40mail.gmail.com.


Re: [android-building] Re: dex2oatd fails due to unexpected mmap address

2022-07-28 Thread &#x27;Dan Willemsen' via Android Building
Have you tried to reproduce with a newer version of Android? Android 7 is
about 6 years old, so I wouldn't be expecting any changes to it.

You may want to talk to your distribution, this could be a configuration
change during the kernel upgrade. Breaking existing binaries is something
the kernel generally attempts to avoid.

- Dan

On Thu, Jul 28, 2022 at 2:32 PM Michael Goffioul 
wrote:

> This seems to be due to the kernel update on the build host, which
> switched from 5.17 to 5.18. Because the error is related to unexpected mmap
> address, and there was a recent kernel update on the Fedora build host, and
> after suspecting everything else, I ended up suspecting the kernel itself.
> I rebooted into the previous 5.17 kernel, and the error went away.
>
> It would be nice if the Android devs could come up with a workaround that
> does not involve not upgrading the build host kernel. I'm happy to test any
> proposed solution.
>
> Thanks,
> Michael.
>
>
> On Tue, Jul 26, 2022 at 2:36 PM Michael Goffioul <
> michael.goffi...@gmail.com> wrote:
>
>> I forgot to mention the Android version is 7.1.2.
>>
>> On Tue, Jul 26, 2022 at 2:34 PM Michael Goffioul <
>> michael.goffi...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I've been compiling an arm64 firmware (for AMLogic chipset) on the same
>>> Fedora-based system for a couple of years now. Today, after rebuilding from
>>> scratch, I faced the following error. Would anybody have any insight on
>>> what is going on?
>>>
>>> [100% 2/2] build
>>> out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/package.odex
>>> FAILED: /bin/bash -c "(mkdir -p
>>> out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/ &&
>>> rm -f
>>> out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/package.odex
>>> ) && (find out/target/common/obj/APPS/AppInstaller_intermediates/ -maxdepth
>>> 1 -name \"classes*.dex\" | sort | xargs zip -qjX
>>> out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/package.odex
>>> ) && (mv
>>> out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/package.odex
>>> out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/package.odex.input
>>> ) && (rm -f
>>> out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/package.odex
>>> ) && (mkdir -p
>>> out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/ ) &&
>>> (ANDROID_LOG_TAGS=\"*:e\" out/host/linux-x86/bin/dex2oatd --runtime-arg
>>> -Xms64m --runtime-arg -Xmx512m --runtime-arg -classpath --runtime-arg \"&\"
>>> --boot-image=out/target/product/p212/dex_bootjars/system/framework/boot.art
>>> --dex-file=out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/package.odex.input
>>> --dex-location=/system/app/AppInstaller/AppInstaller.apk
>>> --oat-file=out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/package.odex
>>> --android-root=out/target/product/p212/system --instruction-set=arm64
>>> --instruction-set-variant=generic --instruction-set-features=default
>>> --include-patch-information --runtime-arg -Xnorelocate
>>> --no-generate-debug-info --abort-on-hard-verifier-error
>>> --no-inline-from=core-oj.jar   --compile-pic ) && (rm
>>> out/target/product/p212/obj/APPS/AppInstaller_intermediates/oat/arm64/package.odex.input
>>> )"
>>> dex2oatd E 449109 449109 art/runtime/gc/heap.cc:324] Could not create
>>> image space with image file
>>> 'out/target/product/p212/dex_bootjars/system/framework/boot.art'.
>>> Attempting to fall back to imageless running. Error was: Failed to load
>>> /system image
>>> 'out/target/product/p212/dex_bootjars/system/framework/arm64/boot-framework.art':
>>> Failed to mmap at expected address, mapped at 0x7fdaa8a0 instead of
>>> 0x70514000
>>> dex2oatd E 449109 449109 art/runtime/gc/heap.cc:324] Attempted image:
>>> out/target/product/p212/dex_bootjars/system/framework/boot-framework.art
>>> dex2oatd E 449109 449109 art/runtime/runtime.cc:1050] Dex file fallback
>>> disabled, cannot continue without image.
>>> dex2oatd E 449109 449109 art/dex2oat/dex2oat.cc:2232] Failed to create
>>> runtime
>>> ninja: build stopped: subcommand failed.
>>>
>>> Thanks,
>>> Michael.
>>>
>>> --
> --
> You received this m

Re: [android-building] Re: Build AOSP 11 with Google RBE service

2022-07-05 Thread &#x27;Dan Willemsen' via Android Building
>
> In our company the AOSP 11 building time is *1.5hr* which is still slow,
> as daily build and dev build are heavily depending on it. I have seen the
> large potential of RBE to improve the build efficiency,
>

That's your clean build time, right? Are you using incremental builds when
possible? Many of our CI builds were incremental builds first, which sped
things up substantially, then remote execution got added to speed things up
further. RE without incremental builds still isn't as good as RE with
incremental builds in terms of speed (our releases are still
non-incremental builds, and incremental builds are not feasible all the
time, so we still do both).

Btw, I have checked services in your link (
> https://bazel.build/community/remote-execution-services), seems they are
> all for Bazel project, but AOSP is based on Android.bp not Bazel. It will
> be much helpful if you could point me to a workable 3rd-party solution.
> Many thanks!
>

While Bazel was the original user of the remote execution (RE) API, it is a
general API usable by multiple different clients, just like it's able to be
implemented by multiple different services. I don't know which services
claim support or have been tested with Android builds, but in theory it
should be possible to make many of them work.

- Dan

On Mon, Jul 4, 2022 at 11:58 AM John Delight  wrote:

> Thanks Amith for the clarification. According to build logs in below link,
> you are using RBE in daily build. Is it possible to let people outside your
> company to have a try to see the potential of reducing the AOSP building
> time using RBE?
>
> https://ci.android.com/builds/submitted/8795921/aosp_arm64-userdebug/latest/view/logs/build.log
>
> In our company the AOSP 11 building time is *1.5hr* which is still slow,
> as daily build and dev build are heavily depending on it. I have seen the
> large potential of RBE to improve the build efficiency,  really appreciate
> if you could allow me to have a try on it. Thanks!
>
> Btw, I have checked services in your link (
> https://bazel.build/community/remote-execution-services), seems they are
> all for Bazel project, but AOSP is based on Android.bp not Bazel. It will
> be much helpful if you could point me to a workable 3rd-party solution.
> Many thanks!
>
> Regards,
> John
>
> 在2022年6月28日星期二 UTC+8 23:51:47 写道:
>
>> Hi John,
>>
>> Google's RBE service is not generally available for building Android
>> Platform, please take a look at alternative options listed here -
>> https://bazel.build/community/remote-execution-services.
>>
>> Regards,
>> On Monday, June 27, 2022 at 11:02:37 AM UTC-7 johnid...@gmail.com wrote:
>>
>>> Hi Android Building,
>>>
>>> I am following the site (
>>> https://groups.google.com/g/android-building/c/EJradKEiPl0) to build
>>> AOSP 11 with Google RBE service. I have created the service account and
>>> enabled the "Remote Build Execution API" service in Google Cloud. After
>>> setup env variables, the make always show a TLS CA cert issue. Could you
>>> show me the correct way to get the TLS CA cert for Google RBE
>>> service?Thanks!
>>>
>>> Below is env variables setup:
>>> export RBE_service=remotebuildexecution.googleapis.com:443
>>> export RBE_tls_ca_cert=rbe.crt
>>> export RBE_use_rpc_credentials=true
>>> export
>>> GOOGLE_APPLICATION_CREDENTIALS=loyal-theater-204209-c0471ad7c674.json
>>> ...
>>>
>>> I got rbe.cert using command "openssl s_client -connect
>>> remotebuildexecution.googleapis.com:443 -showcerts" and converted to
>>> DER format, and loyal-theater-204209-c0471ad7c674.json is my service
>>> account key file.
>>>
>>> Afte make, it always output below error, seems the TLS CA cert is wrong:
>>> E0626 12:33:13.387181   10559 bootstrap.go:91] Unable to start reproxy:
>>> F0626 12:32:53.444195   10569 main.go:122] Error connecting to remote
>>> execution client: Could not create TLS config: failed to load TLS CA
>>> certificates from rbe.crt
>>>
>>> I tried several ways to get the TLS CA cert, neither works, it always
>>> show above error. Really appreciated your help on it. Thank!
>>>
>>> Regards,
>>> 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 gr

Re: [android-building] Re: Lunch combo options not shown

2022-06-15 Thread &#x27;Dan Willemsen' via Android Building
There are also a variety of log files under out/dumpvars-* that may help
find an error during the dumping of the list (it may show up better if you
try to use an explicit target instead of the menu fallback: `lunch
aosp_arm-eng`)

- Dan

On Wed, Jun 15, 2022 at 11:57 AM Thilo Jäggi  wrote:

> Is this on the Linux Install Disk or not?
> I've seen this behavior on external Disks which were also not ext3 or ext4
> formatted.
>
> kishor...@gmail.com schrieb am Donnerstag, 10. März 2022 um 22:04:55
> UTC+1:
>
>> Hi,
>>
>> What could be reason for lunch command not showing lunch combo
>> options?
>> It just says the following
>>
>> You're building on Linux
>>
>>  Lunch menu... pick a combo:
>>
>>  Which would your like? [aosp_arm-eng]
>>
>> I did fresh repo init and repo sync of 11.0.0_r38
>>This was working earlier for me consistently.
>>
>> Regards,
>> Kishore
>>
> --
> --
> 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/eb5939e1-0ca4-4ede-821c-782f21118890n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/eb5939e1-0ca4-4ede-821c-782f21118890n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdn9Uycu4OA2BW91UUGbcGVN%3DRipsLLK5DOhrBebnTEEyw%40mail.gmail.com.


Re: [android-building] AOSP build time vs CPU core count (up to 56)

2022-06-06 Thread &#x27;Dan Willemsen' via Android Building
This is probably one of two things:

1. Disk Speed. Once you saturate your CPUs (and have the associated memory
required -- somewhere around 2GB/core is usually decent), the next thing
you'll often hit is disk bandwidth. This is where ccache tends to hurt more
than it helps, unless the ccache is on a completely separate [also fast]
disk (full cache hits may get better, but writing the cache ends up being
2x the disk bandwidth). Remote cache/execution plus Bazel's Build without
the bytes <https://blog.bazel.build/2019/05/07/builds-without-bytes.html>
concept
is a more ideal caching solution for this case, but that's not available
for Android at this point.

2. That -j isn't a great limiter. It worked "okay" when every build action
was single threaded, but more and more tools are multithreaded these days.
So if we have 64 cpu threads, and use -j64, if you get really unlucky with
a tool that spawns a process thread for every CPU, we could end up with
4096 (64*64) process threads running, well over the 64 specified by `-j`.
In a more limited case, this may mean that on average you're still using a
good portion of your CPU, even with smaller -j values.

Anyone knows how to disable some of the build tasks? For example i've
> noticed that there is a lot of java source processing and wonder if they
> are all needed. I'm pretty sure that some documentation is generated, in
> our case we don't need that.
>

You're probably seeing metalava/etc. While that is used to generate
documentation, it is also used to generate the API stubs used later in the
build, so it can't just be turned off.

If you haven't seen it yet, Soong's Performance doc
<https://android.googlesource.com/platform/build/soong/+/master/docs/perf.md>
is a good overview on how some performance issues can be diagnosed.

Hopefully you're doing many more incremental builds than full builds, but I
know that gets really complicated with some use cases.

---

For reference, the newer desktops at Google end up being 2x 18-core Intel
Xeon Gold 6154 (so 72 threads) or the Ryzen 3995WX (128 threads), at least
with NVME, but often extended with SSDs. We also run builds on a variety of
GCE-based machines, from 32 to 128 vCPUs, and the difference there between
pd-standard and pd-ssd can be substantial.

On my Intel desktop (w/NVME), without ccache, I'm seeing about a 10%
improvement from -j36 -> -j74, so a little better than your comparison, but
not a ton:

`lunch aosp_arm64-userdebug; m` (effectively -j74) takes 32m46s
`lunch aosp_arm64-userdebug; m -j54` takes 34m00s
`lunch aosp_arm64-userdebug; m -j36` takes 36m19s

With RBE (Google's implementation of
https://bazel.build/community/remote-execution-services):

`lunch aosp_arm64-userdebug; USE_RBE=true m` takes 18m46s

- Dan

On Wed, Jun 1, 2022 at 4:21 PM Christian Gagneraud  wrote:

> Hi all,
>
> We're looking into reducing our build time.
> The first benchmark we did was to measure build time of aosp_arm64 versus
> number of parallel jobs.
> We have a machine with 28 cores (56 threads), so i ran a script to build
> aosp from 4 jobs up to 56 jobs with an increment of 4.
>
> The results surprised me, in a nutshell, with ccache enabled and 100% hit
> rate
> 4 cores: 1h
> 8 cores: 42m
> 12 cores: 35m
> 16+ cores: 32m
>
> Throwing more than 16 cores doesn't influence build time anymore, the
> curve is flat!
>
> I just can't explain what is going on here. Does anyone know why the build
> process doesn't scale?
>
> I'm currently running the same benchmark with ccache disabled. Will post
> an update once i have the data.
>
> Anyone knows how to disable some of the build tasks? For example i've
> noticed that there is a lot of java source processing and wonder if they
> are all needed. I'm pretty sure that some documentation is generated, in
> our case we don't need that.
>
> As well, any tips or feedback around reducing build times would be more
> than welcome.
>
> Thanks,
> Chris
>
> --
> --
> 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/a5b97997-311

Re: [android-building] Addr2line support in Android-13 release

2022-06-03 Thread &#x27;Dan Willemsen' via Android Building
We've been moving away from GCC and GNU Binutils over to Clang+llvm tools.
It looks like there's a version of llvm-addr2line
in prebuilts/clang/host/linux-x86/llvm-binutils-stable/llvm-addr2line

- Dan

On Fri, Jun 3, 2022 at 4:21 PM Bala Ramasamy 
wrote:

> Hi All,
> We are trying to use addr2line tool to find the source code line mapping
> for the memory leak traces got from libmemunreacable tool.
>
> In Android#12, we could use the addr2line tool to convert the memory leak
> traces to source code line using the addr2line present in below path but in
> Android-13, we could not find the addr2line tool.
>
> Could you please let us know, whether addr2line will be supported in
> Android#13? or if it is already supported, could you please guide to find
> and use the same?
>
> *Path in Android#12*:
> android\prebuilts\gcc\linux-x86\x86\x86_64-linux-android-4.9\bin\
> x86_64-linux-android-addr2line
>
> *Path in Android#13 does not have addr2line:*
> android\prebuilts\gcc\linux-x86\host
>
>
> Regards,
> Bala.
>
> --
> --
> 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/1bd85dee-a365-450d-9c08-ebd2892f5ce7n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/1bd85dee-a365-450d-9c08-ebd2892f5ce7n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdnyuv-N65DuFOx5vWPCqaGbEwt270%2BqizF9owDA1kQCFw%40mail.gmail.com.


Re: [android-building] Missing blueprints

2022-05-17 Thread &#x27;Dan Willemsen' via Android Building
Did your `repo sync` finish successfully? It sounds like the
build/blueprint project is missing or corrupted.

- Dan

On Tue, May 17, 2022 at 9:08 PM Red  wrote:

> red@Red-LINUX:~/source$ lunch
>
> You're building on Linux
>
> Warning: Cannot display lunch menu.
>
> Note: You can invoke lunch with an explicit target:
>
>   usage: lunch [target]
>
> Which would you like? [aosp_arm-eng]
> Pick from common choices above (e.g. 13) or specify your own (e.g.
> aosp_barbet-eng):
> /home/red/source/build/soong/scripts/microfactory.bash: line 66:
> /home/red/source/build/blueprint/microfactory/microfactory.bash: No such
> file or directory
>
> It says no file or directory, but why?! Sorry I am beginner, I probably
> did something wrong...
>
> --
> --
> 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/2bd56f2f-5982-42bb-8c4b-f754faf4afd5n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/2bd56f2f-5982-42bb-8c4b-f754faf4afd5n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DEA3%2BdV3%3DrewgzxmSiJ6az4sq%2BUb2-w9482%2B_E3FQqFg%40mail.gmail.com.


Re: [android-building] Compilation error while following codelab

2022-04-15 Thread &#x27;Dan Willemsen' via Android Building
I'd suggest syncing your source tree and trying to build again -- it
appears that you have this frameworks/base change
<https://android-review.googlesource.com/c/platform/frameworks/base/+/2042805>,
but not this telephony change
<https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/2042785>
that
was submitted in the same topic.

- Dan

On Fri, Apr 15, 2022 at 8:31 AM Hassan Rom  wrote:

> Hello all,
>
> I'm following this codelab https://source.android.com/setup/start but I'm
> getting the  compilation error below:
>
> Any ideas?
>
> Thanks.
> - Hassan
>
>
> 
>
> FAILED: //frameworks/opt/telephony:telephony-common turbine [common]
> Outputs:
> out/soong/.intermediates/frameworks/opt/telephony/telephony-common/android_common/turbine/telephony-common.jar
> Error: exited with code: 1
> Command: rm -rf
> "out/soong/.intermediates/frameworks/opt/telephony/telephony-common/android_common/turbine/classes"
> && mkdir -p
> "out/soong/.intermediates/frameworks/opt/telephony/telephony-common/android_common/turbine/classes"
> && prebuilts/jdk/jdk11/linux-x86/bin/java -XX:OnError="cat
> hs_err_pid%p.log" -XX:CICompilerCount=6 -XX:+UseDynamicNumberOfGCThreads
> -jar out/host/linux-x86/framework/turbine.jar --output
> out/soong/.intermediates/frameworks/opt/telephony/telephony-common/android_common/turbine/telephony-common.jar.tmp
> --temp_dir
> "out/soong/.intermediates/frameworks/opt/telephony/telephony-common/android_common/turbine/classes"
> --sources
> @out/soong/.intermediates/frameworks/opt/telephony/telephony-common/android_common/turbine/telephony-common.jar.rsp
>  --source_jars
> out/soong/.intermediates/frameworks/opt/telephony/telephony-common/android_common/gen/aidl/aidl0.srcjar
> --javacopts -Xmaxerrs 999 -encoding UTF-8 -sourcepath "" -g
> -XDskipDuplicateBridges=true -XDstringConcat=inline -Xlint:-dep-ann -source
> 11 -target 11 -- --system
> out/soong/.intermediates/build/soong/java/core-libraries/legacy-core-platform-api-stubs-system-modules/android_common/system
> --classpath
> out/soong/.intermediates/frameworks/base/ext/android_common/turbine-combined/ext.jar
> out/soong/.intermediates/frameworks/base/framework/android_common/turbine-combined/framework.jar
> out/soong/.intermediates/hardware/interfaces/radio/1.0/android.hardware.radio-V1.0-java/android_common/turbine-combined/android.hardware.radio-V1.0-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/1.1/android.hardware.radio-V1.1-java/android_common/turbine-combined/android.hardware.radio-V1.1-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/1.2/android.hardware.radio-V1.2-java/android_common/turbine-combined/android.hardware.radio-V1.2-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/1.3/android.hardware.radio-V1.3-java/android_common/turbine-combined/android.hardware.radio-V1.3-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/1.4/android.hardware.radio-V1.4-java/android_common/turbine-combined/android.hardware.radio-V1.4-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/1.5/android.hardware.radio-V1.5-java/android_common/turbine-combined/android.hardware.radio-V1.5-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/1.6/android.hardware.radio-V1.6-java/android_common/turbine-combined/android.hardware.radio-V1.6-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/aidl/android.hardware.radio.config-V1-java/android_common/turbine-combined/android.hardware.radio.config-V1-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/aidl/android.hardware.radio.data-V1-java/android_common/turbine-combined/android.hardware.radio.data-V1-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/aidl/android.hardware.radio.messaging-V1-java/android_common/turbine-combined/android.hardware.radio.messaging-V1-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/aidl/android.hardware.radio.modem-V1-java/android_common/turbine-combined/android.hardware.radio.modem-V1-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/aidl/android.hardware.radio.network-V1-java/android_common/turbine-combined/android.hardware.radio.network-V1-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/aidl/android.hardware.radio.sim-V1-java/android_common/turbine-combined/android.hardware.radio.sim-V1-java.jar
> out/soong/.intermediates/hardware/interfaces/radio/aidl/android.hardware.radio.voice-V1-java/android_common/turbine-combined/android.hardware.radio.voice-V1-java.jar
> out/soong/.intermediates/frameworks/opt/net/voip/voip-common/android_common/turbine-combined/voip-common.jar
> out/soong/.intermediates/frameworks/opt/net/ims/ims-common/android_common/turbine-jarjar/ims-commo

Re: [android-building] Android 9 compilation error in Ubuntu 18.04.

2022-03-10 Thread &#x27;Dan Willemsen' via Android Building
The error isn't in this log snippet, look for a section starting with
"FAILED:". Newer versions have an out/error.log file with the errors, but
Android 9 is too old for that.

- Dan

On Thu, Mar 10, 2022 at 2:43 AM hani  wrote:

> I compiled it into a VMWare environment on two computers, but the same
> build result was derived. What's the problem?
>
> 
> 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.15.0-112-generic-x86_64-Ubuntu-16.04.7-LTS
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=PQ2A.190405.003
> OUT_DIR=out
> 
>
> [ 73% 55222/75441] target thumb C++: gralloc.goldfish <=
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp
> In file included from
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:27:
> In file included from
> device/generic/goldfish-opengl/system/OpenglSystemCommon/HostConnection.h:19:
> In file included from
> device/generic/goldfish-opengl/host/include/libOpenglRender/IOStream.h:22:
> In file included from
> device/generic/goldfish-opengl/shared/OpenglCodecCommon/ErrorLog.h:20:
> system/core/libcutils/include_vndk/cutils/log.h:38:2: warning:
> "Deprecated: don't include cutils/log.h, use either android/log.h or
> log/log.h" [-W#warnings]
> #warning "Deprecated: don't include cutils/log.h, use either android/log.h
> or log/log.h"
>  ^
> In file included from
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:27:
> In file included from
> device/generic/goldfish-opengl/system/OpenglSystemCommon/HostConnection.h:20:
> device/generic/goldfish-opengl/system/renderControl_enc/renderControl_enc.h:22:41:
> warning: unused parameter 'data' [-Wunused-parameter]
> virtual uint64_t lockAndWriteDma(void* data, uint32_t sz) { return
> 0; }
>^
> device/generic/goldfish-opengl/system/renderControl_enc/renderControl_enc.h:22:56:
> warning: unused parameter 'sz' [-Wunused-parameter]
> virtual uint64_t lockAndWriteDma(void* data, uint32_t sz) { return
> 0; }
>   ^
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:456:10: warning:
> unused variable 'hw_write' [-Wunused-variable]
> bool hw_write = (usage & GRALLOC_USAGE_HW_RENDER);
>  ^
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:1064:15:
> warning: unused variable 'vaddr' [-Wunused-variable]
> void *vaddr;
>   ^
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:1270:53:
> warning: unused parameter 'usage' [-Wunused-parameter]
> buffer_handle_t handle, int usage,
> ^
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:1495:9: warning:
> use of GNU old-style field designator extension [-Wgnu-designator]
> open: gralloc_device_open
> ^
> .open =
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:1499:5: warning:
> use of GNU old-style field designator extension [-Wgnu-designator]
> base: {
> ^
> .base =
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:1500:9: warning:
> use of GNU old-style field designator extension [-Wgnu-designator]
> common: {
> ^~~
> .common =
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:1501:13:
> warning: use of GNU old-style field designator extension [-Wgnu-designator]
> tag: HARDWARE_MODULE_TAG,
> ^~~~
> .tag =
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:1503:13:
> warning: use of GNU old-style field designator extension [-Wgnu-designator]
> module_api_version: GRALLOC_MODULE_API_VERSION_0_2,
> ^~~
> .module_api_version =
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:1504:13:
> warning: use of GNU old-style field designator extension [-Wgnu-designator]
> hal_api_version: 0,
> ^~~~
> .hal_api_version =
> device/generic/goldfish-opengl/system/gralloc/gralloc.cpp:1512:13:
> warning: use of GNU old-style field designator extension [-Wgnu-designator]
> id: GRALLOC

Re: [android-building] Building ADB and Fastboot results in huge binaries

2022-01-19 Thread &#x27;Dan Willemsen' via Android Building
You can build the entire platform-tools package for linux and windows with
something like m dist sdk-repo-platform-tools on the master branch (and an
upcoming platform-tools tag, but I don't think that one -- while there is
an equivalent command, it's a much much much larger build, so I wouldn't
recommend it).

The major missing piece between the binaries that you're building and what
you see being distributed is calling `strip` on the binaries. On master
that execution is
`prebuilts/clang/host/linux-x86/clang-r437112b/bin/llvm-strip
`, but it may be slightly different on the particular tag
you are using (different clang version / using `strip` instead of
`llvm-strip` / etc).

- Dan

On Wed, Jan 19, 2022 at 6:25 PM Noah Andrews  wrote:

>  When I build ADB and Fastboot for Windows, I get binaries that are many
> times larger than the binaries available for download from Google.
> Specifically, ADB is 67.3 MiB (compared to just 5.66 MiB), and fastboot is
> 13.1 MiB (compared to just 1.55 MiB).
>
> My build steps:
>
> repo init -u https://android.googlesource.com/platform/manifest -b
> platform-tools-31.0.3
> repo sync -j10
> lunch sdk-user
> make host_cross_adb
> make host_cross_fastboot
>
> I've also tried running make sdk before make host_cross_adb and make
> host_cross_fastboot, and originally I ran lunch sdk-eng like the
> instructions specify, and nothing seems to help.
>
> Any assistance 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/caac19ec-8c41-4a40-b944-c303e5f0b212n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/caac19ec-8c41-4a40-b944-c303e5f0b212n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3Dt_sr2WYoD%3Du5Qfj65xw%3DHYTTM5xpuUtqRQdKO8910LA%40mail.gmail.com.


Re: [android-building] error.GitError: Cannot checkout platform/build/blueprint: Cannot initialize work tree for platform/build/blueprint

2022-01-04 Thread &#x27;Dan Willemsen' via Android Building
It sounds like you're having some issues with git, or your
network/filesystem. There's not really enough information here to
understand what issue you're hitting. Some things that may help:

   - Which repo command you're running
   - What git version you're using (git --version)
   - More complete output from repo -- it may be useful to limit it down to
   just blueprint to start: `repo sync build/blueprint`

when I later try to set the mobile with "lunch aosp_walleye-eng" I do get
> the error message that the concerned blueprint could not be found.
>

Yeah, trying a build when the source is incomplete is unlikely to work very
well. build/blueprint is one of the earliest projects used during a build
(along with build/make and build/soong), so it's not surprising to see a
blueprint error if that didn't sync.

 I am almost certain that I found a Google page where it is was mentioned,
> that Google will no longer maintain the blueprint Git repository.
>

The standalone github project <https://github.com/google/blueprint> is no
longer maintained, but it is still actively used within Android
<https://android.googlesource.com/platform/build/blueprint/+log/master>.

- Dan

On Tue, Jan 4, 2022 at 2:40 PM Michael Herren 
wrote:

>
> Hello
>
> I hope I am correct here. Since some days I am trying to build an Android
> kernel for a Pixel 2 and Nexus 5X. But so far I constantly failed.
>
> I tried several times to download AOSP. I tried to download the master and
> I also tried to create a local mirror and to then download the master from
> the local mirror. I also tried to download the corresponding branch. But
> what ever I try I do get the message  error.GitError: Cannot checkout
> platform/build/blueprint: Cannot initialize work tree for
> platform/build/blueprint
>
> when I later try to set the mobile with "lunch aosp_walleye-eng" I do get
> the error message that the concerned blueprint could not be found.
>
> I am almost certain that I found a Google page where it is was mentioned,
> that Google will no longer maintain the blueprint Git repository.
>
> Can  anyone help
>
> Kind Regards
> 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/0184edc2-f91e-4e1f-a46e-6a111d0f7133n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/0184edc2-f91e-4e1f-a46e-6a111d0f7133n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DOvtM99iZo%2BHFVAvJCaVBW20a27Y%3DF1c_Nzye0_fHXmA%40mail.gmail.com.


Re: [android-building] Android envsetup.sh overrides pre-set TARGET_BUILD_TYPE env variable!

2022-01-04 Thread &#x27;Dan Willemsen' via Android Building
We never really use anything other than TARGET_BUILD_TYPE=release -- in
AOSP changing that flag is effectively a no-op. TARGET_BUILD_VARIANT=eng or
runtime flags tend to control more debug-like features, but in general it's
problematic to turn on any sort of "debug" for everything in a build
(doesn't fit in the partitions, too slow on device, yet another
cross-cutting feature that isn't regularly tested, etc).

We also tend to avoid using `lunch` (or even envsetup.sh) at all for
automation -- it's only setting ~3 variables that the build actually uses (
TARGET_PRODUCT / TARGET_BUILD_VARIANT / TARGET_BUILD_APPS, plus
TARGET_BUILD_TYPE=release). So much of our automation just does:

build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=my_product
TARGET_BUILD_VARIANT=userdebug droid dist 

Which is roughly equivalent to:

source build/envsetup.sh && lunch my_product-userdebug && m dist

- Dan

On Tue, Jan 4, 2022 at 2:41 PM Abhayadev S  wrote:

> Hi,
>
> I am using a master build script to trigger the android build and the
> master script does the following steps,
>
> *source build/envsetup.sh && lunch *
>
> Now in my master script i was planning to export the TARGET_BUILD_TYPE as
> debug or release according to my other options.
>
> Now I see that the  *build/envsetup.sh* is over-writing it by exporting
> TARGET_BUILD_TYPE always as *release *in the *lunch* function ! (ref:
> https://cs.android.com/android/platform/superproject/+/master:build/make/envsetup.sh;drc=6a012266a18cdf89d4e94a3ce7aa15a9c462a448;l=718
> )
>
> is this expected? its really blocking any possibilities for automation
> right?
>
> regards,
> abhay
>
> --
> --
> 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/1ef6ee61-9e47-4116-96c3-b64041461b03n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/1ef6ee61-9e47-4116-96c3-b64041461b03n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3D%3Dz_gubTvAOOq4b1mvXr%3D006EXuLZ_qsyaQvn0PH%2Bs_Q%40mail.gmail.com.


Re: [android-building] Raw ninja build log (not hashes)

2021-12-28 Thread &#x27;Dan Willemsen' via Android Building
The ninja log file, which is an implementation detail, does not have that
information. The verbose.log.gz does have the command, and it's also
possible to query the commands from ninja. In any case, remember that the
command is executed within the build sandbox environment, so it may not act
the same when you run it on the command line yourself.

- Dan

On Tue, Dec 28, 2021 at 6:52 PM Арсений Марьин 
wrote:

> I want to obtain ninja build log with actual bash commands (not hashes).
> Is 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/961ceca3-90f3-441d-9b97-1fd790668b9en%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/961ceca3-90f3-441d-9b97-1fd790668b9en%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmeOLTjq7ezcHpUOUyLFkQ1Rbtu%3Dqm-KC-GN-7X39Vi_A%40mail.gmail.com.


Re: [android-building] Re: Run shell script before include $(BUILD_PREBUILT)

2021-12-21 Thread &#x27;Dan Willemsen' via Android Building
General soong docs: build/soong/README.md
<https://android.googlesource.com/platform/build/soong/+/master/README.md>

For genrule properties, there's auto-generated reference docs here
<https://ci.android.com/builds/latest/branches/aosp-build-tools/targets/linux/view/genrule.html>

It can also be helpful to look at examples
<https://cs.android.com/search?q=file:Android.bp%20%5Egenrule&ss=android%2Fplatform%2Fsuperproject>
in
AOSP.

- Dan

On Tue, Dec 21, 2021 at 1:11 PM Abhayadev S  wrote:

> thanks Dan and Paulo...
> i will look in to how i can make use of the genrule
> do you see any official man page for this... i am kind of lost in the
> google !
>
> On Wednesday, December 15, 2021 at 1:19:48 AM UTC+5:30 phc@gmail.com
> wrote:
>
>> Hello,
>> The $(shell) inside you mk will for sure slow down your build as Dan
>> pointed out (sorry I forgot to mention this) I currently have a setup like
>> this and Im trying to refactor it,  still trying to find the best solution
>> for my use case.
>> Thanks,
>> Paul
>>
>> On Mon, Dec 13, 2021, 8:41 PM 'Dan Willemsen' via Android Building <
>> android-...@googlegroups.com> wrote:
>>
>>> Embedding build systems into one another is a very complicated issue,
>>> and requires deep knowledge of both build systems in order to keep all the
>>> functionality of both systems. Given that the Android build attempts to
>>> provide safe, fast incremental builds that work on any machine, it gets
>>> very difficult to preserve those features while calling out to another
>>> build system. If the scripts are simpler (bash/python script that reads a
>>> known set of inputs and writes to a know set of outputs, and doesn't use
>>> any other tools), then this doesn't get too difficult. But keep in mind
>>> that you do need to declare all inputs and outputs, and most tools you use
>>> need to be referenced by paths (and also be inputs), not in $PATH.
>>> Android.bp has the `genrule` concept that makes this easier.
>>>
>>> >>> Android build to pickup>
>>>>
>>>
>>> Keep in mind that we're not linearly executing Android.mk files -- that
>>> only happens in the first minute or two of the build to generate commands
>>> for what comes later. So you shouldn't actually be running the script
>>> there, but defining some Make logic to run your script later. You may be
>>> able to find references to Android.mk files using base_rules.mk and
>>> defining rules to build $(LOCAL_BUILT_MODULE), but you could also look into
>>> writing Android.bp files with genrules, which makes this simpler and adds
>>> some checks for common issues.
>>>
>>>
>>>> Have you tried using $(shell) ?
>>>> RESULT:= $(shell ($(LOCAL_PATH)/yourscript.sh))
>>>>
>>>
>>> Definitely don't do this, it will slow down every build as we serially
>>> execute every one of these every time (even if there's nothing to build).
>>>
>>> - Dan
>>>
>>> On Mon, Dec 13, 2021 at 2:49 PM Paulo Maia  wrote:
>>>
>>>> Have you tried using $(shell) ?
>>>> RESULT:= $(shell ($(LOCAL_PATH)/yourscript.sh))
>>>>
>>>> Also you I think you could put in buiod/core/app_prebuilt_internal.mk
>>>> if this is going to be repetitive.
>>>>
>>>> BR,
>>>> Paulo
>>>>
>>>> On Monday, November 8, 2021 at 2:14:48 PM UTC-8 abhay...@gmail.com
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I need to run a shell script so that the libs and bins will be
>>>>> generated beofre Android can pick them up.
>>>>>
>>>>> A structure of the makefile i am trying to comeup is below, not sure
>>>>> if this is really possible.. any inputs are appreciated.
>>>>>
>>>>> LOCAL_PATH := $(call my-dir)
>>>>>
>>>>> >>>> for Android build to pickup>
>>>>>
>>>>> include $(CLEAR_VARS)
>>>>> LOCAL_MODULE:= my_modules
>>>>> LOCAL_MODULE_OWNER  := Me
>>>>> LOCAL_MODULE_TAGS   := optional
>>>>> LOCAL_SRC_FILES := ./my_bin_001
>>>>> LOCAL_MODULE_PATH   := $(PRODUCT_OUT)/system/bin
>>>>> include $(BUILD_PREBUILT)
>>>>>
>>>>> i am not sure how can i add my build script which generates the
>>>>> my_bin_001
>&g

Re: [android-building] product_config.mk syntax error ?

2021-12-21 Thread &#x27;Dan Willemsen' via Android Building
It appears that make & ckati both treat that as "" == "," (when
$(TARGET_BUILD_VARIANT) is `user`), so that case never triggers.

I've posted a removal of the second comma here:
https://android-review.googlesource.com/c/platform/build/+/1931200/

Thanks,
Dan



On Tue, Dec 21, 2021 at 1:10 PM Abhayadev S  wrote:

> Hi,
>
> I see the following in the build/make/core/product_config.mk
> <https://cs.android.com/android/platform/superproject/+/master:build/make/core/product_config.mk;drc=f1f49bb9101448bd6b508625b1eae0ae30e127fa;l=415>
>
> ifeq (,$(filter eng userdebug,$(TARGET_BUILD_VARIANT)),)
>
> here ifeq has been given with 3 arguments right? is it expected? what will
> be the outcome?
>
> regards,
> abhay
>
> --
> --
> 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/d1a1280f-8c6b-42c1-b384-1e12f1282c8an%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/d1a1280f-8c6b-42c1-b384-1e12f1282c8an%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3D1TzUE8V%2BHJZZXzt0QevF8u%3D2L-O%2BpPeqRTf2sppqSbw%40mail.gmail.com.


Re: [android-building] Finding target based on source files

2021-12-13 Thread &#x27;Dan Willemsen' via Android Building
This isn't a simple problem, even just in Soong (what do you do when an
Android.bp file changes? what about a product config file that changes how
a module is built, but is nowhere near it?). At Google we're largely just
building a representative sample, but using incremental builds -- so we're
always doing a bunch of builds, but if we've determined nothing interesting
has changed, they're very short. There are some out-of-tree configurations
that trigger more presubmit builds in some cases where the representative
sample is not large enough, but those are all maintained by hand, not
automatically.

Test capacity is also a concern, and you'll find TEST_MAPPING files
throughout AOSP that attempt to say which tests should be run when files
under them are changed. Here are the docs for these:
https://source.android.com/compatibility/tests/development/test-mapping

- Dan

On Mon, Dec 13, 2021 at 2:50 PM Paulo Maia  wrote:

> Hello ,
> Currently I have been working on a feature to build gerrit single or
> chained changes
> Ex:
> Some makes a change (gerrit patchset update) to
> frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
> I know just for experience that I need to make SystemUI target to check if
> that change is going to compile successful .
> But I want to automate this somehow, so far I have been using
> module-info.json to try and find target to build based on the checkout path
> , but this is not very reliable (since I can pickup extra targets on the
> same repo/project)
>
> I wonder if anyone here has any insights on that matter or have
> implemented something similar. If so please do share :D
>
> PS: There is one very cool project called bgraph (
> https://pypi.org/project/bgraph/) but relies only on the existence of
> Android.bp file it works pretty good , but it is limited.
>
> BR,
> 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/c0052985-6923-42e7-adb7-1ade271cf966n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/c0052985-6923-42e7-adb7-1ade271cf966n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkr37PrOd1uKc-a2jeAYVSpfd8T6KWdJmpfPXiZc0Z0Fg%40mail.gmail.com.


Re: [android-building] Re: Run shell script before include $(BUILD_PREBUILT)

2021-12-13 Thread &#x27;Dan Willemsen' via Android Building
Embedding build systems into one another is a very complicated issue, and
requires deep knowledge of both build systems in order to keep all the
functionality of both systems. Given that the Android build attempts to
provide safe, fast incremental builds that work on any machine, it gets
very difficult to preserve those features while calling out to another
build system. If the scripts are simpler (bash/python script that reads a
known set of inputs and writes to a know set of outputs, and doesn't use
any other tools), then this doesn't get too difficult. But keep in mind
that you do need to declare all inputs and outputs, and most tools you use
need to be referenced by paths (and also be inputs), not in $PATH.
Android.bp has the `genrule` concept that makes this easier.

 Android build to pickup>
>

Keep in mind that we're not linearly executing Android.mk files -- that
only happens in the first minute or two of the build to generate commands
for what comes later. So you shouldn't actually be running the script
there, but defining some Make logic to run your script later. You may be
able to find references to Android.mk files using base_rules.mk and
defining rules to build $(LOCAL_BUILT_MODULE), but you could also look into
writing Android.bp files with genrules, which makes this simpler and adds
some checks for common issues.


> Have you tried using $(shell) ?
> RESULT:= $(shell ($(LOCAL_PATH)/yourscript.sh))
>

Definitely don't do this, it will slow down every build as we serially
execute every one of these every time (even if there's nothing to build).

- Dan

On Mon, Dec 13, 2021 at 2:49 PM Paulo Maia  wrote:

> Have you tried using $(shell) ?
> RESULT:= $(shell ($(LOCAL_PATH)/yourscript.sh))
>
> Also you I think you could put in buiod/core/app_prebuilt_internal.mk if
> this is going to be repetitive.
>
> BR,
> Paulo
>
> On Monday, November 8, 2021 at 2:14:48 PM UTC-8 abhay...@gmail.com wrote:
>
>> Hi,
>>
>> I need to run a shell script so that the libs and bins will be generated
>> beofre Android can pick them up.
>>
>> A structure of the makefile i am trying to comeup is below, not sure if
>> this is really possible.. any inputs are appreciated.
>>
>> LOCAL_PATH := $(call my-dir)
>>
>> > Android build to pickup>
>>
>> include $(CLEAR_VARS)
>> LOCAL_MODULE:= my_modules
>> LOCAL_MODULE_OWNER  := Me
>> LOCAL_MODULE_TAGS   := optional
>> LOCAL_SRC_FILES := ./my_bin_001
>> LOCAL_MODULE_PATH   := $(PRODUCT_OUT)/system/bin
>> include $(BUILD_PREBUILT)
>>
>> i am not sure how can i add my build script which generates the my_bin_001
>> there are several bins its generating and i cant really convert the shell
>> script in to a Makefile for practical reasons.
>>
>> reagrds,
>> abhay
>>
> --
> --
> 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/2824e7a8-3745-45b7-9037-fc5c1eaf8930n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/2824e7a8-3745-45b7-9037-fc5c1eaf8930n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmuC3RcAfmF6GvmQVEqGyemMHW-7K0ovbP1RkZkZam-fA%40mail.gmail.com.


Re: [android-building] Re: building cts/vts

2021-11-29 Thread &#x27;Dan Willemsen' via Android Building
The build variant (eng/userdebug/user) generally should only affect the
device builds, not the test builds, but there may be some differences. The
instructions at https://source.android.com/compatibility/cts/development
don't set anything, so you'll be using the default of `eng` if you build
cts with those instructions. Our CI builds tend to be `userdebug`, so I
wouldn't be surprised if that's what the shipping CTS binaries are built
with, but they could also be built with `user` -- it really shouldn't make
a difference.

- Dan

On Mon, Nov 29, 2021 at 7:49 PM Yeong Jian  wrote:

> Hello Dan,
>
> Thank you so much for clarifying. What about the build type? (eng, user
> and user debug). What do these options refer to, the build type of my
> android device? or the build type of the test suite (CTS/VTS)? Sorry I am
> new to android things.
> Thanks.
>
> Regards,
> Yeongjian
>
> On Wednesday, November 17, 2021 at 5:02:57 PM UTC+8 Dan Willemsen wrote:
>
>> Generally, use the prebuilts -- you want to make sure that you're
>> actually compatible with the same tests everyone else is running.
>>
>> The major exception is if you're developing a change to CTS/VTS itself
>> (to upstream into AOSP), then you'll want to build it to test your change.
>> In that case, you should build CTS/VTS separately from your device, though
>> many individual tests may build & work with your device-specific build
>> settings, that's not guaranteed. You'll likely want to be testing patches
>> on an AOSP checkout that doesn't have your custom device configs anyways.
>> The CTS/VTS build does use `lunch aosp_arm64`/etc, as the generically built
>> test apps are expected to be compatible with any device with the same
>> general architecture (arm vs x86 -- if the build system supported it, we'd
>> have a single CTS/VTS build including all architectures).
>>
>> - Dan
>>
>> On Wednesday, November 17, 2021 at 12:27:18 AM UTC-8 yeong...@gmail.com
>> wrote:
>>
>>> Hello,
>>>
>>> If I have a specialized/modified android build that is based off google
>>> AOSP source code (let's called it build-A).
>>>
>>> When I want to run CTS to test on my build-A, can I use the prebuilt
>>> binaries from Compatibility Test Suite Downloads  |  Android Open
>>> Source Project <https://source.android.com/compatibility/cts/downloads> or
>>> do I have to build the CTS from scratch by specifying the BUILD-BUILD_TYPE
>>> for the lunch command? From what I assumed, the prebuilt CTS binaries seem
>>> to be using aosp_arm64 as the BUILD (from CTS Development  |  Android
>>> Open Source Project
>>> <https://source.android.com/compatibility/cts/development>)
>>>
>>> For building VTS, do I also require my own build when building VTS
>>> during the lunch command, so that the VTS packages are built to suit the
>>> android build that I have (build-A).
>>> How does this lunch command works, once I selected my BUILD-BUILD_TYPE,
>>> does it affect the CTS/VTS packages that would be built? Are they
>>> interconnected?
>>>
>>> Would greatly appreciate a clear explanation regarding building cts/vts
>>> and the lunch command. Thank you.
>>>
>>> Best regards,
>>> Yeongjian
>>>
>> --
> --
> 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/710417b2-7efd-4961-b629-0a38520f4d16n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/710417b2-7efd-4961-b629-0a38520f4d16n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdk4MivG6z-SS4oO8%3DE95KQTZeZwuMwziCv%3Dxned-bijqw%40mail.gmail.com.


[android-building] Re: building cts/vts

2021-11-17 Thread &#x27;Dan Willemsen' via Android Building
Generally, use the prebuilts -- you want to make sure that you're actually 
compatible with the same tests everyone else is running.

The major exception is if you're developing a change to CTS/VTS itself (to 
upstream into AOSP), then you'll want to build it to test your change. In 
that case, you should build CTS/VTS separately from your device, though 
many individual tests may build & work with your device-specific build 
settings, that's not guaranteed. You'll likely want to be testing patches 
on an AOSP checkout that doesn't have your custom device configs anyways. 
The CTS/VTS build does use `lunch aosp_arm64`/etc, as the generically built 
test apps are expected to be compatible with any device with the same 
general architecture (arm vs x86 -- if the build system supported it, we'd 
have a single CTS/VTS build including all architectures).

- Dan

On Wednesday, November 17, 2021 at 12:27:18 AM UTC-8 yeong...@gmail.com 
wrote:

> Hello,
>
> If I have a specialized/modified android build that is based off google 
> AOSP source code (let's called it build-A).
>
> When I want to run CTS to test on my build-A, can I use the prebuilt 
> binaries from Compatibility Test Suite Downloads  |  Android Open Source 
> Project <https://source.android.com/compatibility/cts/downloads> or do I 
> have to build the CTS from scratch by specifying the BUILD-BUILD_TYPE for 
> the lunch command? From what I assumed, the prebuilt CTS binaries seem to 
> be using aosp_arm64 as the BUILD (from CTS Development  |  Android Open 
> Source Project <https://source.android.com/compatibility/cts/development>)
>
> For building VTS, do I also require my own build when building VTS during 
> the lunch command, so that the VTS packages are built to suit the android 
> build that I have (build-A).
> How does this lunch command works, once I selected my BUILD-BUILD_TYPE, 
> does it affect the CTS/VTS packages that would be built? Are they 
> interconnected?
>
> Would greatly appreciate a clear explanation regarding building cts/vts 
> and the lunch command. Thank you.
>
> Best regards,
> Yeongjian
>

-- 
-- 
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/376f76df-9c8d-4dcf-859f-0e54e683835cn%40googlegroups.com.


Re: [android-building] AOSP Compile Time

2021-10-27 Thread &#x27;Dan Willemsen' via Android Building
Most of the time you probably should be doing incremental builds instead of
clean builds (it's very rare to see incremental build issues anymore), so
clean build numbers should be somewhat less important than they used to be.
If you're interested in diving into your build's performance, we've got
some documentation at build/soong/docs/perf.md
<https://cs.android.com/android/platform/superproject/+/master:build/soong/docs/perf.md>

I'll post some numbers tomorrow about what we see at Google, but a few more
important pieces of information for anyone sharing:

   - What branch you checked out (master around X date, android tagged
   release, etc)
   - Which product and variant you're building (aosp_arm64-userdebug can be
   very different from aosp_arm-eng, others can be even more different)
   - What you're building (`m sync` is faster than `m [droid]` which is
   faster than `m dist`)
   - Any other options you may be providing to the build (there are options
   to turn on code coverage analysis, clang-tidy, errorprone, etc -- all of
   these add more work)

Even with the same source tree and machine, you can easily get at least a
2-3x spread in build times with different products, targets, and options.

- Dan

On Wed, Oct 27, 2021 at 3:50 AM William Durham 
wrote:

> With a SN550 1tb nvme home directory and 500gb nvme for my out directory,
> core i5 10600k, 32gb ram, from a fresh sync, no ccache, its 2hrs or so here
>
> On Tue, Oct 26, 2021 at 4:32 PM vzl...@gmail.com  wrote:
>
>> Hi everyone,
>>
>> I'm interacted on the compiling time for AOSP project in different
>> systems.
>>
>> If you have the time to share some results about building time and you
>> system information to be a reference for anyone please do.
>>
>> I will start:
>> AOSP: Android 11
>> CPU: i7-8550U
>> RAM: 32G and 16G swap
>> Disk: HDD
>> Time for full clean compile: 6~7h
>>
>> For me there is huge bottleneck because the HDD.
>>
>>
>> --
>> --
>> 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/016992b7-4834-4ebf-9bc6-b77a1b7b13b0n%40googlegroups.com
>> <https://groups.google.com/d/msgid/android-building/016992b7-4834-4ebf-9bc6-b77a1b7b13b0n%40googlegroups.com?utm_medium=email&utm_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/CAKBspjzjk5XORjhsF_UNghJ6Fa7%3DwCHO%2BBisY-Gn7d2r8aZ4qg%40mail.gmail.com
> <https://groups.google.com/d/msgid/android-building/CAKBspjzjk5XORjhsF_UNghJ6Fa7%3DwCHO%2BBisY-Gn7d2r8aZ4qg%40mail.gmail.com?utm_medium=email&utm_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/CALQgHdkPBbGZSmuiZQS6tkta9yjY_KDohtsKnvpwFr1czb23Gw%40mail.gmail.com.


Re: [android-building] Error while building Android 12 for a signed image

2021-10-13 Thread &#x27;Dan Willemsen' via Android Building
The *-sign-targetfile-* rule doesn't appear to be in AOSP, so this looks
like an issue in your custom make code. Switching to the
built sign_target_files_apks is definitely a good start.

out/.path should not have a working soong_zip, though it may be present --
the intention is to limit the available $PATH tools used in the build
exactly to prevent this sort of issue. For commands that aren't allowed, we
return an error and log its usage. Check the config
<https://cs.android.com/android/platform/superproject/+/master:build/soong/ui/build/paths/config.go;drc=bdbbfd53ecee2fd51a69cdd42b8c57b8b8732dab;l=76>
to see if someone has improperly added soong_zip to the allowlist in your
fork.

Rules within the build should be depending and calling the actual paths
instead (but that's not what releasetools is set up to do), or adjusting
PATH for their command, like when we call add_img_to_target_files here
<https://cs.android.com/android/platform/superproject/+/master:build/make/core/Makefile;drc=ab1d0dc36e2eb3b1945bdd402f1d3a22212652b8;l=5252>.
Make sure that there are dependencies to every tool used by the script if
you use that mechanism though, or you can get flaky builds.

I'd also question why you're [re]signing output in the build itself. Based
on the names in the command, it's to sign the targetfiles with a test key
that isn't caught by the CTS test that verifies that you're not shipping
with well-known keys. But signing automatically with insecure keys means
you're no longer getting that protection. It would be a better idea to mark
that as a known failure until you do the real testing on the release image
(especially since in this case it'll also complain about you running an
'eng' build).

- Dan

On Wed, Oct 13, 2021 at 12:20 AM Salini Venate 
wrote:

> Hi,
>
> I'm getting a build error while trying to generate the* Android-12 signed
> image* using sign_target_files_apks:
> Build details: building Android S for x86_64 on Intel celadon platform
>
>
> 1) The make file calls sign_target_files_apks from
> *build/tools/releasetools/sign_target_files_apks* but the build fails
> with below import error:
>
> *[ 99% 131551/131570] Package release:
> out/target/product/caas/caas-sign-targetfile-eng.svenate.zip*
> *FAILED: out/target/product/caas/caas-sign-targetfile-eng.svenate.zip*
> */bin/bash -c "build/tools/releasetools/sign_target_files_apks -o
> -d device/intel/build/testkeys/cts-release-test --key_mapping
> build/target/product/security/networkstack=device/intel/build/testkeys/cts-release-test/networkstack
>
>  
> out/target/product/caas/obj/PACKAGING/target_files_intermediates/caas-target_files-eng.svenate.zip
> out/target/product/caas/caas-sign-targetfile-eng.svenate.zip"*
> *Warning: releasetools script should be invoked as hermetic Python
> executable -- build and run `sign_target_files_apks` directly.*
> *Traceback (most recent call last):*
> *  File "build/tools/releasetools/sign_target_files_apks", line 160, in
> *
> *import add_img_to_target_files*
> *  File
> "/svenate/celadon_S/build/make/tools/releasetools/add_img_to_target_files.py",
> line 63, in *
> *import ota_metadata_pb2*
> *  File
> "/svenate/celadon_S/build/make/tools/releasetools/ota_metadata_pb2.py",
> line 7, in *
> *from google.protobuf import descriptor as _descriptor*
> *ImportError: No module named google.protobuf*
> *[ 99% 131552/131570] Package:
> out/target/product/caas/caas-img-eng.svenate.zip*
>
> command used:
> /bin/bash -c "build/tools/releasetools/sign_target_files_apks -o  -d
> device/intel/build/testkeys/cts-release-test --key_mapping
> build/target/product/security/networkstack=device/intel/build/testkeys/cts-release-test/networkstack
>
>  
> out/target/product/caas/obj/PACKAGING/target_files_intermediates/caas-target_files-eng.svenate.zip
> out/target/product/caas/caas-sign-targetfile-eng.svenate.zip"
>
> 2)  If I point sign_target_files_apks to
> *out/host/linux-x86/bin/sign_target_files_apks*, the above step succeeds
> in bash terminal, but fails when executed as part of build  with the error
> that it is not able to get soong_zip binary.
>
> * File
> "/svenate/S_staging/out/host/linux-x86/bin/sign_target_files_apks/apex_utils.py",
> line 519, in SignApex*
> *apex_utils.ApexInfoError: Failed to get type for
> /svenate/S_staging/out/soong/.temp/apex-container-hTH_qc.apex:*
> *Failed to run command '['apex_compression_tool', 'compress',
> '--apex_compression_tool_path',
> '/svenate/S_staging/out/host/linux-x86/bin:/svenate/S_staging/prebuilts/build-tools/path/linux-x86:/svenate/S_staging/out/.path',
> '--input', '/svenate/S_

Re: [android-building] Android bootstrap fails with Golang panic

2021-10-06 Thread &#x27;Dan Willemsen' via Android Building
It looks like this was an issue in "VSDK"-based trees that are using a
vendor snapshot, and was fixed in master (but not in Android 12):
https://android-review.googlesource.com/q/topic:vendor_snapshot-192647618

You can either try to cherry-pick that topic, or disable the VSDK.

- Dan

On Wed, Oct 6, 2021 at 2:03 PM 나수환  wrote:

> Hi all,
> I was eager to try android 12. So I synced android-12.0.0_r2 and tried
> building with my device tree. But it fails to bootstrap with long lines of
> Golang panic.
> Error Msg:  FAILED: out/soong/.bootstrap/bin/soong_build
> out/soong/build.ninja - Pastebin.com <https://pastebin.com/PEpzz9vK>
> The Blueprint (Android.bp) of the  libshim_sensorndkbridge:
>
> cc_library_shared {
> name: "libshim_sensorndkbridge",
> srcs: ["ASensorManager.cpp"],
> shared_libs: [
> "libsensorndkbridge",
> "libutils",
> "liblog",
> ],
> whole_static_libs: ["libbase"],
> header_libs: ["libbase_headers"],
> vendor: true,
> include_dirs: [
> "system/core/libutils/include",
> "frameworks/hardware/interfaces/sensorservice/libsensorndkbridge",
> ],
> }
> It will be great if someone can guide me what is the problem
>
> --
> --
> 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/a1a7f78a-9a63-4d52-8939-0207cfa3255bn%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/a1a7f78a-9a63-4d52-8939-0207cfa3255bn%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmM27ASMr8t%2BrjTGofa2TGYro67QNX4OoDFVy8PAitOpQ%40mail.gmail.com.


Re: [android-building] post install step for cc_binary

2021-10-04 Thread &#x27;Dan Willemsen' via Android Building
No, the source tree should be considered read-only from within the build.
I'd suggest doing this as a wrapper around the build, rather than inside
the build. You can set up `dist` options so that `m ... dist` builds will
copy artifacts (and logs -- it's meant to be used on build servers) to
$DIST_DIR (defaults to out/dist/) after a build, but you'd still need
something wrapping the build to put them where you wanted, so that may or
may not simplify things.

- Dan

On Mon, Oct 4, 2021 at 12:13 PM Abhayadev S  wrote:

>
> Hi,
>
> I have a cc_binary module (name myBin) defined in in a/b/Android.bp which
> is building fine and installs the binary in to out//system/bin/myBin
>
> Now, every time the binary is built, i need to copy this binary in to
> another git repo project cloned in a/b/bins/ to keep the prebuilts
>
> so, is there post build/install options i can use inside the Android.bp ?
>
> regards,
> abhay
>
> --
> --
> 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/2edbc3a5-816e-4e12-8528-1cc0f0a7e841n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/2edbc3a5-816e-4e12-8528-1cc0f0a7e841n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkEXCceMwd0iWNMieObQtrNXnyU8Sfs1jvPGYVmQp6ZHA%40mail.gmail.com.


Re: [android-building] cc_binary module name and binary name

2021-10-04 Thread &#x27;Dan Willemsen' via Android Building
No, that's not possible, as the installation system still sets up the
install rules for every module, so that the user can request a module to be
installed even if it isn't in PRODUCT_PACKAGES.

Either have them named differently on the device, or use soong namespaces
<https://android.googlesource.com/platform/build/soong/+/master/README.md#namespaces>
and
the same module name(myBin) so that only one will ever be exported to Make
at a time, that can be chosen through PRODUCT_SOONG_NAMESPACES
(PRODUCT_PACKAGES would just have myBin in either case).

- Dan

On Mon, Oct 4, 2021 at 12:14 PM Abhayadev S  wrote:

> Hi,
>
> usually the name of the installed binary will be same as the module "name"
> but can we have 2 cc_binary modules defined to install a binary of same
> name but on a conditional PRODUCT_PACKAGES definition?
>
> like a/Android.bp will define cc_binary with name : mymodule and it shall
> install myBin
> and b/Android.bp will define cc_binary with name mymodule2 and it shall
> install myBin
> and this will be controlled by a conditional PRODUCT_PACKAGES definition
> PRODUCT_PACKAGES += mymodule  OR PRODUCT_PACKAGES += mymodule2
>
> this is the install a binary (with same name) from 2 partners but based on
> a build condition/rule.
>
> regards,
> abhay
>
>
>
> --
> --
> 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/697400b2-6362-430e-99f2-9e5bce018996n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/697400b2-6362-430e-99f2-9e5bce018996n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdm%3D55ZQtZuOrrJKBm_0EbPSYUAfJEpN%2BLuHeg2SYEb1Ug%40mail.gmail.com.


Re: [android-building] ninja error while upgrading external/v8 in Nougat due to Android.bp

2021-09-14 Thread &#x27;Dan Willemsen' via Android Building
Android.bp (and the Soong build system in general) wasn't really supported
until Android-O, so an Android.bp will be ignored in Nougat. (There was
some prototype support in Nougat under a USE_SOONG flag, but I really doubt
that'll work for you)

- Dan

On Tue, Sep 14, 2021 at 4:19 PM Saurabh Banore 
wrote:

> Hello All,
>
> I am upgrading one of the Nougat libraries - external/v8 and I am facing
> the following error when I try to build the changes in external/v8 with the
> comand *mma*
>
> *ninja: error: unknown target 'MODULES-IN-external-v8', did you mean
> 'MODULES-IN-external-iw'?*
>
> The changes required for upgrading are replacing the Android.mk with
> Android.bp. When checked about error, I understood that the Android.bp from
> the external/v8 is not getting loaded. I have verified that the Android.bp
> in the top level directory contains:
>
> *optional_subdirs = [*
> *"external/*",*
> *]*
>
> Instead of *external/**, I also tried using *external/v8, external/v8/*  *but
> still the Android.bp won't get loaded.
>
> Is there anything else I am missing? Could anyone please provide any
> pointers on how to debug this further?
>
>
> --
> --
> 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/37d6d753-7a12-4457-b23f-ef97e2338276n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/37d6d753-7a12-4457-b23f-ef97e2338276n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3D%2B66DK35ApBEtKKOvPg8%3DWx9GR%3DTquZrr%3DWS%3DQ7kqOFw%40mail.gmail.com.


Re: [android-building] Creating Symbolic Links in the /vendor partition

2021-08-27 Thread &#x27;Dan Willemsen' via Android Building
Ah, now I understand why I'm confused -- Android 12 (and main for the last
year+) doesn't allow you to use PRODUCT_COPY_FILES to install binaries and
libraries: docs
<https://android.googlesource.com/platform/build/+/master/Changes.md#build_broken_elf_prebuilt_product_copy_files>.
This lets us verify that all of the needed libraries will be installed,
among other checks. Instead, you should define a prebuilt in an Android.bp
and add the name to PRODUCT_PACKAGES. Example:

in your Android.bp:
cc_prebuilt_binary {
name: "my_binary",
vendor: true,
arch: {
arm64: {
 srcs: ["arm64/my_binary"]
},
},
shared_libs: ["libmylibrary"],
}

cc_prebuilt_library {
name: "libmylibrary",
vendor: true,
arch: {
arm64: {
srcs: ["arm64/libmylibrary.so"],
},
},
}

If they were built with the NDK, or use other libraries, you may need to
set `sdk_version: "30"` or `shared_libs: [...]` as appropriate.

Then to install symlinks like your original question, there is a `symlinks:
["foo"]` property, which if added to my_binary above, would install a
"/vendor/bin/foo -> /vendor/bin/my_binary" symlink whenever my_binary is
installed.

Then in your product makefile (no need to add libmylibrary, as it will get
installed as a dependency):
PRODUCT_PACKAGES += my_binary

- Dan

On Thu, Aug 26, 2021 at 10:49 AM Curt Schwaderer 
wrote:

> Hello - I'm building an Android 11 product and placed the application
> binaries and libraries in /vendor/bin and /vendor/lib. I also need to
> create a symbolic link in /vendor/lib  to one of the library files also in
> /vendor/lib. If I try to do this in an init..rc file, it will not
> create the symbolic link because the /vendor partition is read only.
>
> I move the modules into /vendor/bin and /vendor/lib at build time using
> the COPY_FILES += macro in an aosp_.mk file, but I have not found
> a way to create a symbolic link in the makefile.
>
> How and when do I create symbolic links in the /vendor partition? Please
> provide an example if possible.
>
> Thanks!
> Curt
>
> --
> --
> 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/4a4400a8-2653-48c3-ad52-ba9470879304n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/4a4400a8-2653-48c3-ad52-ba9470879304n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DuN4UGA1DtSw2FfJqJW7a2TBOBpYZ6ZyxQyCnpBumaAQ%40mail.gmail.com.


Re: [android-building] build android q version on ubuntu 18.04 all cpu at low priority

2021-08-27 Thread &#x27;Dan Willemsen' via Android Building
Is there a specific use case where you need the nice value increased?
Realize that we're also running in SCHED_BATCH mode, which also affects how
the processes are scheduled. We didn't really see any build time changes
when we switched this, only an increase in interactivity when using the
desktop while building a build.

If you did want to change this, it looks like we'd need to upgrade our
nsjail prebuilt (with this change
<https://github.com/google/nsjail/commit/494a5f63cdbb91565e8233133c345280687bd451>),
then you could add "--nice_value", "0", to the argument list here
<https://cs.android.com/android/platform/superproject/+/master:build/soong/ui/build/sandbox_linux.go;drc=0506361a60215defc5098a6253fdc8f51371ce88;l=158>
.

- Dan

On Wed, Aug 18, 2021 at 10:40 AM Longping Tang 
wrote:

> Hi  Dan
> I want to increase priority when building aosp.  How can I increase ni
> value to 0?
> On Monday, October 12, 2020 at 11:27:27 PM UTC+8 mmh19...@gmail.com wrote:
>
>> Thank you very much.
>>
>> 在2020年4月8日星期三 UTC+8 上午12:52:26 写道:
>>
>>> Yes, one byproduct of the nsjail sandboxing that we use is to switch up
>>> the scheduling groups. In our testing, this did not change the performance
>>> of the build.
>>>
>>> It did help the interactiveness (ssh, desktop w/mouse+keyboard, etc) of
>>> the machine while the build was running. It's still not perfect, but it's
>>> an improvement (cgroups help the most, but are difficult for the build to
>>> set up).
>>>
>>> - Dan
>>>
>>> On Tue, Apr 7, 2020 at 9:42 AM Minghui Ma  wrote:
>>>
>>>>
>>>> hi all
>>>>
>>>>  when i build android q version on ubuntu 18.04 i found all cpu at low
>>>> priority, and the ni value is 19, PRI value is 39. like below picture. is
>>>> this normal???
>>>>
>>>>
>>>>
>>>>
>>>> [image: QQ拼音截图20200407142802.png]
>>>>
>>>> --
>>>> --
>>>> 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.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/android-building/91a40872-46d8-4755-9419-06a039fbaccc%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/android-building/91a40872-46d8-4755-9419-06a039fbaccc%40googlegroups.com?utm_medium=email&utm_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/d770a1b0-c026-4689-8d13-d818d327c56an%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/d770a1b0-c026-4689-8d13-d818d327c56an%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkMDh%3DTZiZLMxbyBnR1i201sozE-KM28%2B7H5b5tZAxDcg%40mail.gmail.com.


Re: [android-building] Build faild randomly caused by resouce copy race condition during apk buiding

2021-07-20 Thread &#x27;Dan Willemsen' via Android Building
One fix for this is to move over to using an Android.bp to build your app
rather than an Android.mk 🙂

But I also submitted a fix for this into aosp/master last week:
https://android-review.googlesource.com/c/platform/build/+/1764131

- Dan

On Tue, Jul 20, 2021 at 9:42 AM raymond@gmail.com <
raymond.wangx...@gmail.com> wrote:

> Hi ,
>
> Our Android 11 build has been failing randomly with the following error:
>
> *> cp: cannot create regular file
> 'out/target/common/R/androidx/vectordrawable/R.java': > File exists*
>
>
> then, We found the reason for the compilation failure in build/make/core/
> definitions.mk:
>
> define find-generated-R.java
> $(hide) for GENERATED_MANIFEST_FILE in `find $(1) \
>   -name Manifest.java 2> /dev/null`; do \
> dir=`awk '/package/{gsub(/\./,"/",$$2);gsub(/;/,"",$$2);print
> $$2;exit}' $$GENERATED_MANIFEST_FILE`; \
> mkdir -p $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
> cp $$GENERATED_MANIFEST_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
>   done;
> $(hide) for GENERATED_R_FILE in `find $(1) \
>   -name R.java 2> /dev/null`; do \
> dir=`awk '/package/{gsub(/\./,"/",$$2);gsub(/;/,"",$$2);print
> $$2;exit}' $$GENERATED_R_FILE`; \
> mkdir -p $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
> *cp $$GENERATED_R_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir \*
> *  || exit 31; \*
> cp $$GENERATED_R_FILE $(2) || exit 32; \
>   done;
> @# Ensure that the target file is always created, i.e. also in case we did
> not
> @# enter the GENERATED_R_FILE-loop above. This avoids unnecessary
> rebuilding.
> $(hide) touch $(2)
> endef
>
> When two or more unrelated modules depend on a module that needs to be
> compiled 编by appt2, multiple files with the same name will be copied to the
> same directory.
> When the compilation time of these modules overlaps, the copy operation
> conflicts, which leads to the failure of the build
>
> We also check the aosp master, it may has the same issue
>
> B/R
> Raymond
>
> --
> --
> 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/5f6a6033-6620-40ae-a3dd-125c35f6b394n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/5f6a6033-6620-40ae-a3dd-125c35f6b394n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DxTiUHRtZ02ntS6smJjuv9rum4AxV-tvd-676KyN5rcw%40mail.gmail.com.


Re: [android-building] Re: How to build AOSP with 8GB RAM

2021-07-13 Thread &#x27;Dan Willemsen' via Android Building
>
> I hope AOSP will provide a way to disable the documentation build part of
> it. Can someone from Google help me out here..?
>

Unfortunately, the documentation part of the build also generates code
stubs and other information extracted from the code/docs (@hidden is a
javadoc tag, not an annotation / etc), so it cannot be disabled.

- Dan

On Tue, Jul 13, 2021 at 9:56 PM Ravishankar S 
wrote:

> This process given below (for the Droid documentation build) does not work
> for AOSP11 build! We have to use the method given below:
>
>
> https://forum.xda-developers.com/t/guide-how-to-build-android-11-with-low-ram.4298483/
>
> Thanks and Regards
> Ravishankar
>
> On Wednesday, June 9, 2021 at 7:55:13 AM UTC+5:30 Ravishankar S wrote:
>
>> I have completed by AOSP build on a 4 core 8GB machine with the following
>> specs:
>>
>> Ryzen 3 3300u, 1TB HDD, 8GB Dual channel RAM.
>> Usable is 5.81G when fully booted into Kubuntu 20.04 (no apps running)
>>
>> 1) FIrst enable the zram on you system and reboot: sudo apt install
>> zram-config.
>>
>> 2) Default swapfile size is 2G. Its barely sufficient for the initial
>> soong_ui phase.  Just scraped through. It should be increased to least 4GB.
>> If you have the swapfile on SSD or  can move it to an SSD then its even
>> better.
>>
>> (For sure this phase takes a lot of RAM (~12G) and lots of disk IO. It
>> will take more time than normal as there is lots of swapping)
>>
>> 3)  Still in case the soong_ui phase does not get through then you can
>> try to reduce  reduce the number of jobs say m -j3 or m -j2.
>>
>> 4) The next phase is just compilation and other stuff that is not RAM
>> intensive but mainly CPU and some Disk I/O. You can speed up this phase
>> slightly by using tmfs for the /tmp folder.
>>
>> 5) The last phase is the documentation where Java is used and for this no
>> amount of swap space will help and the system will crash for sure. We have
>> the use the solution provided here and restart the make with just 1 job (m
>> -j1)
>>
>>
>> https://stackoverflow.com/questions/60468693/java-outofmemoryerror-when-building-aosp-10/60474592#60474592
>>
>> export _JAVA_OPTIONS="-Xmx4g"
>>
>> You can try to use m-j2 but it seemed fast enough with m -j1 and less
>> pressure on RAM.
>>
>> Other resources are: 110GB disk space after checkout and 170GB after
>> build.
>>
>>
>>
>>
> --
> --
> 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/47a3f319-9572-4522-8b54-df45e0e8ac4cn%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/47a3f319-9572-4522-8b54-df45e0e8ac4cn%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkmpJm54j87Xxg3sUaMsyfjNMYCtfSD5xnf%2BRQjz22Eog%40mail.gmail.com.


[android-building] Re: Platform development on MacOS isn't supported as of June 22, 2021.

2021-07-08 Thread &#x27;Dan Willemsen' via Android Building
> -g default,tools

The "tools" group in the manifest is unrelated to building these SDK tools, 
so that shouldn't be necessary (though all of the "tools" grouped projects 
are also in "default" currently, so it really shouldn't change anything 
either).

> LOCAL_MULTILIB=64 USE_NINJA=false

LOCAL_MULTILIB doesn't do anything on the command line, and ninja has been 
the only way to build for several releases now, so you can drop these. Just 
`m aapt` should work fine.

> Running into error after error attempting a build leads me to believe I'm 
not doing this right.

I think I just fixed this particular error with 
https://android-review.googlesource.com/c/platform/build/+/1760965 this 
afternoon, so if you sync or cherry-pick that change, your command should 
work. Building the actual SDK zip files on AOSP is still broken, and I'm 
working on refactoring those so that you don't need to build a system image 
in order to build the platform/build-tools zips.

- Dan

On Thursday, July 8, 2021 at 2:47:43 PM UTC-7 connor.t...@gmail.com wrote:

> I saw this message - "*Important: Platform development on MacOS isn't 
> supported as of June 22, 2021.*" when attempting to pull down AOSP on 
> MacOS to build the platform/build tools.
>
> I set it up via:
>
> repo init -u https://android.googlesource.com/platform/manifest -b master 
> -g default,tools
> repo sync -c -j8
> source build/envsetup.sh
> lunch sdk-eng
> make LOCAL_MULTILIB=64 USE_NINJA=false aapt
>
> Is there an expected path of building just the tools (platform & build) 
> with that announcement? It is getting tougher and tougher to build these 
> platform/build tools on each release and not sure if I'm making something 
> more difficult than it should be.
>
> Running into error after error attempting a build leads me to believe I'm 
> not doing this right.
>
> FAILED: out/soong/build.ninja
> cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && 
> BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / 
> && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n 
> "out" -d "out/soong/build.ninja.d" -t -l 
> out/.module_paths/Android.bp.list -globFile 
> out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja 
> --available_env out/soong/soong.environment.available --used_env 
> out/soong/soong.environment.used Android.bp
> error: system/bt/vendor_libs/test_vendor_lib/Android.bp:100:1: module 
> "test-vendor_test_host" variant "darwin_x86_64": depends on disabled module 
> "libbluetooth_headers"
> error: system/bt/vendor_libs/test_vendor_lib/Android.bp:100:1: module 
> "test-vendor_test_host" variant "darwin_x86_64": depends on disabled module 
> "libbt-rootcanal-types"
> error: system/bt/vendor_libs/test_vendor_lib/Android.bp:100:1: module 
> "test-vendor_test_host" variant "darwin_x86_64": depends on disabled module 
> "libbt-rootcanal"
> 05:49:56 soong bootstrap failed with: exit status 1
> ninja: build stopped: subcommand failed.
>

-- 
-- 
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/63bbf36e-6746-430d-8a8e-39983269a56cn%40googlegroups.com.


Re: [android-building] ABI update Failed

2021-06-22 Thread &#x27;Dan Willemsen' via Android Building
I'd recommend contacting your source code provider about that build issue,
as that doesn't appear to be AOSP, and the AOSP-based targets don't seem to
work in that source tree.

In general, the idea behind API/ABI stability is that it's stable across
Android releases, so it's not something that can just be changed in a
version that has already been released. If you intended to make changes to
the radio ABI, you'd need to work with one or more of AOSP/Google/your
source provider to add any newly required APIs into a new version of that
API (in which case someone would be running those commands in an AOSP tree,
where they would work).

If you didn't make changes to the ABI, you'd want to debug that issue
further rather than attempting to update the ABI to fix your build issue.

- Dan

On Tue, Jun 22, 2021 at 10:09 PM figs개발자  wrote:

> Hi All
>
> i have a problem with the ABI update.
>
> i changed the android.hardware.radio@1.0
> So, i'm getting an error when building aosp.
>
> FAILED:
> out/soong/.intermediates/hardware/interfaces/radio/1.0/android.hardware.radio@1.0
> /android_arm64_armv8-a_vendor_shared/android.hardware.ra...@1.0.so.abidiff
> (prebuilts/clang-tools/linux-x86/bin/header-abi-diff
> -allow-unreferenced-changes -allow-unreferenced-elf-symbol-changes -lib
> android.hardware.radio@1.0 -arch arm64 -o
> 'out/soong/.intermediates/hardware/interfaces/radio/1.0/android.hardware.radio@1.0
> /android_arm64_armv8-a_vendor_shared/android.hardware.ra...@1.0.so.abidiff'
> -new
> 'out/soong/.intermediates/hardware/interfaces/radio/1.0/android.hardware.radio@1.0
> /android_arm64_armv8-a_vendor_shared/android.hardware.ra...@1.0.so.lsdump'
> -old
> prebuilts/abi-dumps/vndk/29/64/arm64_armv8-a/source-based/android.hardware.ra...@1.0.so.lsdump)||
> (echo 'error: Please update ABI references with:
> $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py
> -l android.hardware.radio@1.0' && (mkdir -p $DIST_DIR/abidiffs && cp
> 'out/soong/.intermediates/hardware/interfaces/radio/1.0/android.hardware.radio@1.0
> /android_arm64_armv8-a_vendor_shared/android.hardware.ra...@1.0.so.abidiff'
> $DIST_DIR/abidiffs/) && exit 1)
> **
> error: VNDK library: android.hardware.radio@1.0's ABI has INCOMPATIBLE
> CHANGES Please check compatibility report at:
> out/soong/.intermediates/hardware/interfaces/radio/1.0/android.hardware.radio@1.0
> /android_arm64_armv8-a_vendor_shared/android.hardware.ra...@1.0.so.abidiff
> **
> error: Please update ABI references with:
> $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py
> -l android.hardware.radio@1.0
>
> i watched the document (
> https://source.android.com/devices/architecture/vndk/abi-stability?hl=en )
> i attempted to update ABI.
> /development/vndk/tools/header-checker/utils/create_reference_dumps.py  -l
> android.hardware.radio@1.0
>
> FAILED]
> making libs for aosp_arm_ab-userdebug
> 
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=10
> TARGET_PRODUCT=aosp_arm_ab
> TARGET_BUILD_VARIANT=userdebug
> 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-142-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=QKQ1.201109.002
> OUT_DIR=out
> 
> [100% 773/773] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
> FAILED: out/soong/build.ninja
> out/soong/.bootstrap/bin/soong_build -t -l
> out/.module_paths/Android.bp.list -b out/soong -n out -d
> out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o
> out/soong/build.ninja Android.bp
> Clang SA is not enabled
> error: external/nos/host/generic/citadel/updater/Android.bp:17:1:
> "citadel_updater" depends on undefined module "libnos_citadeld_proxy"
> 15:34:56 soong bootstrap failed with: exit status 1
> Traceback (most recent call last):
>   File
> "./development/vndk/tools/header-checker/utils/create_reference_dumps.py",
> line 254, in 
> main()
>   File
> "./development/vndk/tools/header-checker/utils/create_reference_dumps.py",
> line 245, in main
> num_processed =
> create_source_abi_reference_dumps_for_all_products(args)
>   File
> "./development/vndk/tools/header-checker/utils/create_referenc

Re: [android-building] Re: Including Library in AOSP/frameworks/base/core

2021-06-22 Thread &#x27;Dan Willemsen' via Android Building
>
> *AOSP/build/make/core/tasks/check_boot_jars/package_allowed_list.txt*


Be careful if you're planning on being compatible with the CDD
<https://source.android.com/compatibility/cdd.html>, particularly section
3.6
<https://source.android.com/compatibility/android-cdd#3_6_api_namespaces>.
Adding new classes to the bootclasspath can cause compatibility issues with
apps, which is why that check exists (and is your subsequent problem).

One method mentioned in the CDD to work around this is to add your new
packages to a separate library that apps can opt into. That doesn't really
work if you're using it in modified framework classes that get loaded into
every app though. There's one example with bouncycastle that gets repackaged
<https://cs.android.com/android/platform/superproject/+/master:external/bouncycastle/Android.bp;drc=f8a7462f1d6d713c4fa611e5f3be8d90ad287df0;l=116>
to be inside a different namespace in order to not conflict with apps. That
may be possible with jarjar <https://github.com/google/jarjar> too (which
the build system has support for), I'm not sure what the scripts
<https://cs.android.com/android/platform/superproject/+/master:external/bouncycastle/srcgen_platform/generate_android_src.sh>
used
for bouncycastle are doing differently.

- Dan

On Tue, Jun 22, 2021 at 10:10 PM Yolo Pucky  wrote:

> So I actually got a solution to my problem mentioned on 09.06.2021.
> However, I have another problem now, that is closely related to the
> aforementioned.
>
>
> ---
> BEGINNING OF SOLUTION
>
> ---
> First here is my solution to my problem from 09.06.2021:
> The blueprint in *AOSP/prebuilts/misc/common/gson/Android.bp *remains.
>
> *AOSP/frameworks/base/Android.bp*
> *...*
> java_library {
> name: "framework-minus-apex",
> ...
> libs: [
> "framework-updatable-stubs-module_libs_api",
> "gson",
> ],
> static_libs: [
> // If MimeMap ever becomes its own APEX, then this dependency would need
> to be removed
> // in favor of an API stubs dependency in java_library "framework" below.
> "mimemap",
> "gson",
> ],
> ...
> }
> ...
>
> *AOSP/build/make/core/tasks/check_boot_jars/package_allowed_list.txt*
> # Boot jar package name allowed list.
> # Each line is interpreted as a regular expression.
> ...
> com\.google\.gson\..*
> com\.google\.gson.*
> ...
>
> ---
> END OF SOLUTION
>
> ---
>
>
> ---
> BEGINNING OF SUBSEQUENT PROBLEM
>
> ---
> First, note that I exchanged the Gson library with the Jackson library by
> now.
> Building custom Android and using the Jackson library is no problem
> anymore. Though I only want to use the library within the AOSP i.e. I do
> not want third-party apps installed on my custom Android to see those
> libraries.
> The way I include the library leads to the problem that third-party apps
> that import classes or methods from these libraries will always try to
> import them from the Android library instead of the library the apps bring
> themselves.
> Since the library I include within my custom Android might differ from the
> library brought by the third-party apps, it does not necessarily contain
> all required classes or methods for those apps. Subsequently, these apps
> break:
> *// Caused by: java.lang.NoSuchMethodError: No interface method
> getterVisibility()LX/15g; in class
> Lcom/fasterxml/jackson/annotation/JsonAutoDetect; or its super classes
> (declaration of 'com.fasterxml.jackson.annotation.JsonAutoDetect' appears
> in /system/framework/framework.jar!classes4.dex)*
>
> How can I make my included library within the framework.jar only visible
> to AOSP internals?
>
>
>
>
> *---END
> OF SUBSEQUENT
> PROBLEM--

Re: [android-building] How to fix or avoid “Android.mk: error: ”libxyz (native:vendor) can not link against libgui.vendor (native:vndk_private)"?

2021-06-22 Thread &#x27;Dan Willemsen' via Android Building
vndk_private libraries are not part of the stable ABI provided to /vendor
code, so they're not safe to link against, as it's possible for a VNDK
update to be installed without recompiling your vendor code. They still
have ".vendor" versions because they're used in the implementations of
other VNDK libraries that are exposed to /vendor code.

- Dan

On Tue, Jun 22, 2021 at 10:10 PM Vitaly Bortz  wrote:

> Hi all,
> Is there a modifiable condition[s]/rule[s] which I could change to allow
> linking between two given libraries types and prevent the "can not link
> against" error to appear?
>
> Thanks in advance,
> Vitaly
>
> P.S. posted initially a question about this error on stackoverflow
> <https://stackoverflow.com/questions/67983413/how-to-fix-or-avoid-android-mk-error-libxyz-nativevendor-can-not-link-aga>,
> but in 3 days got 0 answers :- (
>
> --
> --
> 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/d220b717-30e6-43de-8fe4-c16999f5fad0n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/d220b717-30e6-43de-8fe4-c16999f5fad0n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkrXeQPyWnL%2BRF-Za6u-amxUrxCm0LLaaW9Hviysc2UwA%40mail.gmail.com.


Re: [android-building] Build error for target db845c-userdebug

2021-06-22 Thread &#x27;Dan Willemsen' via Android Building
That doesn't actually look like the error -- there should be a line
starting with `FAILED:` earlier in your console. You can always look at the
dedicated error log after the build too, in out/error.log, which should
only contain errors (not other build output that finished after the error).

- Dan

On Tue, Jun 22, 2021 at 10:11 PM Prabhakar Lad 
wrote:

> Hi All,
>
> I am trying to build the master branch for target db845c-userdebug, at
> around 90% I see the below build errors:
>
> [ 90% 97817/107707] //bionic/libm:libm.ndk abidw
> out/soong/.intermediates/bionic/libm/libm/android_arm_armv8-2a_kryo385_shared/unstripped/libm.
> no declaration found for ELF symbol acoshl
> no declaration found for ELF symbol acosl
> no declaration found for ELF symbol asinhl
> no declaration found for ELF symbol asinl
> no declaration found for ELF symbol atan2l
> no declaration found for ELF symbol atanhl
> no declaration found for ELF symbol atanl
> no declaration found for ELF symbol cacoshl
> no declaration found for ELF symbol cacosl
> no declaration found for ELF symbol casinhl
> no declaration found for ELF symbol casinl
> no declaration found for ELF symbol catanhl
> no declaration found for ELF symbol catanl
> no declaration found for ELF symbol cbrtl
> no declaration found for ELF symbol ceill
> no declaration found for ELF symbol clogl
> no declaration found for ELF symbol coshl
> no declaration found for ELF symbol cosl
> no declaration found for ELF symbol csqrtl
> no declaration found for ELF symbol erfcl
> no declaration found for ELF symbol erfl
> no declaration found for ELF symbol expm1l
> no declaration found for ELF symbol floor
> no declaration found for ELF symbol floorl
> no declaration found for ELF symbol fmal
> no declaration found for ELF symbol frexpl
> no declaration found for ELF symbol hypotl
> no declaration found for ELF symbol ldexpf
> no declaration found for ELF symbol ldexpl
> no declaration found for ELF symbol lgammal
> no declaration found for ELF symbol lgammal_r
> no declaration found for ELF symbol log10l
> no declaration found for ELF symbol log1pl
> no declaration found for ELF symbol logbl
> no declaration found for ELF symbol nanl
> no declaration found for ELF symbol nextafterl
> no declaration found for ELF symbol nexttoward
> no declaration found for ELF symbol nexttowardl
> no declaration found for ELF symbol remainderl
> no declaration found for ELF symbol remquol
> no declaration found for ELF symbol rintl
> no declaration found for ELF symbol scalbnl
> no declaration found for ELF symbol sinhl
> no declaration found for ELF symbol sinl
> no declaration found for ELF symbol sqrt
> no declaration found for ELF symbol sqrtf
> no declaration found for ELF symbol sqrtl
> no declaration found for ELF symbol tanhl
> no declaration found for ELF symbol tanl
> no declaration found for ELF symbol truncl
> 18:07:10 ninja failed with: exit status 137
>
>  failed to build some targets (04:58:40 (hh:mm:ss)) 
>
> My host platform is ubntu20.04.
>
> Has anyone faced similar  issue or any pointers on this would be helpful.
>
> Cheers,
> Prabhakar
>
> --
> --
> 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/e303dccd-e520-480b-adfc-c7acad4475bbn%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/e303dccd-e520-480b-adfc-c7acad4475bbn%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmUs-Q8c0SmR83DCutJVZgnke5qNQm8NpGr4Jszn5vJwQ%40mail.gmail.com.


Re: [android-building] clang++.real stack dump llvm when building nougat-86 android-x86

2021-06-22 Thread &#x27;Dan Willemsen' via Android Building
The common reason that clang crashes come up on this mailing list is that
your system has run out of memory during the build -- you might want to
watch `top` during a build, or look at the kernel logs afterwards and see
if it was OOM-killed or crashed due to some other reason. Sometimes it's a
bug in clang too, but that's rarer (and with clang & code that old, not all
that useful to track down).

- Dan

On Tue, Jun 22, 2021 at 10:12 PM sazer kpla 
wrote:

> Android Building
>
> [  0% 13/29446] //external/llvm/lib/LTO:libLLVMLTO clang++ LTOModule.cpp
> FAILED:
> out/soong/.intermediates/external/llvm/lib/LTO/libLLVMLTO/android_x86_64_static_core/obj/external/llvm/lib/LTO/LTOModule.o
> PWD=/proc/self/cwd
> prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++ -c
> -Iexternal/llvm/lib/LTO  -fno-exceptions -Wno-multichar -O2
> -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2
> -Wstrict-aliasing=2 -ffunction-sections -fno-short-enums -fstrict-aliasing
> -funwind-tables -fstack-protector-strong -no-canonical-prefixes
> -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast
> -Werror=implicit-function-declaration -O2 -g -fno-strict-aliasing -DANDROID
> -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith
> -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd=
> -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion
> -Wno-reserved-id-macro -Wno-format-pedantic
> -Wno-unused-command-line-argument -fcolor-diagnostics
> -Wno-expansion-to-defined -fdebug-prefix-map=$PWD/= -Werror=return-type
> -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point
> -Werror=date-time -nostdlibinc -m64 -march=x86-64 -DUSE_SSSE3 -mssse3
> -msse4 -msse4.1 -msse4.2 -mpopcnt -Iexternal/llvm/include
> -Iexternal/llvm/device/include
> -Iout/soong/.intermediates/external/llvm/llvm-gen-attributes/gen
> -Iout/soong/.intermediates/external/llvm/llvm-gen-intrinsics/gen
> -Iexternal/libcxx/include -Iexternal/libcxxabi/include
> -Isystem/core/include -Isystem/media/audio/include
> -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include
> -Ihardware/ril/include -Ilibnativehelper/include
> -Iframeworks/native/include -Iframeworks/native/opengl/include
> -Iframeworks/av/include -isystem bionic/libc/arch-x86_64/include -isystem
> bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem
> bionic/libc/kernel/uapi/asm-x86 -isystem bionic/libc/kernel/android/scsi
> -isystem bionic/libc/kernel/android/uapi
> -Ilibnativehelper/include_deprecated -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -fomit-frame-pointer -Wall
> -W -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers
> -Wwrite-strings -Werror -Dsprintf=sprintf -Wno-error=unused-lambda-capture
> -Wno-error=user-defined-warnings -target x86_64-linux-android
> -Bprebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin
> -fPIC -D_USING_LIBCXX -std=gnu++14 -Wsign-promo
> -Wno-inconsistent-missing-override -Wno-null-dereference
> -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative
> -Wno-sign-promo -std=c++11 -Woverloaded-virtual -fno-rtti
> -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
> -Werror=address-of-temporary -Werror=return-type -MD -MF
> out/soong/.intermediates/external/llvm/lib/LTO/libLLVMLTO/android_x86_64_static_core/obj/external/llvm/lib/LTO/LTOModule.o.d
> -o
> out/soong/.intermediates/external/llvm/lib/LTO/libLLVMLTO/android_x86_64_static_core/obj/external/llvm/lib/LTO/LTOModule.o
> external/llvm/lib/LTO/LTOModule.cpp
> clang++.real: error: unable to execute command: Bus error
> clang++.real: error: clang frontend command failed due to signal (use -v
> to see invocation)
> Android clang version 5.0.300080  (based on LLVM 5.0.300080)
> Target: x86_64--linux-android
> Thread model: posix
> InstalledDir: prebuilts/clang/host/linux-x86/clang-4053586/bin
> clang++.real: note: diagnostic msg: PLEASE submit a bug report to
> http://llvm.org/bugs/ and include the crash backtrace, preprocessed
> source, and associated run script.
> clang++.real: error: unable to execute command: Bus error
> clang++.real: note: diagnostic msg: Error generating preprocessed
> source(s).
> [  0% 20/29446] //external/llvm/lib/Transforms/IPO:libLLVMipo clang++
> SampleProfile.cpp
> ninja: build stopped: subcommand failed.
> 21:30:12 ninja failed with: exit status 1
> any idea ?
>
> --
> --
> 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

Re: [android-building] Re: Build problem

2021-06-15 Thread &#x27;Dan Willemsen' via Android Building
If that doesn't work, try rebuilding the blob files, my understanding is
that they've been fixed.

Thanks,
Dan

On Tue, Jun 15, 2021 at 3:34 PM cptl...@gmail.com 
wrote:

> In vendor/qcom/redfin/proprietary/Android.mk:
>
> There are several lines that say:
> *LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../COPYRIGHT $(LOCAL_PATH)/../LICENSE*
>
> Remove the  *$(LOCAL_PATH)/../COPYRIGHT* part.  Only the LICENSE file
> exists.
>
> On Tuesday, June 8, 2021 at 10:27:06 PM UTC-4 s41...@gmail.com wrote:
>
>> Where to get the COPYRIGHT document?
>> I want to build image for my Pixel 5 but always get error as below.
>>
>> error: ninja: 'vendor/qcom/redfin/COPYRIGHT', needed by
>> 'out/target/product/redfin/obj/NOTICE_FILES/src/system_ext/app/QtiTelephonyService/QtiTelephonyService.apk.txt',
>> missing and no known rule to make it
>>
>> Does anyone face this issue?
>>
> --
> --
> 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/95115842-5e59-4b81-9845-86cab2bb3b38n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/95115842-5e59-4b81-9845-86cab2bb3b38n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DszwBF4CgzEzNGFCs%2BuyuARaQrsJVSA7WNvhHV_2YAzw%40mail.gmail.com.


Re: [android-building] AOSP on aws a1 instance (arm)

2021-06-08 Thread &#x27;Dan Willemsen' via Android Building
Building Android requires a x86-64 machine, it is not supported on arm. As
you've found, all of our prebuilt tools are x86-64, and I suspect there are
further issues even if you manage to replace them with arm equivalents, as
that hasn't been tested. There's limited support in Soong for Linux/arm64,
but that's for cross-compiling binaries for that configuration on an x86-64
system.

- Dan

On Tue, Jun 8, 2021 at 7:27 PM kkh  wrote:

> Hi,
>
> Anyone manage to build AOSP on arm host? After repo sync on
> android-11.0.0_r35, did the source envsetup.sh and lunch command, but it
> seem that the build tools is in x86.
>
> Error encountered
> */home/ubuntu/android/build/blueprint/microfactory/microfactory.bash: line
> 62: /home/ubuntu/android/prebuilts/go/linux-x86//bin/go: cannot execute
> binary file: Exec format error*
>
> *You're building on Linux*
>
> *Lunch menu... pick a combo:*
>
> *Which would you like? [aosp_arm-eng] *
> */home/ubuntu/android/build/blueprint/microfactory/microfactory.bash: line
> 62: /home/ubuntu/android/prebuilts/go/linux-x86//bin/go: cannot execute
> binary file: Exec format 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/19e0f12e-d416-4ac5-83ec-0a89afae7fb6n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/19e0f12e-d416-4ac5-83ec-0a89afae7fb6n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdn6uwJM9QZcjndOb3W_YJCjxxrW_CR9Ug1Mn_SVXitnNQ%40mail.gmail.com.


Re: [android-building] how to distribute android 10/11 ?

2021-05-14 Thread &#x27;Dan Willemsen' via Android Building
>
> While I understand goma support is being deprecated/removed on AOSP
> master, is there a way to still be able to use Goma on Android 12 since I
> already have a goma client and server setup to work with Android 10.
>

No, it was removed before Android 12 was branched, so it's not in Android
12 either. You could always attempt to revert those removals in your own
tree, but I don't know how complex that could be. RBE works with
significantly more of the build actions than GOMA ever did.

- Dan

On Fri, May 14, 2021 at 3:37 PM Ruben Wu  wrote:

> Hi Dan,
> While I understand goma support is being deprecated/removed on AOSP
> master, is there a way to still be able to use Goma on Android 12 since I
> already have a goma client and server setup to work with Android 10.
>
> Best,
> Ruben
>
> On Tuesday, February 16, 2021 at 4:14:19 PM UTC-6 Dan Willemsen wrote:
>
>> GOMA support has been removed on the AOSP master branch, and has been
>> replaced with RBE.
>>
>> - Dan
>>
>> On Wed, Feb 3, 2021 at 9:30 AM 唐木村  wrote:
>>
>>> @Dan Willemsen
>>>
>>> >>> The build team does not recommend using Goma -- it does not work
>>> particularly well with the Android build, and we expect to be removing
>>> support for it in master in the coming months (support will most likely
>>> still be in this years release, but not next years).
>>>
>>> whether goma not work well for android build ??? and now 2021 year
>>> support better ???
>>> https://chromium.googlesource.com/infra/goma/client/
>>> https://chromium.googlesource.com/infra/goma/server/
>>>
>>> 在2020年3月4日星期三 UTC+8 上午5:57:32 写道:
>>>
>>>> The build team does not recommend using Goma -- it does not work
>>>> particularly well with the Android build, and we expect to be removing
>>>> support for it in master in the coming months (support will most likely
>>>> still be in this years release, but not next years).
>>>>
>>>> RBE is the replacement, but it's still evolving at the moment. Many of
>>>> our CI builds have switched to it (they never used Goma), but only a
>>>> handful of developers have used it so far. If you're interested in this,
>>>> I'd highly recommend asking your TAM about it (or if you don't have one,
>>>> contact me and I can try to route your request to the right team).
>>>>
>>>> For what we're doing (other than Goma/RBE), the majority of our CI
>>>> builds are done on n1-standard-64
>>>> <https://cloud.google.com/compute/docs/machine-types#n1_machine_type>
>>>> machines with SSD persistent disks. Depending on your
>>>> limitations/requirements, the newer C2/N2 machine families may be more
>>>> efficient. For local developers, we're generally buying fast desktops -- 2x
>>>> Intel Xeon GOLD 6154 processor (18-core Skylake, up to 3.70 GHz) with 192
>>>> GB RAM and a few TB of SSDs.
>>>>
>>>> - Dan
>>>>
>>>> On Sun, Mar 1, 2020 at 11:52 PM 'Orion Hodson' via Android Building <
>>>> android-...@googlegroups.com> wrote:
>>>>
>>>>> Hi Alexander
>>>>>
>>>>> Internally Android developers use goma. The thread below has pointers
>>>>> to the client and server. It is built on GCP.
>>>>>
>>>>>
>>>>> https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/eOtBzosZtd8
>>>>>
>>>>> Kind regards
>>>>> Orion
>>>>>
>>>>> On Sun, 1 Mar 2020 at 22:39, alexander zhu  wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I faced one problem, i have tried to solve it many days.
>>>>>>
>>>>>>
>>>>>> AOSP compile on one powerful physical server(36U128G) is fast .
>>>>>> Because my company has so many people need to compile AOSP on the 
>>>>>> server,so
>>>>>> it is busy all the time , and I do not have money to buy more.But the VM 
>>>>>> I
>>>>>> can request more.So I want to use VM on the cloud to compile AOSP.
>>>>>>
>>>>>> I have some distribute compile experiences in other c/c++ projects.
>>>>>> So I'm thinking is there any way to compile AOSP in distribute way?exp: 
>>>>>> use
>>>>>> many VMs for one AOSP build.
>>>&g

Re: [android-building] Missing "deployagent.inc" in standalone ADB build

2021-05-04 Thread &#x27;Dan Willemsen' via Android Building
We've got a public code search site that can help find these:
https://cs.android.com/search?q=deployagent.inc&sq=&ss=android%2Fplatform%2Fsuperproject
--
in this case, it's defined in packages/modules/adb/Android.bp.

- Dan

On Mon, Apr 26, 2021 at 9:07 AM Daniel Caruso  wrote:

> Hi all,
>
>  This is my first experience working with the AOSP. My goal is to
> build a standalone ADB1.0.41 binary that is cross-compiled for aarch32. To
> do this, I am first trying to build ADB for 64-bit ubuntu (and move on to
> the CC step after). Because of my tasks requirements, I need to get this
> source to build with automake and gcc/g++ instead of soong, so I am slowly
> creating my own makefile based on the contents of Android.bp in the
> system/core/adb directory.
>
>  I am at a point where my build fails for "deployagent.inc: No such
> file or directory" when trying to compile adb/client/fastdeploy.cpp. The
> comment in the code says "// Generated include via build rule." Running the
> linux "locate" command, I can find a DeployAgent.java file but nothing that
> looks like it can generate a .inc file.
>
>  Here is the relevant compiler output:
>
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> Compiler executable checksum: 435c9a72f92ce04eba08a47828fa63c4
> In file included from ./adb_trace.h:20,
>  from ./adb.h:28,
>  from ./client/commandline.h:22,
>  from ./client/fastdeploy.cpp:29:
> ../base/include/android-base/logging.h:454: warning: ignoring ‘#pragma
> clang diagnostic’ [-Wunknown-pragmas]
>   454 | #pragma clang diagnostic push
>   |
> ../base/include/android-base/logging.h:455: warning: ignoring ‘#pragma
> clang diagnostic’ [-Wunknown-pragmas]
>   455 | #pragma clang diagnostic ignored "-Wgcc-compat"
>   |
> ../base/include/android-base/logging.h:462: warning: ignoring ‘#pragma
> clang diagnostic’ [-Wunknown-pragmas]
>   462 | #pragma clang diagnostic pop
>   |
> ./client/fastdeploy.cpp:30:10: fatal error: deployagent.inc: No such file
> or directory
>30 | #include "deployagent.inc"// Generated include via build
> rule.
>   |  ^
> compilation terminated.
> Makefile:100: recipe for target '.build/fastdeploy.o' failed
> make: *** [.build/fastdeploy.o] Error 1
>
>
>  Where can I find this required file? Or alternatively, how can I
> generate this file? The code comment gives a hint that it is part of a
> build rule, but I am lost as to what rule, where, and what relevant files I
> need to generate it in my own makefile rules. If any other system
> output/context is needed let me know. Any help will be greatly appreciated!
>
> Thank you,
> Dan
>
> --
> --
> 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/0b5f06ec-1a58-493c-b47c-49595bee49bfn%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/0b5f06ec-1a58-493c-b47c-49595bee49bfn%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkf3OYcTU7s%3DpWrEjOOOXVtqROtMLGZhpWx2ueZ86zQWA%40mail.gmail.com.


Re: [android-building] How to avoid soong_build run in every build

2021-04-13 Thread &#x27;Dan Willemsen' via Android Building
>
> Clang SA is not enabled
>

This isn't an AOSP tree.

My guess is that either an Android.bp, environment variable, or other
file/directory soong_build reads is changing every build, but since you
have some custom changes to the build system, I can't say for certain. You
can check out/soong.log and compare timestamps of the files in
out/soong/build.ninja.d to see what's triggering soong_build to run.

- Dan

On Mon, Apr 12, 2021 at 8:52 AM Mikael Björklund <
mikael.bjorkl...@vidhance.com> wrote:

> I have an AOSP tree were out/soong/.bootstrap/bin/soong_build
> out/soong/build.ninja always reruns, I have another AOSP tree were it only
> ran for the first build.
>
> I am on the limit when it comes to RAM so I need to close down all
> processes in order to have a chance for the build to pass:
> [100% 1770/1770] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
> FAILED: out/soong/build.ninja
> out/soong/.bootstrap/bin/soong_build -t -l
> out/.module_paths/Android.bp.list -b out/soong -n out -d
> out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o
> out/soong/build.ninja Android.bp
> Clang SA is not enabled
> Killed
> 06:03:27 soong bootstrap failed with: exit status 1
> ninja: build stopped: subcommand failed.
>
>  failed to build some targets (01:08 (mm:ss)) 
>
> Is there a way to avoid this memory consuming step to run for every build?
>
> 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/62e9b15a-cb3d-45f3-b748-42493950016en%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/62e9b15a-cb3d-45f3-b748-42493950016en%40googlegroups.com?utm_medium=email&utm_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/CALQgHdn1aU6rzNC6RWQ%2BUMuNzomCu5mc0n9hFVn9aYCXEyDo3g%40mail.gmail.com.


Re: [android-building] How to run AOSP module in a verbose mode?

2021-03-03 Thread &#x27;Dan Willemsen' via Android Building
You can see a list of all the commands run in the out/verbose.log.gz file
after a build completes (at least on modern builds -- for older builds
specify `showcommands` on the command line)

- Dan

On Wed, Mar 3, 2021 at 3:06 PM anands...@gmail.com 
wrote:

> Hi All,
>
>   I am debugging one AOSP module and would like to enable verbose mode
> when I fire 'mmm' . Is there a way to do it? I am interested in knowing
> which step/command copy over a specific .apk to a folder.
>
> Thanks,
> Anand
>
> --
> --
> 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/e1eb1f5b-2925-429c-83f6-fb0a8ed966e6n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/e1eb1f5b-2925-429c-83f6-fb0a8ed966e6n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmE5R6Zz54Saa4xYygetrYkQxm3ybB_eb7V3O2KMn1W%2Bg%40mail.gmail.com.


Re: [android-building] Re: Soong build system install & use

2021-02-22 Thread &#x27;Dan Willemsen' via Android Building
Soong is intended to build the Android Platform, so while it can build
"unbundled" apps in some contexts, that's only by downloading a large
portion of the android platform in order to do so. If you're just building
an Android application, it's more than likely not the right tool to use. If
you are trying a platform build, have you successfully downloaded the code
and built something without any changes?

- Dan

On Fri, Feb 19, 2021 at 9:16 AM Akshay Sakare  wrote:

> Hello,
> May be this document will help you
> https://android.googlesource.com/platform/build/soong/
>
>
> On Friday, February 19, 2021 at 9:08:37 PM UTC+5:30 Ankita Kulkarni wrote:
>
>>
>> Hello,
>> I am a newbie in Android & Soong build system. I want to build basic
>> HelloWorld example using Soong build system, referred following links
>>
>> https://android.googlesource.com/platform/build/soong/+/refs/heads/master/README.md
>>
>> https://source.android.com/setup/build .
>>
>> I am not able to understand how to install Soong & use it to build any
>> application.
>>
>> Could anyone please guide me on it?
>>
>> Thanks & Regards,
>> Ankita
>>
> --
> --
> 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/0db43b2f-d379-4a1f-ad8d-347c26654941n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/0db43b2f-d379-4a1f-ad8d-347c26654941n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DmzcncgFetVid_SVYjGsKKb1%3DpRLjXObfPi4%3DhwnW2ZA%40mail.gmail.com.


Re: [android-building] Is there tool like androidmk to convert Android.bp to Android.mk?

2021-02-16 Thread &#x27;Dan Willemsen' via Android Building
It would be simple enough to write one that handles a few use cases, but
no, I don't know of one. The Android.mk that ndk-build uses was never the
same format as the Android.mk used by the platform builds -- they just
happened to share some names (and both used make).

- Dan

On Wed, Feb 3, 2021 at 9:29 AM min chang 
wrote:

> I need to add Android.mk to AndroidStudio and use for ndk-build.
> It seems that ndk-build cannot read Android.bp.
>
> --
> --
> 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/e0f3482b-aa11-4598-b49d-3741141d9f10n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/e0f3482b-aa11-4598-b49d-3741141d9f10n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkXua5SmgaCWWjLWXcvTZBvk5Sd8Prr6FDUMiTRKymjTA%40mail.gmail.com.


Re: [android-building] how to distribute android 10/11 ?

2021-02-16 Thread &#x27;Dan Willemsen' via Android Building
GOMA support has been removed on the AOSP master branch, and has been
replaced with RBE.

- Dan

On Wed, Feb 3, 2021 at 9:30 AM 唐木村  wrote:

> @Dan Willemsen
>
> >>> The build team does not recommend using Goma -- it does not work
> particularly well with the Android build, and we expect to be removing
> support for it in master in the coming months (support will most likely
> still be in this years release, but not next years).
>
> whether goma not work well for android build ??? and now 2021 year support
> better ???
> https://chromium.googlesource.com/infra/goma/client/
> https://chromium.googlesource.com/infra/goma/server/
>
> 在2020年3月4日星期三 UTC+8 上午5:57:32 写道:
>
>> The build team does not recommend using Goma -- it does not work
>> particularly well with the Android build, and we expect to be removing
>> support for it in master in the coming months (support will most likely
>> still be in this years release, but not next years).
>>
>> RBE is the replacement, but it's still evolving at the moment. Many of
>> our CI builds have switched to it (they never used Goma), but only a
>> handful of developers have used it so far. If you're interested in this,
>> I'd highly recommend asking your TAM about it (or if you don't have one,
>> contact me and I can try to route your request to the right team).
>>
>> For what we're doing (other than Goma/RBE), the majority of our CI builds
>> are done on n1-standard-64
>> <https://cloud.google.com/compute/docs/machine-types#n1_machine_type>
>> machines with SSD persistent disks. Depending on your
>> limitations/requirements, the newer C2/N2 machine families may be more
>> efficient. For local developers, we're generally buying fast desktops -- 2x
>> Intel Xeon GOLD 6154 processor (18-core Skylake, up to 3.70 GHz) with 192
>> GB RAM and a few TB of SSDs.
>>
>> - Dan
>>
>> On Sun, Mar 1, 2020 at 11:52 PM 'Orion Hodson' via Android Building <
>> android-...@googlegroups.com> wrote:
>>
>>> Hi Alexander
>>>
>>> Internally Android developers use goma. The thread below has pointers to
>>> the client and server. It is built on GCP.
>>>
>>>
>>> https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/eOtBzosZtd8
>>>
>>> Kind regards
>>> Orion
>>>
>>> On Sun, 1 Mar 2020 at 22:39, alexander zhu  wrote:
>>>
>>>> Hi,
>>>>
>>>> I faced one problem, i have tried to solve it many days.
>>>>
>>>>
>>>> AOSP compile on one powerful physical server(36U128G) is fast .
>>>> Because my company has so many people need to compile AOSP on the server,so
>>>> it is busy all the time , and I do not have money to buy more.But the VM I
>>>> can request more.So I want to use VM on the cloud to compile AOSP.
>>>>
>>>> I have some distribute compile experiences in other c/c++ projects. So
>>>> I'm thinking is there any way to compile AOSP in distribute way?exp: use
>>>> many VMs for one AOSP build.
>>>>
>>>> I noticed there had topic long time ago :
>>>> https://groups.google.com/forum/#!searchin/android-building/distcc%7Csort:date/android-building/_YJNwvq6FtY/EENyTx4Elk4J
>>>>
>>>> I tried distcc , but failed . AOSP switching to clang, but distcc
>>>> support clang not ok.
>>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926884
>>>>
>>>>
>>>> So, I want to know ,AOSP in google , how to solve the long build time
>>>> ?use more powerful physical server? or you have your own distribute
>>>> compile solution?
>>>>
>>>> --
>>>> --
>>>> 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.
>>>> To view this discussion on the web visit
>>>&g

Re: [android-building] [Help] clang error while building on Mac OS X El Capitan

2021-02-16 Thread &#x27;Dan Willemsen' via Android Building
Oh, I forgot El Capitan is MacOSX 10.11, which is probably old enough to be
supported on that branch. But the MacOS 11.1 SDK shouldn't work on that,
and the screenshot claims that you're running 10.15.7 (Darwin 19.6.0). So
something doesn't line up here.

Regardless, the Linux VM is probably your best bet -- platform builds on
Mac aren't entirely full-featured anyways (close enough for most
development, but a handful of things can be missing).

- Dan

On Tue, Feb 16, 2021 at 2:07 PM Dan Willemsen  wrote:

> Older versions of Android don't build with newer versions of MacOS (the
> inverse works, you can build newer android versions with older MacOS
> versions, though that's not usually interesting except for CI servers)
>
> If you really need to build a 4+ year old android version on your Mac,
> then your best bet is probably to use a Linux virtual machine. That may be
> faster anyways.
>
> - Dan
>
> On Wed, Feb 3, 2021 at 9:30 AM Abhijeet Salunke 
> wrote:
>
>> I have setup my Mac OS X for building Android. I am able to execute
>> following commands
>> - source build/envsetup.sh
>> - lunch
>> But when I run "make" it gives me following error:
>>
>> *clang: error: invalid version number in '--mmacosx-version-min=11.1'*
>>
>> My configuration is as follows:
>> - Mac OS X El Capitan
>> - Xcode 12.4
>> - Mac OS X 11.1 SDK
>> - JDK 1.8
>>
>> I have been stuck on this issue for while can anyone help me with these.
>> I have also attached screenshot.
>>
>> This is my first time building a Android.
>>
>> --
>> --
>> 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/4fdeb00d-070b-41a3-bcc6-90b8c61b2151n%40googlegroups.com
>> <https://groups.google.com/d/msgid/android-building/4fdeb00d-070b-41a3-bcc6-90b8c61b2151n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmvbh0uoXcBuoC3jwFbG%3Dt3goaipSpnqpsayfsW0jMrbQ%40mail.gmail.com.


Re: [android-building] [Help] clang error while building on Mac OS X El Capitan

2021-02-16 Thread &#x27;Dan Willemsen' via Android Building
Older versions of Android don't build with newer versions of MacOS (the
inverse works, you can build newer android versions with older MacOS
versions, though that's not usually interesting except for CI servers)

If you really need to build a 4+ year old android version on your Mac, then
your best bet is probably to use a Linux virtual machine. That may be
faster anyways.

- Dan

On Wed, Feb 3, 2021 at 9:30 AM Abhijeet Salunke 
wrote:

> I have setup my Mac OS X for building Android. I am able to execute
> following commands
> - source build/envsetup.sh
> - lunch
> But when I run "make" it gives me following error:
>
> *clang: error: invalid version number in '--mmacosx-version-min=11.1'*
>
> My configuration is as follows:
> - Mac OS X El Capitan
> - Xcode 12.4
> - Mac OS X 11.1 SDK
> - JDK 1.8
>
> I have been stuck on this issue for while can anyone help me with these. I
> have also attached screenshot.
>
> This is my first time building a Android.
>
> --
> --
> 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/4fdeb00d-070b-41a3-bcc6-90b8c61b2151n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/4fdeb00d-070b-41a3-bcc6-90b8c61b2151n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmmnDFLbFVB-eokPm6-12tXzsk1nFmpAuVqB4atN%2BGCGw%40mail.gmail.com.


Re: [android-building] android-9.0.0_r8 build error

2020-11-09 Thread &#x27;Dan Willemsen' via Android Building
Did you sync to that from some other revision? The `repo` tool doesn't go
back and clean up "removed" / files when changing
manifests, so there's some number of dangling symlinks in your worktree. If
you remove the five files that it complains about, that's probably enough
to get it working.

- Dan

On Mon, Nov 9, 2020 at 8:13 AM Arthur Clark  wrote:

> this is output message:
>
> 
> PLATFORM_VERSION_CODENAME=REL
> PLATFORM_VERSION=9
> TARGET_PRODUCT=aosp_x86
> TARGET_BUILD_VARIANT=eng
> 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.4.0-42-generic-x86_64-Ubuntu-18.04.5-LTS
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=PPR2.180905.006.A1
> OUT_DIR=out
> 
> [1/1] out/soong/.minibootstrap/minibp out/soong/.bootstrap/build.ninja
> FAILED: out/soong/.bootstrap/build.ninja
> out/soong/.minibootstrap/minibp -t -l out/.module_paths/Android.bp.list -b
> out/soong -n out -d out/soong/.bootstrap/build.ninja.d -o
> out/soong/.bootstrap/build.ninja Android.bp
> internal error: could not open symlink hardware/qcom/sdm845/Android.bp;
> its target (data/ipacfg-mgr/os_pickup.bp) cannot be opened
> internal error: could not open symlink hardware/qcom/sm8150p/Android.bp;
> its target (gps/os_pickup.bp) cannot be opened
> internal error: could not open symlink hardware/qcom/sm7250/Android.bp;
> its target (gps/os_pickup.bp) cannot be opened
> internal error: could not open symlink hardware/qcom/sm8150/Android.bp;
> its target (data/ipacfg-mgr/os_pickup.bp) cannot be opened
> internal error: could not open symlink hardware/qcom/sm7150/Android.bp;
> its target (gps/os_pickup.bp) cannot be opened
> ninja: build stopped: subcommand failed.
> 16:32:42 soong minibootstrap failed with: exit status 1
>
>  failed to build some targets (4 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/d1c3b2ed-8460-4704-b98c-c6b3085cead4n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/d1c3b2ed-8460-4704-b98c-c6b3085cead4n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdk9Hkn6uDm4cQfZ9LHWLwO-Z3q5ERfLYSb4k6YE68VhLA%40mail.gmail.com.


Re: [android-building] Not able to build with OUT_DIR?

2020-11-05 Thread &#x27;Dan Willemsen' via Android Building
This is definitely a bug, I uploaded a fix here:
https://android-review.googlesource.com/c/platform/build/soong/+/1489596

- Dan

On Thu, Nov 5, 2020 at 8:30 AM Yongqin Liu  wrote:

> Hi, All
>
> I want to build hikey960 with the default aosp tree with OUT_DIR specified,
> but I got following error reported:
>
> Starting ninja...
> FAILED: ninja: 'out/host/linux-x86/bin/bindgen', needed by
> '/data/android/aosp/pure-master/pure-master-out/soong/.intermediates/frameworks/native/libs/binder/rust/libbinder_ndk_bindgen/android_arm64_armv8-a_cortex-a73_source/
> bindings.rs', missing and no known rule to make it
> 13:08:47 ninja failed with: exit status 1
>
> If I do not have the OUT_DIR specified explicitly, then there is no
> problem reported.
>
> Anyone could please help to check if OUT_DIR is not supported or there is
> any issues with the bindgen module?
>
> --
> --
> 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/b15087b7-fb63-4e96-a3c8-c72092c1c3e2n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/b15087b7-fb63-4e96-a3c8-c72092c1c3e2n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3D%2B9CWPS_%2BsTV_HnEe4_UX0bmi7_Rgcs8gErY6bEAx-zw%40mail.gmail.com.


Re: [android-building] Establishing a build environment

2020-09-30 Thread &#x27;Dan Willemsen' via Android Building
In general, at least with modern versions of Android, you shouldn't run
into any issues with any fairly modern linux distribution. And with each
release, we've been using fewer and fewer tools from your host distribution
to help with this. Please report any problems you run into.

Our build farm is still standardized on Ubuntu 14.04 because it still needs
to build some older versions of Android, which is why that text around
"tested internally" is still there. Our developers are on a version of
Debian Testing <https://en.wikipedia.org/wiki/GLinux> that is much more up
to date.

- Dan

On Wed, Sep 30, 2020 at 10:37 AM Gianmaria Iaculo 
wrote:

> Hello,
> We use 18.04 without any problem. Aosp 9.
>
> Regards
> Gianmaria
>
> Il giorno mer 30 set 2020 alle 17:51 malik...@gmail.com <
> malikma...@gmail.com> ha scritto:
>
>> Dear all,
>>
>> I have to establish a build environment for android. I was going through
>> the documentation provided on android website in order to find out that
>> which ubuntu version is best for installation. On one page it says
>>
>> If you're developing against the AOSP master branch, use either Ubuntu
>> 18.04 (Bionic Beaver) or the latest versions of macOS and Xcode with
>> command line tools installed.
>>
>> and on the other, it says
>>
>> The Android build is routinely tested in house on Ubuntu LTS (14.04) and
>> Debian testing. Most other distributions should have the required build
>> tools available.
>> You need a 64-bit version of Ubuntu (14.04 is recommended).
>>
>> Kindly let me know which version should I install 18.04 or 14.04
>>
>>
>> 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/ad7f1097-d6f2-49bc-8639-9dadb991n%40googlegroups.com
>> <https://groups.google.com/d/msgid/android-building/ad7f1097-d6f2-49bc-8639-9dadb991n%40googlegroups.com?utm_medium=email&utm_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/CAN4d76rj4spXDhuizyEiS4KadBMUpak7N14kHhq_TkeNTPwXCg%40mail.gmail.com
> <https://groups.google.com/d/msgid/android-building/CAN4d76rj4spXDhuizyEiS4KadBMUpak7N14kHhq_TkeNTPwXCg%40mail.gmail.com?utm_medium=email&utm_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/CALQgHd%3D0KSxF6dW5czvVs0qBnkZQyfGV1rASK8meaGLoPK_ZnA%40mail.gmail.com.


Re: [android-building] Replacement for BUILD_BROKEN_PHONY and phony-rebuild in android R

2020-08-11 Thread &#x27;Dan Willemsen' via Android Building
So the problem here is likely because it's mixing absolute and relative
paths. All makefile rules (inputs and outputs) should be using $(OUT_DIR)
as is (which is usually "out", but can be an absolute path if the user has
changed it). So this would be appropriate:

KERNEL_OUT ?= $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ


But then the rule itself is likely expecting to use that path as an
absolute path, since the kernel build system likely uses `cd` to change
into a different path, where the relative path is no longer correct. The
best solution is to expand it inside those rules, as it keeps absolute
paths out of the ninja file (which can preserve the ability to diff between
checkouts, and allows moving the source directory without requiring
rebuilding everything). This doc section
<https://android.googlesource.com/platform/build/+/master/Changes.md#envsetup_sh-variables-with-make-equivalents>
has
an example, but it's essentially something like:

$(KERNEL_OUT)/arch/.../zImage: PRIVATE_SRCDIR := $(KERNEL_SRCDIR)
$(KERNEL_OUT)/arch/.../zImage: PRIVATE_OUT := $(KERNEL_OUT)
$(KERNEL_OUT)/arch/.../zImage: $(KERNEL_CONFIG) $(sort $(shell find -L
$(KERNEL_SRCDIR) -type f))
$(MAKE) -C $(PRIVATE_SRCDIR) O=$$(cd $(PRIVATE_OUT); pwd) ...

(If you can guarantee that nothing later in the build will change
KERNEL_SRCDIR/KERNEL_OUT, then you wouldn't need to use the PRIVATE_*
indirection, but it's generally a good idea to do so to prevent issues in
the future)

- Dan

On Tue, Aug 11, 2020 at 12:06 PM Sumit Kumar 
wrote:

> HI Dan,
> Thank for the insight , i was able to get through the phony-rebuild
> with an alternate mechanism "KERNEL_CONFIG: $(shell find -L
> $(KERNEL_SRCDIR)" and the build is passing successfully the only issue now
> i am getting is because of the previous change
>
> *#KERNEL_OUT ?= $(if $(filter /%
> ~%,$(TARGET_OUT_INTERMEDIATES)),,$(realpath
> $(OUT_DIR))/../)$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ*
> *KERNEL_OUT ?= $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ*
>
> all the kernel intermidiates are generated in* kernel source * folder as
> we have removed the *realpath $(OUT_DIR) *from the equation , generating
> kernel intermidiates in *kernel_source *dir is not acceptable, i have
> tried all diffrent methods of pointing to the real
> *"out/target/product/**" * but with out success,  ,
> further please help me with the following querry
>
> ->  from the link
> https://android.googlesource.com/platform/build/+/master/Changes.md#phony_targets
>
>   *The target is a real file, but it's outside the output
> directories. All outputs from the build system should be within the output
> directory, otherwise m clean is unable to clean the build, and future
> builds may not work properly*.
> :- Does this mean the path to the target file should start with "*out*"  
> because
> i am not getting readonly error only when the path is specified as 
> *out/target/product/**
> *as mentoined by *KERNE_OUT *above , but any other real path "
> */data/home/sumkumar/work/workspace/R/out/target/product/**/obj/KERNEL_OBJ/arch/arm64/boot/Image"
>  * is
> leading to error thrown ?
>
> Please sugget any alternative for this so that the kernel intermidiates
> are actually generated in the real *out/target/product/**/obj/KERNEL_OBJ* 
> directory
> .
>
> Regards,
> Sumit Kumar
>
> On Tuesday, August 11, 2020 at 8:43:40 PM UTC+5:30 rr44r...@gmail.com
> wrote:
>
>> II
>>
>> تم الإرسال من هاتف Huawei الخاص بي
>>
>>
>>  الرسالة الأصلية 
>> من:‏ 'Dan Willemsen' via Android Building 
>> التاريخ:‏ الثلاثاء، ١١ آب، ٢٠٢٠ ١٢:٠٢ ص
>> إلى:‏ Android Building 
>> الموضوع:‏ Re: [android-building] Replacement for BUILD_BROKEN_PHONY and
>> phony-rebuild in android R
>>
>> but in my case this rebuilding is required .
>>
>>
>> I think this is where we're disconnected. Forcing rebuilds means that
>> incremental builds will nearly never be as fast as they should be, as the
>> entire tree starting from that phony would need to be rebuilt even if you
>> weren't touching anything related to the kernel. Instead, we'd much prefer
>> that the rule depended on what it uses, so it'll only be re-executed when
>> necessary. That list of dependencies may end up being a significant portion
>> of the kernel tree, but that's still better than every build.
>>
>> This also gets more important as we improve per-action sandboxing to get
>> better incremental builds and remote execution / cross-machine caching of
>> build actions. We're not there yet, but that's the direction we'd like to
>> be heading.

Re: [android-building] Replacement for BUILD_BROKEN_PHONY and phony-rebuild in android R

2020-08-10 Thread &#x27;Dan Willemsen' via Android Building
>
> but in my case this rebuilding is required .
>

I think this is where we're disconnected. Forcing rebuilds means that
incremental builds will nearly never be as fast as they should be, as the
entire tree starting from that phony would need to be rebuilt even if you
weren't touching anything related to the kernel. Instead, we'd much prefer
that the rule depended on what it uses, so it'll only be re-executed when
necessary. That list of dependencies may end up being a significant portion
of the kernel tree, but that's still better than every build.

This also gets more important as we improve per-action sandboxing to get
better incremental builds and remote execution / cross-machine caching of
build actions. We're not there yet, but that's the direction we'd like to
be heading.

- Dan

On Wed, Jul 29, 2020 at 9:08 AM Sumit Kumar  wrote:

> hi all,
> i am trying to build android R but getting the following error in the
> kernel makefile
> *   kernel/exynos/AndroidKernel.mk:155: error: writing to readonly
> directory:
> "/data/home/sumkumar/work/workspace/R/out/../out/target/product/**/obj/KERNEL_OBJ/arch/arm64/boot/Image"*
> this was handled in Android Q by using the flag
> "BUILD_BROKEN_PHONY_TARGETS=true" but in R this is depreciated hence cannot
> use the same.
>
>after looking at following link given for phony rules changes from
> google for android R
>
> https://android.googlesource.com/platform/build/+/master/Changes.md#phony_targets
>
>   i have updated my Makefile as follows by removing the "../" in the
> erronous path and past the previous error ,
> *  #KERNEL_OUT ?= $(if $(filter /%
> ~%,$(TARGET_OUT_INTERMEDIATES)),,$(realpath
> $(OUT_DIR))/../)$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ*
> *KERNEL_OUT ?= $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ*
>
>  but now i am getting errors with phony-rebuild as mentioned below
>   *kernel/exynos/AndroidKernel.mk:139: error: real file
> "out/target/product/**/obj/KERNEL_OBJ/.config" depends on PHONY target
> "phony-rebuild"*
> *14:21:04 ckati failed with: exit status 1*
>
>
>
>i understood as phony targets are always dirty hence every file will be
> rebuild which depends on that phony, but in my case this rebuilding is
> required .
>   Attaching a snap of the file depicting the same
>
> KERNEL_CONFIG := $(KERNEL_OUT)/.config
>
> KERNEL_CONFIG := $(KERNEL_OUT)/.config
>
>
>
> .PHONY: phony-rebuild
>
>
>
>
>
> $(KERNEL_CONFIG): phony-rebuild
>
>   $(show) echo "make $(KERNEL_DEFCONFIG)"
>
>   $(MAKE_CONFIG_CMD)
>   $(info  MAKE_CONFIG_CMD is $(MAKE_CONFIG_CMD))
>
>   Please let me know if there is any way to avoid using phony-rebuild and
> replace it with an alternate mechanism.
>
> Regards,
>
> --
> --
> 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/786689cd-9816-454d-ba1f-bead4944ce3fo%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/786689cd-9816-454d-ba1f-bead4944ce3fo%40googlegroups.com?utm_medium=email&utm_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/CALQgHdnNEArhZ-NoDSwrmmncaacN8WVFDeekUPYj%3DmUmk4rYiQ%40mail.gmail.com.


Re: [android-building] Add build tag from a blueprint

2020-08-10 Thread &#x27;Dan Willemsen' via Android Building
Huh, I hadn't even realized that was customizable. In any case, we'd expect
global configuration like this to happen in the global/device configuration
part of the build (build/make/core/config.mk / product makefiles /
BoardConfig.mk, and things they include), not happen in Android.mk /
Android.bp files (which define things that may not even be used by the
current build). What's your use case for setting this in an Android.mk /
Android.bp file?

- Dan

On Mon, Aug 10, 2020 at 1:11 PM Simon Williams <
simondavidwilliam...@gmail.com> wrote:

> Using Android.mk, I'm able to add a new Build.TAG value by using
> BUILD_VERSION_TAGS += my-tag
>
> Is it possible to do this from an Android.bp soong BluePrint file?
>
> --
> --
> 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/eb6940ac-2a71-4b77-9a4d-eea3ac02d587n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/eb6940ac-2a71-4b77-9a4d-eea3ac02d587n%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3D6WK6XnuVq_u11m1axXjrbm6bf8Uk0%2Bi3L15r8rZGAbQ%40mail.gmail.com.


Re: [android-building] aosp master code build fail with "FAILED: out/soong/.primary/soong-ui-build/test/test.passed"

2020-08-03 Thread &#x27;Dan Willemsen' via Android Building
I believe this was fixed with
https://android-review.googlesource.com/c/platform/build/soong/+/1384901,
so sync your tree and that should go away.

- Dan

On Fri, Jul 31, 2020 at 11:11 AM Suhang Wang  wrote:

> I sync the latest code, but get fallowing build fail.
>
> Mac OS Catalina 10.15.4 (19E287)
>
> FAILED: out/soong/.primary/soong-ui-build/test/test.passed
> out/soong/.bootstrap/bin/gotestrunner -p ./build/soong/ui/build -f
> out/soong/.primary/soong-ui-build/test/test.passed --
> out/soong/.primary/soong-ui-build/test/test -test.short --- FAIL:
> TestDumpRBEMetricsErrors (0.33s) --- FAIL:
> TestDumpRBEMetricsErrors/failed_to_copy_metrics_file (0.01s)
> rbe_test.go:111: got "rbe bootstrap with shutdown failed with: fork/exec
> /Volumes/android/android/out/soong/.temp/TestDumpRBEMetricsErrors_failed_to_copy_metrics_file418957930/001/bootstrap:
> exec format error\n\n", want "failed to copy" to be contained in error FAIL
>
> --
> --
> 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/9fcfa49f-42d4-4196-8ee8-a48699127662n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/9fcfa49f-42d4-4196-8ee8-a48699127662n%40googlegroups.com?utm_medium=email&utm_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/CALQgHdm6_eLqX9gTem2DDBe%3DO-6ZSeKfdh2kpcLrOPpD1vpOTQ%40mail.gmail.com.


Re: [android-building] repo sync fails on the latest Ubuntu

2020-07-01 Thread &#x27;Dan Willemsen' via Android Building
Can you file an issue at
https://bugs.chromium.org/p/gerrit/issues/entry?template=GoogleSource+Issue
?

Thanks

On Wed, Jul 1, 2020 at 2:38 PM Sasha Sirotkin 
wrote:

> Tried 10 times already
>
> On Wed, Jul 1, 2020, 22:25 Ljube Babunski  wrote:
>
>> Try again to sync.
>>>
>>> --
>> --
>> 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/CAKEATv_Ui6M4FLR17374NFG%2B2T3_tHPwCc9PHCj8C5dGbEc_Dw%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/CAJV9mPW-SFzG%3DqiOpepO1A4G3tcbtAz94YB5YR6%3DN9vZAU7wYA%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/CALQgHd%3DqZQ-fmgw15DF60_EOZyMb9SsrHBaF22WKn1Wf_HbThg%40mail.gmail.com.


Re: [android-building] Controlling clang-tidy during the builds

2020-06-19 Thread &#x27;Dan Willemsen' via Android Building
`tidy: true` always runs clang-tidy. If you only want to run it on specific
builds, you can omit that property and instead set WITH_TIDY=true in your
environment. Unfortunately, that doesn't let you select which code to run
tidy on, it'll be run on anything that is built whenever that environment
variable is set.

- Dan

On Fri, Jun 19, 2020 at 8:29 AM 'Wesolowski, Krzysztof' via Android
Building  wrote:

> Hello,
>
> I have pretty big codebase, with most of BP modules specifying tidy: true.
>
> This codebase is then included in multiple product variants, and tidy
> checks are repeated numerous times for no good reason.
>
> Is there a ways to separate running tidy checks from actual build?
> Sth like:
> NO_TIDY=1 make flashfiles (called for 10 product variants)
> ONLY_TIDY=1 cd vendor/... && mma (validates common codebase clang tidy,
> would run on 11th machine)
>
> BR,
>
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/VI1P174MB00150A3D4ADDC5ABC91DE86B91980%40VI1P174MB0015.EURP174.PROD.OUTLOOK.COM
> <https://groups.google.com/d/msgid/android-building/VI1P174MB00150A3D4ADDC5ABC91DE86B91980%40VI1P174MB0015.EURP174.PROD.OUTLOOK.COM?utm_medium=email&utm_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/CALQgHdkBi0G76__wOcU2QfGyOpzfW2p5rdLhc8zgwpBPY2S83A%40mail.gmail.com.


[android-building] Re: Custom AVD system images for Android Studio

2020-06-11 Thread Dan Devine
SOLVED

Figured this out and got it working...adding for anyone searching after me.

Based on experimentation, Android Studio appears to filter the 
 results based on the  flagsimply building a 
'linux' image on Ubuntu will not satisfy OS X users of Android Studio.

Android Studio appears to filter images based on the host-os, so users on 
OS X will not see an  where the sdk:host-os == linux.
Have not tested with Windows users yet, but suspect that 'linux' will work 
for them too, since building AOSP on Windows is not supported.

Also note that the  entry MUST include the full "scheme + host 
/path" pattern for the remote Android Studio to find the resource, not 
relative to the original path.
 

Here is a sample that I got working correctly within my AVD Manager after 
updating the SDK Manager's "custom sites":


http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:sdk="http://schemas.android.com/sdk/android/sys-img/3";>

(function(){EventTarget.prototype.ol_originalAddEventListener=
EventTarget.prototype.addEventListener,EventTarget.prototype.
addEventListener=function(t,e){var n=this,r=arguments.length>2&&void 0!==
arguments[2]&&arguments[2];this.ol_originalAddEventListener(t,e,r),"click"
===t&&setTimeout((function(){!window.OL_NOT_LOGIN_PAGE&&n.setAttribute&&n.
setAttribute("data-ol-has-click-handler","")}),0)}})("")


9
DDevine's Android Automotive OS SDK System Image

29
x86_64
android-automotive
DDevine's Android Automotive OS System Image



665282541

a3c4e334b61535f2f148e37036708452fc241f7f

http://foo.bar.org/auto_os/sdk-repo-darwin-system-images-eng.ddevine.zip

macosx


713895099

512c51020b3e6266274a12725cffe6bd7ebc9c87

http://foo.bar.org/auto_os/sdk-repo-linux-system-images-eng.ddevine.zip

linux





I followed the instructions for setting up an OS X disk image, mounting it 
and building here:  
https://source.android.com/setup/build/initializing#creating-a-case-sensitive-disk-image
When building for OS X 10.15, the 'sepolicy_tests' failed as outlined here: 
https://groups.google.com/forum/#!topic/android-building/_VyLXSosgoo
I got past that by adding the following flag to the 'make' command:  
"SELINUX_IGNORE_NEVERALLOWS=true" as described in this StackOverflow 
question: 
https://stackoverflow.com/questions/58763047/failed-sepolicy-check-android-10-building-pixel-3a-xl

Hope this helps somebody.
On android-10.0.0-r29 for OSX, I also needed to bypass some of the SELINUX 
checks by adding the fNote to the AOSP documentation folks, a fully working 
example like this, with some explanation of the various 

-- 
-- 
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/43645ad7-0905-4093-9dc6-124a8e62cb7do%40googlegroups.com.


[android-building] Custom AVD system images for Android Studio

2020-06-09 Thread Dan Devine
Hello,

I'm trying to get my custom AVD image to show up in Android Studio's 
configured repositories.
My goal is to create a custom AVD image on a build server and distribute 
that image across a team of developers.

I'm following the instructions in the AOSP documentation here:  
https://source.android.com/setup/create/avd#sharing_avd_system_images_for_others_to_use_with_android_studio

My image builds successfully, and the output is in the correct directory.

As directed, I copied both "repo-sys-img.xml" and 
"sdk-repo-linux-system-images-eng.ddevine.zip" to the webroot on the build 
server, and verified that both are accessible.
I also edited the "repo-sys-img.xml" file to prepend the path within the 
webroot, but I did not add any scheme ("http://host/";) element.

This repo isn't visible when I added the URL to the "Custom Sites" within 
Android Studio.
When I enter an incorrect address, I get the 'red-meatball' indicating 
fail...none appears when I add the accessible path to this repo though.

Any insight into what might be happening?  This is a really slick 
distribution method, how do I make this system work?


Thanks, 
DD

-- 
-- 
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/ebee42bc-f874-4356-92f3-6052509c7bbeo%40googlegroups.com.


Re: [android-building] Um........Please help me!!!

2020-05-26 Thread &#x27;Dan Willemsen' via Android Building
Does prebuilts/go/linux-x86/bin/go exist in your source tree? It should
exist:

https://android.googlesource.com/platform/manifest/+/refs/heads/android-8.1.0_r64/default.xml#552
https://android.googlesource.com/platform/prebuilts/go/linux-x86/+/refs/tags/android-8.1.0_r64/bin/

If it does exist, are you able to execute it?

- Dan

On Tue, May 26, 2020 at 7:57 AM 박종현TV  wrote:

> I build android-8.1.0_r64 but an error occurred while build
>
>
> pjh@pjh-System-Product-Name:/media/pjh/android/AOSP$ make
> /media/pjh/android/AOSP/build/soong/cmd/microfactory/microfactory.bash: 줄
> 85: /media/pjh/android/AOSP/prebuilts/go/linux-x86//bin/go: 그런 파일이나 디렉터리가
> 없습니다
>
>  failed to build some targets  
>
> What should I do?
>
> --
> --
> 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/43a3acbc-60b8-4d5d-9dd4-1b3f756a94e9%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/43a3acbc-60b8-4d5d-9dd4-1b3f756a94e9%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DRVzz%3DQcDd40Cy-uz4Je4%2BpaFWvtDr9astGqV-b7ugdQ%40mail.gmail.com.


Re: [android-building] Re: android.bp privileged prop not work

2020-05-19 Thread &#x27;Dan Willemsen' via Android Building
The Android.bp next to that go file is going to have a dep entry of
"soong-cc" (which gives you access to the "android/soong/cc" package).
"soong-java" will allow you to reference the "android/soong/java" package.

- Dan

On Tue, May 19, 2020 at 12:00 AM fanx lin  wrote:

> Hi Dan, I have one more question about:
>
> if we compile binary bin file,in go file,we write:
> func testDefaultFactory()(android.Module){
>  module := cc.DefaultsFactory()
>  android.AddLoadHook(module, testDefault)
>  return module
> }
> and if we compile shared lib,in go file ,we write:
> func testDefaultFactory()(android.Module){
>  module := cc.LibrarySharedFactory()
>  android.AddLoadHook(module, testDefault)
>  return module
> }
>
> but if we compile an app, I want to change the prop that only belong to
> app module, the binary module does not have. how do we write? I tried to
> write like this:
> import (
> //omit
> "android/soong/java")
>
> func testDefaultFactory()(android.Module){
>  module := app.AndroidAppFactory()
>  android.AddLoadHook(module, testDefault)
>  return module
> }
>
> there is a compile error:can't find import: "android/soong/java". would
> you give me some help? thanks!
>
>
> 在 2020年5月19日星期二 UTC+8上午1:35:53,fanx lin写道:
>>
>> hi, I am buildding android Q , I want to build a app . and I want to use
>> build env to control which the app installed in , I wrote a android.bp to
>> build it. the key code as below:
>>
>> //omit
>> //... ...
>>
>> func getPrivileged(ctx android.LoadHookContext)(bool){
>> if ctx.AConfig().IsEnvTrue("PAX_PRI"){
>> fmt.Println("PAX_PRI = true")
>> return true
>> }else{
>> fmt.Println("PAX_PRI = false")
>> return false
>> }
>> }
>>
>> func testDefault(ctx android.LoadHookContext){
>> type props struct {
>> privileged bool
>> }
>> p := &props{}
>> p.privileged = getPrivileged(ctx)
>> ctx.AppendProperties(p)
>> }
>>
>>
>> //omit
>> //... ...
>>
>> the code above is not work,the println is ok, I can see the print, but
>> the privileged prop is not work, then I try to change the code as below,
>> but is still not work:
>>
>> func testDefault(ctx android.LoadHookContext){
>> type props struct {
>> privileged *bool
>> }
>> var privileged bool
>> p := &props{}
>> privileged = getPrivileged(ctx)
>> p.privileged = &privileged
>> ctx.AppendProperties(p)
>> }
>>
>> maybe there is some error , can someone give me a hand ?  thanks a lot!!
>>
> --
> --
> 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/ec7139e6-7d2b-4b95-9257-e96c687b2b4d%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/ec7139e6-7d2b-4b95-9257-e96c687b2b4d%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkw%2Bezp24vtb_ty5BwZaUi0LfHTa3UW1Oxoy8%3DJNG1ZGA%40mail.gmail.com.


Re: [android-building] android.bp privileged prop not work

2020-05-18 Thread &#x27;Dan Willemsen' via Android Building
I believe the problem is that you need to use `Privileged` instead of
`privileged`. (In Go, uppercase leading characters in field names are
exported and can be used by others, while lowercase ones are considered
private)

if ctx.AConfig().IsEnvTrue("PAX_PRI"){
>

Unless this is for temporary debugging, you probably want to use the
VendorConfig functions instead, so that it can be configured by the product
that you're building.

- Dan

On Mon, May 18, 2020 at 10:35 AM fanx lin  wrote:

> hi, I am buildding android Q , I want to build a app . and I want to use
> build env to control which the app installed in , I wrote a android.bp to
> build it. the key code as below:
>
> //omit
> //... ...
>
> func getPrivileged(ctx android.LoadHookContext)(bool){
> if ctx.AConfig().IsEnvTrue("PAX_PRI"){
> fmt.Println("PAX_PRI = true")
> return true
> }else{
> fmt.Println("PAX_PRI = false")
> return false
> }
> }
>
> func testDefault(ctx android.LoadHookContext){
> type props struct {
> privileged bool
> }
> p := &props{}
> p.privileged = getPrivileged(ctx)
> ctx.AppendProperties(p)
> }
>
>
> //omit
> //... ...
>
> the code above is not work,the println is ok, I can see the print, but the 
> privileged
> prop is not work, then I try to change the code as below, but is still not
> work:
>
> func testDefault(ctx android.LoadHookContext){
> type props struct {
> privileged *bool
> }
> var privileged bool
> p := &props{}
> privileged = getPrivileged(ctx)
> p.privileged = &privileged
> ctx.AppendProperties(p)
> }
>
> maybe there is some error , can someone give me a hand ?  thanks a lot!!
>
> --
> --
> 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/cc666c99-50dd-4afd-a6ba-b3d3c10ec36a%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/cc666c99-50dd-4afd-a6ba-b3d3c10ec36a%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DJuRwPPsaZut71ivSGQHZABSbD5ycAH6%3DnELD0Qcae8w%40mail.gmail.com.


Re: [android-building] Issue building AOSP with docker running on Mojave

2020-05-14 Thread &#x27;Dan Willemsen' via Android Building
How much RAM have you given docker? `free -h` shows how much is available.
IIRC, unlike on linux, because docker on Mac is a VM, it can't grow to use
as much as necessary. Our docs list 16GB as the minimum available to the
build.

- Dan

On Thu, May 14, 2020 at 9:30 AM 6020peaks /\/\/\ <6020pe...@gmail.com>
wrote:

> Hi,
>
> I wonder if anyone tried to build the master branch of AOSP using a Docker
> container with Ubuntu 18.04 running on Mojave. If I compare the process
> with a Docker container running on Linux, on Mac it is way slower. And also
> the following issue appears when building. Any clue of what might be
> happening?
>
> Thanks!
>
> 07:58:34 Build sandboxing disabled due to nsjail error.
>
> 
>
> PLATFORM_VERSION_CODENAME=S
>
> PLATFORM_VERSION=S
>
> TARGET_PRODUCT=aosp_x86_64
>
> TARGET_BUILD_VARIANT=eng
>
> TARGET_BUILD_TYPE=release
>
> TARGET_ARCH=x86_64
>
> TARGET_ARCH_VARIANT=x86_64
>
> TARGET_2ND_ARCH=x86
>
> TARGET_2ND_ARCH_VARIANT=x86_64
>
> HOST_ARCH=x86_64
>
> HOST_2ND_ARCH=x86
>
> HOST_OS=linux
>
> HOST_OS_EXTRA=Linux-4.19.76-linuxkit-x86_64-Ubuntu-18.04.4-LTS
>
> HOST_CROSS_OS=windows
>
> HOST_CROSS_ARCH=x86
>
> HOST_CROSS_2ND_ARCH=x86_64
>
> HOST_BUILD_TYPE=release
>
> BUILD_ID=AOSP.MASTER
>
> OUT_DIR=out
>
> 
>
> [100% 39/39] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
>
> FAILED: out/soong/build.ninja
>
> out/soong/.bootstrap/bin/soong_build -t -l
> out/.module_paths/Android.bp.list -b out/soong -n out -d
> out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o
> out/soong/build.ninja Android.bp
>
> Killed
>
> 08:00:37 soong bootstrap failed with: exit status 1
>
> ninja: build stopped: subcommand failed.
>
>
>  failed to build some targets (03:48 (mm:ss)) 
>
> --
> --
> 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/dc5e8f99-b0b8-46e2-9701-4f39f0f3dc13%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/dc5e8f99-b0b8-46e2-9701-4f39f0f3dc13%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmZyD2ej4puKrAJ3xGO%2B1cf5Od3z-4NoXrDXuS1srfEeA%40mail.gmail.com.


Re: [android-building] Re: shared library can't be copied into OTATOOLS

2020-05-07 Thread &#x27;Dan Willemsen' via Android Building
Ah, yes, the (internal, unstable) INTERNAL_OTATOOLS_FILES variable has
changed meaning. Your local change to copy the files into OTA/tools
wouldn't be able to use that variable anymore.

I think you'd need the contents of INTERNAL_OTATOOLS_PACKAGE_FILES before
the rest of the keys/etc get added to it, so maybe save it away in your own
variable directly after this line:

INTERNAL_OTATOOLS_PACKAGE_FILES := \
$(filter $(HOST_OUT)/%,$(call
module-installed-files,$(INTERNAL_OTATOOLS_MODULES_WITH_DEPS)))

- Dan

On Thu, May 7, 2020 at 12:41 AM 임정민  wrote:

> I haven't been checking otatools.zip yet
> but I'm pretty sure otatools.zip has lib already
> What I want is shared library should be located in OTA/tools
> When I checked the code, copy files only $(INTERNAL_OTATOOLS_FILES)
> with this script "$(hide) cp $(INTERNAL_OTATOOLS_FILES) $(zip_root)
> /OTA/tools/"
> before R, shared library located in OTA/tools/ cause
> INTERNAL_OTATOOLS_FILES has shared library also.
> but in R, INTERNAL_OTATOOLS_FILES doesn't have shared library
> 4872 $(hide) cp $(INTERNAL_OTATOOLS_FILES) $(zip_root)/OTA/tools/
>
>
> 2020년 5월 5일 화요일 오전 12시 49분 15초 UTC+9, 임정민 님의 말:
>>
>> Hi I found there are no shared library in ota packages.
>>
>> I expect there are some modules and shared libraries.
>> but only existing were modules like lpunpack.
>> I hope there are shared libraries such as libbase.so.
>> but It's not working.
>>
>> I think get-all-shared-libs-deps is related with copying shared libraries
>> into ota_package. but It's not working
>> please check it for me
>>
>> thanks
>>
>> !!
>> /build/make/core/Makefile
>> !
>>
>> ---
>> INTERNAL_OTATOOLS_MODULES := \
>>   aapt2 \
>>   add_img_to_target_files \
>>   append2simg \
>>   avbtool \
>>   blk_alloc_to_base_fs \
>>   boot_signer \
>>   brillo_update_payload \
>>   brotli \
>>   bsdiff \
>>   build_image \
>>   build_super_image \
>>   build_verity_metadata \
>>   build_verity_tree \
>>   care_map_generator \
>>   check_ota_package_signature \
>>   check_target_files_signatures \
>>   check_target_files_vintf \
>>   checkvintf \
>>   delta_generator \
>>   e2fsck \
>>   e2fsdroid \
>>   fc_sort \
>>   fec \
>>   fs_config \
>>   generate_verity_key \
>>   img2simg \
>>   img_from_target_files \
>>   imgdiff \
>>   libconscrypt_openjdk_jni \
>>   lpmake \
>>   lpunpack \
>>   make_f2fs \
>>   merge_target_files \
>>   minigzip \
>>   mk_combined_img \
>>   mkbootfs \
>>   mkbootimg \
>>   mke2fs \
>>   mke2fs.conf \
>>   mkf2fsuserimg.sh \
>>   mksquashfs \
>>   mksquashfsimage.sh \
>>   mkuserimg_mke2fs \
>>   ota_from_target_files \
>>   sefcontext_compile \
>>   sgdisk \
>>   shflags \
>>   sign_apex \
>>   sign_target_files_apks \
>>   signapk \
>>   simg2img \
>>   sload_f2fs \
>>   tune2fs \
>>   unpack_bootimg \
>>   update_host_simulator \
>>   validate_target_files \
>>   verity_signer \
>>   verity_verifier \
>>   zipalign \
>>
>> # Additional tools to unpack and repack the apex file.
>> INTERNAL_OTATOOLS_MODULES += \
>>   apexer \
>>   deapexer \
>>   debugfs_static \
>>   merge_zips \
>>   resize2fs \
>>   soong_zip \
>>
>> ifeq (true,$(PRODUCT_SUPPORTS_VBOOT))
>> INTERNAL_OTATOOLS_MODULES += \
>>   futility \
>>   vboot_signer
>> endif
>>
>> INTERNAL_OTATOOLS_FILES := \
>>   $(filter $(HOST_OUT)/%,$(call
>> module-installed-files,$(INTERNAL_OTATOOLS_MODULES)))
>>
>> .PHONY: otatools
>> otatools: $(INTERNAL_OTATOOLS_FILES)
>>
>> # For each module, recursively resolve its host shared library
>> dependencies. Then we have a full
>> # list of modules whose installed files need to be packed.
>>
>> INTERNAL_OTATOOLS_MODULES_WITH_DEPS := \
>>   $(sort $(INTERNAL_OTATOOLS_MODULES) \
>>   $(foreach m,$(INTERNAL_OTATOOLS_MODULES),$(call
>> get-all-shared-libs-deps,$(m
>>
>> INTERNAL_OTATOOLS_PACKAGE_FILES := \
>>   $(filter $(HOST_OUT)/%,$(call
>> module-installed-files,$(INTERNAL_OTATOOLS_MODULES_WITH_DEPS)))
>>
>> INTERNAL_OTATOOLS_PACKAGE_FILES += \
>>   $(sort $(shell find build/make/target/product/security -type f -name
>> "*.x509.pem" -o \
>>   -name "*.pk8" -o -name verity_key))
>>
>> ifneq (,

Re: [android-building] Re: shared library can't be copied into OTATOOLS

2020-05-06 Thread &#x27;Dan Willemsen' via Android Building
No, libc++.so is already included in the otatools zip file that I linked
earlier (missing that file would cause issues in our infrastructure using
otatools as well). I've confirmed it's there in our internal R trees as
well. If it's not showing up in your builds, are you sure you don't have a
local change to the build system causing this problem?

$ zipinfo otatools.zip | less
Archive:  otatools.zip
Zip file size: 361711518 bytes, number of entries: 257
-rwx--  2.0 unx 68541840 bl defN 08-Jan-01 00:00 bin/aapt2
-rwx--  2.0 unx 31833568 bl defN 08-Jan-01 00:00
bin/add_img_to_target_files
...
-rwx--  2.0 unx   558272 bl defN 08-Jan-01 00:00 bin/lpmake
-rwx--  2.0 unx   519040 bl defN 08-Jan-01 00:00 bin/lpunpack
...
-rw 2.0 fat  1720976 bl defN 08-Jan-01 00:00
framework/boot_signer.jar
-rw 2.0 fat  2715758 bl defN 08-Jan-01 00:00 framework/signapk.jar
-rw 2.0 fat  1716209 bl defN 08-Jan-01 00:00
framework/verity_signer.jar
-rwx--  2.0 unx  4114648 bl defN 08-Jan-01 00:00 lib64/libbase.so
-rwx--  2.0 unx  1501888 bl defN 08-Jan-01 00:00
lib64/libbrillo-stream.so
-rwx--  2.0 unx  2690344 bl defN 08-Jan-01 00:00 lib64/libbrillo.so
-rwx--  2.0 unx  6454680 bl defN 08-Jan-01 00:00 lib64/libc++.so
-rwx--  2.0 unx 20883064 bl defN 08-Jan-01 00:00 lib64/libchrome.so
-rwx--  2.0 unx 13054768 bl defN 08-Jan-01 00:00
lib64/libconscrypt_openjdk_jni.so
-rwx--  2.0 unx  6968648 bl defN 08-Jan-01 00:00 lib64/libcrypto-host.so
-rwx--  2.0 unx16736 bl defN 08-Jan-01 00:00
lib64/libcrypto_utils.so
-rwx--  2.0 unx   199776 bl defN 08-Jan-01 00:00 lib64/libcutils.so
...

- Dan

On Wed, May 6, 2020 at 4:58 PM 임정민  wrote:

> Thanks for quick response.
> Why I'm doing this. We use lpunpack including OTA/tools.
> but when I'm running lpunpack there is error cause there are no shared
> library like libc++
>
> You mean I should check all of this and added it into OTA/tools one by one?
>
> 2020년 5월 5일 화요일 오전 12시 49분 15초 UTC+9, 임정민 님의 말:
>>
>> Hi I found there are no shared library in ota packages.
>>
>> I expect there are some modules and shared libraries.
>> but only existing were modules like lpunpack.
>> I hope there are shared libraries such as libbase.so.
>> but It's not working.
>>
>> I think get-all-shared-libs-deps is related with copying shared libraries
>> into ota_package. but It's not working
>> please check it for me
>>
>> thanks
>>
>> !!
>> /build/make/core/Makefile
>> !
>>
>> ---
>> INTERNAL_OTATOOLS_MODULES := \
>>   aapt2 \
>>   add_img_to_target_files \
>>   append2simg \
>>   avbtool \
>>   blk_alloc_to_base_fs \
>>   boot_signer \
>>   brillo_update_payload \
>>   brotli \
>>   bsdiff \
>>   build_image \
>>   build_super_image \
>>   build_verity_metadata \
>>   build_verity_tree \
>>   care_map_generator \
>>   check_ota_package_signature \
>>   check_target_files_signatures \
>>   check_target_files_vintf \
>>   checkvintf \
>>   delta_generator \
>>   e2fsck \
>>   e2fsdroid \
>>   fc_sort \
>>   fec \
>>   fs_config \
>>   generate_verity_key \
>>   img2simg \
>>   img_from_target_files \
>>   imgdiff \
>>   libconscrypt_openjdk_jni \
>>   lpmake \
>>   lpunpack \
>>   make_f2fs \
>>   merge_target_files \
>>   minigzip \
>>   mk_combined_img \
>>   mkbootfs \
>>   mkbootimg \
>>   mke2fs \
>>   mke2fs.conf \
>>   mkf2fsuserimg.sh \
>>   mksquashfs \
>>   mksquashfsimage.sh \
>>   mkuserimg_mke2fs \
>>   ota_from_target_files \
>>   sefcontext_compile \
>>   sgdisk \
>>   shflags \
>>   sign_apex \
>>   sign_target_files_apks \
>>   signapk \
>>   simg2img \
>>   sload_f2fs \
>>   tune2fs \
>>   unpack_bootimg \
>>   update_host_simulator \
>>   validate_target_files \
>>   verity_signer \
>>   verity_verifier \
>>   zipalign \
>>
>> # Additional tools to unpack and repack the apex file.
>> INTERNAL_OTATOOLS_MODULES += \
>>   apexer \
>>   deapexer \
>>   debugfs_static \
>>   merge_zips \
>>   resize2fs \
>>   soong_zip \
>>
>> ifeq (true,$(PRODUCT_SUPPORTS_VBOOT))
>> INTERNAL_OTATOOLS_MODULES += \
>>   futility \
>>   vboot_signer
>> endif
>>
>> INTERNAL_OTATOOLS_FILES := \
>>   $(filter $(HOST_OUT)/%,$(call
>> module-installed-files,$(INTERNAL_OTATOOLS_MODULES)))
>>
>> .PHONY: otatools
>> otatools: $(INTERNAL_OTATOOLS_FI

Re: [android-building] Re: shared library can't be copied into OTATOOLS

2020-05-06 Thread &#x27;Dan Willemsen' via Android Building
Just adding "libc++" (etc) to that list would trigger the shared library to
be installed, but in general (just like PRODUCT_PACKAGES), you shouldn't
need to refer to shared libraries because they should be included as a
byproduct of being used by one of the binaries in that list (unless they're
used via `dlopen`).

- Dan

On Wed, May 6, 2020 at 4:27 PM 임정민  wrote:

> I'm checking R OS
> And I made something wrong the question.
> I need OTATOOLS have shared library
> until Q OS there is lines like
> --
> 2504# Shared libraries.
> 2505OTATOOLS += \
> 2506 $(HOST_LIBRARY_PATH)/libc++$(HOST_SHLIB_SUFFIX) \
> 2507 $(HOST_LIBRARY_PATH)/liblog$(HOST_SHLIB_SUFFIX) \
> --
>
> but It's removed at R OS how could I insert shared library into OTA/tools
>
> 2020년 5월 5일 화요일 오전 12시 49분 15초 UTC+9, 임정민 님의 말:
>>
>> Hi I found there are no shared library in ota packages.
>>
>> I expect there are some modules and shared libraries.
>> but only existing were modules like lpunpack.
>> I hope there are shared libraries such as libbase.so.
>> but It's not working.
>>
>> I think get-all-shared-libs-deps is related with copying shared libraries
>> into ota_package. but It's not working
>> please check it for me
>>
>> thanks
>>
>> !!
>> /build/make/core/Makefile
>> !
>>
>> ---
>> INTERNAL_OTATOOLS_MODULES := \
>>   aapt2 \
>>   add_img_to_target_files \
>>   append2simg \
>>   avbtool \
>>   blk_alloc_to_base_fs \
>>   boot_signer \
>>   brillo_update_payload \
>>   brotli \
>>   bsdiff \
>>   build_image \
>>   build_super_image \
>>   build_verity_metadata \
>>   build_verity_tree \
>>   care_map_generator \
>>   check_ota_package_signature \
>>   check_target_files_signatures \
>>   check_target_files_vintf \
>>   checkvintf \
>>   delta_generator \
>>   e2fsck \
>>   e2fsdroid \
>>   fc_sort \
>>   fec \
>>   fs_config \
>>   generate_verity_key \
>>   img2simg \
>>   img_from_target_files \
>>   imgdiff \
>>   libconscrypt_openjdk_jni \
>>   lpmake \
>>   lpunpack \
>>   make_f2fs \
>>   merge_target_files \
>>   minigzip \
>>   mk_combined_img \
>>   mkbootfs \
>>   mkbootimg \
>>   mke2fs \
>>   mke2fs.conf \
>>   mkf2fsuserimg.sh \
>>   mksquashfs \
>>   mksquashfsimage.sh \
>>   mkuserimg_mke2fs \
>>   ota_from_target_files \
>>   sefcontext_compile \
>>   sgdisk \
>>   shflags \
>>   sign_apex \
>>   sign_target_files_apks \
>>   signapk \
>>   simg2img \
>>   sload_f2fs \
>>   tune2fs \
>>   unpack_bootimg \
>>   update_host_simulator \
>>   validate_target_files \
>>   verity_signer \
>>   verity_verifier \
>>   zipalign \
>>
>> # Additional tools to unpack and repack the apex file.
>> INTERNAL_OTATOOLS_MODULES += \
>>   apexer \
>>   deapexer \
>>   debugfs_static \
>>   merge_zips \
>>   resize2fs \
>>   soong_zip \
>>
>> ifeq (true,$(PRODUCT_SUPPORTS_VBOOT))
>> INTERNAL_OTATOOLS_MODULES += \
>>   futility \
>>   vboot_signer
>> endif
>>
>> INTERNAL_OTATOOLS_FILES := \
>>   $(filter $(HOST_OUT)/%,$(call
>> module-installed-files,$(INTERNAL_OTATOOLS_MODULES)))
>>
>> .PHONY: otatools
>> otatools: $(INTERNAL_OTATOOLS_FILES)
>>
>> # For each module, recursively resolve its host shared library
>> dependencies. Then we have a full
>> # list of modules whose installed files need to be packed.
>>
>> INTERNAL_OTATOOLS_MODULES_WITH_DEPS := \
>>   $(sort $(INTERNAL_OTATOOLS_MODULES) \
>>   $(foreach m,$(INTERNAL_OTATOOLS_MODULES),$(call
>> get-all-shared-libs-deps,$(m
>>
>> INTERNAL_OTATOOLS_PACKAGE_FILES := \
>>   $(filter $(HOST_OUT)/%,$(call
>> module-installed-files,$(INTERNAL_OTATOOLS_MODULES_WITH_DEPS)))
>>
>> INTERNAL_OTATOOLS_PACKAGE_FILES += \
>>   $(sort $(shell find build/make/target/product/security -type f -name
>> "*.x509.pem" -o \
>>   -name "*.pk8" -o -name verity_key))
>>
>> ifneq (,$(wildcard device))
>> INTERNAL_OTATOOLS_PACKAGE_FILES += \
>>   $(sort $(shell find device $(wildcard vendor) -type f -name "*.pk8" -o
>> -name "verifiedboot*" -o \
>>   -name "*.pem" -o -name "

Re: [android-building] Re: android build take eons

2020-05-04 Thread &#x27;Dan Willemsen' via Android Building
Yep, this greatly depends on your machine and which target you're building
-- there are builds and configurations that can do a full clean build in
~30 minutes, but that's a simpler config and a high-end machine.

For the workflow:

if i want to include a new library, or write a new driver, or change
> something minimal, and recompile, isn't there a way to do it quicker?
>

You should only need to do the full clean build once, after that
incremental builds should be much much shorter (our goals are generally
<<1min, but that significantly depends on what you change, and your
machine). You should always try to use incremental builds.

And if you know that you only want to rebuild a single partition / don't
need images / etc, you can ask for `m vendorimage`/`m sync`/etc, but what
works there greatly depends on the types of changes you're making, and what
you need out of the build.


>  And be sure to use make -k to take advantage of all your CPUs.


'-k' is keep going, you're thinking of '-j', but that's been the default
for a while now.

- Dan

On Mon, May 4, 2020 at 12:29 PM 'Glenn Kasten' via Android Building <
android-building@googlegroups.com> wrote:

> The listed build hardware requirements
> <https://source.android.com/setup/build/requirements#hardware-requirements>
> are the bare minimum.
> The more RAM and CPUs you have, the better.
> And be sure to use make -k to take advantage of all your CPUs.
>
> On Monday, May 4, 2020 at 12:19:43 PM UTC-7, Imx6dev Kit wrote:
>>
>> I got my AOSP build to work but it took maybe 8 hours ... i cannot
>> imagine how anyone can develop anything this way .. if i want to include a
>> new library, or write a new driver, or change something minimal, and
>> recompile, isn't there a way to do it quicker?  What is the recommended way
>> to build after making a minor change?
>>
> --
> --
> 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/5192f89b-c40e-4bba-969c-ec6f012d8324%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/5192f89b-c40e-4bba-969c-ec6f012d8324%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DMqEL1LQ74%2Bn7aVjwEuKb3jbpFYGRujQLXmQyML_FdLw%40mail.gmail.com.


Re: [android-building] shared library can't be copied into OTATOOLS

2020-05-04 Thread &#x27;Dan Willemsen' via Android Building
What version of AOSP are you using? The current aosp/master builds of
otatools.zip definitely have lib64/libbase.so:
https://ci.android.com/builds/submitted/6459548/aosp_cf_x86_phone-userdebug/latest

And printing out INTERNAL_OTATOOLS_MODULES_WITH_DEPS, it's getting libbase
added from get-all-shared-libs-deps.

- Dan

On Mon, May 4, 2020 at 8:48 AM 임정민  wrote:

> Hi I found there are no shared library in ota packages.
>
> I expect there are some modules and shared libraries.
> but only existing were modules like lpunpack.
> I hope there are shared libraries such as libbase.so.
> but It's not working.
>
> I think get-all-shared-libs-deps is related with copying shared libraries
> into ota_package. but It's not working
> please check it for me
>
> thanks
>
> !!
> /build/make/core/Makefile
> !
>
> ---
> INTERNAL_OTATOOLS_MODULES := \
>   aapt2 \
>   add_img_to_target_files \
>   append2simg \
>   avbtool \
>   blk_alloc_to_base_fs \
>   boot_signer \
>   brillo_update_payload \
>   brotli \
>   bsdiff \
>   build_image \
>   build_super_image \
>   build_verity_metadata \
>   build_verity_tree \
>   care_map_generator \
>   check_ota_package_signature \
>   check_target_files_signatures \
>   check_target_files_vintf \
>   checkvintf \
>   delta_generator \
>   e2fsck \
>   e2fsdroid \
>   fc_sort \
>   fec \
>   fs_config \
>   generate_verity_key \
>   img2simg \
>   img_from_target_files \
>   imgdiff \
>   libconscrypt_openjdk_jni \
>   lpmake \
>   lpunpack \
>   make_f2fs \
>   merge_target_files \
>   minigzip \
>   mk_combined_img \
>   mkbootfs \
>   mkbootimg \
>   mke2fs \
>   mke2fs.conf \
>   mkf2fsuserimg.sh \
>   mksquashfs \
>   mksquashfsimage.sh \
>   mkuserimg_mke2fs \
>   ota_from_target_files \
>   sefcontext_compile \
>   sgdisk \
>   shflags \
>   sign_apex \
>   sign_target_files_apks \
>   signapk \
>   simg2img \
>   sload_f2fs \
>   tune2fs \
>   unpack_bootimg \
>   update_host_simulator \
>   validate_target_files \
>   verity_signer \
>   verity_verifier \
>   zipalign \
>
> # Additional tools to unpack and repack the apex file.
> INTERNAL_OTATOOLS_MODULES += \
>   apexer \
>   deapexer \
>   debugfs_static \
>   merge_zips \
>   resize2fs \
>   soong_zip \
>
> ifeq (true,$(PRODUCT_SUPPORTS_VBOOT))
> INTERNAL_OTATOOLS_MODULES += \
>   futility \
>   vboot_signer
> endif
>
> INTERNAL_OTATOOLS_FILES := \
>   $(filter $(HOST_OUT)/%,$(call
> module-installed-files,$(INTERNAL_OTATOOLS_MODULES)))
>
> .PHONY: otatools
> otatools: $(INTERNAL_OTATOOLS_FILES)
>
> # For each module, recursively resolve its host shared library
> dependencies. Then we have a full
> # list of modules whose installed files need to be packed.
>
> INTERNAL_OTATOOLS_MODULES_WITH_DEPS := \
>   $(sort $(INTERNAL_OTATOOLS_MODULES) \
>   $(foreach m,$(INTERNAL_OTATOOLS_MODULES),$(call
> get-all-shared-libs-deps,$(m
>
> INTERNAL_OTATOOLS_PACKAGE_FILES := \
>   $(filter $(HOST_OUT)/%,$(call
> module-installed-files,$(INTERNAL_OTATOOLS_MODULES_WITH_DEPS)))
>
> INTERNAL_OTATOOLS_PACKAGE_FILES += \
>   $(sort $(shell find build/make/target/product/security -type f -name
> "*.x509.pem" -o \
>   -name "*.pk8" -o -name verity_key))
>
> ifneq (,$(wildcard device))
> INTERNAL_OTATOOLS_PACKAGE_FILES += \
>   $(sort $(shell find device $(wildcard vendor) -type f -name "*.pk8" -o
> -name "verifiedboot*" -o \
>   -name "*.pem" -o -name "oem*.prop" -o -name "*.avbpubkey"))
> endif
> ifneq (,$(wildcard external/avb))
> INTERNAL_OTATOOLS_PACKAGE_FILES += \
>   $(sort $(shell find external/avb/test/data -type f -name "testkey_*.pem"
> -o \
>   -name "atx_metadata.bin"))
> endif
> ifeq (true,$(PRODUCT_SUPPORTS_VBOOT))
> INTERNAL_OTATOOLS_PACKAGE_FILES += \
>   $(sort $(shell find external/vboot_reference/tests/devkeys -type f))
> endif
>
> INTERNAL_OTATOOLS_RELEASETOOLS := \
>   $(sort $(shell find build/make/tools/releasetools -name "*.pyc" -prune
> -o \
>   \( -type f -o -type l \) -print))
>
> BUILT_OTATOOLS_PACKAGE := $(PRODUCT_OUT)/otatools.zip
> $(BUILT_OTATOOLS_PACKAGE): PRIVATE_ZIP_ROOT := $(call
> intermediates-dir-for,PACKAGING,otatools)/otatools
> $(BUILT_OTATOOLS_PACKAGE): PRIVATE_OTATOOLS_PACKAGE_FILES :=
> $(INTERNAL_OTATOOLS_PACKAGE_FILES)
> $(BUILT_OTATOOLS_PACKAGE): PRIVATE_OTATOOLS_RELEASETOOLS :=
> $(INTERNAL_OTATOOLS_RELEASETOOLS)
> $(BUILT_OTATOOLS_PACKAGE): $(INTERNAL_OTATOOLS_PACK

Re: [android-building] "Build sandboxing disabled due to nsjail error. This may become fatal in the future."

2020-04-30 Thread &#x27;Dan Willemsen' via Android Building
Yes, we're familiar with the docker problems, and we'll likely have to live
with it for the time being: https://issuetracker.google.com/123210688 .
I've removed the above message from master and Android 11 (the other common
case was distributions that turned off user namespaces).

> I suppose this is not very helpful in my case for me as Docker is already
doing process isolation?

I'm actually less interested in it as a security isolation boundary, and
more interested in it providing more assurances about the behaviors we
expect from the build, and provide more safety by default:

* Guarantees that processes don't continue running past the end of the
build (or the part of the build). In practice, this should just be a safety
precaution, and if you're starting the build via the docker command line
every time, it should provide similar guarantees (if you're attaching to a
long-running docker instance, not so much).
* Allows us to turn off the network for part of the build. In most cases
right now this can be emulated by just turning off the network for that
docker container, but with the remote execution work that's ongoing, we
allow a daemon access to the network, but turn it off for the rest of the
build (which tunnels build requests to the daemon as necessary).
* Recently on master, turns off write access to the rest of the system
(except $srcdir, $outdir, $distdir, $home? something like that). Depending
on your docker setup, this safety may not be too important (just mounting
the necessary directories, and throwing away any changes made after the
build exists, for example).

So while we can't require the use of nsjail at this point, it may mean that
your build succeeds while the same build on another system using nsjail
fails. You may be able to configure docker similarly, but changing the
configuration during different parts of the build likely wouldn't be
possible.

I'd like to do things like turn the source directory read only, but I've
been hesitant to do so because it'll cause a larger behavior difference
between the nsjail users and the rest. Also on the list is hiding things
like /usr/include from the build, as we never want to use it. Potentially
changing what parts of the output tree are read/write vs read-only vs
invisible during different parts of the build is another idea I've had.

- Dan



On Thu, Apr 30, 2020 at 9:43 AM Ricky Ng-Adam  wrote:

> Hello!
>
> I'm building Android 10 in a Docker with overlay and getting the following
> error:
>
> Building Android
>
>
> 06:58:14 Build sandboxing disabled due to nsjail error. This may become
> fatal in the future.
>
> 06:58:14 Please let us know why nsjail doesn't work in your environment
> at:
>
> 06:58:14   https://groups.google.com/forum/#!forum/android-building
>
>
> 06:58:14   https://issuetracker.google.com/issues/new?component=381517
>
> https://github.com/google/nsjail
>
> A light-weight process isolation tool, making use of Linux namespaces and
> seccomp-bpf syscall filters (with help of the kafel bpf language)
>
> I suppose this is not very helpful in my case for me as Docker is already
> doing process isolation? I see it's possible to run nsjail but it requires
> --disable_proc and --privileged.
>
> I'm supposing nsjail exists to provide better performance?
>
> Does it work well with Overlay FS? I'm trying to build for every branch
> without copying over all source tree and output build objects.
>
> Thanks,
>
> Ricky
>
> --
> --
> 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/8cd8ef17-d322-404e-986e-feb0f5c7c3c8%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/8cd8ef17-d322-404e-986e-feb0f5c7c3c8%40googlegroups.com?utm_medium=email&utm_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://gr

Re: [android-building] Memory leak?

2020-04-30 Thread &#x27;Dan Willemsen' via Android Building
The minimum requirements for the build is 16GB of RAM available (and even
with that it can be difficult later in the build). The virtualization
mention was meant to say that a machine with 16GB of RAM wasn't enough when
virtualizing -- the virtual machine would need 16GB allocated to it.

`m -j1` means that we'll only launch a single process at a time, but many
of those spin up a number of threads on their own. Parallelism can have
some effect on peak RAM use, but I wouldn't expect that to significantly
affect things, at least for soong_build.

Which target you're building can have a reasonably big impact on RAM usage
(as 64-bit targets need both 64 and 32 bit configurations). On my machine
with aosp-master:

 aosp_cf_x86_phone - soong_build peaks at ~6GB  (and allocated ~20GB over
its lifetime). next, kati takes ~4GB
 aosp_crosshatch - soong_build peaks at ~8.5GB  (and allocated ~26GB over
its lifetime). next, kati takes ~6GB

For some of our larger branches/targets, I've seen peaks at >14GB (~50GB
lifetime allocs), with kati using >10GB.

- Dan

On Thu, Apr 30, 2020 at 12:05 PM Eliane Fonseca 
wrote:

> same problem with 2 processes and I have only 8 GB of physical RAM and it
> is not virtualized system . any timing for fix ?
>
> Em 30 de abr de 2020 13:43, "Silver Rampart" 
> escreveu:
>
> When running a normal build, process soong_build quickly fills up all
> available memory (6GB in under 5 minutes) and starts to swap. Quad-core i5.
> I understand this might have something to do with parallelism, but I run
> make with -j1 and soong_build is still running multiple threads.
>
> --
> --
> 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/ca25a692-cd1f-4096-be61-552017644208%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/ca25a692-cd1f-4096-be61-552017644208%40googlegroups.com?utm_medium=email&utm_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/CAJ%2BSQK6ow5BwiNHUpt9bxTcjnJsyVBptX6mkL%2B4Pn9KaA3mNRA%40mail.gmail.com
> <https://groups.google.com/d/msgid/android-building/CAJ%2BSQK6ow5BwiNHUpt9bxTcjnJsyVBptX6mkL%2B4Pn9KaA3mNRA%40mail.gmail.com?utm_medium=email&utm_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/CALQgHdnkEefTzYxU%2BYnGH5RN27vROLmBitc6VkfgVCwjLMuN3g%40mail.gmail.com.


Re: [android-building] equivalent flag "optimize" from Android.bp in Android.mk

2020-04-28 Thread &#x27;Dan Willemsen' via Android Building
`LOCAL_PROGUARD_ENABLED := disabled` would be the equivalent of `optimize:
{ enabled: false }`

- Dan

On Tue, Apr 28, 2020 at 11:51 AM Kbc K  wrote:

> Hi Everyone,
>
> Soong build system "Android.bp" has a useful flag called "optimize" which
> allow to disable compiler optimization.
>
> I'm looking for something equivalent in Android.mk system.
>
> BR, K
>
> --
> --
> 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/8d5ed84a-8753-44c9-999f-c55e7874b665%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/8d5ed84a-8753-44c9-999f-c55e7874b665%40googlegroups.com?utm_medium=email&utm_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/CALQgHdnFyXbGOic1UNYqeFCtfFzaUTuMCUKsWTrG8cL_1MWNZA%40mail.gmail.com.


Re: [android-building] Android.mk deprecation status and plan

2020-04-23 Thread &#x27;Dan Willemsen' via Android Building
The AOSP master branch is already reflecting the 2021 work in progress.

For the Android 11 (2020) release,
https://cs.android.com/android/_/android/platform/build/+/be01cf841e95b8ae396625486b8fb746e5e71492:Deprecation.md;drc=97ec8127081ce0e4b372349caa513ccde9f0fcf7;bpv=0;bpt=0
will
be the state:

Host C/C++ builds in Make have been deprecated, and are errors by default
(but are still available behind BUILD_BROKEN_USES_BUILD_* flags). Lesser
used module types (AUX, NATIVE_BENCHMARK, STATIC_TEST_LIBRARY) are also in
that state. [HOST_]SHARED_TEST_LIBRARY was removed because it was
previously marked obsolete.

The rest of the module types are still available, but as before, there may
be other reasons you need to switch code to Android.bp -- if something else
that was converted to Android.bp needs to link to your library, your
library needs to be in an Android.bp; if you are defining a jar to put in
the bootclasspath; etc.

- Dan

On Thu, Apr 23, 2020 at 8:58 AM XING WANG 
wrote:

> I checked the doc in build repo
> https://cs.android.com/android/platform/superproject/+/master:build/make/Deprecation.md,
> Google is coverting the make to soong.
>
> Will google convert all BUILD_* to soong in 2020 release?  If not,could
> you give us a deprecation plan list in 2020 release ?
>
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/a9baa74b-96c7-4548-87cb-ba3295cb471f%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/a9baa74b-96c7-4548-87cb-ba3295cb471f%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkgXUOkb8F5WnorLMEZF0H-xP3-TrBecF6ffmJCnqoKxw%40mail.gmail.com.


Re: [android-building] repo init python2.7 or python3.6 which one to use?

2020-04-22 Thread &#x27;Dan Willemsen' via Android Building
When using `--repo-url=git://codeaurora.org/tools/repo.git
 --repo-branch=caf-stable`, you likely need to use a repo launcher
downloaded from codeaurora as well, as it seems the upstream repo launcher
is not compatible with it. I'm not familiar with codeaurora though --
there's a chance you could remove those arguments and be successful, this
may be something to bring up in their forums / support channels.

- Dan

On Wed, Apr 22, 2020 at 9:23 AM Yuvaraj Velumani  wrote:

> 1. I have my Ubuntu server 16.04.10 installed which has python 2.7.12 and
> 3.6.9(I installed it - following procedure referring
> https://realpython.com/installing-python/)
> 2. Installed repo launcher (version 2.5) as per
> https://source.android.com/setup/build/downloading (by default I used curl
> https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo)
>
> My intention was to install the qualcomm processor public code from using 
> "repo
> init -u https://source.codeaurora.org/quic/la/platform/manifest.git -b
> release -m LA.AU.0.0.1-03620-sa8155_gvmq.0.xml --repo-url=git://
> codeaurora.org/tools/repo.git --repo-branch=caf-stable"
>
> *My initial repo download messages showed (when using python 3.6.9)*
>  warning: Python 3 support is currently experimental. YMMV.
>  Please use Python 2.6 - 2.7 instead
>  Get https://source.codeaurora.org/quic/le/le/manifest
> *Error Message*
>  File "/usr/local/lib/python3.6/codecs.py", line 321, in decode
>  (result, consumed) = self._buffer_decode(data, self.errors, final)
>  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9d in position
> 151: invalid start byte
>
> *After this I change to python 2.7.12 *(rm -rf ~/bin/repo and used curl
> https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo)
> and launched "repo init -u
> https://source.codeaurora.org/quic/la/platform/manifest.git -b release -m
> LA.AU.0.0.1-03620-sa8155_gvmq.0.xml --repo-url=git://
> codeaurora.org/tools/repo.git --repo-branch=caf-stable"
>
> *My initial repo download messages showed (when using python 2.7.12)*
> Get https://source.codeaurora.org/quic/la/tools/repo.git/clone.bundle
> Get https://source.codeaurora.org/quic/la/tools/repo.git
> *Error Message*
> File "/usr/lib/python2.7/pickle.py", line 1384, in load
> return Unpickler(file).load()
> File "/usr/lib/python2.7/pickle.py", line 864, in load
>  dispatch[key](self)
>  File "/usr/lib/python2.7/pickle.py", line 892, in load_proto
>  raise ValueError, "unsupported pickle protocol: %d" % proto
>  ValueError: unsupported pickle protocol: 4
>
> I really don't know what is the real issue.
>
> Thanks in advance and I appreciate your 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/054a0cab-d651-467d-942b-3aa54e3664a8%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/054a0cab-d651-467d-942b-3aa54e3664a8%40googlegroups.com?utm_medium=email&utm_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/CALQgHdnGB4_WTUx_R8ZYEEeWo449%3DMxM7B3AGqArx%3Da6qE2S2Q%40mail.gmail.com.


Re: [android-building] Replacing acloud prebuilt binary

2020-04-21 Thread &#x27;Dan Willemsen' via Android Building
I believe the prebuilt comes from the python support in the platform build
system, not setup.py:

  source build/envsetup.sh
  m acloud
  cp out/host/linux-x86/bin/acloud-dev .../acloud

- Dan

On Tue, Apr 21, 2020 at 11:16 AM Andre D  wrote:

> Hello,
>
> Is it possible to replace the prebuilt acloud binary
> (prebuilts/asuite/acloud)? When I run "python setup.py bdist_wheel" within
> the tools/acloud directory I don't find any binary in the output. I'm new
> to Python, so perhaps I'm missing something.
>
> Thank you,
> Andre
>
> --
> --
> 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/83408403-ec0a-4b15-a87a-5d11bc230094%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/83408403-ec0a-4b15-a87a-5d11bc230094%40googlegroups.com?utm_medium=email&utm_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/CALQgHd%3DCrR9jghSXM24t%3D3HdoHvga5fknU9%2Bmij7OiPQhhdSeA%40mail.gmail.com.


Re: [android-building] Classes.jar and classes-header.jar with same module name

2020-04-14 Thread &#x27;Dan Willemsen' via Android Building
That generally should be an error, as we normally require modules to be
unique based on the combination of LOCAL_MODULE / LOCAL_IS_HOST_MODULE /
LOCAL_MODULE_CLASS (this is in build/make/core/base_rules.mk
<https://cs.android.com/android/platform/superproject/+/master:build/make/core/base_rules.mk;drc=fca369e4e3694b0f549613362f0568c88f67;l=322>
)


If that isn't triggering, you may be making two rules to create the same
/system/frameworks/X.jar, and you should be getting a warning like this:

build/make/core/mk:LLL: warning: overriding commands for target
`out/target/product/mydevice/system/frameworks/X.jar'
build/make/core/...mk:LLL: warning: ignoring old commands for target
`out/target/product/mydevice/system/frameworks/X.jar'

That should be an error by default unless you've got BUILD_BROKEN_DUP_RULES
set (at least as of Android-Q iirc). That means you're getting one of the
two, or sometimes a mix, but we don't really even guarantee which one
you'll get (it's fairly stable, but can change based on ordering/etc).


What did you intend for the snippet to do? How would we install both
classes.jar and classes-header.jar onto the device? Same filenames?
Different filenames? Why do they share the same module name?

- Dan

On Tue, Apr 14, 2020 at 8:10 AM Pranitha Reddy <
pranitha.alugube...@gmail.com> wrote:

> Hello
> Say there is module 'X' writtern twice in Android.mk
>
> include $(CLEAR_VARS)
> LOCAL_MODULE   := X
> LOCAL_MODULE_CLASS := JAVA_LIBRARIES
> LOCAL_SRC_FILES:= same_path/classes-header.jar
>
>
>
> include $(CLEAR_VARS)
> LOCAL_MODULE   := X
> LOCAL_MODULE_CLASS := JAVA_LIBRARIES
> LOCAL_SRC_FILES:= same_path/classes.jar
>
> Is there any way to install X such that both classes.jar and
> classes-header.jar will be in out folder?
> At present with above Android.mk, the rule that is writtern first is being
> compiled and the rest is being ingnored and so Im seeing only
> classes-header.jar in out folder
>
> 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/CAH4VoYmaY%3DokDbzrBCa%2BGt9ysJNLasKMeK2NKVTH2Lq95QjE3w%40mail.gmail.com
> <https://groups.google.com/d/msgid/android-building/CAH4VoYmaY%3DokDbzrBCa%2BGt9ysJNLasKMeK2NKVTH2Lq95QjE3w%40mail.gmail.com?utm_medium=email&utm_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/CALQgHdnpF2%2BgT_C9wymuA3VtCDEjP3g4uy4SAXyZ04%3DVEEEOcw%40mail.gmail.com.


Re: [android-building] How to call Android.bp from Android.mk?

2020-04-14 Thread &#x27;Dan Willemsen' via Android Building
Android.bp files are handled by a different system, and can't just be
included as a makefile. In Android-P and newer (IIRC), all Android.bp files
in the tree are always loaded, so you should be able to reference the
modules from your Android.mk files (using LOCAL_SHARED_LIBRARIES/etc).

- Dan

On Mon, Apr 13, 2020 at 7:21 AM Sriraj Hebbar  wrote:

> Hi,
> I have a legacy code Android.mk from this make file I want to call
> Android.bp how can I do that?
> when I add "include $(AIS_PATH)/hal/evs/1.1/Android.bp" its gving error
> like "Android.bp:1: error: missing separator."
>
> --
> --
> 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/0cc931a4-881a-4d94-86e7-f0a4419d82e4%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/0cc931a4-881a-4d94-86e7-f0a4419d82e4%40googlegroups.com?utm_medium=email&utm_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/CALQgHdnJN9tafRB%2BmxWLu-NqNSDLG_fsd06PSgDu4uyNoxwzbQ%40mail.gmail.com.


Re: [android-building] Android 11` Preview building failed initially

2020-04-08 Thread &#x27;Dan Willemsen' via Android Building
Sorry, apparently that link didn't 
work. https://groups.google.com/d/msg/android-building/t-70r0IdkZY/sY_NhNd6AgAJ 
should work better.

- Dan

On Tuesday, April 7, 2020 at 9:45:15 AM UTC-7 Dan Willemsen wrote:

> Yep, that's not intended to be a buildable tag. See my previous messages: 
> https://groups.google.com/g/android-building/c/t-70r0IdkZY/m/sY_NhNd6AgAJ
>
> - Dan
>
> On Tue, Apr 7, 2020 at 9:41 AM Varun Kumar  wrote:
>
>> Hi Dan Willemsen,
>>
>> I have used below branch/tag 
>>
>> *repo init -u https://android.googlesource.com/platform/manifest 
>> <https://android.googlesource.com/platform/manifest> -b android-r-preview-2*
>>
>> I googled few things related with this error. It's because of a 
>> duplicate entry in somewhere  which both are trying to copy some file to 
>> the same destination.
>>
>>
>> On Friday, April 3, 2020 at 9:30:34 AM UTC+5:30, Dan Willemsen wrote:
>>>
>>> What branch/tag did you use to initialize this source tree? (`repo init 
>>> ...`)
>>>
>>> - Dan
>>>
>>> On Thu, Apr 2, 2020 at 8:57 PM Varun Kumar  wrote:
>>>
>>>> 
>>>> PLATFORM_VERSION_CODENAME=R
>>>> PLATFORM_VERSION=R
>>>> TARGET_PRODUCT=aosp_arm64
>>>> TARGET_BUILD_VARIANT=eng
>>>> TARGET_BUILD_TYPE=release
>>>> TARGET_ARCH=arm64
>>>> TARGET_ARCH_VARIANT=armv8-a
>>>> TARGET_CPU_VARIANT=generic
>>>> TARGET_2ND_ARCH=arm
>>>> TARGET_2ND_ARCH_VARIANT=armv8-a
>>>> TARGET_2ND_CPU_VARIANT=generic
>>>> HOST_ARCH=x86_64
>>>> HOST_2ND_ARCH=x86
>>>> HOST_OS=linux
>>>> HOST_OS_EXTRA=Linux-4.15.0-91-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=AOSP.MASTER
>>>> OUT_DIR=out
>>>> 
>>>> [100% 430/430] writing build rules ...
>>>> FAILED: 
>>>> build/make/core/base_rules.mk:491: error: overriding commands for 
>>>> target `out/target/product/generic_arm64/system/bin/chattr', previously 
>>>> defined at build/make/core/base_rules.mk:467
>>>> 07:04:16 ckati failed with: exit status 1
>>>>
>>>>  failed to build some targets (03:53 (mm:ss)) 
>>>>
>>>> -- 
>>>> -- 
>>>> 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/c97e5216-cfd2-47c6-a7cb-7a67929f62a9%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/android-building/c97e5216-cfd2-47c6-a7cb-7a67929f62a9%40googlegroups.com?utm_medium=email&utm_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-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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-building/16d2c2e3-6dba-410d-a730-3b239ad5c436%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/android-building/16d2c2e3-6dba-410d-a730-3b239ad5c436%40googlegroups.com?utm_medium=email&utm_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/89249ef3-6117-448d-a3c2-11a945d35766%40googlegroups.com.


Re: [android-building] Android 11` Preview building failed initially

2020-04-07 Thread &#x27;Dan Willemsen' via Android Building
Yep, that's not intended to be a buildable tag. See my previous messages:
https://groups.google.com/g/android-building/c/t-70r0IdkZY/m/sY_NhNd6AgAJ

- Dan

On Tue, Apr 7, 2020 at 9:41 AM Varun Kumar  wrote:

> Hi Dan Willemsen,
>
> I have used below branch/tag
>
> *repo init -u https://android.googlesource.com/platform/manifest
> <https://android.googlesource.com/platform/manifest> -b android-r-preview-2*
>
> I googled few things related with this error. It's because of a duplicate
> entry in somewhere  which both are trying to copy some file to the same
> destination.
>
>
> On Friday, April 3, 2020 at 9:30:34 AM UTC+5:30, Dan Willemsen wrote:
>>
>> What branch/tag did you use to initialize this source tree? (`repo init
>> ...`)
>>
>> - Dan
>>
>> On Thu, Apr 2, 2020 at 8:57 PM Varun Kumar  wrote:
>>
>>> 
>>> PLATFORM_VERSION_CODENAME=R
>>> PLATFORM_VERSION=R
>>> TARGET_PRODUCT=aosp_arm64
>>> TARGET_BUILD_VARIANT=eng
>>> TARGET_BUILD_TYPE=release
>>> TARGET_ARCH=arm64
>>> TARGET_ARCH_VARIANT=armv8-a
>>> TARGET_CPU_VARIANT=generic
>>> TARGET_2ND_ARCH=arm
>>> TARGET_2ND_ARCH_VARIANT=armv8-a
>>> TARGET_2ND_CPU_VARIANT=generic
>>> HOST_ARCH=x86_64
>>> HOST_2ND_ARCH=x86
>>> HOST_OS=linux
>>> HOST_OS_EXTRA=Linux-4.15.0-91-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=AOSP.MASTER
>>> OUT_DIR=out
>>> 
>>> [100% 430/430] writing build rules ...
>>> FAILED:
>>> build/make/core/base_rules.mk:491: error: overriding commands for
>>> target `out/target/product/generic_arm64/system/bin/chattr', previously
>>> defined at build/make/core/base_rules.mk:467
>>> 07:04:16 ckati failed with: exit status 1
>>>
>>>  failed to build some targets (03:53 (mm:ss)) 
>>>
>>> --
>>> --
>>> 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/c97e5216-cfd2-47c6-a7cb-7a67929f62a9%40googlegroups.com
>>> <https://groups.google.com/d/msgid/android-building/c97e5216-cfd2-47c6-a7cb-7a67929f62a9%40googlegroups.com?utm_medium=email&utm_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/16d2c2e3-6dba-410d-a730-3b239ad5c436%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/16d2c2e3-6dba-410d-a730-3b239ad5c436%40googlegroups.com?utm_medium=email&utm_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/CALQgHdkcOOkc6ciNDGj6kZ0mX%3DTNMqYB9Mk4CRb_nPJyJ9U55w%40mail.gmail.com.


Re: [android-building] Re: Kotlin illegal reflection when building AOSP

2020-04-06 Thread &#x27;Dan Willemsen' via Android Building
Yeah, our minimum requirement
<https://source.android.com/setup/build/requirements> is 16GB (ignore the
comment about virtual machines there -- the point is that we expect 16GB
available for the OS+Build). Even on 16GB we've been seeing some number of
issues (hence the workarounds I mentioned earlier).

You can try setting NINJA_HIGHMEM_NUM_JOBS=1 in your environment, you may
also need to start lowering your `m -j#` value -- this defaults to a number
related to your cpu cores, but that always doesn't work well on machines
with low ram. (Anything we'd be doing to help the low ram cases would be
adjusting these defaults based on what we detect we're running on)

- Dan

On Mon, Apr 6, 2020 at 1:11 PM Steve  wrote:

> The machine has only 8Gb and 5580Mb are available when the build starts
> for 'm api-stubs-docs'.  Running a single job does not help.
> This happens on the master branch.
>
> It is not a virtual machine, the available swap is 7300Mb which is the
> default for Ubuntu installation.
>
> Too small?
>
>  -Steve
>
>
>
> On Sunday, April 5, 2020 at 5:27:36 PM UTC+2, Steve wrote:
>>
>> Trying to build a standard AOSP on Ubuntu 14.04, target aosp_arm-eng.
>> The build works fine until the metalava and the use of kotlin, when it
>> fails with:
>>
>> WARNING: An illegal reflective access operation has occurred
>>> WARNING: Illegal reflective access by
>>> org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreApplicationEnvironment
>>> (file:/aosp/soong/host/linux-x86/framework/metalava.jar) to field
>>> java.lang.reflect.Field.modifiers
>>> WARNING: Please consider reporting this to the maintainers of
>>> org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreApplicationEnvironment
>>> WARNING: Use --illegal-access=warn to enable warnings of further illegal
>>> reflective access operations
>>> WARNING: All illegal access operations will be denied in a future release
>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>> at
>>> java.base/java.util.LinkedHashMap$LinkedKeySet.iterator(LinkedHashMap.java:543)
>>> at java.base/java.util.HashSet.iterator(HashSet.java:173)
>>> at
>>> kotlin.collections.CollectionsKt___CollectionsKt.toList(_Collections.kt:1220)
>>> at kotlin.collections.ArraysKt___ArraysKt.distinct(_Arrays.kt:9836)
>>> at
>>> com.android.tools.metalava.model.psi.PsiModifierItem$Companion.create(PsiModifierItem.kt:188)
>>> at
>>> com.android.tools.metalava.model.psi.PsiModifierItem$Companion.create(PsiModifierItem.kt:58)
>>> at
>>> com.android.tools.metalava.model.psi.PsiItem$Companion.modifiers(PsiItem.kt:264)
>>> at
>>> com.android.tools.metalava.model.psi.PsiMethodItem$Companion.create(PsiMethodItem.kt:355)
>>> at
>>> com.android.tools.metalava.model.psi.PsiClassItem$Companion.create(PsiClassItem.kt:466)
>>> at
>>> com.android.tools.metalava.model.psi.PsiBasedCodebase.createClass(PsiBasedCodebase.kt:441)
>>> at
>>> com.android.tools.metalava.model.psi.PsiBasedCodebase.findOrCreateClass(PsiBasedCodebase.kt:559)
>>> at
>>> com.android.tools.metalava.model.psi.PsiClassItem$Companion$create$result$1.invoke(PsiClassItem.kt:534)
>>> at
>>> com.android.tools.metalava.model.psi.PsiClassItem$Companion$create$result$1.invoke(PsiClassItem.kt:391)
>>> at
>>> kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:172)
>>> at
>>> kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:716)
>>> at
>>> kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:746)
>>> at
>>> com.android.tools.metalava.model.psi.PsiClassItem$Companion.create(PsiClassItem.kt:538)
>>> at
>>> com.android.tools.metalava.model.psi.PsiBasedCodebase.createClass(PsiBasedCodebase.kt:441)
>>> at
>>> com.android.tools.metalava.model.psi.PsiBasedCodebase.initialize(PsiBasedCodebase.kt:180)
>>> at com.android.tools.metalava.Driver.parseSources(Driver.kt:876)
>>> at
>>> com.android.tools.metalava.Driver.parseSources$default(Driver.kt:847)
>>> at com.android.tools.metalava.Driver.loadFromSources(Driver.kt:773)
>>> at com.android.tools.metalava.Driver.processFlags(Driver.kt:182)
>>> at com.android.tools.metalava.Driver.run(Driver.kt:115)
>>> at com.android.tools.metalava.Driver.run$default(Driver.kt:98)
>>> at com.android.tools.metalava.Driver.main(Driver.kt:86)
>>> 12:35:03 ninja

Re: [android-building] Kotlin illegal reflection when building AOSP

2020-04-06 Thread &#x27;Dan Willemsen' via Android Building
The problem isn't the kolin warning, but java.lang.OutOfMemoryError -- your
machine ran out of ram. How much ram is available/free before the build
starts?

Are you using AOSP master, or some other branch/tag? We've made some
attempts to help with this on master (running fewer "highmem" actions
concurrently), but that may still need tweaking.

- Dan

On Sun, Apr 5, 2020 at 8:27 AM Steve  wrote:

> Trying to build a standard AOSP on Ubuntu 14.04, target aosp_arm-eng.
> The build works fine until the metalava and the use of kotlin, when it
> fails with:
>
> WARNING: An illegal reflective access operation has occurred
>> WARNING: Illegal reflective access by
>> org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreApplicationEnvironment
>> (file:/aosp/soong/host/linux-x86/framework/metalava.jar) to field
>> java.lang.reflect.Field.modifiers
>> WARNING: Please consider reporting this to the maintainers of
>> org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreApplicationEnvironment
>> WARNING: Use --illegal-access=warn to enable warnings of further illegal
>> reflective access operations
>> WARNING: All illegal access operations will be denied in a future release
>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>> at
>> java.base/java.util.LinkedHashMap$LinkedKeySet.iterator(LinkedHashMap.java:543)
>> at java.base/java.util.HashSet.iterator(HashSet.java:173)
>> at
>> kotlin.collections.CollectionsKt___CollectionsKt.toList(_Collections.kt:1220)
>> at kotlin.collections.ArraysKt___ArraysKt.distinct(_Arrays.kt:9836)
>> at
>> com.android.tools.metalava.model.psi.PsiModifierItem$Companion.create(PsiModifierItem.kt:188)
>> at
>> com.android.tools.metalava.model.psi.PsiModifierItem$Companion.create(PsiModifierItem.kt:58)
>> at
>> com.android.tools.metalava.model.psi.PsiItem$Companion.modifiers(PsiItem.kt:264)
>> at
>> com.android.tools.metalava.model.psi.PsiMethodItem$Companion.create(PsiMethodItem.kt:355)
>> at
>> com.android.tools.metalava.model.psi.PsiClassItem$Companion.create(PsiClassItem.kt:466)
>> at
>> com.android.tools.metalava.model.psi.PsiBasedCodebase.createClass(PsiBasedCodebase.kt:441)
>> at
>> com.android.tools.metalava.model.psi.PsiBasedCodebase.findOrCreateClass(PsiBasedCodebase.kt:559)
>> at
>> com.android.tools.metalava.model.psi.PsiClassItem$Companion$create$result$1.invoke(PsiClassItem.kt:534)
>> at
>> com.android.tools.metalava.model.psi.PsiClassItem$Companion$create$result$1.invoke(PsiClassItem.kt:391)
>> at
>> kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:172)
>> at
>> kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:716)
>> at
>> kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:746)
>> at
>> com.android.tools.metalava.model.psi.PsiClassItem$Companion.create(PsiClassItem.kt:538)
>> at
>> com.android.tools.metalava.model.psi.PsiBasedCodebase.createClass(PsiBasedCodebase.kt:441)
>> at
>> com.android.tools.metalava.model.psi.PsiBasedCodebase.initialize(PsiBasedCodebase.kt:180)
>> at com.android.tools.metalava.Driver.parseSources(Driver.kt:876)
>> at
>> com.android.tools.metalava.Driver.parseSources$default(Driver.kt:847)
>> at com.android.tools.metalava.Driver.loadFromSources(Driver.kt:773)
>> at com.android.tools.metalava.Driver.processFlags(Driver.kt:182)
>> at com.android.tools.metalava.Driver.run(Driver.kt:115)
>> at com.android.tools.metalava.Driver.run$default(Driver.kt:98)
>> at com.android.tools.metalava.Driver.main(Driver.kt:86)
>> 12:35:03 ninja failed with: exit status 1
>>
>>>
>>>
> Following the AOSP environment instructions and build instructions, and
> have re-installed everything several times.  Same problem with the latest
> version of Ubuntu and the LTS 14.04 version.   Also with the aosp_arm64-eng
> target as well.
>
> Any suggestions?
>
>   Steve
>
> --
> --
> 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

Re: [android-building] Android 11` Preview building failed initially

2020-04-02 Thread &#x27;Dan Willemsen' via Android Building
What branch/tag did you use to initialize this source tree? (`repo init
...`)

- Dan

On Thu, Apr 2, 2020 at 8:57 PM Varun Kumar  wrote:

> 
> PLATFORM_VERSION_CODENAME=R
> PLATFORM_VERSION=R
> TARGET_PRODUCT=aosp_arm64
> TARGET_BUILD_VARIANT=eng
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm64
> TARGET_ARCH_VARIANT=armv8-a
> TARGET_CPU_VARIANT=generic
> TARGET_2ND_ARCH=arm
> TARGET_2ND_ARCH_VARIANT=armv8-a
> TARGET_2ND_CPU_VARIANT=generic
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-4.15.0-91-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=AOSP.MASTER
> OUT_DIR=out
> 
> [100% 430/430] writing build rules ...
> FAILED:
> build/make/core/base_rules.mk:491: error: overriding commands for target
> `out/target/product/generic_arm64/system/bin/chattr', previously defined at
> build/make/core/base_rules.mk:467
> 07:04:16 ckati failed with: exit status 1
>
>  failed to build some targets (03:53 (mm:ss)) 
>
> --
> --
> 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/c97e5216-cfd2-47c6-a7cb-7a67929f62a9%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/c97e5216-cfd2-47c6-a7cb-7a67929f62a9%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmKQDzdzMkjBJmTKRqqZ_Rb61fW%2Bf8Tda%2BdGqiahkw05Q%40mail.gmail.com.


Re: [android-building] Android Build Teststub -- Linker failed "undefined symbol" Android.bp // maybe missing an include path?

2020-03-31 Thread &#x27;Dan Willemsen' via Android Building
The `libsonic` in Android only includes `sonic.c`:
https://cs.android.com/android/platform/superproject/+/master:external/sonic/Android.bp

openInputWaveFile and readFromWaveFile are in `wave.c`

- Dan

On Tue, Mar 31, 2020 at 2:56 PM jrw  wrote:

> Hello,
>
> i'm facing an issue with the linker, most likely because of lack of
> knowledge :/
>
> i think i lack an include path or something like that, but i could not
> find something in the documentation or got confused by the Android.bp files.
>
> i try to simple example fuzzer:
>
> #include 
> #include 
> #include 
> #include "sonic.h"
> #include "wave.h"
>
> #define BUFFER_SIZE 2048
>
> extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
>
> short inBuffer[BUFFER_SIZE];
> int foo = 10;
> int bar = 1;
>
> waveFile batz = openInputWaveFile((char*)data, &foo,&bar);
>
> readFromWaveFile(batz,inBuffer,size);
>
> return 0;
> }
>
>
> for that, i setup an Android.bp file in the subfolder "fuzz" i created.
>
> cc_fuzz {
> name: "sonic_fuzz",
> host_supported: false,
> srcs: [
> "sonic_fuzz.cc",
> ],
> shared_libs: [
> "libsonic",
> ],
> cflags: [
> "-g",
> ],
> cpp_std: "c++98",
> }
>
> and after i tried to build it, i get:
>
> ld.lld: error: undefined symbol: openInputWaveFile(char*, int*, int*)
> >>> referenced by sonic_fuzz.cc:16 (external/sonic/fuzz/sonic_fuzz.cc:16)
> >>>   out/soong/.intermediates/external/sonic/fuzz/sonic_fuzz/
> android_arm64_armv8-a_cortex-a73_hwasan_fuzzer/obj/external/sonic/fuzz/
> sonic_fuzz.o:(LLVMFuzzerTestOneInput)
>
> ld.lld: error: undefined symbol: readFromWaveFile(waveFileStruct*, short*,
> int)
> >>> referenced by sonic_fuzz.cc:18 (external/sonic/fuzz/sonic_fuzz.cc:18)
> >>>   out/soong/.intermediates/external/sonic/fuzz/sonic_fuzz/
> android_arm64_armv8-a_cortex-a73_hwasan_fuzzer/obj/external/sonic/fuzz/
> sonic_fuzz.o:(LLVMFuzzerTestOneInput)
> clang-10: error: linker command failed with exit code 1 (use -v to see
> invocation)
> 23:28:40 ninja failed with: exit status 1
>
>  failed to build some targets (13:07 (mm:ss)) 
>
> do i need to include some path for the sonic library in the Android.bp
> file or something?
>
> Thanks for your help
> Hannes
>
> --
> --
> 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/68c9f746-afc2-4870-b724-1b18c7cda9cf%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/68c9f746-afc2-4870-b724-1b18c7cda9cf%40googlegroups.com?utm_medium=email&utm_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/CALQgHdmJDYp_U5De676SeAUBN_3tZJSxYYCXXnfEFMjYFdQ1FQ%40mail.gmail.com.


Re: [android-building] Re: Dex2oat failed to compile a boot image

2020-03-30 Thread &#x27;Dan Willemsen' via Android Building
As posted with the announcement:

This preview is not a full platform update and only for reference.


I would not expect this to build or necessarily get any further (eg
boot/etc). Only some components have been updated, and that's done on a
git-project boundary, so the entire build graph gets skewed significantly
between old and new projects.

- Dan

On Mon, Mar 30, 2020 at 10:10 PM Guoyin Chen  wrote:

> There are quite a lot of build error with android-preview-2 build. I think
> google have several wrong tag on different gits.
>
> On Tuesday, March 31, 2020 at 8:41:18 AM UTC+8, Michael Goffioul wrote:
>>
>> I found out I was missing this change:
>> https://android.googlesource.com/platform/libcore/+/271b4054b825efca3176c4ac11565e33cff5d09a
>> I cherry-picked it, but now I'm getting a different error:
>>
>> dex2oatd F 03-30 19:11:33  6962  6962 unstarted_runtime.cc:2085] Calling
>> native method void android.system.OsConstants.initConstants() in an
>> unstarted non-transactional runtime
>>
>>
>> On Mon, Mar 30, 2020 at 6:59 PM Michael Goffioul 
>> wrote:
>>
>>> On Mon, Mar 30, 2020 at 6:52 PM Michael Goffioul 
>>> wrote:
>>>
>>>> I'm still experimenting with android-r-preview-2, and very close to the
>>>> end of the build process, I'm getting the following error:
>>>>
>>>> FAILED:
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-apache-xml.art
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-apache-xml.oat
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-apache-xml.vdex
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-bouncycastle.art
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-bouncycastle.oat
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-bouncycastle.vdex
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-core-icu4j.art
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-core-icu4j.oat
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-core-icu4j.vdex
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-core-libart.art
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-core-libart.oat
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-core-libart.vdex
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-okhttp.art
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-okhttp.oat
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot-okhttp.vdex
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot.art
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot.invocation
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot.oat
>>>> out/soong/x86/dex_artjars/android/apex/com.android.art/javalib/x86/boot.vdex
>>>> out/soong/x86/dex_artjars_unstripped/android/apex/com.android.art/javalib/x86/boot-apache-xml.oat
>>>> out/soong/x86/dex_artjars_unstripped/android/apex/com.android.art/javalib/x86/boot-bouncycastle.oat
>>>> out/soong/x86/dex_artjars_unstripped/android/apex/com.android.art/javalib/x86/boot-core-icu4j.oat
>>>> out/soong/x86/dex_artjars_unstripped/android/apex/com.android.art/javalib/x86/boot-core-libart.oat
>>>> out/soong/x86/dex_artjars_unstripped/android/apex/com.android.art/javalib/x86/boot-okhttp.oat
>>>> out/soong/x86/dex_artjars_unstripped/android/apex/com.android.art/javalib/x86/boot.oat
>>>> dex2oatd F 03-30 18:38:12  5762  5762 class_linker.cc:8451] Check
>>>> failed: previous_size == size (previous_size=108, size=104)
>>>> Ljava/lang/DexCache;
>>>> Runtime aborting...
>>>>
>>>> Any hint would be appreciated. I've never had that error in previous
>>>> Android versions, I'm not sure what to look for.
>>>>
>>>> Note that the above error is accompanied with a message to add
>>>> "--runtime-arg -verbose:verifier" to the
>>>>
>>>
>>> My apologies, I hit send too early. I just meant to say the additional
>>> flag didn't provide more information.
>>>
>>> --
> --
> You received this message because you are subscribed to the "Android
> Building" m

  1   2   3   >