charleslfw

charleslfw

0个粉丝

2

问答

0

专栏

0

资料

charleslfw  发布于  2016-08-01 17:54:46
采纳率 0%
2个问答
19298

这个编译错误是什么引起的

 
CC      mkfs.ubifs/crc16.o
  CC      mkfs.ubifs/lpt.o
  CC      mkfs.ubifs/compr.o
  CC      mkfs.ubifs/devtable.o
  CC      mkfs.ubifs/hashtable/hashtable.o
  CC      mkfs.ubifs/hashtable/hashtable_itr.o
mkfs.ubifs/hashtable/hashtable_itr.c:42:1: error: redefinition of ‘hashtable_iterator_key’
hashtable_iterator_key(struct hashtable_itr *i)
^
In file included from mkfs.ubifs/hashtable/hashtable_itr.c:5:0:
mkfs.ubifs/hashtable/hashtable_itr.h:32:1: note: previous definition of ‘hashtable_iterator_key’ was here
hashtable_iterator_key(struct hashtable_itr *i)
^
mkfs.ubifs/hashtable/hashtable_itr.c:46:1: error: redefinition of ‘hashtable_iterator_value’
hashtable_iterator_value(struct hashtable_itr *i)
^
In file included from mkfs.ubifs/hashtable/hashtable_itr.c:5:0:
mkfs.ubifs/hashtable/hashtable_itr.h:41:1: note: previous definition of ‘hashtable_iterator_value’ was here
hashtable_iterator_value(struct hashtable_itr *i)
^
common.mk:82: recipe for target '/home/charles/Hixx/Hi3521A_SDK_V1.0.3.0/osdrv/tools/pc/jffs2_tool/tmp/mtd-utils-1.5.0/mkfs.ubifs/hashtable/hashtable_itr.o' failed
make[2]: *** [/home/charles/Hixx/Hi3521A_SDK_V1.0.3.0/osdrv/tools/pc/jffs2_tool/tmp/mtd-utils-1.5.0/mkfs.ubifs/hashtable/hashtable_itr.o] Error 1
make[2]: Leaving directory '/home/charles/Hixx/Hi3521A_SDK_V1.0.3.0/osdrv/tools/pc/jffs2_tool/tmp/mtd-utils-1.5.0'
Makefile:40: recipe for target '/home/charles/Hixx/Hi3521A_SDK_V1.0.3.0/osdrv/tools/pc/jffs2_tool/tmp/sbin/mkfs.jffs2' failed
make[1]: *** [/home/charles/Hixx/Hi3521A_SDK_V1.0.3.0/osdrv/tools/pc/jffs2_tool/tmp/sbin/mkfs.jffs2] Error 2
make[1]: Leaving directory '/home/charles/Hixx/Hi3521A_SDK_V1.0.3.0/osdrv/tools/pc/jffs2_tool'
Makefile:182: recipe for target 'hipctools' failed
make: *** [hipctools] Error 2
我来回答
回答18个
时间排序
认可量排序

ccjtech

0个粉丝

1

问答

0

专栏

0

资料

ccjtech 2017-01-02 11:56:28
认可0
serve_image.c: In function ‘main’:
serve_image.c:32:18: error: storage size of ‘hints’ isn’t known
  struct addrinfo hints;
                  ^
serve_image.c:94:19: error: ‘AI_ADDRCONFIG’ undeclared (first use in this functi         on)
  hints.ai_flags = AI_ADDRCONFIG;
                   ^
serve_image.c:94:19: note: each undeclared identifier is reported only once for          each function it appears in
serve_image.c:97:8: warning: implicit declaration of function ‘getaddrinfo’ [-Wi         mplicit-function-declaration]
  ret = getaddrinfo(argv[1], argv[2], &hints, &ai);
        ^
serve_image.c:99:40: warning: implicit declaration of function ‘gai_strerror’ [-         Wimplicit-function-declaration]
   fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(ret));
                                        ^
