本文主要是介绍【Error】 交叉编译ncurses-6.1 make install 报错 strip: Unable to recognise the format of the input,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
发生在交叉编译tmux时,交叉编译ncurses-6.1 make install 报错:
.. installing alias ttytype.3ncurses.gz
installing /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/share/man/man5/terminfo.5.gz
installing /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/share/man/man1/tic.1.gz
installing /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/share/man/man1/toe.1.gz
installing /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/share/man/man1/tput.1.gz
.. installing alias reset.1.gz
installing /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/share/man/man1/tset.1.gz
.. installing alias reset.1.gz
installing /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/share/man/man5/user_caps.5.gz
installing /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/share/man/man3/wresize.3ncurses.gz
make[1]: Leaving directory '/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/man'
cd include && make DESTDIR="" RPATH_LIST="/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib" install
make[1]: Entering directory '/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/include'
mkdir -p /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/include/ncurses
installing curses.h in /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/include/ncurses
installing unctrl.h in /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/include/ncurses
installing ncurses_dll.h in /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/include/ncurses
installing term.h in /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/include/ncurses
installing termcap.h in /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/include/ncurses
installing ./tic.h in /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/include/ncurses
installing ./term_entry.h in /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/include/ncurses
installing ./nc_tparm.h in /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/include/ncurses
make[1]: Leaving directory '/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/include'
cd ncurses && make DESTDIR="" RPATH_LIST="/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib" install
make[1]: Entering directory '/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/ncurses'
mkdir -p /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib
installing ../lib/libncurses.a as /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib/libncurses.a
/usr/bin/install -c -m 644 ../lib/libncurses.a /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib/libncurses.a
ranlib /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib/libncurses.a
installing ../lib/libncurses_g.a as /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib/libncurses_g.a
/usr/bin/install -c -m 644 ../lib/libncurses_g.a /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib/libncurses_g.a
ranlib /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib/libncurses_g.a
make[1]: Leaving directory '/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/ncurses'
cd progs && make DESTDIR="" RPATH_LIST="/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/lib" install
make[1]: Entering directory '/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/progs'
mkdir -p /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/bin
/usr/bin/install -c -s tic /root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/bin/`echo tic| sed 's/$//'|sed 's,x,x,'|sed 's/$//'`
strip: Unable to recognise the format of the input file `/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/out/bin/tic'
/usr/bin/install: strip process terminated abnormally
Makefile:201: recipe for target 'install.progs' failed
make[1]: *** [install.progs] Error 1
make[1]: Leaving directory '/root/Pwn/tmp/gdb-aarch64/tmux/tmux/ncurses-6.1/progs'
Makefile:113: recipe for target 'install' failed
make: *** [install] Error 2
问题在与gcc和strip不是同一个arch 的。交叉编译时CC已经指定,但是strip依然是系统的strip。强行ln -s修改即可。(alias尝试了无效)
解决方案:
ln -s /root/Pwn/tmp/gdb-aarch64/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-strip /usr/bin/strip
参考:https://www.cnblogs.com/water-moon/p/5983152.html
这篇关于【Error】 交叉编译ncurses-6.1 make install 报错 strip: Unable to recognise the format of the input的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!