C compiler cannot create executables 这个错误应该怎么排错 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
lytofb
V2EX    程序员

C compiler cannot create executables 这个错误应该怎么排错

  •  
  •   lytofb 2016-07-09 10:35:55 +08:00 10041 次点击
    这是一个创建于 3388 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近想在群晖 216play 上安装一下 aria2 ,但是在安装完 bootstrap , ipkg 之后,启动 aria2 的时候出现了如下错误

    Exception: [AbstractOptionHandler.cc:73] errorCode=28 We encountered a problem while processing the option '--seed-ratio'. -> [OptionHandlerImpl.cc:254] errorCode=1 seed-ratio must be greater than or equal to 0.0. 

    折腾了半天也没有什么结果,于是乎我又想试试源码编译。结果刚 configure 的时候就遇上了这个错误

    configure: error: C compiler cannot create executables See `config.log' for more details 

    在 config.log 里面是这样的

    #define PACKAGE_NAME "aria2" #define PACKAGE_TARNAME "aria2" #define PACKAGE_VERSION "1.19.0" #define PACKAGE_STRING "aria2 1.19.0" #define PACKAGE_BUGREPORT "https://github.com/tatsuhiro-t/aria2/issues" #define PACKAGE_URL "http://aria2.sourceforge.net/" #define PACKAGE "aria2" #define VERSION "1.19.0" configure: exit 77 

    后来 google 了一顿发现我就蒙了,感觉 cannot create executables 这个错误有好多种原因,我以前没太接触过 c 的编译,也就是知道 arm 和 x86 的程度,完全不知道该怎么玩了,还求大伙指点一下

    第 1 条附言    2016-07-09 15:32:32 +08:00

    后来重新看了一下日志,发现如下错误

    在 Core tests 里面有这样的错误: /opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: ERROR: /lib/libc.so.6 uses VFP register arguments, a.out does not /opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: failed to merge target specific data of file /lib/libc.so.6 
    14 条回复    2016-11-09 16:18:04 +08:00
    nyanyh
        1
    nyanyh  
       2016-07-09 11:02:36 +08:00
    这个 log 是不是不完整啊
    lsmgeb89
        2
    lsmgeb89  
       2016-07-09 11:03:39 +08:00
    查下有没有写目录的权限
    lytofb
        3
    lytofb  
    OP
       2016-07-09 11:23:05 +08:00
    @nyanyh 这个是 config.log 的日志的最后几行,前面的部分也没有报错,不过记录的都是 Platform , Core tests , Cache Variable , Output variables 等类似参数,直到正文里的 log 最后这是 confdefs 部分
    nyanyh
        4
    nyanyh  
       2016-07-09 11:28:16 +08:00   1
    r#3 @lytofb 以前我也遇到过这个错误,但是在 log 里有../gcc-4.6.2/configure: line 4190: -gcc: command not found 这种错误,建议再找一下吧
    lytofb
        5
    lytofb  
    OP
       2016-07-09 11:32:10 +08:00
    @nyanyh 恩,找了一下,确实在 Core tests 里面有这样的错误:
    /opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: ERROR: /lib/libc.so.6 uses VFP register arguments, a.out does not
    /opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: failed to merge target specific data of file /lib/libc.so.6
    单独试了一下用 gcc 编译个 hello world 也出这样的错,看来和 VFP 有关系
    Archangel_SDY
        6
    Archangel_SDY  
       2016-07-09 11:41:19 +08:00
    这不是写得很清楚了么....

    seed-ratio must be greater than or equal to 0.0.
    lytofb
        7
    lytofb  
    OP
       2016-07-09 12:46:02 +08:00
    @Archangel_SDY 问题是这个参数默认就是 1.0 啊,而且即使指定了也会报同样的错
    owt5008137
        8
    owt5008137  
       2016-07-09 14:32:51 +08:00
    config.log 你没贴关键的信息,搜一下里面的 error ,然后找到最后出错的位置附近的 log 。只贴最后一部分没用啊
    RecursiveG
        9
    RecursiveG  
       2016-07-09 16:54:52 +08:00
    lytofb
        10
    lytofb  
    OP
       2016-07-09 18:32:39 +08:00
    @RecursiveG 谢谢,这个我也看了,但是说实话这方面基础不好看不太懂说的啥

    问题也解决了,群晖 216play 可以使用 pbhub 上的 bootstrap installer 来安装 bootstrap ,我就是通过这个第三方套件重新安装了 bootstrap 解决了最根本的 aria2 报错问题,同时 c 的编译也正常了,看来所有问题的起因都是安装了错误的 bootstrap 导致的
    dishonest
        11
    dishonest  
       2016-11-09 14:30:07 +08:00
    @lytofb 请问下具体怎么操作吗,我的也是 216play
    lytofb
        12
    lytofb  
    OP
       2016-11-09 14:36:02 +08:00
    @dishonest 看 10 楼,里面讲的挺清楚的。比较傻瓜的解决办法就是用群晖的应用商店里的 bootstrap installer 来安装对应的 bootstrap 即可
    dishonest
        13
    dishonest  
       2016-11-09 16:12:29 +08:00
    @lytofb 找到了,这个源叫做 cphub =.=b 您写错了。。
    lytofb
        14
    lytofb  
    OP
       2016-11-09 16:18:04 +08:00
    @dishonest 哈哈,不好意思哈,应该是 cphub
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     880 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 25ms UTC 20:21 PVG 04:21 LAX 13:21 JFK 16:21
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86