Hello Than, when I using ninja to build gollvm, just like % cmake -DCMAKE_INSTALL_PREFIX=/home/yt/LLVMsvn/install - DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=gold -G "Ninja" ../llvm % ninja gollvm
the build system still reports an error: ninja: error: '/home/yt/LLVMsvn/llvm-project/llvm/tools/gollvm/gotools/buildid.go', needed by 'tools/gollvm/gotools/buildid', missing and no known rule to make it I notice that some warnings are raised during the configuration like: /home/yt/LLVMsvn/llvm-project/llvm/tools/gollvm/gofrontend/libgo/match.sh:138: no such file or directory: action.go build.go buildid.go exec.go gc.go gccgo.go init.go security.go testgo.go Is there something I missing ? 在 2019年5月7日星期二 UTC+8下午9:48:48,Than McIntosh写道: > > Hello, > For the gollvm build ninja is recommended (using "make" is untested and I > doubt if it will work). > Thanks, Than > > > On Tue, May 7, 2019 at 9:27 AM <yuan...@ict.ac.cn <javascript:>> wrote: > >> I try to build gollvm on ubuntu(x64) following these commands in >> https://go.googlesource.com/gollvm/ : >> >> % cd workarea >> % mkdir build-debug >> % cd build-debug >> % cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=gold ../llvm >> ... >> % make gollvm -j4 >> ... >> % >> >> but I got >> >> -- Targeting X86 >> -- starting libgo configuration. >> /home/yt/LLVMsvn/llvm-project/llvm/tools/gollvm/gofrontend/libgo/match.sh >> :138: no such file or directory: common.go format.go reader.go >> stat_actime1.go stat_actime2.go stat_unix.go strconv.go writer.go >> /home/yt/LLVMsvn/llvm-project/llvm/tools/gollvm/gofrontend/libgo/match.sh >> :138: no such file or directory: reader.go register.go struct.go writer. >> go >> ...... >> -- Performing Test HAVE_STEADY_CLOCK -- success >> -- Configuring done >> -- Generating done >> -- Build files have been written to: /home/yt/LLVMsvn/llvm-project/debug >> ... >> [ 0%] Built target LLVMDemangle >> [ 0%] Built target GoDumpSpecMacroParser >> ... >> [ 50%] Building Go package 'runtime' (non-PIC) >> /home/yt/LLVMsvn/llvm-project/debug/tools/gollvm/libgo/sigtab.go:5:21: >> error: use of undefined type 'sigTabT' >> /home/yt/LLVMsvn/llvm-project/debug/tools/gollvm/libgo/sigtab.go:7:12: >> error: reference to undefined name '_SigNotify' >> /home/yt/LLVMsvn/llvm-project/debug/tools/gollvm/libgo/sigtab.go:7:25: >> error: reference to undefined name '_SigKill' >> /home/yt/LLVMsvn/llvm-project/debug/tools/gollvm/libgo/sigtab.go:8:12: >> error: reference to undefined name '_SigNotify' >> ... >> tools/gollvm/libgo/CMakeFiles/libgo_runtime.dir/build.make:64: recipe for >> target 'tools/gollvm/libgo/runtime.o' failed >> make[3]: *** [tools/gollvm/libgo/runtime.o] Error 3 >> CMakeFiles/Makefile2:16487: recipe for target >> 'tools/gollvm/libgo/CMakeFiles/libgo_runtime.dir/all' failed >> make[2]: *** [tools/gollvm/libgo/CMakeFiles/libgo_runtime.dir/all] Error >> 2 >> CMakeFiles/Makefile2:11625: recipe for target >> 'tools/gollvm/CMakeFiles/gollvm.dir/rule' failed >> make[1]: *** [tools/gollvm/CMakeFiles/gollvm.dir/rule] Error 2 >> Makefile:3475: recipe for target 'gollvm' failed >> make: *** [gollvm] Error 2 >> >> I have no idea about this problem. Should I switch make to ninja (like >> the document said)? >> >> >> -- >> 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 <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/4529d46b-caf4-475f-bcda-273c1bca5016%40googlegroups.com >> >> <https://groups.google.com/d/msgid/golang-nuts/4529d46b-caf4-475f-bcda-273c1bca5016%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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/ed517fe7-e180-4d0b-b134-f8ee76427ebf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.