PaddlePaddle / Paddle-Lite-Demo

lib, demo, model, data
Apache License 2.0
686 stars 286 forks source link

ld.lld: error: libpaddle_light_api_shared.so: invalid local symbol '__bss_start__' in global part of symbol table #385

Open Haseeeb21 opened 1 month ago

Haseeeb21 commented 1 month ago

I have followed all the steps mentioned in ocr/android/app/cxx/ppocr_demo Deployment steps on 6th step when I am running the app then I am getting the following error on Android studio.

cmd.exe /C "cd . && C:\Users\HaseebUlHassan\AppData\Local\Android\Sdk\ndk\26.1.10909125\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android23 --sysroot=C:/Users/HaseebUlHassan/AppData/Local/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++11 -mfpu=neon -fuse-ld=lld -ffast-math -Ofast -Os -DNDEBUG -fno-exceptions -fomit-frame-pointer -fno-asynchronous-unwind-tables -fno-unwind-tables -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -fexceptions -fno-limit-debug-info -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -Wl,--no-fatal-warnings -Wl,-z,nocopyreloc -shared -Wl,-soname,libNative.so -o C:\Users\HaseebUlHassan\Desktop\original_paddlelite\Paddle-Lite-Demo\ocr\android\app\cxx\ppocr_demo\app\build\intermediates\cxx\Debug\u6361133\obj\arm64-v8a\libNative.so @CMakeFiles/Native.rsp && cd ."

ld.lld: error: Desktop/original_paddlelite/Paddle-Lite-Demo/ocr/android/app/cxx/ppocr_demo/app/src/main/cpp/../../../PaddleLite/cxx/libs/arm64-v8a/libpaddle_light_api_shared.so: invalid local symbol '__bss_start__' in global part of symbol table

Can anyone help me how to fix this?

or anyone who have runned the android application share the steps and repo kindly. Thanks!

1574300748 commented 3 weeks ago

我换到这个ndk版本就能实现了,之前用25的就报错跟你一样的错误 android { ... ndkVersion "21.3.6528147" }

bdbaigc commented 2 weeks ago

我换到这个ndk版本就能实现了,之前用25的就报错跟你一样的错误 android { ... ndkVersion "21.3.6528147" }

靠谱啊,确实是这个原因,我用NDK 28.0.12433566 一直报错,给跪了