OpenXiangShan / xs-env

XiangShan Frontend Develop Environment
https://xiangshan-doc.readthedocs.io/zh_CN/latest/tools/xsenv/
Other
44 stars 47 forks source link

ubuntu20.04执行xs-env.sh脚本失败 #13

Closed MapleLeafFall closed 2 years ago

MapleLeafFall commented 2 years ago

嗨all, 我按照OpenXiangshang/xs-env的说明,已把完整代码clone下来。 现在根据readme的步骤执行编译脚本,卡在这个位置。 Github上issue没找到相关说明…… 想问下:这里对应哪个脚本的命令,在下载什么文件?如果能看到明文链接的话是不是可以通过手动下载来跳过? 环境信息:虚拟机运行ubuntu20.04/64bit,30G内存,30G磁盘

cwq@ubuntu:~/1_xiangshan/xs-env$ source setup.sh
SPECIALIZE_TYPE=RISCV SOFTFLOAT_OPTS="-DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -fPIC" make -s -C /home/cwq/1_xiangshan/xs-env/NEMU/resource/softfloat/repo/build/Linux-x86_64-GCC all
mkdir -p resource/softfloat/build
ln -sf /home/cwq/1_xiangshan/xs-env/NEMU/resource/softfloat/repo/build/Linux-x86_64-GCC/softfloat.a resource/softfloat/build/softfloat.a
+ LD /home/cwq/1_xiangshan/xs-env/NEMU/build/riscv64-nemu-interpreter-so
# Building coremark [riscv64-xs] with AM_HOME {/home/cwq/1_xiangshan/xs-env/nexus-am}
# Building lib-am [riscv64-xs]
+ AS src/nemu/common/mainargs.S
+ AR -> build/am-riscv64-xs.a
# Building lib-klib [riscv64-xs]
# Creating binary image [riscv64-xs]
+ LD -> build/coremark-riscv64-xs.elf
+ OBJCOPY -> build/coremark-riscv64-xs.bin
git submodule update --init
make: 对“verilog”无需做任何事。
Makefile:50: begin...
Makefile:52: finish...
mkdir -p build
mill chiselModule.test.runMain top.TopMain -td build --output-file SimTop.v BOARD=sim CORE=inorder 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:02:15 --:--:--     0
curl: (52) Empty reply from server
make: *** [Makefile:51:build/SimTop.v] 错误 52

(另:不确定mill是否安装成功,不知道会不会和它有关?因为执行ll /use/local/bin/mill的确有输出,但执行mill --version/mill -v/mill -V等命令都看不到它的版本号)

AugustusWillisWang commented 2 years ago

从这些现象看来是 mill 的安装问题。

mill 安装成功后 mill --version 应当会显示版本信息。实际上

https://github.com/OpenXiangShan/xs-env/blob/7cc55ad977ec2f6d282d82d9296f1d72fcb38021/setup-tools.sh#L6

这一步下载的是 mill 的官方安装脚本。可以使用文本编辑工具查看这个脚本的内容。这个脚本会在 mill 没有安装时安装 mill,若 mill 已经成功安装则启动 mill。你给出的报错信息显示这个脚本的执行卡住了。

mill 的安装需要从 github 下载文件,可以尝试在运行之前调整好自己的网络环境。

如果有关于 mill 使用的更多问题,建议去阅读 mill 的官方文档。

MapleLeafFall commented 2 years ago

已解决,谢谢提醒。 问题在于curl下载mill卡住,和git clone下载不了代码一样原因:需要配置vpn才能下载。 我的解决方法: ubuntu设置全局vpn,在命令行设置环境变量(指定代理,具体值由vpn设置确定): export http_proxy=http://127.0.0.1:7890 export https_proxy=https://127.0.0.1:7890 再次执行即可。