serve_image.c:99:19: warning: format ‘%s’ expects argument of type ‘char *’, but          argument 3 has type ‘int’ [-Wformat=]
   fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(ret));
                   ^
serve_image.c:103:35: error: dereferencing pointer to incomplete type ‘struct ad         drinfo’
  for (runp = ai; runp; runp = runp->ai_next) {
                                   ^
common.mk:82: recipe for target '/home/ccj/share/Hi3519V101_SDK_V1.0.0.1/osdrv/t         ools/pc/jffs2_tool/tmp/mtd-utils-1.5.0/serve_image.o' failed
make[2]: *** [/home/ccj/share/Hi3519V101_SDK_V1.0.0.1/osdrv/tools/pc/jffs2_tool/         tmp/mtd-utils-1.5.0/serve_image.o] Error 1
make[2]: Leaving directory '/home/ccj/share/Hi3519V101_SDK_V1.0.0.1/osdrv/tools/         pc/jffs2_tool/tmp/mtd-utils-1.5.0'
Makefile:40: recipe for target '/home/ccj/share/Hi3519V101_SDK_V1.0.0.1/osdrv/to         ols/pc/jffs2_tool/tmp/sbin/mkfs.jffs2' failed
make[1]: *** [/home/ccj/share/Hi3519V101_SDK_V1.0.0.1/osdrv/tools/pc/jffs2_tool/         tmp/sbin/mkfs.jffs2] Error 2
make[1]: Leaving directory '/home/ccj/share/Hi3519V101_SDK_V1.0.0.1/osdrv/tools/         pc/jffs2_tool'
Makefile:189: recipe for target 'hipctools' failed
make: *** [hipctools] Error 2

lianfan

0个粉丝

0

问答

0

专栏

0

资料

lianfan 2017-02-12 15:27:09
认可0
楼上两位,这个问题解决了吗?我也碰到了,有知道怎么回事吗?

laocheng

1个粉丝

14

问答

0

专栏

0

资料

laocheng 2017-02-12 19:40:06
认可0
持续关注,我也是遇见到这个错误。

laocheng

1个粉丝

14

问答

0

专栏

0

资料

laocheng 2017-02-13 10:44:03
认可0
嗯,我已经解决问题了。这个工具可以跳过。
1.你先将osdrv/Makefile中的jffs2_tool部分注释(不再编译sdk提供的源码包)
2.然后自己从源上下载mkfs.jffs2(apt-get install mtd-utils)
3.并且将执行文件放到pub/pc目录下。
4.然后你再重新在osdrv/下编译(注意clean掉之前发生错误部分,不需要全部clean,选择hipctools_clean)

ssss樱

0个粉丝

3

问答

0

专栏

0

资料

ssss樱 2017-02-14 19:29:39
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=44919&ptid=12147]lianfan 发表于 2017-2-12 15:27[/url]
楼上两位,这个问题解决了吗?我也碰到了,有知道怎么回事吗?[/quote]

哈哈我们头像一样的

小雨点

0个粉丝

0

问答

0

专栏

0

资料

小雨点 2017-02-15 12:44:53
认可0
新人,请多多关照。

cyyljw

0个粉丝

0

问答

0

专栏

0

资料

cyyljw 2017-05-08 18:34:53
认可0
我也出错了

rupert

0个粉丝

1

问答

0

专栏

0

资料

rupert 2017-05-29 01:20:14
认可0

我也出错了

caiccbuchiyao

0个粉丝

7

问答

0

专栏

0

资料

caiccbuchiyao 2017-06-23 11:46:07
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=43601&ptid=12147]ccjtech 发表于 2017-1-2 11:56[/url]
serve_image.c: In function ‘main’:
serve_image.c:32:18: error: storage size of ‘hints’ isn’t k ...[/quote]

这个是什么问题呀

hero

0个粉丝

1

问答

0

专栏

0

资料

hero 2017-06-30 14:02:14
认可0
:)                        

平凡人

0个粉丝

0

问答

0

专栏

0

资料

