目录
  1. 1. 环境
  2. 2. 错误描述
  3. 3. 解决
全志A64编译固件报Fault

全志A64

环境

  • Ubuntu: Ubuntu 19.04
  • 固件: 全志CQA64-LinuxQT
  • arm交叉编译器:crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09
  • 时间:19-10-2019

错误描述

  • 1
    2
    3
    freadahead.c: In function 'freadahead':
    freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
    #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."

解决

  • 进入host-m4-1.4.18/lib中,对fflush.c,fpending.c,fpurge.c,freadahead.c,freading.c,fseeko.c中”_IO_ftrylockfile“ 替换为“_IO_EOF_SEEN”

  • 进入host-m4-1.4.18/lib中,对stdio-impl.h中添加

    1
    2
    3
    4
    5
    6
    +/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
    + problem by defining it ourselves. FIXME: Do not rely on glibc
    + internals. */
    +#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
    +# define _IO_IN_BACKUP 0x100
    +#endif

    参考Patch:m4.patch

文章作者: ZhaoH.T
文章链接: http://www.funful.ink/2019/10/19/2019-10-19-全志A64编译固件报Fault/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 FunfulBlog

评论