Bootstrap

20241129解决在Ubuntu20.04下编译中科创达的CM6125的Android10出现找不到库文件

20241129解决在Ubuntu20.04下编译中科创达的CM6125的Android10出现找不到库文件libtinfo.so.5的问题
2024/11/29 20:41


缘起:中科创达的高通CM6125开发板的Android10的编译环境需要。


[ 11% 15993/135734] target Java source list: vr
[ 11% 15994/135734] target Java source list: appwidget
[ 11% 15995/135734] target Java source list: content
[ 11% 15996/135734] target Java source list: bu
[ 11% 15997/135734] Export SDK libs out/target/common/obj/APPS/AccentColorSpaceOverlay_intermediates/exported-sdk-libs
[ 11% 15998/135734] target Java source list: svclib
[ 11% 15999/135734] Export SDK libs out/target/common/obj/APPS/AccentColorPurpleOverlay_intermediates/exported-sdk-libs
[ 11% 16000/135734] Check module type: out/target/common/obj/APPS/DisplayCutoutEmulationCornerOverlay_intermediates/link_type
[ 11% 16001/135734] Check module type: out/target/common/obj/APPS/DisplayCutoutEmulationDoubleOverlay_intermediates/link_type
[ 11% 16002/135734] Check module type: out/target/common/obj/APPS/DisplayCutoutEmulationTallOverlay_intermediates/link_type
[ 11% 16003/135734] Export SDK libs out/target/common/obj/APPS/DisplayCutoutEmulationCornerOverlay_intermediates/exported-sdk-libs
[ 11% 16004/135734] Export SDK libs out/target/common/obj/APPS/DisplayCutoutEmulationTallOverlay_intermediates/exported-sdk-libs
[ 11% 16005/135734] Export SDK libs out/target/common/obj/APPS/DisplayCutoutEmulationDoubleOverlay_intermediates/exported-sdk-libs
[ 11% 16006/135734] Export SDK libs out/target/common/obj/APPS/FontNotoSerifSourceOverlay_intermediates/exported-sdk-libs
[ 11% 16007/135734] Check module type: out/target/product/qssi/obj/EXECUTABLES/antradio_app_intermediates/link_type
[ 11% 16008/135734] target  C: antradio_app <= external/ant-wireless/ant_native/app/ant_app.c
FAILED: out/target/product/qssi/obj/EXECUTABLES/antradio_app_intermediates/app/ant_app.o
/bin/bash -c "PWD=/proc/self/cwd vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang     -I external/ant-wireless/ant_native/src/common/inc -I external/ant-wireless/ant_native/app -I frameworks/base/core/jni/include -I external/ant-wireless/ant_native -I out/target/product/qssi/obj/EXECUTABLES/antradio_app_intermediates -I out/target/product/qssi/gen/EXECUTABLES/antradio_app_intermediates -I libnativehelper/include_jni \$(cat out/target/product/qssi/obj/EXECUTABLES/antradio_app_intermediates/import_includes)  -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -faddrsig -Wimplicit-fallthrough -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-zero-as-null-pointer-constant -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -march=armv8-a  -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin   -std=gnu99    -Wall -Werror -g -c -W -Wall -O2 -fPIE -Wno-enum-compare -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -D_USING_LIBCXX   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-tautological-unsigned-enum-zero-compare -Wno-tautological-unsigned-zero-compare -Wno-c++98-compat-extra-semi -Wno-return-std-move-in-c++11   -MD -MF out/target/product/qssi/obj/EXECUTABLES/antradio_app_intermediates/app/ant_app.d -o out/target/product/qssi/obj/EXECUTABLES/antradio_app_intermediates/app/ant_app.o external/ant-wireless/ant_native/app/ant_app.c"
vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
[ 11% 16009/135734] Check module type: out/target/product/qssi/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/link_type
[ 11% 16010/135734] Fix manifest: out/target/common/obj/JAVA_LIBRARIES/SettingsLib-search_intermediates/manifest/AndroidManifest.xml
[ 11% 16011/135734] Fix manifest: out/target/common/obj/APPS/SimAppDialog_intermediates/manifest/AndroidManifest.xml.fixed
[ 11% 16012/135734] Fix manifest: out/target/common/obj/APPS/InputDevices_intermediates/manifest/AndroidManifest.xml
[ 11% 16013/135734] Fix manifest: out/target/common/obj/APPS/AccentColorCinnamonOverlay_intermediates/manifest/AndroidManifest.xml
[ 11% 16014/135734] Fix manifest: out/target/common/obj/APPS/AccentColorOceanOverlay_intermediates/manifest/AndroidManifest.xml
[ 11% 16015/135734] Fix manifest: out/target/common/obj/APPS/AccentColorGreenOverlay_intermediates/manifest/AndroidManifest.xml
[ 11% 16016/135734] Fix manifest: out/target/common/obj/APPS/AccentColorBlackOverlay_intermediates/manifest/AndroidManifest.xml
[ 11% 16017/135734] Fix manifest: out/target/common/obj/APPS/AccentColorOrchidOverlay_intermediates/manifest/AndroidManifest.xml
[ 11% 16018/135734] Fix manifest: out/target/common/obj/APPS/MtpDocumentsProvider_intermediates/manifest/AndroidManifest.xml
[ 11% 16019/135734] Fix manifest: out/target/common/obj/APPS/AntHalService_intermediates/manifest/AndroidManifest.xml
[ 11% 16020/135734] Fix manifest: out/target/common/obj/APPS/Shell_intermediates/manifest/AndroidManifest.xml.fixed
[ 11% 16021/135734] Fix manifest: out/target/common/obj/APPS/PrintRecommendationService_intermediates/manifest/AndroidManifest.xml.fixed
[ 11% 16022/135734] Fix manifest: out/target/common/obj/APPS/DynamicSystemInstallationService_intermediates/manifest/AndroidManifest.xml
[ 11% 16023/135734] Fix manifest: out/target/common/obj/APPS/ExtShared_intermediates/manifest/AndroidManifest.xml
[ 11% 16024/135734] build out/target/product/qssi/obj/kernel/msm-4.14/usr
make: Entering directory '/home/rootroot/cm6125q/LINUX/android/kernel/msm-4.14'
make[1]: Entering directory '/home/rootroot/cm6125q/LINUX/android/out/target/product/qssi/obj/kernel/msm-4.14'
  GEN     ./Makefile
  HOSTCC  scripts/basic/fixdep
  SHIPPED scripts/kconfig/zconf.tab.c
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
drivers/input/touchscreen/Kconfig:1292:warning: leading whitespace ignored
#
# configuration written to .config
#
make[1]: Leaving directory '/home/rootroot/cm6125q/LINUX/android/out/target/product/qssi/obj/kernel/msm-4.14'
make: Leaving directory '/home/rootroot/cm6125q/LINUX/android/kernel/msm-4.14'
make: Entering directory '/home/rootroot/cm6125q/LINUX/android/kernel/msm-4.14'
make[1]: Entering directory '/home/rootroot/cm6125q/LINUX/android/out/target/product/qssi/obj/kernel/msm-4.14'
/home/rootroot/cm6125q/LINUX/android/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
/home/rootroot/cm6125q/LINUX/android/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
/home/rootroot/cm6125q/LINUX/android/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
/home/rootroot/cm6125q/LINUX/android/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
/home/rootroot/cm6125q/LINUX/android/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
/home/rootroot/cm6125q/LINUX/android/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

  WRAP    arch/arm64/include/generated/uapi/asm/errno.h
  WRAP    arch/arm64/include/generated/uapi/asm/ioctl.h
  WRAP    arch/arm64/include/generated/uapi/asm/ioctls.h
  WRAP    arch/arm64/include/generated/uapi/asm/ipcbuf.h
  WRAP    arch/arm64/include/generated/uapi/asm/kvm_para.h
  WRAP    arch/arm64/include/generated/uapi/asm/mman.h
  WRAP    arch/arm64/include/generated/uapi/asm/msgbuf.h
  WRAP    arch/arm64/include/generated/uapi/asm/poll.h
  WRAP    arch/arm64/include/generated/uapi/asm/resource.h
  WRAP    arch/arm64/include/generated/uapi/asm/sembuf.h
  WRAP    arch/arm64/include/generated/uapi/asm/shmbuf.h
  WRAP    arch/arm64/include/generated/uapi/asm/sockios.h
  WRAP    arch/arm64/include/generated/uapi/asm/socket.h
  WRAP    arch/arm64/include/generated/uapi/asm/swab.h
  WRAP    arch/arm64/include/generated/uapi/asm/termbits.h
  WRAP    arch/arm64/include/generated/uapi/asm/termios.h
  WRAP    arch/arm64/include/generated/uapi/asm/types.h
