IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 移动开发 -> qcom SDM450 android11平台新建device的编译报错 -> 正文阅读

[移动开发]qcom SDM450 android11平台新建device的编译报错

最近在移植SDM450 Android 11的项目,新建device的过程中发现一个编译报错,模块为高通GPS相关的slim_daemon,默认的target为msm8953_64编译ok. 新建的device编译就是失败,错误log如下:

[ 12% 3353/26214] target Executable: slim_daemon (out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/LINKED/slim_daemon)
FAILED: out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/LINKED/slim_daemon
/bin/bash -c "prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang++ -pie -nostdlib -Bdynamic -Wl,-dynamic-linker,/system/bin/linker64 -Wl,--gc-sections -Wl,-z,nocopyreloc out/soong/.intermediates/bionic/libc/crtbegin_dynamic/android_vendor.30_arm64_armv8-a/crtbegin_dynamic.o out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/apss/daemon/SlimDaemonManager.o out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/apss/listener/ClientListener.o out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/provider/common/ProviderBase.o out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/provider/common/MultiplexingProvider.o out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/provider/common/SlimProviderConf.o out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/provider/common/KalmanFilter.o out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/provider/ndk/SlimNDKProvider.o out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/apss/listener/QLClientListener.o -Wl,--whole-archive  -Wl,--no-whole-archive   out/target/product/xxx/obj/STATIC_LIBRARIES/libslimcommon_intermediates/libslimcommon.a  out/target/product/xxx/obj/STATIC_LIBRARIES/libslimutils_intermediates/libslimutils.a  out/target/product/xxx/obj/STATIC_LIBRARIES/libc++demangle.vendor_intermediates/libc++demangle.vendor.a  out/target/product/xxx/obj/STATIC_LIBRARIES/libclang_rt.ubsan_minimal-aarch64-android.vendor_intermediates/libclang_rt.ubsan_minimal-aarch64-android.vendor.a   prebuilts/clang/host/linux-x86/clang-r383902b1/lib64/clang/11.0.2/lib/linux//libclang_rt.builtins-aarch64-android.a out/target/product/xxx/obj/STATIC_LIBRARIES/libatomic_intermediates/libatomic.a -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined-version -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_stripped.a -Wl,--exclude-libs,libunwind_llvm.a -fuse-ld=lld -Wl,--hash-style=gnu -Wl,-z,separate-code -Wl,--icf=safe -Wl,-z,max-page-size=4096    -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,--pack-dyn-relocs=none -pie -flto -fsanitize-cfi-cross-dso -fsanitize=cfi -Wl,-plugin-opt,O1 -Wl,--version-script,build/soong/cc/config/cfi_exports.map -Wl,--exclude-libs,libclang_rt.ubsan_minimal-aarch64-android.a -Wl,--no-undefined -target aarch64-linux-android30  out/target/product/xxx/obj/SHARED_LIBRARIES/libgps.utils_intermediates/libgps.utils.so  out/target/product/xxx/obj/SHARED_LIBRARIES/liblog.vendor_intermediates/liblog.vendor.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libdiag_intermediates/libdiag.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libqmi_csi_intermediates/libqmi_csi.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libqmi_cci_intermediates/libqmi_cci.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libqmi_common_so_intermediates/libqmi_common_so.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libqmi_encdec_intermediates/libqmi_encdec.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libutils.vendor_intermediates/libutils.vendor.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libhidlbase.vendor_intermediates/libhidlbase.vendor.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libsensorndkbridge_intermediates/libsensorndkbridge.so  out/target/product/xxx/obj/SHARED_LIBRARIES/android.hardware.sensors@1.0.vendor_intermediates/android.hardware.sensors@1.0.vendor.so  out/target/product/xxx/obj/SHARED_LIBRARIES/android.frameworks.sensorservice@1.0.vendor_intermediates/android.frameworks.sensorservice@1.0.vendor.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libloc_api_v02_intermediates/libloc_api_v02.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libloc_core_intermediates/libloc_core.so  out/target/product/xxx/obj/SHARED_LIBRARIES/liblbs_core_intermediates/liblbs_core.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libc++.vendor_intermediates/libc++.vendor.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libc.vendor_intermediates/libc.vendor.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libm.vendor_intermediates/libm.vendor.so  out/target/product/xxx/obj/SHARED_LIBRARIES/libdl.vendor_intermediates/libdl.vendor.so -o out/target/product/xxx/obj/EXECUTABLES/slim_daemon_intermediates/LINKED/slim_daemon out/soong/.intermediates/bionic/libc/crtend_android/android_vendor.30_arm64_armv8-a/obj/bionic/libc/arch-common/bionic/crtend.o"
ld.lld: error: undefined symbol: QSQmiSvcTask_SvcCbInit
>>> referenced by qmislim_qmi_service_task.c:664 (vendor/qcom/proprietary/gps-noship/slim/qmislim/common/src/qmislim_qmi_service_task.c:664)
>>>               lto.tmp:(slim_QSQmiSvcTask_Init)
>>> referenced by qmislim_qmi_service_task.c:665 (vendor/qcom/proprietary/gps-noship/slim/qmislim/common/src/qmislim_qmi_service_task.c:665)
>>>               lto.tmp:(slim_QSQmiSvcTask_Init)
>>> referenced by qmislim_qmi_service_task.c:666 (vendor/qcom/proprietary/gps-noship/slim/qmislim/common/src/qmislim_qmi_service_task.c:666)
>>>               lto.tmp:(slim_QSQmiSvcTask_Init)

