【版权申明】转载请附上出处链接
编译Hi3518EV200 SDK遇到的问题
/bin/sh: /opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/bin/arm-hisiv300-linux-gcc: No such file or directory dirname: missing operand
解决办法:
$sudo apt-get install lib32z1
$sudo apt-get install lib32stdc++6-4.8-dbg
"mkimage" command not found - U-Boot images will not be built
解决办法:
$sudo apt-get install uboot-mkimage
更高的Linux版本使用u-boot-tools替代
$sudo apt-get install u-boot-tools
mtd-utils-1.5.0/lib/libmtd.c:444: undefined reference to `major'
解决办法:
$vi tools/pc/jffs2_tool/tmp/mtd-utils-1.5.0/include/common.h
$vi tools/pc/jffs2_tool/tmp/mtd-utils-1.5.0/rbtree.h
添加以下头文件:
#include <sys/sysmacros.h>
compr_zlib.c:39:10: fatal error: zlib.h: No such file or directory
解决办法:
$sudo apt-get install zlib1g-dev
mtd-utils-1.5.0/mkfs.jffs2.c:945: undefined reference to `major'
解决办法:
$vi tools/pc/jffs2_tool/tmp/mtd-utils-1.5.0/mkfs.jffs2.c
添加以下头文件:
#include <sys/sysmacros.h>
serve_image.c:32:18: error: storage size of ‘hints’ isn’t known
解决办法:
$vi /usr/include/netdb.h
然后注释
//#ifdef __USE_XOPEN2K
以及和它对应的
//#endif
mkfs.ubifs/devtable.c:277:36: error: called object ‘minor’ is not a function or function pointer
解决办法:
vi tools/pc/jffs2_tool/tmp/mtd-utils-1.5.0/mkfs.ubifs/devtable.c
添加以下头文件:
#include <sys/sysmacros.h>
mkfs.ubifs/hashtable/hashtable_itr.c:42:1: error: redefinition of ‘hashtable_iterator_key
解决办法:
$vi vi tools/pc/jffs2_tool/tmp/mtd-utils-1.5.0/mkfs.ubifs/hashtable/hashtable_itr.h
#if 0
extern inline void *
hashtable_iterator_key(struct hashtable_itr *i)
{
return i->e->k;
}
#else
void *hashtable_iterator_key(struct hashtable_itr *i);
#endif
#if 0
extern inline void *
hashtable_iterator_value(struct hashtable_itr *i)
{
return i->e->v;
}
#else
void *
hashtable_iterator_value(struct hashtable_itr *i);
#endif
configure: error: ncurses or ncursesw selected, but library not found (--without-ncurses to disable)
解决办法:
$sudo apt-get install libncurses5-dev libncursesw5-dev
tools/pc/cramfs_tool/tmp/util-linux-2.22-rc2/misc-utils/lslocks.c:223: undefined reference to `makedev'
解决办法:
$vi tools/pc/cramfs_tool/tmp/util-linux-2.22-rc2/misc-utils/lslocks.c
#include <sys/sysmacros.h>
mksquashfs.c:1354:24: error: called object ‘major’ is not a function or function pointer
解决办法:
$vi tools/pc/squashfs4.2/tmp/squashfs4.2/mksquashfs.c
#include <sys/sysmacros.h>
configure: error: C++ compiler cannot create executables
$sudo apt-get install g++