p4ddy1 / pine_ox64

13 stars 3 forks source link

make build fails with error #4

Open jbrunk1966 opened 1 year ago

jbrunk1966 commented 1 year ago

updated all build tools and source before

$ brew update; brew upgrade
$ cd xuantie-gnu-toolchain
$ git pull --force
$ git submodule update --remote  --force --recursive  
$ make distclean
$ ./configure --prefix=/opt/riscv-toolchain/xuantie --with-cmodel=medany --enable-multilib --disable-gdb
$ make newlib -j$(nproc)

but the build still fails somewhere

g++   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -DGENERATOR_FILE -fno-PIE  -no-pie -o build/genautomata \
    build/genautomata.o build/rtl.o build/read-rtl.o build/ggc-none.o build/vec.o build/min-insn-modes.o build/gensupport.o build/print-rtl.o build/hash-table.o build/sort.o build/read-md.o build/errors.o ../build-arm-apple-darwin22.4.0/libiberty/libiberty.a -lm
clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
ld: warning: -no_pie is deprecated when targeting new OS versions
ld: warning: -no_pie ignored for arm64
build/genautomata ../.././riscv-gcc/gcc/common.md ../.././riscv-gcc/gcc/config/riscv/riscv.md \
  insn-conditions.md > tmp-automata.c
/bin/sh ../.././riscv-gcc/gcc/../move-if-change tmp-automata.c insn-automata.c
automatav=$(echo $(LC_MESSAGES=C csplit insn-automata.c /parallel\ compilation/ -k -s {20} -f insn-automata -b "%d.c" 2>&1));\
[ ! "$automatav" ] || grep "match not found" <<< $automatav
make[2]: *** [Makefile:2411: s-automata] Error 1
make[2]: Leaving directory '/Users/jbrunk/Development/riscv/xuantie-gnu-toolchain/build-gcc-newlib-stage1/gcc'
make[1]: *** [Makefile:4429: all-gcc] Error 2
make[1]: Leaving directory '/Users/jbrunk/Development/riscv/xuantie-gnu-toolchain/build-gcc-newlib-stage1'
make: *** [Makefile:553: stamps/build-gcc-newlib-stage1] Error 2
KenjutsuGH commented 1 year ago

I get the same error. Has anyone been able to resolve this?

Alternatively, has anyone been able to successfully build the tool chain and if so, will you be willing to upload/share it?

marchingband commented 1 year ago

@p4ddy1 you must have built it successfully ... are you willing to upload/share for us?

p4ddy1 commented 1 year ago

Did you install the GNU coreutils and included them in your PATH with export PATH=$(brew --prefix)/opt/coreutils/libexec/gnubin:$PATH before trying to compile the toolchain?

flyingcys commented 2 months ago

@p4ddy1 you must have built it successfully ... are you willing to upload/share for us?

You can download in https://github.com/flyingcys/xuantie-gnu-toolchain/releases

marchingband commented 2 months ago

@flyingcys Oh man, thank you!

Here are the steps I took to make it work:

make CHIP=bl616 BOARD=bl616dk now completes without errors. make flash CHIP=bl616 COMX=/dev/cu.usbserial-A50285BI also runs.

This make process is fairly slow, taking about 20 seconds on my M1. It produces:

Do i need all these? Is there any way to speed it up? It is 10x slower then the similar process on my X86 machine, which is a far slower machine.