openwrt php gd库,编译某基于openwrt的sdk

from . import parser

File "/opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/glib-2.50.3/gio/gdbus-2.0/codegen/parser.py", line 23, in import xml.parsers.expat

ImportError: No module named xml.parsers.expat

make[8]: *** [Makefile:4643: gdbus-test-codegen-generated.h] Error 1

解决:

系统中python安装defusedxml模块, 比如suse系统,在YaST2中搜索并安装python2-defusedxml

13

问题

make[4]: Entering directory '/opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/Python-2.7.13'

running build

running build_ext

building dbm using ndbm

INFO: Can't locate Tcl/Tk libs and/or headers

building '_curses' extension

gcc -pthread -fPIC -fno-strict-aliasing -O2 -I/opt/p2/openwrt/staging_dir/host/include -I/opt/p2/openwrt/staging_dir/host/usr/include -I/opt/p2/openwrt/staging_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/opt/p2/openwrt/staging_dir/host/include -I/opt/p2/openwrt/staging_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/include -I/usr/local/include -I/opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/Python-2.7.13/Include -I/opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/Python-2.7.13 -c /opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/Python-2.7.13/Modules/_cursesmodule.c -o build/temp.linux-x86_64-2.7/opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/Python-2.7.13/Modules/_cursesmodule.o

/opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/Python-2.7.13/Modules/_cursesmodule.c: In function 'PyCursesWindow_EchoChar':

/opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/Python-2.7.13/Modules/_cursesmodule.c:809:18: error: dereferencing pointer to incomplete type 'WINDOW' {aka 'struct _win_st'}

809 |     if (self->win->_flags & _ISPAD)

|                  ^~

/opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/host/Python-2.7.13/Modules/_cursesmodule.c: In function 'PyCurses_setupterm':

*** WARNING: renaming "_ctypes" since importing it failed: libffi.so.6: cannot open shared object file: No such file or directory

Python build finished, but the necessary bits to build these modules were not found:

_sqlite3           _tkinter           bsddb185

dl                 imageop            nis

解决:

安装tcl-devel, tk-devel, sqlite3-devel, libffi-devel,  注意必须要有libffi.so.6这个文件,实在没有且有libffi.so.7的则可以ln -s libffi.so.7 libffi.so.6来做临时解决。

如果还是不行,则试下安装readline-devel,bzip2-devel,openssl-devel,gdbm-devel,libdbi-devel,ncurses-libs,zlib-devel, libnsl-devel

14

问题:

checking for refresh in -lncurses6... no

checking for refresh in -lncurses... no

checking for refresh in -lncurses6... (cached) no

checking for refresh in -lncurses... (cached) no

checking curses.h usability... yes

checking curses.h presence... yes

checking for curses.h... yes

configure: error: missing libraries:  libncurses

make[3]: *** [Makefile:57: /opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/htop-2.0.2/.configured_yyyyyyyy] Error

解决:

查看build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/htop-2.0.2/config.log

configure:13075: checking for refresh in -lncurses

configure:13100: arm-openwrt-linux-gnueabi-gcc -o conftest -Os -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap /opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/htop-2.0.2:htop-2.0.2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/opt/p2/openwrt/staging_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/usr/include -I/opt/p2/openwrt/staging_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/include -I/opt/p2/openwrt/staging_dir/toolchain-arm_cortex-a7+neon_gcc-5.3.0_glibc-2.22_eabi/usr/include -I/opt/p2/openwrt/staging_dir/toolchain-arm_cortex-a7+neon_gcc-5.3.0_glibc-2.22_eabi/include  -L/usr/lib64/ncurses5 -Wl,-O2 -Wl,-Bsymbolic-functions -Wl,--as-needed -lncurses -ltinfo -L/opt/p2/openwrt/staging_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/usr/lib -L/opt/p2/openwrt/staging_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/lib -L/opt/p2/openwrt/staging_dir/toolchain-arm_cortex-a7+neon_gcc-5.3.0_glibc-2.22_eabi/usr/lib -L/opt/p2/openwrt/staging_dir/toolchain-arm_cortex-a7+neon_gcc-5.3.0_glibc-2.22_eabi/lib -znow -zrelro  conftest.c -lncurses  -lm  >&5

/lib64/libncurses.so.5: file not recognized: File format not recognized

collect2: error: ld returned 1 exit status

configure:13100: $? = 1

关键是这句 -L/usr/lib64/ncurse5, 加上/lib64/libncurses.so.5: file not recognized: File format not recognized, 可见是链接目录有问题,交叉编译时却链接上pc中的库,无法识别,出错。

系统中安装了ncurses-devel  ncurses5-devel, 这里删除掉ncurses5-devel,问题解决。

15

问题:

+ mkdosfs /opt/p2/openwrt/build_dir/target-arm_cortex-a7+neon_glibc-2.22_eabi/linux-leo_gx8009b-ssd-lc-v1/cfg.img -C 1024

./gen_leo_sdcard_img.sh: line 40: mkdosfs: command not found

解决:

系统安装dosfstools, 如果是suse系统,又安装有dosfstools, 则是路径有问题(/usr/sbin/mkdosfs), 在/usr/bin/下创建软链接sudo ln -s /usr/sbin/mkdosfs /usr/bin/mkdosfs

作者:帅得不敢出门

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值