讨论广场 问答详情
OH 4.0编译报错提示有头文件找不到
孤鸿影 2025-01-06 16:18:29
144 评论 分享

对比能编译过的OH4.0,对于的头文件所在一直一模一样,代码也一样,就是不知道为什么会报错

区别在于报错的工程是在AMD平台上安装Ubuntu22虚拟机,正常编译的是Intel上直接装Ubuntu18

 

[OHOS ERROR] [1132/20653] CXX clang_x64/obj/third_party/skia/src/gpu/gl/glx/gpu/GrGLMakeGLXInterface.o
[OHOS ERROR] FAILED: clang_x64/obj/third_party/skia/src/gpu/gl/glx/gpu/GrGLMakeGLXInterface.o 
[OHOS ERROR] /usr/bin/ccache ../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang++ -MMD -MF clang_x64/obj/third_party/skia/src/gpu/gl/glx/gpu/GrGLMakeGLXInterface.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DNEW_SKIA -DGR_TEST_UTILS=1 -DSK_BUILD_FOR_OHOS -DSK_R32_SHIFT=16 -DSK_ENABLE_SKSL -DSK_GAMMA_APPLY_TO_A8 -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1 -DSKIA_IMPLEMENTATION=1 -DSK_GL -Iclang_x64/override/third_party -I../.. -Iclang_x64/gen -I../../third_party/skia -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -m64 -march=x86-64 -fstack-protector-strong -fPIC -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-error=c99-designator -Wno-error=anon-enum-enum-conversion -Wno-error=implicit-fallthrough -Wno-error=sizeof-array-div -Wno-error=reorder-init-list -Wno-error=range-loop-construct -Wno-error=deprecated-copy -Wno-error=implicit-int-float-conversion -Wno-error=inconsistent-dllimport -Wno-error=unknown-warning-option -Wno-error=abstract-final-class -Wno-error=sign-compare -Wno-error=int-in-bool-context -Wno-error=xor-used-as-pow -Wno-error=return-stack-address -Wno-error=dangling-gsl -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-unused-but-set-parameter -Wno-null-pointer-subtraction -Wno-unqualified-std-cast-call -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fno-common -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-format -fvisibility=hidden -Wno-deprecated-declarations -Wno-pessimizing-move -Wno-return-type -Wno-sign-compare -Wno-sometimes-uninitialized -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-private-field -Wno-unused-variable -Wno-c++17-extensions -std=c++17 -fno-exceptions -fno-rtti -Wno-array-parameter -fvisibility-inlines-hidden -Wno-psabi -c ../../third_party/skia/src/gpu/gl/glx/GrGLMakeGLXInterface.cpp -o clang_x64/obj/third_party/skia/src/gpu/gl/glx/gpu/GrGLMakeGLXInterface.o
[OHOS ERROR] ../../third_party/skia/src/gpu/gl/glx/GrGLMakeGLXInterface.cpp:14:10: fatal error: 'GL/glx.h' file not found
[OHOS ERROR] #include <GL/glx.h>
[OHOS ERROR]          ^~~~~~~~~~
[OHOS ERROR] 1 error generated.
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/services/ninja.py", line 49, in _execute_ninja_cmd
[OHOS ERROR]     SystemUtil.exec_command(
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/util/system_util.py", line 63, in exec_command
[OHOS ERROR]     raise OHOSException(
[OHOS ERROR] exceptions.ohos_exception.OHOSException: Please check build log in /home/baic/workspace/openHarmony4.0/out/sdk/build.log
[OHOS ERROR] 
[OHOS ERROR] During handling of the above exception, another exception occurred:
[OHOS ERROR] 
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/containers/status.py", line 47, in wrapper
[OHOS ERROR]     return func(*args, **kwargs)
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/modules/ohos_build_module.py", line 67, in run
[OHOS ERROR]     raise exception
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/modules/ohos_build_module.py", line 65, in run
[OHOS ERROR]     super().run()
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/modules/interface/build_module_interface.py", line 72, in run
[OHOS ERROR]     raise exception
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/modules/interface/build_module_interface.py", line 70, in run
[OHOS ERROR]     self._target_compilation()
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/modules/ohos_build_module.py", line 103, in _target_compilation
[OHOS ERROR]     self.target_compiler.run()
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/services/ninja.py", line 38, in run
[OHOS ERROR]     self._execute_ninja_cmd()
[OHOS ERROR]   File "/home/baic/workspace/openHarmony4.0/build/hb/services/ninja.py", line 52, in _execute_ninja_cmd
[OHOS ERROR]     raise OHOSException('ninja phase failed', '4000')
[OHOS ERROR] exceptions.ohos_exception.OHOSException: ninja phase failed
[OHOS ERROR] 
[OHOS ERROR] Code:      4000
[OHOS ERROR] 
[OHOS ERROR] Reason:    ninja phase failed
[OHOS ERROR] 
[OHOS ERROR] Solution:  Please check the compile log at out/{compiling product}/build.log, If you could analyze build logs. 
[OHOS ERROR]            Or you can try the following steps to solve this problem:
[OHOS ERROR]              1. cd to OHOS root path
[OHOS ERROR]              2. run 'hb clean --all' or 'rm -rf out build/resources/args/*.json'.
[OHOS ERROR]              3. repo sync
[OHOS ERROR]              4. repo forall -c 'git lfs pull'
[OHOS ERROR]              5. bash build/prebuilts_download.sh
[OHOS ERROR]              6. rebuild your product or component
[OHOS ERROR] 
[OHOS ERROR]            If you still cannot solve this problem, you could post this problem on: 
[OHOS ERROR]              https://gitee.com/openharmony/build/issues
[OHOS ERROR] 
ohos-sdk build failed!

 

144 评论 分享
写回答
全部评论(3)
1 楼

缺少环境,应该是没装libgl1-mesa-dev,下面的内容都可以装一下

sudo apt-get install binutils git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby libtinfo-dev libtinfo5

sudo apt-get install openjdk-17-jre-headless default-jdk libssl-dev genext2fs u-boot-tools mtd-utils scons gcc-arm-none-eabi gcc-arm-linux-gnueabi

2025-01-06 19:32:09
2025-01-06 22:44:55
安装上面的环境后,没有这个报错error: 'GL/glx.h' file not found,但是有新的报错,还有什么环境需要安装的? [OHOS ERROR] [7173/19520] CC clang_x64/obj/third_party/flutter/glfw/src/glfw/context.o [OHOS ERROR] FAILED: clang_x64/obj/third_party/flutter/glfw/src/glfw/context.o [OHOS ERROR] /usr/bin/ccache ../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang -MMD -MF clang_x64/obj/third_party/flutter/glfw/src/glfw/context.o.d -DPREVIEW -DLINUX_PLATFORM -D_GLFW_X11 -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../third_party/flutter/glfw/src -Iclang_x64/override/third_party -I../.. -Iclang_x64/gen -I../../third_party/flutter/glfw/include -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -m64 -march=x86-64 -fstack-protector-strong -fPIC -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-error=c99-designator -Wno-error=anon-enum-enum-conversion -Wno-error=implicit-fallthrough -Wno-error=sizeof-array-div -Wno-error=reorder-init-list -Wno-error=range-loop-construct -Wno-error=deprecated-copy -Wno-error=implicit-int-float-conversion -Wno-error=inconsistent-dllimport -Wno-error=unknown-warning-option -Wno-error=abstract-final-class -Wno-error=sign-compare -Wno-error=int-in-bool-context -Wno-error=xor-used-as-pow -Wno-error=return-stack-address -Wno-error=dangling-gsl -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-unused-but-set-parameter -Wno-null-pointer-subtraction -Wno-unqualified-std-cast-call -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fno-common -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -Wno-sign-compare -Wno-missing-field-initializers -c ../../third_party/flutter/glfw/src/context.c -o clang_x64/obj/third_party/flutter/glfw/src/glfw/context.o [OHOS ERROR] In file included from ../../third_party/flutter/glfw/src/context.c:28: [OHOS ERROR] In file included from ../../third_party/flutter/glfw/src/internal.h:169: [OHOS ERROR] ../../third_party/flutter/glfw/src/x11_platform.h:39:10: fatal error: 'X11/Xcursor/Xcursor.h' file not found [OHOS ERROR] #include <x11 xcursor xcursor.h> [OHOS ERROR] ^~~~~~~~~~~~~~~~~~~~~~~ [OHOS ERROR] 1 error generated. [OHOS ERROR] [7174/19520] CC clang_x64/obj/third_party/flutter/glfw/src/glfw/input.o [OHOS ERROR] FAILED: clang_x64/obj/third_party/flutter/glfw/src/glfw/input.o [OHOS ERROR] /usr/bin/ccache ../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang -MMD -MF clang_x64/obj/third_party/flutter/glfw/src/glfw/input.o.d -DPREVIEW -DLINUX_PLATFORM -D_GLFW_X11 -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../third_party/flutter/glfw/src -Iclang_x64/override/third_party -I../.. -Iclang_x64/gen -I../../third_party/flutter/glfw/include -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -m64 -march=x86-64 -fstack-protector-strong -fPIC -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-error=c99-designator -Wno-error=anon-enum-enum-conversion -Wno-error=implicit-fallthrough -Wno-error=sizeof-array-div -Wno-error=reorder-init-list -Wno-error=range-loop-construct -Wno-error=deprecated-copy -Wno-error=implicit-int-float-conversion -Wno-error=inconsistent-dllimport -Wno-error=unknown-warning-option -Wno-error=abstract-final-class -Wno-error=sign-compare -Wno-error=int-in-bool-context -Wno-error=xor-used-as-pow -Wno-error=return-stack-address -Wno-error=dangling-gsl -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-unused-but-set-parameter -Wno-null-pointer-subtraction -Wno-unqualified-std-cast-call -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fno-common -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -Wno-sign-compare -Wno-missing-field-initializers -c ../../third_party/flutter/glfw/src/input.c -o clang_x64/obj/third_party/flutter/glfw/src/glfw/input.o [OHOS ERROR] In file included from ../../third_party/flutter/glfw/src/input.c:28: [OHOS ERROR] In file included from ../../third_party/flutter/glfw/src/internal.h:169: [OHOS ERROR] ../../third_party/flutter/glfw/src/x11_platform.h:39:10: fatal error: 'X11/Xcursor/Xcursor.h' file not found [OHOS ERROR] #include <x11 xcursor xcursor.h> [OHOS ERROR] ^~~~~~~~~~~~~~~~~~~~~~~ [OHOS ERROR] 1 error generated. [OHOS ERROR] [7175/19520] CC clang_x64/obj/third_party/flutter/glfw/src/glfw/init.o [OHOS ERROR] FAILED: clang_x64/obj/third_party/flutter/glfw/src/glfw/init.o [OHOS ERROR] /usr/bin/ccache ../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang -MMD -MF clang_x64/obj/third_party/flutter/glfw/src/glfw/init.o.d -DPREVIEW -DLINUX_PLATFORM -D_GLFW_X11 -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../third_party/flutter/glfw/src -Iclang_x64/override/third_party -I../.. -Iclang_x64/gen -I../../third_party/flutter/glfw/include -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -m64 -march=x86-64 -fstack-protector-strong -fPIC -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-error=c99-designator -Wno-error=anon-enum-enum-conversion -Wno-error=implicit-fallthrough -Wno-error=sizeof-array-div -Wno-error=reorder-init-list -Wno-error=range-loop-construct -Wno-error=deprecated-copy -Wno-error=implicit-int-float-conversion -Wno-error=inconsistent-dllimport -Wno-error=unknown-warning-option -Wno-error=abstract-final-class -Wno-error=sign-compare -Wno-error=int-in-bool-context -Wno-error=xor-used-as-pow -Wno-error=return-stack-address -Wno-error=dangling-gsl -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-unused-but-set-parameter -Wno-null-pointer-subtraction -Wno-unqualified-std-cast-call -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fno-common -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -Wno-sign-compare -Wno-missing-field-initializers -c ../../third_party/flutter/glfw/src/init.c -o clang_x64/obj/third_party/flutter/glfw/src/glfw/init.o [OHOS ERROR] In file included from ../../third_party/flutter/glfw/src/init.c:28: [OHOS ERROR] In file included from ../../third_party/flutter/glfw/src/internal.h:169: [OHOS ERROR] ../../third_party/flutter/glfw/src/x11_platform.h:39:10: fatal error: 'X11/Xcursor/Xcursor.h' file not found [OHOS ERROR] #include <x11 xcursor xcursor.h> [OHOS ERROR] ^~~~~~~~~~~~~~~~~~~~~~~ [OHOS ERROR] 1 error generated. [OHOS ERROR] [7177/19520] CC clang_x64/obj/third_party/flutter/glfw/src/glfw/monitor.o [OHOS ERROR] FAILED: clang_x64/obj/third_party/flutter/glfw/src/glfw/monitor.o [OHOS ERROR] /usr/bin/ccache ../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang -MMD -MF clang_x64/obj/third_party/flutter/glfw/src/glfw/monitor.o.d -DPREVIEW -DLINUX_PLATFORM -D_GLFW_X11 -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../third_party/flutter/glfw/src -Iclang_x64/override/third_party -I../.. -Iclang_x64/gen -I../../third_party/flutter/glfw/include -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -m64 -march=x86-64 -fstack-protector-strong -fPIC -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-error=c99-designator -Wno-error=anon-enum-enum-conversion -Wno-error=implicit-fallthrough -Wno-error=sizeof-array-div -Wno-error=reorder-init-list -Wno-error=range-loop-construct -Wno-error=deprecated-copy -Wno-error=implicit-int-float-conversion -Wno-error=inconsistent-dllimport -Wno-error=unknown-warning-option -Wno-error=abstract-final-class -Wno-error=sign-compare -Wno-error=int-in-bool-context -Wno-error=xor-used-as-pow -Wno-error=return-stack-address -Wno-error=dangling-gsl -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-unused-but-set-parameter -Wno-null-pointer-subtraction -Wno-unqualified-std-cast-call -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fno-common -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -Wno-sign-compare -Wno-missing-field-initializers -c ../../third_party/flutter/glfw/src/monitor.c -o clang_x64/obj/third_party/flutter/glfw/src/glfw/monitor.o [OHOS ERROR] In file included from ../../third_party/flutter/glfw/src/monitor.c:28: [OHOS ERROR] In file included from ../../third_party/flutter/glfw/src/internal.h:169: [OHOS ERROR] ../../third_party/flutter/glfw/src/x11_platform.h:39:10: fatal error: 'X11/Xcursor/Xcursor.h' file not found [OHOS ERROR] #include <x11 xcursor xcursor.h> [OHOS ERROR] ^~~~~~~~~~~~~~~~~~~~~~~ [OHOS ERROR] 1 error generated. [OHOS ERROR] Traceback (most recent call last): [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/services/ninja.py", line 49, in _execute_ninja_cmd [OHOS ERROR] SystemUtil.exec_command( [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/util/system_util.py", line 63, in exec_command [OHOS ERROR] raise OHOSException( [OHOS ERROR] exceptions.ohos_exception.OHOSException: Please check build log in /home/baic/workspace/openHarmony4.0/out/sdk/build.log [OHOS ERROR] [OHOS ERROR] During handling of the above exception, another exception occurred: [OHOS ERROR] [OHOS ERROR] Traceback (most recent call last): [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/containers/status.py", line 47, in wrapper [OHOS ERROR] return func(*args, **kwargs) [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/modules/ohos_build_module.py", line 67, in run [OHOS ERROR] raise exception [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/modules/ohos_build_module.py", line 65, in run [OHOS ERROR] super().run() [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/modules/interface/build_module_interface.py", line 72, in run [OHOS ERROR] raise exception [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/modules/interface/build_module_interface.py", line 70, in run [OHOS ERROR] self._target_compilation() [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/modules/ohos_build_module.py", line 103, in _target_compilation [OHOS ERROR] self.target_compiler.run() [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/services/ninja.py", line 38, in run [OHOS ERROR] self._execute_ninja_cmd() [OHOS ERROR] File "/home/baic/workspace/openHarmony4.0/build/hb/services/ninja.py", line 52, in _execute_ninja_cmd [OHOS ERROR] raise OHOSException('ninja phase failed', '4000') [OHOS ERROR] exceptions.ohos_exception.OHOSException: ninja phase failed [OHOS ERROR] [OHOS ERROR] Code: 4000 [OHOS ERROR] [OHOS ERROR] Reason: ninja phase failed [OHOS ERROR] [OHOS ERROR] Solution: Please check the compile log at out/{compiling product}/build.log, If you could analyze build logs. [OHOS ERROR] Or you can try the following steps to solve this problem: [OHOS ERROR] 1. cd to OHOS root path [OHOS ERROR] 2. run 'hb clean --all' or 'rm -rf out build/resources/args/*.json'. [OHOS ERROR] 3. repo sync [OHOS ERROR] 4. repo forall -c 'git lfs pull' [OHOS ERROR] 5. bash build/prebuilts_download.sh [OHOS ERROR] 6. rebuild your product or component [OHOS ERROR] [OHOS ERROR] If you still cannot solve this problem, you could post this problem on: [OHOS ERROR] https://gitee.com/openharmony/build/issues [OHOS ERROR] ohos-sdk build failed! </x11> </x11> </x11> </x11>
2025-01-06 22:44:55
2 楼
2025-01-07 00:37:17