docker pull ubuntu:20.04
docker run -v <> --name bsc ubuntu:20.04 /bin/bash
在docker中运行以下script
export DEBIAN_FRONTEND=noninteractive
apt-get install update
apt-get install upgrade -y
apt-get install ghc -y
apt-get install -y libghc-regex-compat-dev
apt-get install -y libghc-syb-dev
apt-get install -y libghc-old-time-dev
apt-get install -y libghc-split-dev
apt-get install -y ghc-prof
apt-get install -y libghc-regex-compat-prof
apt-get install -y libghc-syb-prof
apt-get install -y libghc-old-time-prof
apt-get install -y libghc-split-prof
apt-get install -y tcl-dev
apt-get install -y build-essential
apt-get install -y pkg-config
apt-get install -y autoconf
apt-get install -y gperf
apt-get install -y flex
apt-get install -y bison
apt-get install -y iverilog
git clone https://github.com/B-Lang-org/bsc.git
git submodule update --init --recursive
make install-src
sed -i '$a export PATH=/home/linbai/bsc/inst/bin:$PATH' ~/.bashrc
sed -i '$a export LIBRARY_PATH=/home/linbai/bsc/inst/lib:$LIBRARY_PATH' ~/.bashrc
source ~/.bashrc
make check-smoke
参考:
[1] GitHub # bsc # Compiling BSC from source
[2] GitHub # BSV_Tutorial_cn # 3.1 安装 bsc 编译器