/home/rootroot/cm6125q/LINUX/android/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
  HOSTCC  scripts/unifdef
/home/rootroot/cm6125q/LINUX/android/vendor/qcom/proprietary/llvm-arm-toolchain-ship/8.0/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

  INSTALL usr/include/drm/ (27 files)
  INSTALL usr/include/asm-generic/ (36 files)
  INSTALL usr/include/xen/ (4 files)
  INSTALL usr/include/video/ (5 files)
  INSTALL usr/include/misc/ (1 file)
  INSTALL usr/include/mtd/ (5 files)
  INSTALL usr/include/sound/ (15 files)
  INSTALL usr/include/rdma/ (20 files)
  INSTALL usr/include/media/ (32 files)
  INSTALL usr/include/scsi/ (6 files)
  INSTALL usr/include/rdma/hfi/ (2 files)
  INSTALL usr/include/scsi/fc/ (4 files)
  INSTALL usr/include/linux/ (523 files)
  INSTALL usr/include/scsi/ufs/ (2 files)
  INSTALL usr/include/linux/android/ (1 file)
  INSTALL usr/include/linux/byteorder/ (2 files)
  INSTALL usr/include/linux/caif/ (2 files)
  INSTALL usr/include/linux/can/ (6 files)
  INSTALL usr/include/linux/cifs/ (1 file)
  INSTALL usr/include/linux/dvb/ (8 files)
  INSTALL usr/include/linux/genwqe/ (1 file)
  INSTALL usr/include/linux/hdlc/ (1 file)
  INSTALL usr/include/linux/hsi/ (2 files)
  INSTALL usr/include/linux/iio/ (2 files)
  INSTALL usr/include/linux/isdn/ (1 file)
  INSTALL usr/include/linux/mmc/ (3 files)
  INSTALL usr/include/linux/netfilter/ (88 files)
  INSTALL usr/include/linux/netfilter_arp/ (2 files)
  INSTALL usr/include/linux/netfilter/ipset/ (4 files)
  INSTALL usr/include/linux/netfilter_bridge/ (17 files)
  INSTALL usr/include/linux/netfilter_ipv6/ (12 files)
  INSTALL usr/include/linux/nfsd/ (5 files)
  INSTALL usr/include/linux/raid/ (2 files)
  INSTALL usr/include/linux/netfilter_ipv4/ (10 files)
  INSTALL usr/include/linux/nfc/ (2 files)
  INSTALL usr/include/linux/sched/ (1 file)
  INSTALL usr/include/linux/spi/ (1 file)
  INSTALL usr/include/linux/sunrpc/ (1 file)
  INSTALL usr/include/linux/tc_act/ (15 files)
  INSTALL usr/include/linux/tc_ematch/ (4 files)
  INSTALL usr/include/linux/wimax/ (1 file)
  INSTALL usr/include/linux/usb/ (15 files)
  INSTALL usr/include/asm/ (35 files)
