sifive의freedom-u-sdk 컴파일

sifive의freedom-u-sdk 컴파일

  • 문제1: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."
  • 해결 1:
  • 문제2:fatal error:openssl/bio.h: No such file or directory
  • 해결 2:
  • 참조 글
  • sdk , linux ( :Ubuntu 20.04 LTS), ,

    문제1: 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."

    freadahead.c: In function 'freadahead':
    rm -f t-charset.alias charset.alias && \
    /bin/bash ./config.charset 'x86_64-pc-linux-gnu' > t-charset.alias && \
    mv t-charset.alias charset.alias
    freadahead.c:91: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."
       91 |  #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."
          |   ^~~~~
    fseeko.c: In function 'rpl_fseeko':
    make[7]: *** [Makefile:1842: freadahead.o] Error 1
    make[7]: *** Waiting for unfinished jobs....
    fseeko.c:109:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
      109 |   #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
          |    ^~~~~
    make[7]: *** [Makefile:1842: fseeko.o] Error 1
    make[6]: *** [Makefile:1602: all] Error 2
    make[5]: *** [Makefile:1506: all-recursive] Error 1
    make[4]: *** [Makefile:1461: all] Error 2
    make[3]: *** [package/pkg-generic.mk:198: /home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/work/buildroot_initramfs/build/host-m4-1.4.17/.stamp_built] Error 2
    make[2]: *** [Makefile:36: _all] Error 2
    make[2]: Leaving directory '/home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/buildroot'
    make[1]: *** [Makefile:115: /home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/work/buildroot_initramfs/images/rootfs.tar] Error 2
    make[1]: Leaving directory '/home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk'
    make: *** [Makefile:312: Image] Error 2
    

    해결 1:

    // 
    $ cd /home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/work/buildroot_initramfs/build/host-m4-1.4.17
    $ sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
    $ echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
    

    문제2: fatal error: openssl/bio.h: No such file or directory

    /home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/linux/scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory
       21 | #include 
          |          ^~~~~~~~~~~~~~~
    compilation terminated.
    make[4]: *** [scripts/Makefile.host:90: scripts/extract-cert] Error 1
    make[4]: *** Waiting for unfinished jobs....
      SHIPPED scripts/dtc/dtc-parser.tab.c
      HOSTCC  scripts/dtc/dtc-lexer.lex.o
      HOSTCC  scripts/dtc/dtc-parser.tab.o
      CHK     scripts/mod/devicetable-offsets.h
      UPD     scripts/mod/devicetable-offsets.h
      MKELF   scripts/mod/elfconfig.h
      HOSTCC  scripts/mod/modpost.o
      HOSTCC  scripts/mod/file2alias.o
      HOSTCC  scripts/mod/sumversion.o
      UPD     include/config/kernel.release
      Using /home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/linux as source for kernel
      CHK     include/generated/utsrelease.h
      UPD     include/generated/utsrelease.h
      CC      kernel/bounds.s
      CHK     include/generated/timeconst.h
      UPD     include/generated/timeconst.h
      CHK     include/generated/bounds.h
      UPD     include/generated/bounds.h
      CC      arch/riscv/kernel/asm-offsets.s
      HOSTLD  scripts/dtc/dtc
      CHK     include/generated/asm-offsets.h
      UPD     include/generated/asm-offsets.h
      CALL    /home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/linux/scripts/checksyscalls.sh
      HOSTLD  scripts/mod/modpost
    make[3]: *** [/home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/linux/Makefile:556: scripts] Error 2
    make[3]: Leaving directory '/home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/work/linux'
    make[2]: *** [Makefile:146: sub-make] Error 2
    make[2]: Leaving directory '/home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/linux'
    make[1]: *** [Makefile:164: /home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk/work/linux/vmlinux] Error 2
    make[1]: Leaving directory '/home/imaginemiracle/Miracle/Linux_Workspace/riscv-object/freedom-u-sdk'
    make: *** [Makefile:312: Image] Error 2
    

    해결 2:


    이것 또는fatal 오류가 발생했습니다: openssl/명단.h: No such file or directory.모두libssl-devlibssl-dev는libraries,header files and manpages를 포함하고 있지 않습니다. 그는openssl의 일부분입니다. openssl은 ssl을 실현했습니다.
    $ sudo apt-get install libssl-dev
    

    참고문


    [1].https://blog.csdn.net/zmlovelx/article/details/104200565 [2].https://blog.csdn.net/qq_41533289/article/details/82985788

    좋은 웹페이지 즐겨찾기