积分5 / 贡献0

提问1答案被采纳0文章0

作者动态

    请问哪位大佬使用aarch64-linux-ohos编译成功libdrm吗

    欢乐马_FB7PK 显示全部楼层 发表于 2024-9-8 11:14:48

    【问题描述】

    1. 介绍问题现象和发生的背景 使用http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.10.3/20230817_130047/version-Master_Version-OpenHarmony_4.0.10.3-20230817_130047-ohos-sdk-full.tar.gz 中的aarch64-linux-ohos编译libdrm

    2. 相关的代码(请勿使用截图)

      1. 使用meson编译libdrm,其中cross_file.txt中指定OpenHarmony的交叉编译器
      2. meson setup --cross-file=cross_file.txt
      3. cross_file.txt:

      [binaries] c = '/ohos-sdk/linux/native/llvm/bin/clang' cpp = '/ohos-sdk/linux/native/llvm/bin/clang++' ar = '/ohos-sdk/linux/native/llvm/bin/llvm-ar' strip = '/ohos-sdk/linux/native/llvm/bin/llvm-strip' ld = '/ohos-sdk/linux/native/llvm/bin/ld.lld'

      [host_machine] system = 'linux' cpu_family = 'aarch64' cpu = 'aarch64' endian = 'little'

      [paths] prefix = '/lib' libdir = 'clang/15.0.4/lib/aarch64-linux-ohos'

      [env] CC = '/ohos-sdk/linux/native/llvm/bin/clang --target=aarch64-linux-ohos' CXX = '/ohos-sdk/linux/native/llvm/bin/clang++ --target=aarch64-linux-ohos' AR = '/ohos-sdk/linux/native/llvm/bin/llvm-ar' RANLIB = '/ohos-sdk/linux/native/llvm/bin/llvm-ranlib' LD = '/ohos-sdk/linux/native/llvm/bin/ld.lld'

    3. 运行结果、错误截图 编译libdrm报错如下,

      /usr/bin/ld: cannot find Scrt1.o: No such file or directory /usr/bin/ld: cannot find crti.o: No such file or directory /usr/bin/ld: cannot find crtbeginS.o: No such file or directory /usr/bin/ld: cannot find -lgcc /usr/bin/ld: cannot find -lgcc_s

    4. 我尝试过的解决方法和结果

      我认为是编译时没有使用ohos-sdk/linux/native/llvm/bin/ld.lld

    5. 我想要达到的结果

    使用OenHarmony中的aarch64-linux-ohos编译成功libdrm

    【运行环境】

    硬件: ROM版本: DevEvoStudio版本: SDK版本:version-Master_Version-OpenHarmony_4.0.10.3-20230817_130047

    您尚未登录,无法参与评论,登录后可以:
    参与开源共建问题交流
    认同或收藏高质量问答
    获取积分成为开源共建先驱

    精彩评论1

    Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

    返回顶部