Closed duchao713 closed 3 years ago
Which Ubuntu? 14.04, 16.04, 18.04, 20.04, or a different one?
You didn't show the actual build error. The error messages are in the log files. Look for an error in the file obj/x86_64-linux-ubuntu14/build/riscv-gnu-toolchain/build-gdb-py-newlib//make-build.log for instance. And keep in mind that the first error is the most important one. The rest are likely cascading errors.
We have precompiled packages on our web site. Using one of those is easier than trying to build it.
Thanks Jim for reply.
I have realized the cause and solved it by the following command: apt-get install python3.7-dev
I just followed the README.md to build the tools on Ubuntu.
$ sudo apt-get install cmake autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf patchutils bc zlib1g-dev libexpat-dev libtool pkg-config mingw-w64 mingw-w64-tools texlive zip python-dev gettext libglib2.0-dev libpixman-1-dev swig ninja-build python3 $ sudo pip3 install meson $ git clone git@github.com:sifive/freedom-tools.git $ cd freedom-tools $ git submodule update --init --recursive $ make -j16
But some make error was seen
make -C obj/x86_64-linux-ubuntu14/build/riscv-gnu-toolchain/build-gdb-py-newlib/ &>obj/x86_64-linux-ubuntu14/build/riscv-gnu-toolchain/build-gdb-py-newlib//make-build.log Makefile:488: recipe for target 'obj/x86_64-linux-ubuntu14/build/riscv-gnu-toolchain/build-gdb-py-newlib/stamp' failed make: [obj/x86_64-linux-ubuntu14/build/riscv-gnu-toolchain/build-gdb-py-newlib/stamp] Error 2 make: Waiting for unfinished jobs....make -C obj/x86_64-w64-mingw32/build/riscv-gnu-toolchain/build-gdb-py-newlib/ -j1 install install-pdf install-html &>obj/x86_64-w64-mingw32/build/riscv-gnu-toolchain/build-gdb-py-newlib//make-install.log Makefile:521: recipe for target 'obj/x86_64-w64-mingw32/build/riscv-gnu-toolchain/build-gcc-newlib-stage1/stamp' failed make: [obj/x86_64-w64-mingw32/build/riscv-gnu-toolchain/build-gcc-newlib-stage1/stamp] Error 2 Makefile:521: recipe for target 'obj/x86_64-linux-ubuntu14/build/riscv-gnu-toolchain/build-gcc-newlib-stage1/stamp' failed make: [obj/x86_64-linux-ubuntu14/build/riscv-gnu-toolchain/build-gcc-newlib-stage1/stamp] Error 2 date > obj/x86_64-w64-mingw32/build/riscv-gnu-toolchain/build-gdb-py-newlib/stamp
Could you please help ?