rknn-toolkit2 icon indicating copy to clipboard operation
rknn-toolkit2 copied to clipboard

librknnmrt.so: error adding symbols: file in wrong format

Open fanronghua0123456 opened this issue 2 months ago • 1 comments

hi, all ,我用 rknn.codegen 自動生成代碼,發佈,編譯出現如下錯誤?

ret = rknn.export_rknn(export_path = '../model/export_best_12.rknn')
ret = rknn.codegen(output_path='./rknn_rv1126b_app_demo',overwrite=True)
# 性能评估
#eval_print = rknn.eval_perf(is_print=True)
rknn.release()

編譯前設置了環境變量。

export RKNPU2=/opt/nfsroot/rknn-src/rknn-toolkit2/rknpu2 export ARCH=

link 的時候出現了錯誤。

[100%] Linking CXX executable rknn_app_demo /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: /opt/nfsroot/rknn-src/rknn-toolkit2/rknpu2/runtime/Linux/librknn_api/armhf-uclibc/librknnmrt.so: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/rknn_app_demo.dir/build.make:146:rknn_app_demo] 错误 1 make[1]: *** [CMakeFiles/Makefile2:83:CMakeFiles/rknn_app_demo.dir/all] 错误 2 make: *** [Makefile:136:all] 错误 2

fanronghua0123456 avatar Dec 09 '25 03:12 fanronghua0123456

modfiy bulid_linux.sh 1. delete #LIB_ARCH="armhf-uclibc" elif [ $1 == "rv1126b" ]; then TARGET_SOC="rv1126b" #LIB_ARCH="armhf-uclibc" else echo "$1 not recognize." usage exit 1

change ARCH to LIB_ARCH

build

BUILD_DIR=${ROOT_PWD}/build/build_linux_${LIB_ARCH}

fanronghua0123456 avatar Dec 09 '25 06:12 fanronghua0123456