Ubuntu编译报错

Openwrt编译报错

fatal error: bits/libc-header-start.h: No such file or directory

具体报错如下:

from host/minilua.c:33:
/usr/include/limits.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory
   26 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:692:

解决方案:

sudo apt-get install gcc-multilib

后面编译,仍有报错:

make[4]: Entering directory '/mnt/d/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/LuaJIT-2.1.0-beta3/src'
HOSTCC    host/minilua.o
HOSTLINK  host/minilua
DYNASM    host/buildvm_arch.h
host/minilua: 1: Syntax error: "(" unexpected

解决方案,直接进入对应目录:

cd /mnt/d/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/LuaJIT-2.1.0-beta3/src

手动执行:

make

重新编译可解决。

fatal error: bits/c++config.h: No such file or directory

具体报错如标题:

fatal error: bits/c++config.h: No such file or directory

那是系统还没有安装多版本编译模式的缘故,安装如下插件即可。

sudo apt-get install gcc-multilib g++-multilib

upx not found

具体报错如下,原因是host端并没有安装upx这个工具

upx is not available

解决思路是,可手动安装upx,然后放到host端工具的目录下:

sudo apt-get install upx-ucl

然后将upx复制到指定目录:

cp /usr/bin/upx staging_dir/host/bin/
posted @   付时凡  阅读(187)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示