This topic contains 2 replies, has 3 voices, and was last updated by Jason_Yu 4 years, 1 month ago.
-
AuthorPosts
-
January 22, 2019 at 4:36 pm #337
Has anybody successfully setup the toolchain on a mac computer?
I am following the steps as discussed in the document:
git clone –recursive https://github.com/pulp-platform/pulp-riscv-gnu-toolchain
cd pulp-riscv-gnu-toolchain
./configure –prefix=/opt/riscv –with-arch=rv32imc –with-cmodel=medlow –enable-
multilib
makeHowever, I am getting error messages during make that it eventually errors out:
==
/Users/jinsongzhang/Documents/Algodone/VEGA/rv32m1_sdk_riscv/pulp-riscv-gnu-toolchain/riscv-gcc/gcc/vec.h:1058:10: warning: offset of on non-POD type
‘vec_embedded’ (aka ‘vec<std::__1::pair<gphi *, gphi *>, va_heap, vl_embed>’) [-Winvalid-offsetof]
return offsetof (vec_embedded, m_vecdata) + alloc * sizeof (T);
^ ~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/stddef.h:120:24: note: expanded from macro ‘offsetof’
#define offsetof(t, d) __builtin_offsetof(t, d)
^ ~
/Users/jinsongzhang/Documents/Algodone/VEGA/rv32m1_sdk_riscv/pulp-riscv-gnu-toolchain/riscv-gcc/gcc/vec.h:286:44: note: in instantiation of member
function ‘vec<std::__1::pair<gphi *, gphi *>, va_heap, vl_embed>::embedded_size’ requested here
size_t size = vec<T, va_heap, vl_embed>::embedded_size (alloc);
^
/Users/jinsongzhang/Documents/Algodone/VEGA/rv32m1_sdk_riscv/pulp-riscv-gnu-toolchain/riscv-gcc/gcc/vec.h:1445:12: note: in instantiation of function
template specialization ‘va_heap::reserve<std::__1::pair<gphi *, gphi *> >’ requested here
va_heap::reserve (m_vec, nelems, exact PASS_MEM_STAT);
^
/Users/jinsongzhang/Documents/Algodone/VEGA/rv32m1_sdk_riscv/pulp-riscv-gnu-toolchain/riscv-gcc/gcc/vec.h:1554:3: note: in instantiation of member
function ‘vec<std::__1::pair<gphi *, gphi *>, va_heap, vl_ptr>::reserve’ requested here
reserve (1, false PASS_MEM_STAT);
^
/Users/jinsongzhang/Documents/Algodone/VEGA/rv32m1_sdk_riscv/pulp-riscv-gnu-toolchain/riscv-gcc/gcc/graphite-isl-ast-to-gimple.c:1859:28: note: in
instantiation of member function ‘vec<std::__1::pair<gphi *, gphi *>, va_heap, vl_ptr>::safe_push’ requested here
region->incomplete_phis.safe_push (std::make_pair (old_phi, new_phi));
^
25 warnings and 11 errors generated.
make[2]: *** [graphite-isl-ast-to-gimple.o] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [stamps/build-gcc-newlib-stage1] Error 2
==I also tried adding the patch as described here:
https://github.com/open-isa-rv32m1/rv32m1_sdk_riscv
This does not help either. Please let me know how I can move forward.
Thanks,
JinJanuary 25, 2019 at 7:06 am #347Hi Jin,
Follow the below steps:
1. Dependency preparation
brew install gawk gnu-sed gmp mpfr libmpc isl zlib
2. Build the PULP GNU toolchain To support RV32M1, some patches are applied to the PULP GNU toolchain
# clone pulp-riscv-gnu-toolchain git clone --recursive https://github.com/pulp-platform/pulp-riscv-gnu-toolchain # clone RV32M1 GNU toolchain patch git clone https://github.com/open-isa-rv32m1/rv32m1_gnu_toolchain_patch.git # Copy and apply the patch cp rv32m1_gnu_toolchain_patch/apply_rv32m1_patches.sh pulp-riscv-gnu-toolchain/ cp -r rv32m1_gnu_toolchain_patch/rv32m1_patches pulp-riscv-gnu-toolchain/ cd pulp-riscv-gnu-toolchain bash ./apply_rv32m1_patches.sh # Build the toolchain ./configure --prefix=/opt/riscv --with-arch=rv32imc --with-cmodel=medlow --enable- multilib make
Regards,
HowardApril 17, 2019 at 7:56 am #391Hi Jin,
I think this error is because of new version isl 0.20, please see the discussion here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724
This issue is fixed in GCC 7.4, the patch could be found here: https://github.com/gcc-mirror/gcc/commit/d6470854446446a4e8b3b958a00e5013ed86ae7f
You can try to apply the change then build.
Jason
-
AuthorPosts
You must be logged in to reply to this topic. Login here