日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Android >内容正文

Android

16.04编译android 7.0,ubuntu16.04 编译Android5.1报错

發布時間:2023/12/2 Android 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 16.04编译android 7.0,ubuntu16.04 编译Android5.1报错 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

hi kylin team,

我使用 ubuntu16.04 構建 android 編譯環境后編譯 android5.1 時出現如下報錯。請向開發團隊反饋看能否給出解決方案,謝謝!

當我使用 ubuntu16.04 構建 Android 編譯環境后, 編譯報錯. 報錯信息如下:

/home/.../proj/.../anroidsrcroot/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/../lib/gcc/x86_64-linux/4.6/../../../../x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/STATIC_LIBRARIES/libcompiler_rt_intermediates/libcompiler_rt.a(eprintf.o): unsupported reloc 43 against global symbol stderr

external/compiler-rt/lib/builtins/eprintf.c:32: error: unsupported reloc 43

collect2: ld returned 1 exit status

host C++: libnativehelper_32 <= libnativehelper/JNIHelp.cpp

make: *** [out/host/linux-x86/obj32/lib/libcompiler_rt.so] Error 1

make: *** 正在等待未完成的任務....

請問如何解決該報錯? 我確認編譯環境安裝 OK, 下面是 ubuntu16.04 上安裝工具的版本信息:

root@... :~# sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dri:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 dpkg-dev

Reading package lists... Done

Building dependency tree

Reading state information... Done

bison is already the newest version (2:3.0.4.dfsg-1).

build-essential is already the newest version (12.1ubuntu2).

curl is already the newest version (7.47.0-1ubuntu2).

dpkg-dev is already the newest version (1.18.4ubuntu1).

flex is already the newest version (2.6.0-11).

g++-multilib is already the newest version (4:5.3.1-1ubuntu1).

git is already the newest version (1:2.7.4-0ubuntu1).

gnupg is already the newest version (1.4.20-1ubuntu3).

libc6-dev is already the newest version (2.23-0ubuntu3).

libgl1-mesa-dev is already the newest version (11.2.0-1ubuntu2).

libxml2-utils is already the newest version (2.9.3+dfsg1-1).

x11proto-core-dev is already the newest version (7.0.28-2ubuntu1).

xsltproc is already the newest version (1.1.28-2.1).

zip is already the newest version (3.0-11).

libgl1-mesa-dri:i386 is already the newest version (11.2.0-1ubuntu2).

libncurses5-dev:i386 is already the newest version (6.0+20160213-1ubuntu1).

libreadline6-dev:i386 is already the newest version (6.3-8ubuntu2).

libx11-dev:i386 is already the newest version (2:1.6.3-1ubuntu2).

zlib1g-dev:i386 is already the newest version (1:1.2.8.dfsg-2ubuntu4).

gperf is already the newest version (3.0.4-2).

python-markdown is already the newest version (2.6.6-1).

tofrodos is already the newest version (1.7.13+ds-2ubuntu1).

mingw32 is already the newest version (4.2.1.dfsg-2ubuntu1).

0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

宿主機環境 binutils 版本信息:

root@...:~# apt-get install binutils

Reading package lists... Done

Building dependency tree

Reading state information... Done

binutils is already the newest version (2.26-8ubuntu2).

0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

root@...:~# objdump -v

GNU objdump (GNU Binutils for Ubuntu) 2.26

Copyright (C) 2015 Free Software Foundation, Inc.

This program is free software; you may redistribute it under the terms of

the GNU General Public License version 3 or (at your option) any later version.

This program has absolutely no warranty.

宿主機環境 gcc 版本信息:

root@...:~# gcc --version

gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413

Copyright (C) 2015 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

從報錯信息來看,是在鏈接 host 程序時出錯。鏈接 host 程序時用的工具鏈是放在 codebase 中的,即 prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/../lib/gcc/x86_64-linux/4.6/../../../../x86_64-linux/bin/ld.

1. 搞不明白,既然工具鏈在 codebase 中,也就不應該依賴宿主機 gcc 和 binutils, 就算我宿主機 gcc 和 binutils 版本較高,也不應該報此錯誤?

2. 請問如何解決此錯誤?降級宿主機 binutils 版本嗎?

3. 在 ubuntu16.04 上編譯貴司代碼時,我還曾遇見另一個錯誤由 make 報出,即 ***recipe commence before first target, 查看 make 版本是 4.1, 后來重新覆蓋安裝 make 3.81 解決。

長期來看編譯環境遷移到 ubuntu16.04 LTS 是必然的事情,因此非常期待貴司的解答,謝謝!

總結

以上是生活随笔為你收集整理的16.04编译android 7.0,ubuntu16.04 编译Android5.1报错的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。