ld.lld: error: undefined symbol: QSQmiSvcTaskSvcCb_I2O
>>> referenced by qmislim_qmi_service_task.c:411 (vendor/qcom/proprietary/gps-noship/slim/qmislim/common/src/qmislim_qmi_service_task.c:411)

初步怀疑点是device目录下及vendor/qcom/proprietary下的msm8953相关的配置,是否都考虑到了. 反复确认,没找到下手的变量的差异可以排除,最终通过比较out目录下对应的编译

out\target\product\oemdevice\obj\STATIC_LIBRARIES\libslimutils_intermediates\src\qmislim_target.d

发现问题所在,发现编译报错使用的工具链为

prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang++ -pie -nostdlib -Bdynamic -Wl,-dynamic-linker,/system/bin/linker64 -Wl,--gc-sections -Wl,

msm8953_64编译正常编译的工具链为:?

vendor/qcom/proprietary/llvm-arm-toolchain-ship/10.0/lib/clang/10.0.7/include/stddef.h \

然后简单追踪了下调用流程:

vendor\qcom\proprietary\common\config\sdclang.json

{
    "default": {
        "FORCE_SDCLANG_OFF": false,
        "SDCLANG": false,
        "SDCLANG_PATH": "vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin",
        "SDCLANG_FLAGS": ""
    },
..
..
..
..


    "msm8953_64": {
        "SDCLANG": true,
        "SDCLANG_PATH": "vendor/qcom/proprietary/llvm-arm-toolchain-ship/10.0/bin",
        "SDCLANG_FLAGS": "-Wno-reorder-init-list -Wno-implicit-fallthrough -Wno-c99-designator -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-alloca -Wno-dangling-gsl -Wno-pointer-compare -Wno-final-dtor-non-final-class -Wno-incomplete-setjmp-declaration -Wno-sizeof-array-div -Wno-xor-used-as-pow -fsplit-lto-unit -Wno-c++17-extensions -flax-vector-conversions=all -Wno-tautological-overlap-compare -Wno-range-loop-analysis -Wno-invalid-partial-specialization -Wno-deprecated-copy -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-bool-operation -Wno-unused-comparison -Wno-string-compare -Wno-wrong-info -Wno-thread-safety-analysis -Wno-unsequenced -Wno-unknown-warning-option"
    },
    "oemdevice": {
        "SDCLANG": true,
        "SDCLANG_PATH": "vendor/qcom/proprietary/llvm-arm-toolchain-ship/10.0/bin",
        "SDCLANG_FLAGS": "-Wno-reorder-init-list -Wno-implicit-fallthrough -Wno-c99-designator -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-alloca -Wno-dangling-gsl -Wno-pointer-compare -Wno-final-dtor-non-final-class -Wno-incomplete-setjmp-declaration -Wno-sizeof-array-div -Wno-xor-used-as-pow -fsplit-lto-unit -Wno-c++17-extensions -flax-vector-conversions=all -Wno-tautological-overlap-compare -Wno-range-loop-analysis -Wno-invalid-partial-specialization -Wno-deprecated-copy -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-bool-operation -Wno-unused-comparison -Wno-string-compare -Wno-wrong-info -Wno-thread-safety-analysis -Wno-unsequenced -Wno-unknown-warning-option"
    },
    "msm8953_32": {
        "SDCLANG": true,
        "SDCLANG_PATH": "vendor/qcom/proprietary/llvm-arm-toolchain-ship/10.0/bin",
        "SDCLANG_FLAGS": "-Wno-reorder-init-list -Wno-implicit-fallthrough -Wno-c99-designator -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-alloca -Wno-dangling-gsl -Wno-pointer-compare -Wno-final-dtor-non-final-class -Wno-incomplete-setjmp-declaration -Wno-sizeof-array-div -Wno-xor-used-as-pow -fsplit-lto-unit -Wno-c++17-extensions -flax-vector-conversions=all -Wno-tautological-overlap-compare -Wno-range-loop-analysis -Wno-invalid-partial-specialization -Wno-deprecated-copy -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-bool-operation -Wno-unused-comparison -Wno-string-compare -Wno-wrong-info -Wno-thread-safety-analysis -Wno-unsequenced -Wno-unknown-warning-option"
    },

    },
    "qssi": {
        "SDCLANG": false,
        "SDCLANG_PATH": "vendor/qcom/proprietary/llvm-arm-toolchain-ship/10.0/bin",
        "SDCLANG_FLAGS": "-Wno-reorder-init-list -Wno-implicit-fallthrough -Wno-c99-designator -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-alloca -Wno-dangling-gsl -Wno-pointer-compare -Wno-final-dtor-non-final-class -Wno-incomplete-setjmp-declaration -Wno-sizeof-array-div -Wno-xor-used-as-pow -fsplit-lto-unit -Wno-c++17-extensions -flax-vector-conversions=all -Wno-tautological-overlap-compare -Wno-range-loop-analysis -Wno-invalid-partial-specialization -Wno-deprecated-copy -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-bool-operation -Wno-unused-comparison -Wno-string-compare -Wno-wrong-info -Wno-thread-safety-analysis -Wno-unsequenced -Wno-unknown-warning-option"
    },
    "qssi_32": {
        "SDCLANG": false,
        "SDCLANG_PATH": "vendor/qcom/proprietary/llvm-arm-toolchain-ship/10.0/bin",
        "SDCLANG_FLAGS": "-Wno-reorder-init-list -Wno-implicit-fallthrough -Wno-c99-designator -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-alloca -Wno-dangling-gsl -Wno-pointer-compare -Wno-final-dtor-non-final-class -Wno-incomplete-setjmp-declaration -Wno-sizeof-array-div -Wno-xor-used-as-pow -fsplit-lto-unit -Wno-c++17-extensions -flax-vector-conversions=all -Wno-tautological-overlap-compare -Wno-range-loop-analysis -Wno-invalid-partial-specialization -Wno-deprecated-copy -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-bool-operation -Wno-unused-comparison -Wno-string-compare -Wno-wrong-info -Wno-thread-safety-analysis -Wno-unsequenced -Wno-unknown-warning-option"
    },
    "qssi_32go": {
        "SDCLANG": false,
        "SDCLANG_PATH": "vendor/qcom/proprietary/llvm-arm-toolchain-ship/10.0/bin",
        "SDCLANG_FLAGS": "-Wno-reorder-init-list -Wno-implicit-fallthrough -Wno-c99-designator -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-alloca -Wno-dangling-gsl -Wno-pointer-compare -Wno-final-dtor-non-final-class -Wno-incomplete-setjmp-declaration -Wno-sizeof-array-div -Wno-xor-used-as-pow -fsplit-lto-unit -Wno-c++17-extensions -flax-vector-conversions=all -Wno-tautological-overlap-compare -Wno-range-loop-analysis -Wno-invalid-partial-specialization -Wno-deprecated-copy -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-bool-operation -Wno-unused-comparison -Wno-string-compare -Wno-wrong-info -Wno-thread-safety-analysis -Wno-unsequenced -Wno-unknown-warning-option"
    },
     "cuttlestone_x86_phone": {
        "SDCLANG": false,
        "SDCLANG_PATH": "prebuilts/clang/host/linux-x86/clang-r377782/bin",
        "SDCLANG_FLAGS": ""
    }
}

vendor/qcom/proprietary/common/vendorsetup.sh引入

export QCPATH="vendor/qcom/proprietary"
9 export QCPATH_COMMONSYS="${QCPATH}/commonsys"
10 export SDCLANG_AE_CONFIG="${QCPATH}/common-noship/etc/sdclang.json"
11 export SDCLANG_CONFIG="${QCPATH}/common/config/sdclang.json"
12 if [ -f "$(pwd)/${QCPATH}/qrsp/mpgen/mpgen.py" ]; then
13 export RTIC_MPGEN="python $(pwd)/${QCPATH}/qrsp/mpgen/mpgen.py"
14 fi

此处先简单记录,后续需要对SDLANG编译工具这一块做下详细的了解(Todo).

  移动开发 最新文章
Vue3装载axios和element-ui
android adb cmd
【xcode】Xcode常用快捷键与技巧
Android开发中的线程池使用
Java 和 Android 的 Base64
Android 测试文字编码格式
微信小程序支付
安卓权限记录
知乎之自动养号
【Android Jetpack】DataStore
上一篇文章      下一篇文章      查看所有文章
加:2021-09-01 12:02:26  更:2021-09-01 12:03:36 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/23 13:35:07-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码