Android-p-preview-4 for hikey build fail

Hi all,

I got these error log while building android-p-preview-4 for hikey.
Does anyone have any suggestion? Thanks
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 -o out/soong/build.ninja Android.bp
error: system/core/fs_mgr/Android.bp:33:1: dependency “libfec_rs” of “libfs_mgr” missing variant:


Detail of my problem :
I have download android-p-preview-4 according to Using Reference Boards  |  Android Open Source Project
By using commd :
repo init -u platform/manifest - Git at Google -b android-p-preview-4
repo sync -j24

After download android-p-preview-4, I use command :
. ./build/envsetup.sh
lunch hikey-userdebug
make -j32

Then, I get these error :

PLATFORM_VERSION_CODENAME=Q
PLATFORM_VERSION=Q
TARGET_PRODUCT=hikey
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-130-generic-x86_64-Ubuntu-16.04-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OC-MR1
OUT_DIR=out

[1/1] out/soong/.minibootstrap/minibp out/soong/.bootstrap/build.ninja
[58/59] glob prebuilts/ndk/stl.bp
[83/83] 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 -o out/soong/build.ninja Android.bp
error: system/core/fs_mgr/Android.bp:33:1: dependency “libfec_rs” of “libfs_mgr” missing variant:
arch:android_arm64_armv8-a_cortex-a53, image:recovery, link:static
available variants:
arch:android_arm64_armv8-a_cortex-a53, image:core, link:static
arch:android_arm_armv8-a_cortex-a53, image:core, link:static
arch:linux_glibc_x86, link:static
arch:linux_glibc_x86_64, link:static
arch:windows_x86, link:static
arch:windows_x86_64, link:static
error: system/core/fs_mgr/Android.bp:33:1: dependency “libselinux” of “libfs_mgr” missing variant:
arch:android_arm64_armv8-a_cortex-a53, image:recovery, link:static
available variants:
arch:android_arm64_armv8-a_cortex-a53, image:core, link:shared
arch:android_arm64_armv8-a_cortex-a53, image:core, link:static
arch:android_arm64_armv8-a_cortex-a53, image:vendor, link:shared
arch:android_arm64_armv8-a_cortex-a53, image:vendor, link:static
arch:android_arm_armv8-a_cortex-a53, image:core, link:shared
arch:android_arm_armv8-a_cortex-a53, image:core, link:static
arch:android_arm_armv8-a_cortex-a53, image:vendor, link:shared
arch:android_arm_armv8-a_cortex-a53, image:vendor, link:static
arch:linux_glibc_x86, link:shared
arch:linux_glibc_x86, link:static
arch:linux_glibc_x86_64, link:shared
arch:linux_glibc_x86_64, link:static
arch:windows_x86, link:shared
arch:windows_x86, link:static
arch:windows_x86_64, link:shared
arch:windows_x86_64, link:static
ninja: build stopped: subcommand failed.
16:46:30 soong bootstrap failed with: exit status 1

Hikey is only maintained on master branch and I’m not sure the P preview is in good shape for building. Are you sure your repo sync finished successfully ? googling [dependency “libfec_rs” of “libfs_mgr” missing variant] gives some results.

Thanks for your reply :slight_smile:

As you said, Android-p-preview-4 might not be good shape for building.

I’ve tried to build android-8.0.0_r4 before and had some problem with own build kernel.
I sent email to hikey kernel aosp git maintainer to report this problem, and he create a tag for android-8.0.0_r4
With this android-8.0.0_r4 tag, I run android-8.0.0_r4 on hikey successfully.
That’s why I thought hikey is not only maintained on master branch.

I’ll try master branch again, thanks.