Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] GCC for aarch64 (Read 109 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] GCC for aarch64

I am trying to rebuild gcc for aarch64 withPKGBUILD from ArchARM on aarch64 device. I get the following error:
Code: [Select]
g++ -std=gnu++98 -no-pie   -g -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o cc1plus \
      cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/class.o cp/constexpr.o cp/constraint.o cp/cp-gimplify.o cp/cp-objcp-common.o cp/cp-ubsan.o cp/cvt.o cp/cxx-pretty-print.o cp/decl.o cp/decl2.o cp/dump.o cp/error.o cp/except.o cp/expr.o cp/friend.o cp/init.o cp/lambda.o cp/lex.o cp/logic.o cp/mangle.o cp/method.o cp/name-lookup.o cp/optimize.o
cp/parser.o cp/pt.o cp/ptree.o cp/repo.o cp/rtti.o cp/search.o cp/semantics.o cp/tree.o cp/typeck.o cp/typeck2.o cp/vtable-class-hierarchy.o attribs.o incpath.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o aarch64-c.o glibc-c.o cc1plus-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -L/mnt/build/gcc/src/gcc-build/./isl/.libs  -lisl -lmpc -lmpfr -lgmp -rdynamic -ldl  -lz
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
make[3]: *** [/mnt/build/gcc/src/gcc/gcc/lto/Make-lang.in:81: lto1] Error 1
make[3]: *** Waiting for unfinished jobs....
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
make[3]: *** [/mnt/build/gcc/src/gcc/gcc/c/Make-lang.in:85: cc1] Error 1
make[3]: Leaving directory '/mnt/build/gcc/src/gcc-build/gcc'
make[2]: *** [Makefile:4619: all-stage1-gcc] Error 2
make[2]: Leaving directory '/mnt/build/gcc/src/gcc-build'
make[1]: *** [Makefile:25031: stage1-bubble] Error 2
make[1]: Leaving directory '/mnt/build/gcc/src/gcc-build'
make: *** [Makefile:946: all] Error 2
Are there any ideas what could cause it? I have also used Artix PKGBUILD with some modifications and got same error.
Building gcc on x86_64 machine works without problems.

Re: GCC for aarch64

Reply #1
ld terminated with signal 9
That's a low memory error when I searched it. Add more RAM or swap. Or it might be a CPU overload, make -jN or -lN could help.
If that isn't it, it might help to try another (older?) GCC version, build dep versions etc. on the assumption it must have worked in the past  :D


Re: GCC for aarch64

Reply #3
ld terminated with signal 9
That's a low memory error when I searched it. Add more RAM or swap. Or it might be a CPU overload, make -jN or -lN could help.
If that isn't it, it might help to try another (older?) GCC version, build dep versions etc. on the assumption it must have worked in the past  :D
Thanks! Adding swap allowed to pass this step. I will note when build process finishes.

Re: GCC for aarch64

Reply #4
It still failed later. I will try other version

Re: GCC for aarch64

Reply #5
New error:
Code: [Select]
libtool: compile:  /mnt/build/gcc/src/gcc-build/./gcc/gccgo -B/mnt/build/gcc/src/gcc-build/./gcc/ -B/usr/aarch64-unknown-linux-gnu/bin/ -B/usr/aarch64-unknown-linux-gnu/lib/
-isystem /usr/aarch64-unknown-linux-gnu/include -isystem /usr/aarch64-unknown-linux-gnu/sys-include -O2 -g -I . -c -fgo-pkgpath=go/ast /mnt/build/gcc/src/gcc/libgo/go/go/ast/ast.go /mnt/build/gcc/src/gcc/libgo/go/go/ast/commentmap.go /mnt/build/gcc/src/gcc/libgo/go/go/ast/filter.go /mnt/build/gcc/src/gcc/libgo/go/go/ast/import.go /mnt/build/gcc/src/gcc/libgo/go/go/ast/print.go /mnt/build/gcc/src/gcc/libgo/go/go/ast/resolve.go /mnt/build/gcc/src/gcc/libgo/go/go/ast/scope.go /mnt/build/gcc/src/gcc/libgo/go/go/ast/walk.go -o go/ast.o >/dev/null 2>&1
make[4]: *** [Makefile:3324: internal/trace.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/mnt/build/gcc/src/gcc-build/aarch64-unknown-linux-gnu/libgo'
make[3]: *** [Makefile:2690: all-recursive] Error 1
make[3]: Leaving directory '/mnt/build/gcc/src/gcc-build/aarch64-unknown-linux-gnu/libgo'
make[2]: *** [Makefile:1415: all] Error 2
make[2]: Leaving directory '/mnt/build/gcc/src/gcc-build/aarch64-unknown-linux-gnu/libgo'
make[1]: *** [Makefile:21199: all-target-libgo] Error 2
make[1]: Leaving directory '/mnt/build/gcc/src/gcc-build'
make: *** [Makefile:947: all] Error 2
It seems the problem is compiling go. Is it OK to disable gcc-go? gcc-ada is already disabled in ArchARM build


 

Re: GCC for aarch64

Reply #7
Disabling go support really solved the problem