在其它电脑搭建编译该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 <openssl/bio.h>
| ^~~~~~~~~~~~~~~
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 error: openssl/名单.h: No such file or directory。都是没有安装libssl-dev

libssl-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

编译sifive的freedom-u-sdk的更多相关文章

  1. Windows下编译使用Aliyun OSS PHP SDK

    摘要: WIN环境下搭建Aliyun OSS PHP SDK编译运行环境.从PHP的安装逐步完成,SDK的编译运行.即使没有任何PHP基础,也能顺利完成. 安装环境:Win7 64 + PHP 5.6 ...

  2. eclipse 编译的时候 自动把SDK需要放入libs里面的so文件给删除了

    解决方法: 右击Project,选Properties->Builders, 把CDT Builder 关掉. 这样就不会编译了.包括c++的代码也不会编译.. 治标不治本啊...以后c++代码 ...

  3. Qt5.3.2 在MAC yosemite下编译出错 Could not resolve SDK path

    把Qt目录下面Users/Qt5.3.2/5.3/clang_64/mkspecs/qdevice.pri文件中的!host_build:QMAKE_MAC_SDK = macosx10.8改为!ho ...

  4. Win7+VS2005编译Qt4.7.3+phonon(需要安装新版本Windows SDK)

    Qt官网上下载的源代码在编译时并没有将phonon继承进去,只提供了源代码,而在Win7+VS2005中编译phonon时遇到不少的问题,因为phonon只是一个前端程序,要使用其实现多媒体的播放还需 ...

  5. esp8266 SDK开发之编译流程

    最近刚完成自己8266的小项目,已经发布在github上,有兴趣的朋友可以看一下 github地址:esp-ujn 1. 通过MQTT协议与服务器交互 2. 内置HTTP服务器,支持通过浏览器进行参数 ...

  6. 全志H3-NanoPi开发板SDK之三编译流程【转】

    本文转载自:https://blog.csdn.net/yuesichiu/article/details/77600124 版权声明:本文为博主(宽简厚重,Yuesichiu)原创文章,未经博主允许 ...

  7. iOS开发之App间账号共享与SDK封装

    上篇博客<iOS逆向工程之KeyChain与Snoop-it>中已经提到了,App间的数据共享可以使用KeyChian来实现.本篇博客就实战一下呢.开门见山,本篇博客会封装一个登录用的SD ...

  8. 手机游戏渠道SDK接入工具项目分享(三)拨开云雾是个坑

    一直在纠结是先写框架设计还是先写掉过的坑,最后本这娱乐大众的态度先写掉过的坑让大家乐呵下. 项目开发过程中遇问题无数,回顾下8个大坑照成了项目一定程度上延期甚至返工. 项目一开始几个人把现有3家主流的 ...

  9. SDK的制作详解

    一个简单的SDK制作是很容易的,复杂的sdk其实就和复杂化的应用一样,都是从简单开始的,这里介绍一下sdk的简单制作 步骤: 1.创建sdk,公开文件 2.编译.获取sdk文件 3.导入工程,配置文件 ...

随机推荐

  1. thinkphp操作phpexcel问题

    一.thinkphp引入PHPExcel到/Thinkphp/Library/Vendor/ 二.在控制器中引用 public function get_detail() { Vendor(" ...

  2. TransactionHelper

    public class TransactionHelper { public static OracleTransaction ora_Transaction = null; public stat ...

  3. 送你一份Redis书单,以后使用缓存的问题不用再问我啦!

    点击蓝色"程序员书单"关注我哟 加个"星标",每天带你读好书!

  4. 05_CSS入门和高级技巧(3)

    上节课复习 !important不能影响就近原则,远的标签如果加上!important也干不过近的标签! !important不能影响继承权重是0,通过继承的标签加上!important也干不过直接选 ...

  5. go多种uuid生成方式

    package main import ( "fmt" "github.com/chilts/sid" "github.com/kjk/betterg ...

  6. layui select下拉菜单联动

    做的比较简单,先从后台直接把第一级菜单输出,然后点击二级菜单的时候再动态展示 <div class="layui-inline"> <label class=&q ...

  7. springmvc 校验---spring校验

    springmvc提供了灵活的可拓展的校验方式,根据不同的项目可选择适合的校验方式,首先介绍下springmvc中内置的校验实现方式! 1.实现 org.springframework.validat ...

  8. 3、get请求(url详解)

    前言 上一篇介绍了Composer的功能,可以模拟get和post请求,get请求有些是不带参数的,这种比较容易,直接放到url地址栏就行.有些get请求会带有参数,本篇详细介绍url地址格式. 一. ...

  9. PAT 1006 Sign In and Sign Out (25分) 字符串比较

    题目 At the beginning of every day, the first person who signs in the computer room will unlock the do ...

  10. Android平台使用termux,随时随地写代码

    生活如此无聊,写点代码打发时间. 趁着假期,我的vivo手机和华为平板(均为4G+64G配置)用的也比较少.于是,思考着如何将这2个设备用来写latex.python.用kingroot却取不了两设备 ...