AOSP4.4.2编译:fatal error: CSSGrammar.hpp: No such file or directory,fatal error: XPathGrammar.hpp: No such file or directory
我使用ubuntu22.04,网上说是bison的版本问题,造成的这个错误,经过一番尝试未果。
target C++: third_party_WebKit_Source_core_webcore_derived_gyp <= out/target/product/generic_x86/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_derived_gyp_intermediates/CSSGrammar.cpp
target C++: third_party_WebKit_Source_core_webcore_derived_gyp <= out/target/product/generic_x86/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_derived_gyp_intermediates/XPathGrammar.cpp
/home/yy/aosp/out/target/product/generic_x86/obj/GYP/shared_intermediates/blink/CSSGrammar.cpp:159:26: fatal error: CSSGrammar.hpp: No such file or directory
compilation terminated.
make: *** [ out/target/product/generic_x86/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_derived_gyp_intermediates/CSSGrammar.o] 错误 1
make: *** 正在等待未完成的任务.. ..
target StaticLib: components_autofill_core_common_gyp ( out/target/product/generic_x86/obj/STATIC_LIBRARIES/components_autofill_core_common_gyp_intermediates/components_autofill_core_common_gyp.a)
/home/yy/aosp/out/target/product/generic_x86/obj/GYP/shared_intermediates/blink/XPathGrammar.cpp:124:28: fatal error: XPathGrammar.hpp: No such file or directory
compilation terminated.
make: *** [ out/target/product/generic_x86/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_derived_gyp_intermediates/XPathGrammar.o] 错误 1
解决方法
打开该文件夹:out/target/product/generic_x86/obj/GYP/shared_intermediates/blink 手动创建这两个文件。 可以通过编译,造成什么结果暂不明确。