make[1]: Leaving directory '/home/rootroot/cm6125q/LINUX/android/out/target/product/qssi/obj/kernel/msm-4.14'
make: Leaving directory '/home/rootroot/cm6125q/LINUX/android/kernel/msm-4.14'
ninja: build stopped: subcommand failed.
09:57:40 ninja failed with: exit status 1

#### failed to build some targets (03:03 (mm:ss)) ####


real    6m1.843s
user    19m58.515s
sys    2m58.714s
============================================
[build.sh]: FAILED: make -j36 dist ENABLE_AB=true BOARD_DYNAMIC_PARTITION_ENABLE=true SHIPPING_API_LEVEL=29
============================================
20241129_09:57:40 [TURBOX BUILD ERROR]: build_hlos Error****
rootroot@rootroot-X99-Turbo:~/cm6125q$ 
rootroot@rootroot-X99-Turbo:~/cm6125q$ 
rootroot@rootroot-X99-Turbo:~/cm6125q$ 
rootroot@rootroot-X99-Turbo:~/cm6125q$ 
rootroot@rootroot-X99-Turbo:~/cm6125q$ 
rootroot@rootroot-X99-Turbo:~/cm6125q$ sudo apt-get install libtinfo5
[sudo] password for rootroot: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libgstreamer-plugins-bad1.0-0 libnvidia-cfg1-535 libnvidia-common-535 libnvidia-decode-535 libnvidia-encode-535 libnvidia-extra-535 libnvidia-fbc1-535
  libnvidia-gl-535 libva-wayland2 libx11-xcb1:i386 libxnvctrl0 nvidia-compute-utils-535 nvidia-kernel-source-535 nvidia-settings nvidia-utils-535 screen-resolution-extra xserver-xorg-video-nvidia-535
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  libtinfo5
0 upgraded, 1 newly installed, 0 to remove and 64 not upgraded.
Need to get 83.4 kB of archives.
After this operation, 535 kB of additional disk space will be used.
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 libtinfo5 amd64 6.2-0ubuntu2.1 [83.4 kB]
Fetched 83.4 kB in 21s (4,015 B/s)
Selecting previously unselected package libtinfo5:amd64.
(Reading database ... 200104 files and directories currently installed.)
Preparing to unpack .../libtinfo5_6.2-0ubuntu2.1_amd64.deb ...
Unpacking libtinfo5:amd64 (6.2-0ubuntu2.1) ...
Setting up libtinfo5:amd64 (6.2-0ubuntu2.1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.16) ...
rootroot@rootroot-X99-Turbo:~/cm6125q$ 

