哪吒D1鸿蒙编译显示ninja: build stopped: subcommand failed. build: ninja error
-
编译D1时,一直显示ninja编译失败,具体log信息如下,请大佬们帮忙解答一下。
Starting Ninja... ninja: Entering directory `/usr/OpenHarmony/out/ohos-riscv64-release' [1/8371] COPY ../../drivers/peripheral/camera/hal/pipeline_core/pipeline_impl/src/strategy/config/config.c obj/drivers/peripheral/camera/hal/adapter/platform/v4l2/drivers/peripheral/camera/hal/pipeline_core/pipeline_impl/src/strategy/config/config.c [2/8371] COPY ../../drivers/peripheral/camera/hal/pipeline_core/pipeline_impl/src/strategy/config/params.c obj/drivers/peripheral/camera/hal/adapter/platform/v4l2/drivers/peripheral/camera/hal/pipeline_core/pipeline_impl/src/strategy/config/params.c [3/8371] STAMP obj/drivers/peripheral/camera/hal/adapter/platform/v4l2/params.c.stamp [4/8371] STAMP obj/drivers/peripheral/camera/hal/adapter/platform/v4l2/config.c.stamp [5/8371] ACTION //third_party/libxkbcommon:libxkbcommon__notice(//build/toolchain/ohos:ohos_clang_riscv64) [6/8371] ACTION //third_party/flutter:flutter_engine_common_ohos__notice(//build/toolchain/ohos:ohos_clang_riscv64) [7/8371] SOLINK global/i18n_standard/libprotobuf_standard.z.so FAILED: global/i18n_standard/libprotobuf_standard.z.so lib.unstripped/global/i18n_standard/libprotobuf_standard.z.so /usr/bin/env "../../build/toolchain/gcc_solink_wrapper.py" --readelf="../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/llvm-readobj" --nm="../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/llvm-nm" --strip=../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/llvm-strip --sofile="./lib.unstripped/global/i18n_standard/libprotobuf_standard.z.so" --output="global/i18n_standard/libprotobuf_standard.z.so" -- ../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/clang++ -shared -shared -Wl,--fatal-warnings -Wl,--build-id=md5 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=lld -Wl,--icf=all -Wl,--color-diagnostics -Wl,--no-undefined -Wl,--exclude-libs=libunwind_llvm.a -Wl,--exclude-libs=libc++_static.a -Wl,--exclude-libs=libvpx_assembly_arm.a --target=riscv64-linux-ohosmusl -Wl,--hash-style=gnu -Wl,--warn-shared-textrel -Wl,-O2 -Wl,--gc-sections -Wl,--gdb-index --sysroot=obj/third_party/musl -nostdlib -L../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/riscv64-linux-ohosmusl/c++ -Lobj/third_party/musl/usr/lib/riscv64-linux-ohosmusl -L../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/lib/clang/12.0.1/lib/riscv64-linux-ohosmusl -Wl,--dynamic-linker,/system/bin/ld-musl-riscv64.so.1 -Wl,--warn-shared-textrel -o "./lib.unstripped/global/i18n_standard/libprotobuf_standard.z.so" @"global/i18n_standard/libprotobuf_standard.z.so.rsp" -Wl,-soname="libprotobuf_standard.z.so" ld.lld: error: obj/third_party/protobuf/src/google/protobuf/protobuf_standard/api.pb.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/protobuf_standard/arena.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/protobuf_standard/generated_message_reflection.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/protobuf_standard/generated_message_table_driven_lite.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/protobuf_standard/generated_message_util.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/protobuf_standard/implicit_weak_message.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/io/protobuf_standard/coded_stream.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/io/protobuf_standard/gzip_stream.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/io/protobuf_standard/io_win32.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/io/protobuf_standard/printer.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/io/protobuf_standard/tokenizer.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/io/protobuf_standard/zero_copy_stream.o: unknown file type ld.lld: error: obj/third_party/protobuf/src/google/protobuf/io/protobuf_standard/zero_copy_stream_impl.o: unknown file type clang-12: error: linker command failed with exit code 1 (use -v to see invocation) [8/8371] ACTION //third_party/flutter:ace_skia_ohos__notice(//build/toolchain/ohos:ohos_clang_riscv64) [9/8371] CXX obj/third_party/re2/re2/re2/prefilter_tree.o ninja: build stopped: subcommand failed. build: ninja error used: 93 seconds pycache statistics manage pycache contents pycache daemon exit
-
@karrena 重新编译后报错信息不一样,如下:
Starting Ninja...
ninja: Entering directory `/usr/OpenHarmony/out/ohos-riscv64-release'
[1/8521] COPY ../../drivers/peripheral/camera/hal/pipeline_core/pipeline_impl/src/strategy/config/config.c obj/drivers/peripheral/camera/hal/adapter/platform/v4l2/drivers/peripheral/camera/hal/pipeline_core/pipeline_impl/src/strategy/config/config.c
[2/8521] COPY ../../drivers/peripheral/camera/hal/pipeline_core/pipeline_impl/src/strategy/config/params.c obj/drivers/peripheral/camera/hal/adapter/platform/v4l2/drivers/peripheral/camera/hal/pipeline_core/pipeline_impl/src/strategy/config/params.c
[3/8521] STAMP obj/drivers/peripheral/camera/hal/adapter/platform/v4l2/params.c.stamp
[4/8521] STAMP obj/drivers/peripheral/camera/hal/adapter/platform/v4l2/config.c.stamp
[5/8521] CXX obj/third_party/protobuf/src/google/protobuf/protobuf_standard/extension_set.o
FAILED: obj/third_party/protobuf/src/google/protobuf/protobuf_standard/extension_set.o
/usr/bin/ccache ../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/bin/clang++ -MMD -MF obj/third_party/protobuf/src/google/protobuf/protobuf_standard/extension_set.o.d -DHAVE_PTHREAD -DV8_DEPRECATION_WARNINGS -DNO_TCMALLOC -D_GNU_SOURCE -DHAVE_SYS_UIO_H -D__MUSL__ -D_LIBCPP_HAS_MUSL_LIBC -D__BUILD_LINUX_WITH_CLANG -D_LIBCPP_NO_NATIVE_SEMAPHORES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCOMPONENT_BUILD -D__GNU_SOURCE=1 -DCHROMIUM_CXX_TWEAK_INLINES -D__MUSL__ -D_LIBCPP_HAS_MUSL_LIBC -D__BUILD_LINUX_WITH_CLANG -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Iobj/third_party/musl/usr/include/riscv64-linux-ohosmusl -I../../prebuilts/clang/ohos/linux-x86_64/llvm-riscv/include/c++/v1 -I../.. -Igen -I../../third_party/protobuf/src -I../../third_party/protobuf/src/google -I../../third_party/protobuf/src/google/protobuf -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector-strong -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -ffunction-sections -fno-short-enums --target=riscv64-linux-ohosmusl -mno-relax -march=rv64imafdc -mabi=lp64d -mno-relax -Wall -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-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-gnu-folding-constant -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g2 -ggnu-pubnames -fno-common -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wall -Werror -fPIC -frtti -U__ANDROID__ -Wno-sign-compare -Wno-error=unused-parameter -Wno-error=unused-const-variable -Wno-error=unneeded-internal-declaration -Wno-inconsistent-missing-override -std=c++17 -fno-exceptions --sysroot=obj/third_party/musl -fvisibility-inlines-hidden -frtti -c ../../third_party/protobuf/src/google/protobuf/extension_set.cc -o obj/third_party/protobuf/src/google/protobuf/protobuf_standard/extension_set.o
expected ':' in depfile[6/8521] CXX obj/third_party/protobuf/src/google/protobuf/protobuf_standard/extension_set_heavy.oFAILED: obj/third_party/protobuf/src/google/protobuf/protobuf_standard/extension_set_heavy.o
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号