> Do you have tools/gollvm/libgo/zgoarch.go.tmp in your build area? What sort of content is in that file?
No $ ninja -v -d explain tools/gollvm/libgo/zgoarch.go ninja: error: unknown target 'tools/gollvm/libgo/zgoarch.go' $ gcc -dumpmachine x86_64-pc-linux-gnu $ clang -dumpmachine x86_64-pc-linux-gnu I tried manually setting up different target triples (for example the same as on a working machine) but it did not help. чт, 20 окт. 2022 г. в 15:48, Than McIntosh <th...@google.com>: > >There is no zgoarch.go file in the build area. It seems that it was not > created by the build system. > > I've oversimplified things a bit -- what cmake does is write > out tools/gollvm/libgo/zgoarch.go.tmp, and then add a build rule > for zgoarch.go that copies the *.tmp file to the *.go file if they are > different. > > Do you have tools/gollvm/libgo/zgoarch.go.tmp in your build area? What > sort of content is in that file? What happens when you do > > $ ninja -v -d explain tools/gollvm/libgo/zgoarch.go > > You should see something like > > ninja explain: output tools/gollvm/libgo/zgoarch.go doesn't exist > [1/1] cd /x/llvm-project/build-relwithdbg/tools/gollvm/libgo && > /usr/bin/cmake -E copy_if_different > /x/llvm-project/build-relwithdbg/tools/gollvm/libgo/zgoarch.go.tmp > /x/llvm-project/build-relwithdbg/tools/gollvm/libgo/zgoarch.go > > Thanks, Than > > > > > On Wed, Oct 19, 2022 at 5:42 PM Alex Markin <alexan...@gmail.com> wrote: > >> There is no zgoarch.go file in the build area. It seems that it was not >> created by the build system. I watched the logs and there were no lines to >> create it. In the directory libgo I have only the following *go files: >> >> epoll.go goroot.go libcalls.go syscall_arch.go tmp-libcalls.go >> >> So I can't understand why the rule for zgoarch is not called. Probably >> some env variable? >> >> ср, 19 окт. 2022 г. в 16:47, Than McIntosh <th...@google.com>: >> >>> Hi, >>> >>> Those constants are supposed to be defined in the generated file >>> <buildarea>/tools/gollvm/libgo/zgoarch.go, which is written as out part of >>> the gollvm build process, e.g. here >>> >>> >>> https://go.googlesource.com/gollvm/+/253c122ed62d5e9a32a9806e83c47a389a6435bf/cmake/modules/AutoGenGo.cmake#63 >>> >>> What does the zgoarch.go file look like in your build area? >>> >>> Thanks, Than >>> >>> >>> On Wed, Oct 19, 2022 at 8:20 AM Alex Markin <alexan...@gmail.com> wrote: >>> >>>> Hello. >>>> >>>> I'm trying to build gollvm on my gentoo system and get the following >>>> error: >>>> >>>> FAILED: tools/gollvm/libgo/internal/.pic/goarch.o >>>> /home/alex/test/gollvm/build-debug/tools/gollvm/libgo/internal/.pic/goarch.o >>>> >>>> cd /home/alex/test/gollvm/build-debug/tools/gollvm/libgo && >>>> /usr/bin/cmake -E make_directory ./internal/.pic && >>>> /home/alex/test/gollvm/build-debug/./bin/llvm >>>> -goc -c -o >>>> /home/alex/test/gollvm/build-debug/tools/gollvm/libgo/internal/.pic/goarch.o >>>> -fPIC -fgo-pkgpath=internal/goarch -I . /home/alex/test/gollvm/llvm-p >>>> roject/llvm/tools/gollvm/gofrontend/libgo/go/internal/goarch/goarch.go >>>> /home/alex/test/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/goarch/goarch.go:15:35: >>>> error: reference to undefined name '_ArchFamily' >>>> /home/alex/test/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/goarch/goarch.go:18:19: >>>> error: reference to undefined name '_BigEndian' >>>> /home/alex/test/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/goarch/goarch.go:21:29: >>>> error: reference to undefined name '_DefaultPhysPa >>>> geSize' >>>> /home/alex/test/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/goarch/goarch.go:25:19: >>>> error: reference to undefined name '_PCQuantum' >>>> /home/alex/test/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/goarch/goarch.go:28:20: >>>> error: reference to undefined name '_Int64Align' >>>> /home/alex/test/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/goarch/goarch.go:35:22: >>>> error: reference to undefined name '_MinFrameSize' >>>> /home/alex/test/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/goarch/goarch.go:39:20: >>>> error: reference to undefined name '_StackAlign' >>>> >>>> What can be the reason of such error? On another ubuntu system >>>> everything goes correctly. >>>> >>>> The cmake line: >>>> >>>> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ >>>> -DCMAKE_C_COMPILER=clang -G Ninja ../llvm-project/llvm >>>> >>>> -- >>>> 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/9ad0d8dc-d118-45d2-984e-9cdf36ab4f28n%40googlegroups.com >>>> <https://groups.google.com/d/msgid/golang-nuts/9ad0d8dc-d118-45d2-984e-9cdf36ab4f28n%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/CAAgqtbWP%3D7Y9Q5Kh8791USRMRdXEEmP%3D%2BBsFqj%2Bg6hr21owwWQ%40mail.gmail.com.