平凡人 2017-07-05 13:27:44
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=43601&ptid=12147]ccjtech 发表于 2017-1-2 11:56[/url]
serve_image.c: In function ‘main’:
serve_image.c:32:18: error: storage size of ‘hints’ isn’t k ...[/quote]

我在osdrv目录编译时,我也遇到您的问题了,请问您解决了吗?这是由于什么原因呢?

羽落

0个粉丝

3

问答

0

专栏

0

资料

羽落 2017-07-11 19:57:40
认可0
就没人 解决吗

ebnehj

0个粉丝

13

问答

0

专栏

0

资料

ebnehj 2017-08-02 19:49:43
认可0
解决方法:
gedit /usr/include/netdb.h
修改#ifdef __USE_XOPEN2K
改为//#ifdef __USE_XOPEN2K
保存编译即可。
原因:新版本系统头文件更新了,多了这个宏,去掉该宏限制即可。
官方的sdk是用旧版本系统编译的,系统内头文件不一样,所以报错。

asd8688

0个粉丝

0

问答

0

专栏

0

资料

asd8688 2017-08-07 11:44:34
认可0
我也出错了

murmur宝宝

0个粉丝

1

问答

0

专栏

0

资料

murmur宝宝 2017-09-28 17:05:26
认可0
有人解决了吗 我也出错了

murmur宝宝

0个粉丝

1

问答

0

专栏

0

资料

murmur宝宝 2017-09-28 17:08:36
认可0
有没有大神解决过的,求帮助:$
make[1]: Leaving directory `/home/win/hisivSDK/Hi3519_SDK_V1.0.3.0/osdrv/opensource/busybox/busybox-1.20.2'
cp -af /home/win/hisivSDK/Hi3519_SDK_V1.0.3.0/osdrv/opensource/busybox/busybox-1.20.2/_install/* /home/win/hisivSDK/Hi3519_SDK_V1.0.3.0/osdrv/pub/rootfs_uclibc_big-little
---------task [6] build tools which run on pc
make -C /home/win/hisivSDK/Hi3519_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image/
make[1]: Entering directory `/home/win/hisivSDK/Hi3519_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image'
cd /home/win/hisivSDK/Hi3519_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image/mkyaffs2image && \
                make && \
        cd -
make[2]: Entering directory `/home/win/hisivSDK/Hi3519_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image/mkyaffs2image'
gcc -o mkyaffs2image100 mkyaffs2image.o yaffs_ecc.o yaffs_packedtags2.o yaffs_tagsvalidity.o oob_config_v100.o -static
/usr/bin/ld: cannot find -lc
collect2: ld 返回 1
make[2]: *** [mkyaffs2image100] 错误 1
make[2]: Leaving directory `/home/win/hisivSDK/Hi3519_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image/mkyaffs2image'
make[1]: *** [all] 错误 2
make[1]: Leaving directory `/home/win/hisivSDK/Hi3519_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image'
make: *** [hipctools] 错误 2

qn1512548967

0个粉丝

0

问答

0

专栏

0

资料

qn1512548967 2017-12-06 16:38:02
认可0
用的楼上的方法解决了,我先下了个mtd-utils-1.5.2版本的,然后自行解压编译,最后得到了一系列的可执行文件。在osdrv的Makefile里,我把hipctools里面的jffs2部分都注释掉了,然后先make hipctools,编译完后,照着被注释掉地方的cp路径,把我自己编译好的可执行文件按它的路径放到相应的地方(基本上都在自己编译成功的里面可以找到,但是有个ubi.cfg文件我是在/osdrvtools/pc/ubifs_config里找到的)。放进去后,再进行全局编译make all,目前成功了,生成的镜像文件也都有。

ipcore

0个粉丝

0

问答

0

专栏

0

资料

ipcore 2018-01-10 14:46:18
认可0
下载mtd-utils-1.5.2.tar.bz2,替换osdrv\tools\pc\jffs2_tool目录下的mtd-utils-1.5.0.tar.bz2
同时修改该目录下的Makefile
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区