Building Fairphone Open OS fails without setting USE_CUSTOM_AUDIO_POLICY

I exactly followed the build instructions on https://code.fairphone.com/projects/fp-osos/dev/fairphone-os-build-instructions.html but I am always getting the following result:

[...]
Notice file: frameworks/base/cmds/media/NOTICE -- out/target/product/FP2/obj/NOTICE_FILES/src//system/bin/media.txt
Export includes file: frameworks/av/services/audioflinger/Android.mk -- out/target/product/FP2/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/export_includes
Export includes file: frameworks/av/services/audiopolicy/Android.mk -- out/target/product/FP2/obj/SHARED_LIBRARIES/libaudiopolicyservice_intermediates/export_includes
Export includes file: frameworks/av/services/camera/libcameraservice/Android.mk -- out/target/product/FP2/obj/SHARED_LIBRARIES/libcameraservice_intermediates/export_includes
Export includes file: frameworks/av/services/medialog/Android.mk -- out/target/product/FP2/obj/SHARED_LIBRARIES/libmedialogservice_intermediates/export_includes
Export includes file: frameworks/av/media/libmediaplayerservice/Android.mk -- out/target/product/FP2/obj/SHARED_LIBRARIES/libmediaplayerservice_intermediates/export_includes
Export includes file: frameworks/av/services/soundtrigger/Android.mk -- out/target/product/FP2/obj/SHARED_LIBRARIES/libsoundtriggerservice_intermediates/export_includes
Export includes file: frameworks/av/media/mediaserver/Android.mk -- out/target/product/FP2/obj/STATIC_LIBRARIES/libregistermsext_intermediates/export_includes
Export includes file: frameworks/av/services/audioflinger/Android.mk -- out/target/product/FP2/obj/SHARED_LIBRARIES/libaudioresampler_intermediates/export_includes
Export includes file: frameworks/av/media/libeffects/factory/Android.mk -- out/target/product/FP2/obj/SHARED_LIBRARIES/libeffects_intermediates/export_includes
Export includes file: frameworks/av/services/audioflinger/Android.mk -- out/target/product/FP2/obj/SHARED_LIBRARIES/libserviceutility_intermediates/export_includes
Export includes file: frameworks/av/services/audioflinger/Android.mk -- out/target/product/FP2/obj/STATIC_LIBRARIES/libscheduling_policy_intermediates/export_includes
Export includes file: frameworks/av/media/libcpustats/Android.mk -- out/target/product/FP2/obj/STATIC_LIBRARIES/libcpustats_intermediates/export_includes
Import includes file: out/target/product/FP2/obj/SHARED_LIBRARIES/libaudioresampler_intermediates/import_includes
Import includes file: out/target/product/FP2/obj/SHARED_LIBRARIES/libeffects_intermediates/import_includes
Import includes file: out/target/product/FP2/obj/SHARED_LIBRARIES/libserviceutility_intermediates/import_includes
Import includes file: out/target/product/FP2/obj/STATIC_LIBRARIES/libscheduling_policy_intermediates/import_includes
make: *** No rule to make target `out/target/product/FP2/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/export_includes', needed by `out/target/product/FP2/obj/SHARED_LIBRARIES/libaudiopolicyservice_intermediates/import_includes'.  Stop.
make: *** Waiting for unfinished jobs....
Import includes file: out/target/product/FP2/obj/STATIC_LIBRARIES/libcpustats_intermediates/import_includes

This also happens when building from a clean docker image like https://github.com/justfortherec/fairphone2-build-env/ and also with make -j1.

As per this Stackoverflow post I can make the build succeed by setting USE_CUSTOM_AUDIO_POLICY to 0:

echo "USE_CUSTOM_AUDIO_POLICY := 0" >> device/fairphone_devices/FP2/BoardConfig.mk

I am not sure though, if the build is fully functional then.

Anyone knows why the build fails and how to fix it without modifying BoardConfig.mk?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.