sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

AOSP 9 build / fatal error: 'processgroup/sched_policy.h' file not found #482

Closed samoylenko closed 4 years ago

samoylenko commented 4 years ago

Platform: tone Device: kagura Kernel version: 4.9 Android version: 9 Software binaries version: 9.0_2.3.2_v9_tone

Description A fresh build from scratch following Pie instructions no longer works: https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-android-p-9-0-0-2 Getting the following error:

hardware/qcom/gps/sdm845/utils/MsgTask.cpp:38:10: fatal error: 'processgroup/sched_policy.h' file not found

Removing the #include <processgroup/sched_policy.h> line from MsgTask.cpp seems to be working, but concerned that something else may be missing after branching Pie out from the master branch. Unfortunately I just started learning this, so was not able to trace the issue. Looks like it's related to the repo_update.sh script: https://talk.sonymobile.com/t5/Android-9-x-Pie/Build-error-with-AOSP-Pie-for-Xperia-X-Performance-Dual-F8132/td-p/1360569

Symptoms hardware/qcom/gps/sdm845/utils/MsgTask.cpp:38:10: fatal error: 'processgroup/sched_policy.h' file not found

include <processgroup/sched_policy.h>

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.

How to reproduce Just by following instructions here: https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-android-p-9-0-0-2#tutorial-step-4

repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r46
cd .repo/
git clone https://github.com/sonyxperiadev/local_manifests
cd local_manifests/
git checkout  android-9.0.0_r46
cd ../..
repo sync
./repo_update.sh
source build/envsetup.sh && lunch aosp_f8331-userdebug
make -j 8

Additional context Just the console log. I tried reinstalling my build machine, and also tried Ubuntu 14.04 and AOSP's Docker image, both my desktop and laptop, result is the same:

No need to regenerate ninja file
[  0% 17/80779] target thumb C++: libgps.utils_32 <= hardware/qcom/gps/sdm845/utils/MsgTask.cpp
FAILED: out/target/product/kagura/obj_arm/SHARED_LIBRARIES/libgps.utils_intermediates/MsgTask.o
/bin/bash -c "PWD=/proc/self/cwd  prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++      -I hardware/qcom/gps/
sdm845/utils -I out/target/product/kagura/obj_arm/SHARED_LIBRARIES/libgps.utils_intermediates -I out/target/product/k
agura/gen/SHARED_LIBRARIES/libgps.utils_intermediates -I libnativehelper/include_jni \$(cat out/target/product/kagura
/obj_arm/SHARED_LIBRARIES/libgps.utils_intermediates/import_includes)  -I system/core/include -I system/media/audio/i
nclude -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehel
per/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem out/ta
rget/product/kagura/obj/include -isystem kernel/sony/msm-4.9/common-headers/kernel-headers -isystem bionic/libc/inclu
de -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi
 -isystem bionic/libc/kernel/android/uapi -c  -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused 
-Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict
-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-res
erved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -
Wno-zero-as-null-pointer-constant -fdebug-prefix-map=\$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -fu
nwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -
Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc
 -msoft-float -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -D__ARM_FEAT
URE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideab
i/bin  -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIO
NS -Wno-thread-safety-negative -Wno-gnu-include-next -fvisibility-inlines-hidden  -std=gnu++14 -mthumb -Os  -fno-rtti
 -fno-short-enums -D_ANDROID_ -Wno-error -Werror -Wno-error=unused-parameter -Wno-error=format -Wno-error=macro-redef
ined -Wno-error=reorder -Wno-error=missing-braces -Wno-error=self-assign -Wno-error=enum-conversion -Wno-error=logica
l-op-parentheses -Wno-error=null-arithmetic -Wno-error=null-conversion -Wno-error=parentheses-equality -Wno-error=und
efined-bool-conversion -Wno-error=tautological-compare -Wno-error=switch -Wno-error=date-time -fPIC -D_USING_LIBCXX -
DANDROID_STRICT   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return
-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch   -M
D -MF out/target/product/kagura/obj_arm/SHARED_LIBRARIES/libgps.utils_intermediates/MsgTask.d -o out/target/product/k
agura/obj_arm/SHARED_LIBRARIES/libgps.utils_intermediates/MsgTask.o hardware/qcom/gps/sdm845/utils/MsgTask.cpp"
hardware/qcom/gps/sdm845/utils/MsgTask.cpp:38:10: fatal error: 'processgroup/sched_policy.h' file not found
#include <processgroup/sched_policy.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[  0% 24/80779] Import includes file: out/target/product/...SHARED_LIBRARIES/libhal_dbg_intermediates/import_include
ninja: build stopped: subcommand failed.
22:58:43 ninja failed with: exit status 1

#### failed to build some targets (7 seconds) ####

P.S. Thank you for making it possible to build AOSP 9 and 10 for my phone which only hast latest 8.1 stock. You guys are awesome! Sorry for bothering you with this, but it seems that AOSP 10 will take some time to be ready for use, and really wanted to have the stable 9 branch to play around with

MarijnS95 commented 4 years ago

This seems to be a remnant from the fixes done for https://github.com/sonyxperiadev/bug_tracker/issues/474#issuecomment-538642588

More specifically https://github.com/sonyxperiadev/local_manifests/pull/77 and https://github.com/sonyxperiadev/repo_update/pull/110, since the first one has not been merged yet.

samoylenko commented 4 years ago

@MarijnS95 thank you, this seems to fixed the issue. I started a new build from scratch, so it's still building, but it's definitely past the point of the problem I had. Appreciate the quick and very helpful response. After the build succeeds I will close this ticket and add a comment about successful build on the referenced MR which has not been merged yet.

samoylenko commented 4 years ago

Thank you again, everything works after applying the change from https://github.com/sonyxperiadev/local_manifests/pull/77