完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
本帖最后由 芯灵思FAE 于 2015-10-12 11:17 编辑
编译过程中的错误: 错误一: In file included from clean-temp.h:22:0, from clean-temp.c:23: ./stdio.h:456:1: error: 'gets' undeclared here (not in a function) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ^ /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/sinlinx/a31s/linux/lichee/buildroot/output/host/include -I/home/sinlinx/a31s/linux/lichee/buildroot/output/host/usr/include -MT freadahead.o -MD -MP -MF .deps/freadahead.Tpo -c -o freadahead.o freadahead.c /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/sinlinx/a31s/linux/lichee/buildroot/output/host/include -I/home/sinlinx/a31s/linux/lichee/buildroot/output/host/usr/include -MT freading.o -MD -MP -MF .deps/freading.Tpo -c -o freading.o freading.c mv -f .deps/dup-safer-flag.Tpo .deps/dup-safer-flag.Po /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/sinlinx/a31s/linux/lichee/buildroot/output/host/include -I/home/sinlinx/a31s/linux/lichee/buildroot/output/host/usr/include -MT gl_linkedhash_list.o -MD -MP -MF .deps/gl_linkedhash_list.Tpo -c -o gl_linkedhash_list.o gl_linkedhash_list.c In file included from freadahead.h:18:0, from freadahead.c:20: ./stdio.h:456:1: error: 'gets' undeclared here (not in a function) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ^ In file included from freading.h:18:0, from freading.c:20: ./stdio.h:456:1: error: 'gets' undeclared here (not in a function) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ^ make[4]: *** [freadahead.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[4]: *** [freading.o] Error 1 make[4]: *** [clean-temp.o] Error 1 mv -f .deps/fatal-signal.Tpo .deps/fatal-signal.Po mv -f .deps/gl_linkedhash_list.Tpo .deps/gl_linkedhash_list.Po make[4]: Leaving directory `/home/sinlinx/a31s/linux/lichee/buildroot/output/build/host-m4-1.4.15/lib' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/sinlinx/a31s/linux/lichee/buildroot/output/build/host-m4-1.4.15/lib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/sinlinx/a31s/linux/lichee/buildroot/output/build/host-m4-1.4.15' make[1]: *** [all] 閿欒 2 make[1]:姝e湪绂诲紑鐩綍 `/home/sinlinx/a31s/linux/lichee/buildroot/output/build/host-m4-1.4.15' make: *** [/home/sinlinx/a31s/linux/lichee/buildroot/output/build/host-m4-1.4.15/.stamp_built] 閿欒 2 解决方法:/home/sinlinx/a31s/linux/lichee/buildroot/output/build/host-m4-1.4.15/lib/stdio.h #if defined(__GLIBC__) &&!defined(__UCLIBC__) &&!__GLIBC_PREREQ(2, 16) _GL_WARN_ON_USE (gets, "gets is a security hole -use fgets instead"); #endif 错误二: error:must be after `@defmac' to use `@defmacx' 解决方法: @macro ovar{varname} @r{[}@var{varname}@r{]}@c @end macro @c @dvar(ARG, DEFAULT) @c ------------------- @c The ARG is an optional argument, defaulting to DEFAULT. To be used @c for macro arguments in their documentation (@defmac). @macro dvar{varname, default} @r{[}@var{varname} = @samp{default}@r{]}@c @end macro 将红色行最后边的@c去掉 打包过程中的错误: 错误一: cc -Wall -Werror -O2 /home/silinx/lichee/buildroot/output/build/host-makedevs/makedevs.c -o /home/silinx/lichee/buildroot/output/build/host-makedevs/makedevs /home/silinx/lichee/buildroot/output/build/host-makedevs/makedevs.c: In function ‘main’: /home/silinx/lichee/buildroot/output/build/host-makedevs/makedevs.c:374:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] int ret = EXIT_SUCCESS; ^ cc1: all warnings being treated as errors make: *** [/home/silinx/lichee/buildroot/output/build/host-makedevs/makedevs] Error 1 解决办法: 直接修改makedevs.c文件: 最后一行,return 0; 修改为:return ret; 源代码位置:./buildroot/package/makedevs/makedevs.c |
|
相关推荐 |
|
只有小组成员才能发言,加入小组>>
芯灵思SinlinxA33开发板Linux内核workqueue(附实测代码)
11864 浏览 0 评论
芯灵思SinlinxA33开发板Linux内核 tasklet 机制(附实测代码)
12521 浏览 0 评论
芯灵思Sinlinx A33开发板 Linux内核等待队列poll ---阻塞与非阻塞
34797 浏览 0 评论
芯灵思Sinlinx A33开发板Linux中断编程 3-应用程序
34728 浏览 0 评论
38813 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-4 00:59 , Processed in 0.595405 second(s), Total 49, Slave 37 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号