Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AOSP Build TARGET_PRODUCT fails

I'm trying to build an external tool with AOSP. My OS is Linux, Distribution ArchLinux (i3wm), but to compile AOSP I use Ubuntu in Docker (https://android.googlesource.com/platform/build/+/master/tools/docker)

First step:

# init repo
repo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r36 --depth=1
repo sync
. build/envsetup.sh # set up environment
lunch aosp_arm-eng # select target to build

Second step: select tool and build

cd external/selinux
mma -j48

Output:

ninja: error: unknown target 'MODULES-IN-'
15:41:55 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
make: Leaving directory `/home/user/aosp'

#### make failed to build some targets (6 seconds) ###

Another tool

cd external/wpa_supplicant_8
mma -j48

Output:

ninja: error: unknown target 'MODULES-IN-external-wpa_supplicant_8'
15:41:55 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
make: Leaving directory `/home/user/aosp'

#### make failed to build some targets (2 seconds) ###

This happens with any aosp generic target:

Lunch menu... pick a combo:
     1. aosp_arm-eng                    # fails
     2. aosp_arm64-eng                  # fails
     3. aosp_mips-eng                   # fails
     4. aosp_mips64-eng                 # fails
     5. aosp_x86-eng                    # fails
     6. aosp_x86_64-eng                 # fails
     7. full_fugu-userdebug             # works
     8. aosp_fugu-userdebug             # works
     9. car_emu_arm64-userdebug         # fails
     10. car_emu_arm-userdebug          # fails
     11. car_emu_x86_64-userdebug       # fails
     12. car_emu_x86-userdebug          # fails
     13. mini_emulator_arm64-userdebug  # fails
     14. m_e_arm-userdebug              # fails
     15. m_e_mips64-eng                 # fails
     16. m_e_mips-userdebug             # fails
     17. mini_emulator_x86_64-userdebug # fails
     18. mini_emulator_x86-userdebug    # fails
     19. aosp_dragon-userdebug          # works
     20. aosp_dragon-eng                # works
     21. aosp_marlin-userdebug          # works
     22. aosp_marlin_svelte-userdebug   # works
     23. aosp_sailfish-userdebug        # works
     24. aosp_angler-userdebug          # works
     25. aosp_bullhead-userdebug        # works
     26. aosp_bullhead_svelte-userdebug # works
     27. hikey-userdebug                # works

I want to compile some binary tools in all arch: arm, arm64, x86 and x86_64.

Why aosp_arm-eng does not work? Or how can I change the CPU architecture from non generic aosp target?

Using tapas does not work.

like image 285
VasileM Avatar asked Jul 16 '19 14:07

VasileM


2 Answers

You probably need to make a full AOSP build before trying to use mm... shortcuts - looks like some build script files were not generated yet.

like image 143
Mixaz Avatar answered Sep 28 '22 00:09

Mixaz


clear all the binaries from /out dir with make clean command & then try to make a full build

like image 44
Amartya Avatar answered Sep 27 '22 23:09

Amartya