rootroot@rootroot-X99-Turbo:~/cm6125q$ 


参考资料:
https://blog.csdn.net/weixin_41582781/article/details/125875268

clang --version clang: error while loading shared libraries: libtinfo.so.5: cannot open shared objec

wx最初的梦想 于 2022-07-19 16:37:06 发布

安装llvm时出现 clang --version
clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
解决方法:sudo apt-get install libtinfo5


已经安装了

还需要额外安装
net-tools
openssh-server
nethogs
pyton2【内置python3.8】
samba


$ sudo apt-get install android-tools-adb
$ sudo apt-get install android-tools-fastboot
$ sudo apt-get install openjdk-8-jdk
【异常了】
sudo apt-get install repo


sudo apt-get install bc
sudo apt-get install bison
sudo apt-get install build-essential
sudo apt-get install ccache
sudo apt-get install curl
sudo apt-get install flex
sudo apt-get install libxml-simple-perl

sudo apt-get install g++-multilib
sudo apt-get install gcc-multilib
sudo apt-get install git
sudo apt-get install gnupg
sudo apt-get install gperf
sudo apt-get install imagemagick

sudo apt-get install lib32ncurses5-dev
sudo apt-get install lib32readline-dev
sudo apt-get install lib32z1-dev
【需要更新源】
sudo apt-get install libesd0-dev

rootroot@rootroot-X99-Turbo:/etc/apt$ sudo cp sources.list.bak1 sources.list
rootroot@rootroot-X99-Turbo:/etc/apt$ sudo echo "" >> sources.list
rootroot@rootroot-X99-Turbo:/etc/apt$ sudo echo "" >> sources.list
rootroot@rootroot-X99-Turbo:/etc/apt$ sudo echo "deb http://us.archive.ubuntu.com/ubuntu/ xenial main universe" >> sources.list
rootroot@rootroot-X99-Turbo:/etc/apt$ sudo echo "deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main universe" >> sources.list
rootroot@rootroot-X99-Turbo:/etc/apt$ sudo echo "" >> sources.list
rootroot@rootroot-X99-Turbo:/etc/apt$ sudo echo "" >> sources.list

sudo apt-get install liblz4-tool
sudo apt-get install libncurses5-dev
sudo apt-get install libsdl1.2-dev
sudo apt-get install libssl-dev

【异常】
sudo apt-get install libwxgtk3.0-dev
【更新为】
sudo apt install libwxgtk3.0-gtk3-dev
sudo apt-get install libxml2
sudo apt-get install libxml2-utils
sudo apt-get install lzop
sudo apt-get install pngcrush
sudo apt-get install rsync

sudo apt-get install schedtool
sudo apt-get install squashfs-tools
sudo apt-get install xsltproc
sudo apt-get install zip
sudo apt-get install zlib1g-dev

;