OK. I'm wondering if for some reason the fix I put in is not effective.
Could you please try this in your build area: rm ./tools/gollvm/libgo/CMakeFiles/libgo_c_piclib.dir/__/gofrontend/libgo/go/syscall/errno.c.o ninja -v libgo_all and post the compile line for errno.c? Thanks, Than On Tue, May 26, 2020 at 7:21 AM Yuan Ting <yuant...@ict.ac.cn> wrote: > Yes, I'm sure I fetched the last version of gollvm, > i.e. 0edc44a02852dd0d56cac35163a45634b497d6cd > > On Tuesday, May 26, 2020 at 6:55:08 PM UTC+8, Than McIntosh wrote: >> >> Hello, >> >> The ld.gold error message looks a lot like one reported in a previous >> bug, https://github.com/golang/go/issues/38728. >> >> Can you please check to make sure that your client is sync'd past the CLs >> that fix this issue, e.g. 0edc44a02852dd0d56cac35163a45634b497d6cd. >> >> Thanks, Than >> >> >> On Mon, May 25, 2020 at 10:15 PM Yuan Ting <yuan...@ict.ac.cn> wrote: >> >>> I tried to build gollvm in a docker container (the image is based on >>> ubuntu 20.04, and the host OS is MacOS catalina). I configured llvm by >>> >>> SHELL=/bin/sh cmake -DCMAKE_BUILD_TYPE=Release >>> -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ASSERTIONS=On >>> -DLLVM_ENABLE_RTTI=On -DLLVM_USE_LINKER=gold -G Ninja ../llvm >>> >>> and then build and install gollvm by >>> >>> ninja gollvm && ninja install-gollvm >>> >>> after a while, I encountered >>> >>> ... >>> >>> error: At most two relocations per offset are supported >>> >>> error: At most two relocations per offset are supported >>> >>> error: At most two relocations per offset are supported >>> >>> [212/1279] Creating >>> /root/llvm-project/build-debug/tools/gollvm/libgo/tmp-sigtab.go >>> >>> FAILED: tools/gollvm/libgo/tmp-sigtab.go >>> >>> cd /root/llvm-project/build-debug/tools/gollvm/libgo && GOARCH=amd64 >>> GOOS=linux /bin/sh >>> /root/llvm-project/llvm/tools/gollvm/libgo/capturescript.sh >>> /root/llvm-project/llvm/tools/gollvm/gofrontend/libgo/mksigtab.sh >>> /root/llvm-project/build-debug/tools/gollvm/libgo/tmp-sigtab.go >>> >>> error: no SHELL setting >>> >>> [214/1279] Creating >>> /root/llvm-project/build-debug/tools/gollvm/libgo/tmp-sysinfo.go >>> >>> ninja: build stopped: subcommand failed. >>> >>> >>> By add SHELL=/bin/sh, the errors above seems to be skipped but another >>> period of time: >>> >>> >>> ... >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libgo_c_piclib.dir/__/gofrontend/libgo/go/syscall/errno.c.o: >>> failed to match split-stack sequence at section 4 offset 0 >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libgo_c_piclib.dir/__/gofrontend/libgo/go/syscall/errno.c.o: >>> failed to match split-stack sequence at section 6 offset 0 >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libgo_c_piclib.dir/__/gofrontend/libgo/go/syscall/signame.c.o: >>> failed to match split-stack sequence at section 5 offset 0 >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libbacktrace_piclib.dir/libbacktrace/backtrace.c.o: >>> failed to match split-stack sequence at section 4 offset 0 >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libbacktrace_piclib.dir/libbacktrace/backtrace.c.o: >>> failed to match split-stack sequence at section 6 offset 0 >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libbacktrace_piclib.dir/libbacktrace/dwarf.c.o: >>> failed to match split-stack sequence at section 18 offset 0 >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libbacktrace_piclib.dir/libbacktrace/dwarf.c.o: >>> failed to match split-stack sequence at section 79 offset 0 >>> >>> ... >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/ffi64.c.o: >>> failed to match split-stack sequence at section 22 offset 0 >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/ffi64.c.o: >>> failed to match split-stack sequence at section 26 offset 0 >>> >>> /usr/bin/ld.gold: error: >>> tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/ffiw64.c.o: >>> failed to match split-stack sequence at section 16 offset 0 >>> >>> collect2: error: ld returned 1 exit status >>> >>> [901/1066] Linking C static library tools/gollvm/libgo/libgo.a >>> >>> ninja: build stopped: subcommand failed. >>> >>> >>> I'm not sure the error is caused by the container environment or my >>> configurations/other prerequisites. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "golang-nuts" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to golan...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/golang-nuts/23309451-cb0a-4f7b-93a1-27038187302a%40googlegroups.com >>> <https://groups.google.com/d/msgid/golang-nuts/23309451-cb0a-4f7b-93a1-27038187302a%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/1ffd3fb4-e739-4f13-9168-565e4c64bc70%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/1ffd3fb4-e739-4f13-9168-565e4c64bc70%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2BUr55Gc1vENW7pfYZdpBdGWVPqxktT8rgqhT3tdjLax_Mxc0Q%40mail.gmail.com.