找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2108|回复: 4

新人不懂就问,编译报错是哪里的原因

[复制链接]
发表于 2020-3-3 12:16 | 显示全部楼层 |阅读模式
源码下载可以编译通过,在luci中自选应用后在编译就报错.什么原因.
[CC] src/gpsdclient.c
src/gpsdclient.c: In function 'nmeaInfoFromGpsd':
src/gpsdclient.c:291:101: warning: format '%f' expects argument of type 'double', but argument 12 has type 'timespec_t {aka struct timespec}' [-Wformat=]
         syslog(LOG_INFO, "Using %s device%s%s on %s in %s mode at %u baud (%u%c%u), refresh time %.3f (min. %.3f)", //
                                                                                                  ~~~^
src/gpsdclient.c:301:13:
             dev->cycle, //
             ~~~~~~~~~~                                                                              
src/gpsdclient.c:291:112: warning: format '%f' expects argument of type 'double', but argument 13 has type 'timespec_t {aka struct timespec}' [-Wformat=]
   syslog(LOG_INFO, "Using %s device%s%s on %s in %s mode at %u baud (%u%c%u), refresh time %.3f (min. %.3f)", //
                                                                                                       ~~~^
src/gpsdclient.c:302:13:
       dev->mincycle);
       ~~~~~~~~~~~~~                                                                                       
In file included from ../../lib/pud/nmealib/include/nmealib/info.h:21:0,
                 from src/gpsdclient.h:51,
                 from src/gpsdclient.c:46:
../../lib/pud/nmealib/include/nmealib/util.h:48:21: error: invalid operands to binary != (have 'timespec_t {aka struct timespec}' and 'timespec_t {aka struct timespec}')
#define isNaN(x) (x != x)
                     ^
src/gpsdclient.c:370:8: note: in expansion of macro 'isNaN'
   if (!isNaN(gpsdata->fix.time)) {
        ^~~~~
src/gpsdclient.c:372:33: error: incompatible type for argument 1 of 'fabs'
     double fraction = modf(fabs(gpsdata->fix.time), &seconds);
                                 ^~~~~~~
In file included from ../../lib/pud/wireformat/include/OlsrdPudWireFormat/wireFormat.h:57:0,
                 from src/configuration.h:59,
                 from src/gpsdclient.c:48:
/home/tl/openwrt_source_code/lede/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/include/math.h:203:13: note: expected 'double' but argument is of type 'timespec_t {aka struct timespec}'
double      fabs(double);
             ^~~~
src/gpsdclient.c:390:7: error: wrong type argument to unary exclamation mark
   if (!gpsdata->online) {
       ^
src/gpsdclient.c:457:29: error: 'struct gps_data_t' has no member named 'separation'; did you mean 'version'?
     info->height = gpsdata->separation;
                             ^~~~~~~~~~
                             version
src/gpsdclient.c: In function 'readFromGpsd':
src/gpsdclient.c:581:19: error: too few arguments to function 'gps_read'
     gpsReadCode = gps_read(gpsdata);
                   ^~~~~~~~
In file included from src/gpsdclient.h:49:0,
                 from src/gpsdclient.c:46:
/home/tl/openwrt_source_code/lede/staging_dir/target-x86_64_musl/usr/include/gps.h:2307:12: note: declared here
extern int gps_read(struct gps_data_t *, char *message, int message_len);
            ^~~~~~~~
../../Makefile.inc:351: recipe for target 'src/gpsdclient.o' failed
make[5]: *** [src/gpsdclient.o] Error 1
make[5]: Leaving directory '/home/tl/openwrt_source_code/lede/build_dir/target-x86_64_musl/olsrd-0.9.7/lib/pud'
Makefile:241: recipe for target 'libs' failed
make[4]: *** [libs] Error 2
make[4]: Leaving directory '/home/tl/openwrt_source_code/lede/build_dir/target-x86_64_musl/olsrd-0.9.7'
Makefile:293: recipe for target '/home/tl/openwrt_source_code/lede/build_dir/target-x86_64_musl/olsrd-0.9.7/.built' failed
make[3]: *** [/home/tl/openwrt_source_code/lede/build_dir/target-x86_64_musl/olsrd-0.9.7/.built] Error 2
make[3]: Leaving directory '/home/tl/openwrt_source_code/lede/feeds/routing/olsrd'
time: package/feeds/routing/olsrd/compile#0.17#0.37#0.68
package/Makefile:111: recipe for target 'package/feeds/routing/olsrd/compile' failed
make[2]: *** [package/feeds/routing/olsrd/compile] Error 2
make[2]: Leaving directory '/home/tl/openwrt_source_code/lede'
package/Makefile:107: recipe for target '/home/tl/openwrt_source_code/lede/staging_dir/target-x86_64_musl/stamp/.package_compile' failed
make[1]: *** [/home/tl/openwrt_source_code/lede/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/tl/openwrt_source_code/lede'
/home/tl/openwrt_source_code/lede/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2


我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2020-3-3 12:18 | 显示全部楼层
这个是gpsdclient.c好像是在olsrd-0.9.7里面的.找不到这个是属于哪个软件的.
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-3-3 19:19 | 显示全部楼层
找到一种确定位置的方法.用make menuconfig的搜索包名.symbol后面是[=y]表示选中了.下面的location是位置.在luci里面选上luci-app-olsr,会自动勾选network里面的这几选项,取消选择还需要手动关闭这几个选项.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-4-5 16:04 | 显示全部楼层
https://github.com/OLSR/olsrd/pull/79
这个pull修复了olsrd gps3.20 api变动
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-5-27 00:16 | 显示全部楼层
感谢分享,也多次出现此问题,尝试一下取消luci-app-olsr和network下的olsdr看看是否可行
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-18 13:58

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表