美文网首页
'编译器版本问题'

'编译器版本问题'

作者: 贵族_4e67 | 来源:发表于2018-03-07 10:28 被阅读0次

    今天在交叉编译 fuse-3.1.1源码的时候遇到了这样的问题

    passthrough_ll.c: In function 'lo_getattr':
    passthrough_ll.c:138: error: 'AT_EMPTY_PATH' undeclared (first use in this function)
    passthrough_ll.c:138: error: (Each undeclared identifier is reported only once
    passthrough_ll.c:138: error: for each function it appears in.)
    passthrough_ll.c: In function 'lo_do_lookup':
    passthrough_ll.c:168: error: 'O_PATH' undeclared (first use in this function)
    passthrough_ll.c:172: error: 'AT_EMPTY_PATH' undeclared (first use in this function)
    
    

    可以看到问题产生的原因是因为这几个宏定义没有找到。但是如果使用Ubuntu自带的i386编译器则没有问题。问题产生的原因在于使用的编译器是一个很古老的arm-2009q3,但是使用的fuse源码却是最新的。经过查阅发现AT_EMPTY_PATH was introduced in v2.6.39, and systemd, including all its components, currently depends on >= v3.7.Reference就是说自己的编译器已经太古老了。所以要更新编译器。
    自己使用的是arm-none-linux-gnueabi-gcc

    相关文章

      网友评论

          本文标题:'编译器版本问题'

          本文链接:https://www.haomeiwen.com/subject/ktihfftx.html